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:
@@ -307,6 +307,23 @@ type DashboardResponse {
|
||||
Inspiration []InspirationItem `json:"inspiration"`
|
||||
}
|
||||
|
||||
type GetAgentStarterConfigRequest {
|
||||
Locale string `form:"locale,optional"`
|
||||
}
|
||||
|
||||
type AgentStarterItem {
|
||||
Id string `json:"id"`
|
||||
Label string `json:"label"`
|
||||
Prompt string `json:"prompt"`
|
||||
}
|
||||
|
||||
type AgentStarterConfigResponse {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
PreviewImages []string `json:"previewImages"`
|
||||
Starters []AgentStarterItem `json:"starters"`
|
||||
}
|
||||
|
||||
type ProjectListResponse {
|
||||
Projects []ProjectSummary `json:"projects"`
|
||||
NextOffset int64 `json:"nextOffset"`
|
||||
@@ -1007,6 +1024,9 @@ service img_infinite_canvas-api {
|
||||
@handler dashboard
|
||||
get /dashboard returns (DashboardResponse)
|
||||
|
||||
@handler getAgentStarterConfig
|
||||
get /ui/agent-starters (GetAgentStarterConfigRequest) returns (AgentStarterConfigResponse)
|
||||
|
||||
@handler getAuthOptions
|
||||
get /auth/options returns (AuthOptionsResponse)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user