feat(server): add localized agent starter config endpoint
Add a public GET /api/ui/agent-starters endpoint returning localized empty-state content (title, description, preview images, and starter prompts) for the canvas Agent panel. Content is server-configurable via AgentStarter config with built-in zh-CN/en-US fallbacks, and the route is exempt from authentication so shared canvases render the same content. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,9 +15,28 @@ type Config struct {
|
||||
Auth AuthConfig
|
||||
Sharing SharingConfig
|
||||
Agent AgentConfig
|
||||
AgentStarter AgentStarterConfig
|
||||
ObjectStorage ObjectStorageConfig
|
||||
}
|
||||
|
||||
type AgentStarterConfig struct {
|
||||
PreviewImages []string `json:",optional"`
|
||||
ZhCN AgentStarterLocaleConfig
|
||||
EnUS AgentStarterLocaleConfig
|
||||
}
|
||||
|
||||
type AgentStarterLocaleConfig struct {
|
||||
Title string `json:",optional"`
|
||||
Description string `json:",optional"`
|
||||
Starters []AgentStarterItemConfig `json:",optional"`
|
||||
}
|
||||
|
||||
type AgentStarterItemConfig struct {
|
||||
ID string `json:",optional"`
|
||||
Label string `json:",optional"`
|
||||
Prompt string `json:",optional"`
|
||||
}
|
||||
|
||||
type SharingConfig struct {
|
||||
EncryptionSecret string `json:",optional"`
|
||||
EncryptionSecretEnv string `json:",default=SHARING_ENCRYPTION_SECRET"`
|
||||
|
||||
Reference in New Issue
Block a user