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:
@@ -77,6 +77,19 @@ type AgentPreferToolCategories struct {
|
||||
Image []string `json:"IMAGE,optional"`
|
||||
}
|
||||
|
||||
type AgentStarterConfigResponse struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
PreviewImages []string `json:"previewImages"`
|
||||
Starters []AgentStarterItem `json:"starters"`
|
||||
}
|
||||
|
||||
type AgentStarterItem struct {
|
||||
Id string `json:"id"`
|
||||
Label string `json:"label"`
|
||||
Prompt string `json:"prompt"`
|
||||
}
|
||||
|
||||
type AgentThreadListRequest struct {
|
||||
ProjectId string `json:"projectId"`
|
||||
Page int64 `json:"page,optional"`
|
||||
@@ -545,6 +558,10 @@ type GeneratorTaskSubmitResponse struct {
|
||||
Data GeneratorTaskSubmitData `json:"data"`
|
||||
}
|
||||
|
||||
type GetAgentStarterConfigRequest struct {
|
||||
Locale string `form:"locale,optional"`
|
||||
}
|
||||
|
||||
type GlobalEmailLoginRequest struct {
|
||||
Email string `json:"email"`
|
||||
Code string `json:"code"`
|
||||
|
||||
Reference in New Issue
Block a user