refactor: merge agent workbench into chat
This commit is contained in:
@@ -2,19 +2,17 @@
|
||||
|
||||
## Scope
|
||||
|
||||
This deliverable adds the desktop UI shell and local interactions for Agent Workbench, and connects Agent mode to the existing desktop Agent command path. It intentionally avoids new Rust commands, database tables, billing, and remote media generation until the page contract is stable.
|
||||
This deliverable adds the desktop Chat empty-state creator composer and local interactions for Agent Workbench, and connects Agent mode to the existing desktop Agent command path. It intentionally avoids new Rust commands, database tables, billing, and remote media generation until the page contract is stable.
|
||||
|
||||
## Frontend Boundaries
|
||||
|
||||
- `types/index.ts` owns the `PageKey` addition.
|
||||
- `components/layout/Sidebar.tsx` owns navigation entry placement.
|
||||
- `components/layout/ContentArea.tsx` owns routing from `PageKey` to page component.
|
||||
- `pages/AgentWorkbenchPage.tsx` owns the creator composer, local attachment state, mode state, model selection, Agent handoff, and placeholder result/status for media modes.
|
||||
- `components/chat/AgentWorkbenchComposer.tsx` owns the creator composer, local attachment state, mode state, model selection, Agent handoff, and placeholder result/status for media modes.
|
||||
- `components/chat/ChatView.tsx` renders the composer in the Chat empty state and keeps the normal Chat input for existing conversations.
|
||||
- `stores/providerStore.ts` remains the source of provider/model data. The page reads `providers` and calls `fetchProviders`; it does not duplicate provider fetching logic.
|
||||
- `stores/conversationStore.ts` remains the source for conversation creation and Agent streaming. The Workbench reuses `createConversation`, `updateConversation`, and `sendAgentMessage`.
|
||||
- `stores/skillStore.ts` remains the source for skill installation/listing. The Workbench reuses `loadSkills`, `installSkill`, and `toggleSkill` for third-party skills.
|
||||
- `lib/browserMock.ts` mirrors skill install/list/toggle enough for browser preview.
|
||||
- `i18n/locales/*.json` owns navigation labels. The first page UI can use Chinese literal copy to match current product direction, but nav should use locale keys.
|
||||
- The first composer UI can use Chinese literal copy to match current product direction; it does not add a standalone nav label.
|
||||
|
||||
## Data Flow
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Implementation Plan
|
||||
|
||||
1. Add `agent-workbench` to desktop page types, sidebar nav, content routing, and nav locale files.
|
||||
2. Create `AgentWorkbenchPage.tsx` with:
|
||||
1. Integrate Agent Workbench into the existing Chat empty state instead of adding a standalone `agent-workbench` page/nav module.
|
||||
2. Create `components/chat/AgentWorkbenchComposer.tsx` with:
|
||||
- mode definitions
|
||||
- provider-derived model options
|
||||
- custom model fallback
|
||||
@@ -30,3 +30,4 @@
|
||||
- `pnpm --dir desktop exec tsc --noEmit` passed after bundling built-in skills.
|
||||
- `pnpm --dir desktop run build` passed after bundling built-in skills.
|
||||
- `cargo check -p open-agent-sdk --manifest-path desktop/src-tauri/Cargo.toml` passed after bundling built-in skills.
|
||||
- `pnpm --dir desktop exec tsc --noEmit` passed after merging Agent Workbench into Chat.
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
## Goal
|
||||
|
||||
Add a first usable Agent Workbench entry to the desktop client so users can start from the same creator-style surface used in the BoosAPI web UI: choose a creation mode, select a model, attach references, and type a prompt.
|
||||
Merge the first usable Agent Workbench creator surface into the desktop Chat entry so users start from one conversation-first screen: choose a creation mode, select a model, attach references, and type a prompt.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Add an Agent Workbench page to the desktop navigation without disrupting existing Chat, Drawing, Skills, Knowledge, Memory, Gateway, Files, or Settings flows.
|
||||
- Integrate the Agent Workbench composer into the existing Chat page instead of adding a separate Agent navigation module.
|
||||
- The first screen should match the creator-composer direction: centered prompt, large input surface, upload affordance, creation mode selector, auto toggle, model selector, skills button, subject button, and submit button.
|
||||
- Creation modes must include at least Agent, image generation, video generation, music generation, voice generation, digital human, and action imitation. Unsupported modes may show “coming soon” copy but must remain selectable.
|
||||
- Agent mode should expose a conversation model selector populated from existing enabled desktop provider models where possible, with a custom model fallback.
|
||||
- Upload affordance should accept local reference files, display removable attachment chips, and pass attachments into existing Agent chat flow when Agent mode submits.
|
||||
- The page must follow the desktop app’s existing React/Ant Design/Zustand conventions and be reachable from the sidebar.
|
||||
- The composer must follow the desktop app’s existing React/Ant Design/Zustand conventions and remain reachable through the Chat sidebar entry.
|
||||
- The implementation must avoid new backend schema. Existing Tauri commands may be reused.
|
||||
- The Workbench skills menu should expose a JianYing/剪映 automation entry that installs/enables `luoluoluo22/jianying-editor-skill` through the existing Desktop skills system and primes the Agent prompt.
|
||||
- Desktop should bundle the first-party curated skill pack in the project so JianYing, Seedance, DWG/CAD, and PPT skills are available even when the online `skills.sh` market does not return them.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [x] Sidebar contains an Agent Workbench entry and selecting it renders the new page.
|
||||
- [x] Chat empty state contains the Agent Workbench composer; no separate Agent Workbench sidebar entry is required.
|
||||
- [x] Agent Workbench page has a centered creator composer with mode dropdown, model control, upload button, `@` subject popover, and submit button.
|
||||
- [x] Available chat models are derived from existing enabled desktop providers/models, with a custom model option.
|
||||
- [x] Selecting a mode updates the composer label and mode-specific model controls where applicable.
|
||||
|
||||
Reference in New Issue
Block a user