Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

docs: sync missing documentation after merging 8 fix PRs (#976)

Lan5d4545288639
diff --git a/docs/adr/0255-theme-assets-by-absolute-path.md b/docs/adr/0255-theme-assets-by-absolute-path.md
index 4550fd9d3..eaa1c6cb3 100644
--- a/docs/adr/0255-theme-assets-by-absolute-path.md
+++ b/docs/adr/0255-theme-assets-by-absolute-path.md
@@ -64,6 +64,10 @@ itself could read.
- Themes that declared package-relative assets stop resolving. This is a
deliberate breaking change; the affected surface is limited to themes that use
`assets` at all.
+- The plugin devkit (`pi-plugin check`) rejects package-relative theme assets at
+ author time with the `theme.asset-package-relative` diagnostic, preventing a
+ package from passing validation only to fail installation on every user's
+ machine.
- `resolveInsidePlugin` remains for the theme sheet path itself
(`contributes.themes[].path`), which is still package-relative.
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index 8f2cabff8..474a5ae24 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -3109,7 +3109,10 @@ Anatomy:
transient state, and submits it separately from visible text. Main stores
image bytes under `attachments/<sha256>` and sends visual input only when the
selected model's effective binding capability accepts images and the 10 MB
- inline bound is met; otherwise it appends a safe `@path` fallback. Removing
+ inline bound is met; otherwise it appends a safe `@path` fallback. SVG inputs
+ (`image/svg+xml` or `.svg` extension) are always classified as files, never
+ as model images, regardless of vision capability (see
+ `03-runtime/svg-attachment-input.md`). Removing
a chip does not delete
scratch bytes. A text-only paste longer than `largePasteThreshold` follows
the same bounded session bridge with generated `text/plain` UTF-8 bytes,
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 4f251c0d6..8b25c2fe5 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -7152,6 +7152,30 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.
- **Status**: Unit-covered (`model-capabilities.test.ts`, host-core attachment
roundtrip); provider/UI journey Draft (run only in a capable environment when this surface changes)
+#### E2E-ATTACHMENTS-svg-file-fallback: SVG inputs are sent as files, not model images
+
+- **Preconditions**: A vision-capable model; an Agent session; one SVG file
+ (clipboard paste or native file picker) and one PNG.
+- **Steps**:
+ 1. Paste or attach an SVG file into Composer alongside a PNG.
+ 2. Send a prompt asking the model about both attachments.
+ 3. Inspect the provider request body.
+ 4. Reload the session and inspect restored attachments.
+- **Expected**:
+ - The SVG appears as a file chip, not an image chip. It is classified as
+ `kind: "file"` with `.svg` extension (even if the original had none).
+ - The PNG still appears as an image chip and is sent as a model image block.
+ - The provider request contains no `inlineData` for the SVG; it uses a safe
+ `@path` file reference.
+ - Legacy content-addressed SVG attachments from older sessions are restored
+ as files, not images; stale temporary image data is cleared.
+ - Non-SVG image attachments and vision capability detection are unaffected.
+- **Specs linked**: `03-runtime/svg-attachment-input.md`,
+ `03-runtime/01-ipc-protocol.md` §5.1, `04-ux/08-component-spec.md` §11.7
+- **Acceptance**: C (conversation & stream), F (persistence), Quality
+- **Milestone**: M5
+- **Status**: Unit-covered (`svg-attachments.test.mjs`); Desktop E2E Draft
+
#### E2E-102d: Non-vision and oversized images use the path fallback
- **Preconditions**: One known non-vision model and one known vision-capable
diff --git a/docs/zh-CN/spec/04-ux/08-component-spec.md b/docs/zh-CN/spec/04-ux/08-component-spec.md
index 5a5f703b9..3aab0b3c6 100644
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@ -2118,8 +2118,9 @@ MainChat 底部的输入区域,用于撰写和发送提示。支持多行输
文件,并在粘贴位置插入内联临时文件标记(D197、D209、D262、ADR 0059、ADR 0070、
ADR 0131)
- Main 把图片字节存在 `attachments/<sha256>`,仅当所选 models.dev 模型接受
- 图片且不超过 10 MB 内联上限时发送视觉输入;否则追加安全的 `@path` 回退
- (D361)。草稿仍是文本;芯片在发送前序列化为规范 `@<absolute-path>`,
+ 图片且不超过 10 MB 内联上限时发送视觉输入;否则追加安全的 `@path` 回退。
+ SVG 输入(`image/svg+xml` 或 `.svg` 扩展名)始终被分类为文件而非模型图片,
+ 无论视觉能力如何(见 `03-runtime/svg-attachment-input.md`)(D361)。草稿仍是文本;芯片在发送前序列化为规范 `@<absolute-path>`,
代理用文件工具跟随路径。
- 没有语音输入
diff --git a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
index bd281ce68..fcbef20d1 100644
--- a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
+++ b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
@@ -611,6 +611,25 @@
- 部分中止的消息会获得静音的“(中止)”后缀。只有
未应答的智能停止分支会删除其刚刚发送的用户行。
+### 3.4 排队发送
+
+- 会话运行中,草稿非空时 Composer 显示 Send,空时显示 Stop。普通 Send 和回车发送
+ 都是 follow-up 操作。被接受的 follow-up 清空 Composer 并追加到该会话的 Host 持
+ 久 FIFO 队列;切换会话不会移动或清空其他会话的队列。
+- 队列渲染在 Composer 上方。每行有独立的可键盘访问的 Remove 操作和 Send now 操
+ 作(Host 入队返回持久 id 后可用)。入队挂起期间,行操作禁用并显示 Saving 提
+ 示,Send now 也显示 Saving;此时编辑/删除不改变队列或 Composer 草稿。
+- Send now 将该行移至队首并请求新的 `agent/stop` 通道。当前助手回复和已完成的工
+ 具批次正常结束;`agent_end` 和持久回合确认后,提升行通过正常 `agent/prompt` 流
+ 程在剩余行之前派发。空闲时 Send now 立即派发。等待期间,提升行保留 Remove 并
+ 提示当前任务需要完成。拒绝或失败的优雅停止报告错误且不丢失排队消息。删除需等待
+ Host 确认;若交付抢先完成,报告消息已开始执行并引导用户使用 Stop。
+- 无 Send now 时,活跃回合完成、失败或中止后,下一个 FIFO 行自动开始。终端事件可
+ 在持久化释放会话之前到达;确认必须在释放所有权后再次唤醒队列。不需要额外发送或
+ 切换会话。
+- 中止始终立即执行且不清空队列。排队提示在应用重启后保留,直到控制器连接
+ (ADR 0213)。应用关闭时的确认不得启动另一个排队回合。
+
### 3.5 向当前回合补充指令
- Host 入队尚未返回持久化 id 时,排队行操作保持禁用,五个操作均提示正在保存,