Skip to content

feat(chat): add native session context and data-only plugin groups - #2648

Merged
Tioit-Wang merged 4 commits into
feat/2645-plugin-gated-collaboration-sidebarfrom
feat/2646-session-context
Nov 29, 2026
Merged

Tioit-Wang merged 4 commits into
feat/2645-plugin-gated-collaboration-sidebarfrom
feat/2646-session-context

Conversation

@Tioit-Wang

@Tioit-Wang Tioit-Wang commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary / 概要

2/3 · 依赖 #2647;本 PR 以其分支为基线。请先合并 #2647,再将本 PR 对准 main。

在消息区域右上增加一张会话上下文卡片。分支、提交历史、当前会话改动和 Task 子代理四类信息全部原生实现,不依赖 Git、文件管理器或协作插件。分支打开当前 checkout 的历史;提交打开其详情;文件聚焦所属会话的 Review 快照;子代理打开对应的执行记录。非 Git、远程、不支持的会话或没有数据时不虚构记录。

宽度依据实际消息列而非整个窗口:可用宽度 ≥880px 时卡片与消息并列,否则收为图标并按需悬浮。支持键盘、Escape、点击外部及焦点恢复。切换会话会丢弃过期请求,隐藏窗格不读取。

普通插件可声明 contributes.contextCards 和专用 ui.contextCards 权限;只接收有界文本条目。宿主负责渲染,按会话、插件加载代次和作用域校验点击,不能运行任意命令或注入 DOM。默认预览 3 条;有 onAction 则 全部 N 执行本组动作,否则原地展开。一个插件失效不影响其他组。

Requirement link / 需求关联

Verification

  • 候选 fcfd91270ea3,main 44b06ef0c468,stack base 0693fe4d4dfe;Windows / Node 22.19 / Electron 43.6。
  • pnpm build:js、Desktop typecheck、lint、架构检查、docs:check / docs:build、Rust fmt / Clippy。原生 Git、实际隔离 checkout、Review RPC、SDK/DevKit、插件子进程和 Electron 交互测试通过。
  • 候选 smoke(2 个真实模型场景未运行)、启动、协作与 transcript E2E;实际官方插件子进程和临时 Rust Host 台账联调,验证选项 → worker → 创建者及卸载。
  • 环境基线:Windows 全量 Rust 在叠加前结果为 1368 通过、9 失败、1 忽略;9 个失败均在干净 main 44b06ef0c468 上逐项重现,涉及路径迁移、旧插件 ID、远程工具和项目移动。没有改动无关路径或放宽断言。最终叠加候选的相关 Rust 检查通过。

Follow-up

3/3 的官方插件 PR #4 注册侧栏门控及卡片分组。仅创建 PR,不在此发布插件或合并。

Keep branch history, recorded changes, and Task delegations available
without extensions. A single pane-width-aware card links to each native
destination without forcing a narrow conversation into another column.

Plugins can add bounded text groups through their own process. Bind
reads and navigation to the selected session and load generation so
switching sessions or unloading a plugin cannot replay stale actions.

Refs #2646
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0654e1a
Status: ✅  Deploy successful!
Preview URL: https://cf8fe691.pi-desktop.pages.dev
Branch Preview URL: https://feat-2646-session-context.pi-desktop.pages.dev

View logs

Tioit-Wang and others added 3 commits November 30, 2026 00:50
…tion-sidebar' into feat/2646-session-context-merge
)

* feat(sidebar): group workers only for registered collaboration plugins

Keep ordinary sessions flat unless a loaded, in-scope plugin opts in.
Use bounded host creation links, not titles or plugin-provided trees, so
folding a group never removes access to a worker that needs attention.

Refs #2645

* docs(sidebar): index the worker hierarchy decision

Record the opt-in and fallback trade-offs in the standard ADR sections
so the decision is discoverable in the published documentation.
@Tioit-Wang
Tioit-Wang merged commit 14e4ac7 into feat/2645-plugin-gated-collaboration-sidebar Nov 29, 2026
7 checks passed
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