5d7c10aeab
- Updated runtime configuration to use __CS_AI_AGENT_WIDGET_CONFIG__ instead of __CS_AGENT_WIDGET_CONFIG__. - Changed message types in support host bridge from "cs-agent" to "cs-ai-agent". - Minified SDK script updated to reflect new AI agent naming conventions. - Adjusted scrollbar styles in main.scss to use .cs-ai-agent-scrollbar instead of .cs-agent-scrollbar.
33 lines
668 B
Go
33 lines
668 B
Go
package main
|
|
|
|
import (
|
|
"log/slog"
|
|
|
|
"cs-ai-agent/internal/bootstrap"
|
|
"cs-ai-agent/internal/pkg/config"
|
|
"cs-ai-agent/internal/pkg/logx"
|
|
)
|
|
|
|
func main() {
|
|
cfg, err := config.Load("config/config.yaml")
|
|
if err != nil {
|
|
slog.Error("load config failed", "error", err)
|
|
return
|
|
}
|
|
logx.Init(logx.Config{
|
|
Level: cfg.Logger.Level,
|
|
Format: cfg.Logger.Format,
|
|
AddSource: cfg.Logger.AddSource,
|
|
})
|
|
|
|
if _, err = bootstrap.InitDB(cfg.DB); err != nil {
|
|
slog.Error("init db failed", "error", err)
|
|
return
|
|
}
|
|
if err = bootstrap.InitMigrations(); err != nil {
|
|
slog.Error("run migrations failed", "error", err)
|
|
return
|
|
}
|
|
slog.Info("migrations completed")
|
|
}
|