Skip to content

feat(chat): move conversations to another workspace (single & batch) - #356

Open
devil233-ui wants to merge 1 commit into
Stack-Cairn:mainfrom
devil233-ui:feat/move-conversations-between-workspaces
Open

feat(chat): move conversations to another workspace (single & batch)#356
devil233-ui wants to merge 1 commit into
Stack-Cairn:mainfrom
devil233-ui:feat/move-conversations-between-workspaces

Conversation

@devil233-ui

@devil233-ui devil233-ui commented Aug 1, 2026

Copy link
Copy Markdown

Summary

Conversations are permanently bound to the workspace (cwd) selected at creation time, with no way to re-file them afterwards (see #348). This PR adds a "Move to workspace" action for a single conversation plus a batch move in multi-select mode.

Changes

Backend (agent-gui/src-tauri)

  • New Tauri command chat_history_set_cwd(id, cwd) that updates chatHistory.cwd and broadcasts a history sync (mirrors chat_history_set_pinned).
  • Unit tests covering: moving a conversation between workspaces (and the resulting workdirs grouping), rejecting empty targets, and rejecting missing conversations.

Frontend (agent-gui/src)

预览
  • setChatHistoryCwd(id, cwd) IPC wrapper in chatHistory.ts.
  • Conversation context menu now includes a "Move to workspace" submenu listing available workspaces (excludes the current one).
  • Multi-select mode gains a batch move button (folder icon) that moves all selected conversations to a chosen workspace, reusing the existing selection mechanism (parallel to bulk delete).
  • i18n keys added for zh-CN and en.

Verified

  • cargo test -p liveagent set_cwd — 2/2 pass
  • cargo check — clean
  • pnpm exec tsc --noEmit — clean
  • pnpm exec biome check on changed files — clean
  • Manually tested in the desktop GUI: single-conversation move and batch move both work; sidebar re-groups immediately without restart.

Closes #348 (feature request).

- 后端新增 chat_history_set_cwd 命令:更新会话的 cwd 归属并广播历史同步
- 前端新增 chat_history_set_cwd IPC 封装与 setChatHistoryCwd API
- 侧边栏会话右键菜单新增"移动到工作空间"子菜单,列出可用工作空间
- 多选模式下新增"批量移动到工作空间"按钮,复用现有选择机制
- 新增后端单元测试覆盖移动归属与边界校验
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR governance checks passed. Awaiting human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: move/reassign conversations between workspaces

1 participant