Skip to content

feat(sidebar): 新增项目分区【已审核 PR】 - #2041

Open
Andreaseszhang wants to merge 2 commits into
proma-ai:mainfrom
Andreaseszhang:feat/sidebar-project-sections-202609100105
Open

Andreaseszhang wants to merge 2 commits into
proma-ai:mainfrom
Andreaseszhang:feat/sidebar-project-sections-202609100105

Conversation

@Andreaseszhang

Copy link
Copy Markdown
Contributor

概述

为 Agent 侧栏新增一级项目分区能力,支持创建、重命名、排序、折叠,以及将项目移动到分区或默认项目区域。分区仅影响侧栏组织,不改变项目与会话的核心生命周期。

改动

  • apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx — 增加项目分区展示、折叠、拖拽排序、创建/重命名/解散交互,以及项目移动入口。
  • apps/electron/src/renderer/components/app-shell/sidebar-section-operations.ts — 提取分区操作的并发门禁、目标解析和辅助逻辑。
  • apps/electron/src/main/lib/agent-workspace-manager.ts — 增加分区索引、顺序持久化、项目分区归属更新与删除迁移逻辑。
  • apps/electron/src/main/ipc.ts — 注册分区查询、创建、更新、删除、排序 IPC,并扩展项目更新参数。
  • apps/electron/src/preload/index.ts — 暴露分区相关安全 IPC API。
  • packages/shared/src/types/agent.ts — 增加分区、项目更新和 IPC 契约类型。
  • apps/electron/package.json / packages/shared/package.json — 更新对应 patch 版本。

测试方法

  1. 运行 bun run --cwd apps/electron typecheck
  2. 在侧栏创建、重命名、折叠和排序项目分区。
  3. 将项目拖入分区、移回默认项目区域,并验证重启后分区状态保留。
  4. 解散分区并验证项目迁移到选择的目标区域。

备注

  • 本次提交不包含测试文件。
  • 已删除此前误加入的生命周期修复及其测试文件;该 PR 仅包含侧栏项目分区相关改动。

Made with Proma · GitHub

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.

1 participant