Files
ai-agent/internal/bootstrap/banner.go
T
mlogclub 5d7c10aeab refactor: rename agent widget references to AI agent for consistency
- 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.
2026-05-30 21:19:36 +08:00

44 lines
738 B
Go

package bootstrap
import (
"fmt"
"io"
"os"
"cs-ai-agent/internal/pkg/config"
)
func printBanner() {
printBannerTo(os.Stdout, config.Current())
}
func printBannerTo(w io.Writer, cfg config.Config) {
_, _ = fmt.Fprint(w, renderBanner(cfg))
}
func renderBanner(cfg config.Config) string {
port := cfg.Server.Port
if port <= 0 {
port = 8080
}
dbType := cfg.DB.Type
if dbType == "" {
dbType = "unknown"
}
return fmt.Sprintf(`
____ _ _ _ _ ___
/ ___|| |__ ___| | | / \ |_ _|
\___ \| '_ \ / _ \ | | / _ \ | |
___) | | | | __/ | | / ___ \ | |
|____/|_| |_|\___|_|_| /_/ \_\___|
:: Shell AI ::
Port : %d
DB : %s
Address : http://127.0.0.1:%d
`, port, dbType, port)
}