@epoch-agent/tui 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +18 -18
  2. package/dist/index.js +2 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -68,24 +68,24 @@ web 也用同一份。⚠️ **别在模块级调 `t()`**:插槽是 `renderApp
68
68
 
69
69
  ## 结构
70
70
 
71
- | 目录 / 文件 | 内容 |
72
- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
73
- | `app.tsx` | 根组件:`<Static>` 历史 + 限高 pending + 底栏 + 全局键位 |
74
- | `render.tsx` | `renderApp()`——provider 树 + ink render options |
75
- | `contexts/` | app / config / session / streaming / ui-state 五个 context |
76
- | `components/` | banner、history-item、input-box、status-bar、suggestions、toast、thinking-indicator、shortcuts-help |
77
- | `components/dialogs/` | tool-confirmation(审批)、plan-confirmation、command-palette、file-palette、search-palette(Ctrl+R)、rewind-picker(Esc Esc)、picker(单选 / 多选 / 自由输入)、select-list |
78
- | `components/messages/` | 按类型分发的消息渲染:user / model / diff / error / warning / info / hint |
79
- | `commands/` | 斜杠命令:`builtin.ts` / `session.ts` / `inspect.ts` / `workspace.ts` / `rewind.ts` / `plugins.ts` + `parse.ts` + `prefix.ts` + `types.ts`(`HostActions` 契约) |
80
- | `hooks/` | `use-agent-run.ts`(跑一轮 + 中断)、`use-slash-commands.ts`、`use-rewind.ts`(面板 + Esc Esc 窗口)、`use-question.ts`(结构化提问逐个走完) |
81
- | `keybindings/` | 键位层(方案 31):`actions.ts` / `parser.ts`(ink 的 Key → chord)/ `defaults.ts`(默认表 = 原来的硬编码)/ `resolver.ts` / `use-keybinding.ts` / `sequences.ts` + `use-key-sequences.ts`(序列) |
82
- | `vim/` | Vim 模式(方案 31 PR-3):`motions.ts`(`w` / `$` / `f,` 落在哪)+ `machine.ts`(`(state, key) → (state, edits)` 纯状态机)+ `use-vim.ts`(React 外壳,只存 ref / 喂渲染) |
83
- | `streaming/` | 工具调用与 artifact 的展示格式化 |
84
- | `text/` | `ops.ts` 多行 buffer 的纯状态迁移 + `use-text-buffer.ts` React 外壳 |
85
- | `markdown/` | Markdown 解析、行内样式、代码高亮(lowlight) |
86
- | `theme/` | 语义色 + 颜色工具 |
87
- | `types/` | 消息 / 状态类型、`checkpoint-types.ts`(core 那几个回退类型的结构性镜像)、`host-info.ts`(宿主算好的展示形状) |
88
- | `debug.ts` | debug 日志 |
71
+ | 目录 / 文件 | 内容 |
72
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
73
+ | `app.tsx` | 根组件:`<Static>` 历史 + 限高 pending + 底栏 + 全局键位 |
74
+ | `render.tsx` | `renderApp()`——provider 树 + ink render options |
75
+ | `contexts/` | app / config / session / streaming / ui-state 五个 context |
76
+ | `components/` | banner、history-item、input-box、status-bar、suggestions、toast、thinking-indicator、shortcuts-help |
77
+ | `components/dialogs/` | tool-confirmation(审批)、plan-confirmation、command-palette、file-palette、search-palette(Ctrl+R)、rewind-picker(Esc Esc)、picker(单选 / 多选 / 自由输入)、select-list |
78
+ | `components/messages/` | 按类型分发的消息渲染:user / model / diff / error / warning / info / hint |
79
+ | `commands/` | 斜杠命令:`builtin.ts` / `session.ts` / `inspect.ts` / `workspace.ts` / `rewind.ts` / `plugins.ts` + `parse.ts` + `prefix.ts` + `types.ts`(`HostActions` 契约) |
80
+ | `hooks/` | `use-agent-run.ts`(跑一轮 + 中断)、`use-slash-commands.ts`、`use-rewind.ts`(面板 + Esc Esc 窗口)、`use-question.ts`(结构化提问逐个走完)。⚠️ 2026-09-29 起,某一问带 `page`(插件在本机起的一张页)时副标题末尾补一句地址 —— **终端画不出 iframe,所以一行分支都不开**(选项是必填的,照常答得动;判据在 `use-question.ts` 那一处) |
81
+ | `keybindings/` | 键位层(方案 31):`actions.ts` / `parser.ts`(ink 的 Key → chord)/ `defaults.ts`(默认表 = 原来的硬编码)/ `resolver.ts` / `use-keybinding.ts` / `sequences.ts` + `use-key-sequences.ts`(序列) |
82
+ | `vim/` | Vim 模式(方案 31 PR-3):`motions.ts`(`w` / `$` / `f,` 落在哪)+ `machine.ts`(`(state, key) → (state, edits)` 纯状态机)+ `use-vim.ts`(React 外壳,只存 ref / 喂渲染) |
83
+ | `streaming/` | 工具调用与 artifact 的展示格式化 |
84
+ | `text/` | `ops.ts` 多行 buffer 的纯状态迁移 + `use-text-buffer.ts` React 外壳 |
85
+ | `markdown/` | Markdown 解析、行内样式、代码高亮(lowlight) |
86
+ | `theme/` | 语义色 + 颜色工具 |
87
+ | `types/` | 消息 / 状态类型、`checkpoint-types.ts`(core 那几个回退类型的结构性镜像)、`host-info.ts`(宿主算好的展示形状) |
88
+ | `debug.ts` | debug 日志 |
89
89
 
90
90
  ## 布局约束(改这里之前先读)
91
91
 
package/dist/index.js CHANGED
@@ -4577,10 +4577,11 @@ function useQuestion({ prompt }) {
4577
4577
  [questions, settle]
4578
4578
  );
4579
4579
  if (!prompt || !current) return { picker: null, step: step2 };
4580
- const subtitle2 = questions.length > 1 ? `${t("tui.question.step", {
4580
+ const head = questions.length > 1 ? `${t("tui.question.step", {
4581
4581
  i: stepRef.current + 1,
4582
4582
  n: questions.length
4583
4583
  })} \xB7 ${current.header}` : current.header;
4584
+ const subtitle2 = current.page ? `${head} \xB7 ${t("tui.question.page_hint", { url: current.page.url })}` : head;
4584
4585
  const base = {
4585
4586
  title: current.question,
4586
4587
  subtitle: subtitle2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch-agent/tui",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "private": false,
5
5
  "description": "epoch-agent Ink TUI 界面",
6
6
  "repository": {
@@ -29,8 +29,8 @@
29
29
  "mnemonist": "0",
30
30
  "string-width": "8",
31
31
  "strip-ansi": "7",
32
- "@epoch-agent/protocol": "0.20.0",
33
- "@epoch-agent/view": "0.20.0"
32
+ "@epoch-agent/protocol": "0.21.0",
33
+ "@epoch-agent/view": "0.21.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.1.2",