feat: slash commands and skills in the composer, readable turn errors
- Typing `/` opens a palette above the composer, dsh-Go's shape: icon, the first-party Chinese label, /name, a one-line description, the first match highlighted and a return hint. It lists the directory's commands (/api/command) and skills (/api/skill), filters by name, label or description, and keeps the field focused while it opens. - Picking completes `/name ` when the command takes arguments (its description shows a `[...]` form) and runs argument-free commands at once; skills complete and ride the next prompt as a `skills` attachment. Enter picks the highlighted row, arrows move, Esc closes. - Sends route by name: commands go through POST /api/session/:id/command so the server expands the template (and writes the user message), skills go through the normal prompt with their id attached, anything else stays a plain message. A failed command keeps the draft for a retry. - A failed turn now says so in the transcript: the last step's error is rendered under it as a quiet red block with the 中文 reading (auth, retry, stopped, send failure) and the provider's raw response behind 显示详情. Failed compactions and idle errors not already carried by the step are shown too; an error that a later step recovered from is not the turn's outcome and stays hidden. - The tail is refetched when a turn starts, so a command's server-written user message (or another client's) appears without reopening the session; a successful send clears the stale error banner. Version 0.3.6 (code 306).
This commit is contained in:
1 parent
d7cec9d155
commit
6c00e5e026
7 files changed
+725
-14
No files matched your search
@@ -27,6 +27,19 @@
|
||||
|
||||
---
|
||||
|
||||
## 0.3.6 斜杠指令与错误显示(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| `/` 指令面板 | 输入框以 `/` 开头且还没打空格时,在输入条上方弹出(dsh-Go 的样子:图标 + 中文名 + `/name` + 一行说明,最多 5.5 行,首条高亮,右侧 ↵)。来源是这个会话目录的 `GET /api/command` 与 `GET /api/skill`,第一次打开时加载并缓存;支持按名称/说明过滤,↑/↓ 选择、回车选中、Esc 关闭 |
|
||||
| 选中行为 | 说明里带 `[…]` 参数形式的指令补全成 `/name ` 并等待参数;没有参数的(如 `/init`)立即执行;技能补全为文本随下一条消息发出。未知的 `/xxx` 仍是普通消息 |
|
||||
| 发送路由 | 指令走 `POST /api/session/:id/command`(`{name, text}`,服务端展开模板并写用户消息);技能走普通 `/prompt` 并附 `skills: [{id}]`;失败时保留草稿 |
|
||||
| 错误显示 | 解析消息上的 `error`(`provider.*`、`provider.auth`、`MessageAbortedError` 等):只显示结束这一轮的那一步的错误(被后续步骤接上的失败不算),另外显示失败的压缩消息和未被助手消息覆盖的 idle 错误。样式为浅红圆角块 + 图标 + 中文说明(认证失败、重试中、已停止、发送失败),provider 的原始响应放在「显示详情」里(美化过的 JSON) |
|
||||
| 刷新 | `session.execution.started` 时拉一次尾部:指令这条由服务端写入的用户消息(以及别的客户端发的消息)能立刻出现,不用重进会话 |
|
||||
| 版本 | **0.3.6(code 306)** |
|
||||
|
||||
---
|
||||
|
||||
## 0.3.5 折叠动画与流式修复(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
|
||||
Reference in new issue
Block a user