101577f163
- Updated import paths in multiple service files to reflect the new agent-desk module. - Added a new configuration file for agent-desk in the Docker setup.
44 lines
737 B
Go
44 lines
737 B
Go
package bootstrap
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"os"
|
|
|
|
"agent-desk/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)
|
|
}
|