Add agent workflow engine foundation and theme-style page switcher.

Introduce WorkflowEngine with state machine, tool registry, and builtin chat template; migrate stream chat to engine callbacks. Move page mode switching to TopBar actions cluster as a ThemeToggle-style dropdown (聊天/工作室/爽文/房间).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 02:30:43 +08:00
parent d6745b45a5
commit bc130d98f4
24 changed files with 1164 additions and 614 deletions

View File

@@ -215,6 +215,10 @@ class ChatHeader(BaseModel):
messageCount: int = Field(0, description="消息数量")
ragLibraryId: Optional[str] = Field(None, description="关联的 RAG 历史消息库 ID")
# Agent workflow engine (optional, backward compatible)
workflowTemplateId: Optional[str] = Field(None, description="工作流模板 ID")
engineRunId: Optional[str] = Field(None, description="最近一次引擎运行 ID")
class ChatMessage(BaseModel):
"""