diff --git a/CHANGELOG.md b/CHANGELOG.md index 00da3cf4..097eb0e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,8 @@ - 🧪 守护:`tests/market-manifest.spec.ts` 同时校验仓库清单与 `pnpm pack` 后的发布清单,dependencies 必须恰好是 `ws` / `yaml`,且 `src` 仍在 `files` 里。 +- 🧭 **开始页更直观**:「线索收集(beta)」用一行说明其用途——本地文件、飞书与 GitHub 的上下文信息中心;「侧边对话」移除 beta 标识。默认位置交换侧边对话与新建终端,用户已保存的自定义顺序不变。 + - ✨ **划选操作可配置**:统一文件编辑/预览与线索正文/评论的划选菜单;支持总开关、逐项开关、主菜单及改写类型排序、内置提示词编辑/恢复和自定义操作。改写收进二级菜单(扩写 / 去 AI 味 / 缩短 / 续写),默认在新的侧边会话立即执行,也可先填草稿。 - **改写直接更新原资源**:本地文件直接编辑原路径;远程正文沿用来源保存能力。只读内容、评论和当前有未保存编辑的表面不提供改写。 - **独立翻译**:直接调用宿主 LLM,不创建会话、不修改原文;译文留在划选浮层,可复制与重试。模型可独立配置,目标语言默认跟随当前界面语言。 diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index ad781ef3..7022ded9 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -71,6 +71,8 @@ - 🧪 `tests/market-manifest.spec.ts` checks both the repo and the `pnpm pack` manifest: dependencies must be exactly `ws` / `yaml`, and `src` must stay in `files`. +- 🧭 **Clearer start-page entries**: Clues is now marked beta and described as a context hub for local files, Feishu and GitHub; Side Chat drops its beta marker. Side Chat and New terminal exchange their default positions without changing saved custom ordering. + - ✨ **Configurable selection actions**: one menu across file editing/previews and clue bodies/comments, with overall/per-action switches, menu and rewrite ordering, editable/resettable prompts and custom actions. Rewrite opens a submenu (expand / naturalize / shorten / continue) and runs in a fresh side chat by default, with an optional draft-first mode. - **Rewrite the original source**: local actions edit the original path; remote bodies use the existing source save flow. Read-only content, comments and surfaces with unsaved edits do not offer rewriting. - **Standalone translation**: call the host LLM directly, without creating a session or changing the source. Results stay in the popup with copy/retry. Configure a separate model; the target language follows the UI by default. diff --git a/README.md b/README.md index 3f455db8..f4fca2cb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ |---|---| | **🗂️ File Management**
Lazy-loading tree, git status colors, live directory watch, global search, drag-and-drop upload, multi-select batch actions, dual-source "Open with" menu.
File tree with git colors
Context menu: Open with + Zip and download | **🌿 Git**
Source Control (Merge / Staged / Changes groups, message box with Generate, branch + sync footer) plus a this-session AI-changes lens, with a **read-only commit graph** (lanes, branch and tag badges, branch filter, commit details) in one tab.
Git: changes and commit graph with tags | | **📝 Editable Editor & Previews**
An editable CodeMirror (the stock preview is read-only), Markdown + Mermaid + floating outline, sandboxed HTML preview, `.jsonl` record cards, paged preview for huge files, streaming transfers with no size caps.
Markdown + Mermaid preview | **🧩 Tasks**
Live subagent topology (workflow graph / tree modes) + background task list: exit codes, live output, force-kill.
Tasks: subagent topology | -| **💬 Side Chat (beta)**
Codex-style side threads: inherit the full parent context and run independently, realtime push, visible & revocable queue, per-thread model selection, one-click promotion to a top-level session. One shared native page by default; switch to one page per thread in Settings.
Side Chat | **🖥️ Bottom Workbench**
A self-drawn bottom panel that coexists with the native right sidebar: drag-to-split panes, multiple terminal tabs, per-session persisted layout.
Dual workbench | +| **💬 Side Chat**
Codex-style side threads: inherit the full parent context and run independently, realtime push, visible & revocable queue, per-thread model selection, one-click promotion to a top-level session. One shared native page by default; switch to one page per thread in Settings.
Side Chat | **🖥️ Bottom Workbench**
A self-drawn bottom panel that coexists with the native right sidebar: drag-to-split panes, multiple terminal tabs, per-session persisted layout.
Dual workbench | **Also**: 📂 the `sidebar_open` tool lets the model open the sidebar itself · ⚡ ~325KB core at startup, heavy chunks load on demand · 🌏 i18n follows DSH · 📱 narrow screens switch to a full-width drawer diff --git a/README_ZH.md b/README_ZH.md index 5c7d4b89..8b03909c 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -24,7 +24,7 @@ |---|---| | **🗂️ 文件管理**
懒加载目录树、Git 变更着色、实时 watch 刷新、全局搜索、拖拽上传、多选批量操作、「打开方式」双源菜单。
文件树(Git 着色)
右键菜单:打开方式 + 打包下载 | **🌿 Git**
Source Control(Merge / Staged / Changes 三组、带 Generate 的消息框、分支与同步底栏)+ 本轮 AI 改动视角合一,并在同一页签内给出**只读提交图**(泳道、分支与 tag 徽章、分支筛选、提交详情)。
Git:变更与带 tag 的提交图 | | **📝 可编辑编辑器与预览**
可编辑的 CodeMirror(官方预览是只读)、Markdown + Mermaid + 浮动目录、HTML 沙箱预览、`.jsonl` 记录卡片、超大文件分页预览、传输无大小上限。
Markdown + Mermaid 预览 | **🧩 任务管理**
子代理拓扑实时预览(工作流图 / 树双模式)+ 后台任务清单:退出码、实时输出、强制终止。
任务页:子代理拓扑 | -| **💬 侧边对话(beta)**
Codex 风格侧边线程:继承主会话完整上下文独立运行、实时推送、排队可见可撤回、每个线程独立选模型、一键提升为顶层会话。默认共用一个原生页签,可在设置中切换为每个对话独立页。
侧边对话 | **🖥️ 底部工作台**
自绘底部面板与原生右侧栏同时展开:拖拽分栏、多终端页签、按会话持久化布局。
双工作台 | +| **💬 侧边对话**
Codex 风格侧边线程:继承主会话完整上下文独立运行、实时推送、排队可见可撤回、每个线程独立选模型、一键提升为顶层会话。默认共用一个原生页签,可在设置中切换为每个对话独立页。
侧边对话 | **🖥️ 底部工作台**
自绘底部面板与原生右侧栏同时展开:拖拽分栏、多终端页签、按会话持久化布局。
双工作台 | **还有**:📂 `sidebar_open` 工具让模型主动打开侧边栏 · ⚡ 启动只拉 ~325KB 核心、重依赖按需加载 · 🌏 多语言跟随 DSH · 📱 窄屏自动切换全宽抽屉 diff --git a/docs/external-plugin-guide.md b/docs/external-plugin-guide.md index e1d4657f..f37aaef7 100644 --- a/docs/external-plugin-guide.md +++ b/docs/external-plugin-guide.md @@ -214,7 +214,7 @@ interface TabDescriptor { description?: string | (() => string) /** 图标:ReactNode 或 (size: number) => ReactNode(不声明时宿主补一个方块占位) */ icon?: ReactNode | ((size: number) => ReactNode) - /** + 菜单排序(升序);默认 100。内置:editor=10, git=20, subagent=30, sidechat=35, terminal-bottom=40 */ + /** + 菜单排序(升序);默认 100。内置:editor=10, sidechat=15, git=16, clues=17, subagent=18, terminal-bottom=40 */ order?: number /** * 从 + 菜单隐藏(diff 用:由其他流程触发打开,不在菜单里)。同时不占原生 @@ -476,12 +476,14 @@ ctx.effect(() => { ### 4.4 内置 tab 清单(不可重复注册) +默认开始页顺序为文件 → 侧边对话 → Git → 线索收集(beta) → 任务 → 宿主新建终端。已保存的 `guideOrder` 始终优先,不迁移或覆盖用户顺序。 + | id | order | single | hidden | 用途 | |---|---|---|---|---| | `editor` | 10 | 否(按 path 去重) | 否 | 唯一「文件窗口」(编辑/预览 + 资源管理)。chrome 恒合并形态:路径输入框 + 编辑器控件 + 可开关内嵌文件树(全局搜索 `fs.search`;状态存 `tab.meta.treeOpen/treeWidth`)。`editorExplorer`:关(默认)= 按 path 新开,无路径窗口 = 纯资源管理器;开 = 树点击/Enter 经 `updateTab` 原地切换(id/meta 不变),无路径窗口 = 带 chrome 空窗口。树右键「在新 Tab 中打开」「在侧边打开」(pane 右侧 split)。新会话**不 seed 任何页签**(右侧栏归宿主,插件只投 tab 类型;首开落在宿主开始页,即本插件接管的 `guideTakeover` 页面);旧 `explorer` tab 经 `sanitizeState` 迁移为无路径的 `editor` 页签(`title:'Files'`、`meta.treeOpen:true`)。树 listing 与文件名搜索应用 `explorerExclude` 排除模式(editor 卡片齿轮弹窗可编辑;host 侧过滤,匹配条目彻底移除且永不阻塞折叠);单目录链折叠为 `a/b/c` 面包屑行(POSIX 隐藏与排除条目不计入唯一子项判定) | -| `git` | 20 | 是 | 是(本轮文件操作数) | 「Git」统一 tab(id 保留 `git` 以兼容持久化布局):**Git 视角**(Source Control:独立折叠的 Changes / Graph;Changes 内为多行 Message + 仅填草稿的 Generate、Merge Changes → Staged Changes → Changes(资源组也独立折叠,计数常驻标题最右,文件行整行 hover);Git 刷新仅留在 Changes 标题,外层本轮文件刷新保留;真实 parent hashes 泳道图;常驻底栏为可点击分支 + `*`/`+`/`!` 标记、upstream 的 behind↓ / ahead↑ 及安全 Pull-then-Push 同步;Push/Pull 与 worktree·子仓库选择移入 More Actions;提交只消费已暂存项,冲突/空消息/无暂存时禁止,草稿按会话·仓库·worktree 隔离)+ **本轮文件视角**(原 file-trace:模型读/写/编辑实时折叠,按操作时间倒序平铺、不按文件分组,每行「操作 → 文件路径 → 大小/时间」,支持类型筛选);会话事件经插件自有宿主路由 `changes.ops` 供给(live 日志优先、冷会话回放持久化记录,`afterSeq` 增量),primed 后用 `wait` 挂在宿主侧等下一个工具事件而不是重放整窗),badge 读 tab 轮询写入的同步缓存。页头是插件自绘的下划线 Tabs(与宿主会话页同一视觉:13px/500、未选中三级文字、选中态品牌色 + 2px 下划线压在页头分隔线上、24px 间距;`role="tablist"` + `aria-selected`/`aria-controls` 关联、左右方向键与 Home/End 漫游焦点)。宿主没有公开的下划线 Tabs 组件,早期复用的宿主私有哈希类名会随宿主升级失效(#1098),所以样式只落在 `changes.module.css` 的主题 Token 上。两视角共用底部可拖拽预览面板(`tab.meta.lens/previewH` 持久化),diff 渲染统一走 `src/client/diff/`(`DiffRows`/`DiffFiles`:mod 配对 + 行内高亮 + 语法着色 + 上下文折叠);Git 目标可展开为独立 diff tab(落进工作台的 diff 分栏) | -| `subagent` | 30 | 是 | 否 | 任务管理(工作流图/树、团队任务板、后台任务抽屉) | -| `sidechat` | 35 | 否(`sidechat:`,按 `meta.threadId` 去重) | 否 | 侧边对话(默认共用一页;设置可切换「每个对话独立页」):共用页再次打开聚焦同一页并回到本会话最近线程;独立页每个线程一个原生 occurrence,按 contentId 精确恢复。打开即建空线程(首条消息赢得标签并同步标题);线程 = 插件自建子会话(种子继承父会话上下文,进行中回合以 `interrupted` 闭合;种子带合法 `subagent/descriptor`,SubagentView 按 `Side: ` 前缀过滤),`origin:'subagent'` 隐藏于主列表;走 `/sidebar/api/sidechat.*` 路由;头部菜单切换/重开(`parkSidechatReopen` + 确定性 id),关 Tab 释放 live agent;重开经 `collectOwnEvents` 回源到种子边界;「保存为新会话」= `session.fork`(`this` 敏感)。[设计文档](plans/2026-08-20-sidechat-tab-design.md) | +| `git` | 16 | 是 | 是(本轮文件操作数) | 「Git」统一 tab(id 保留 `git` 以兼容持久化布局):**Git 视角**(Source Control:独立折叠的 Changes / Graph;Changes 内为多行 Message + 仅填草稿的 Generate、Merge Changes → Staged Changes → Changes(资源组也独立折叠,计数常驻标题最右,文件行整行 hover);Git 刷新仅留在 Changes 标题,外层本轮文件刷新保留;真实 parent hashes 泳道图;常驻底栏为可点击分支 + `*`/`+`/`!` 标记、upstream 的 behind↓ / ahead↑ 及安全 Pull-then-Push 同步;Push/Pull 与 worktree·子仓库选择移入 More Actions;提交只消费已暂存项,冲突/空消息/无暂存时禁止,草稿按会话·仓库·worktree 隔离)+ **本轮文件视角**(原 file-trace:模型读/写/编辑实时折叠,按操作时间倒序平铺、不按文件分组,每行「操作 → 文件路径 → 大小/时间」,支持类型筛选);会话事件经插件自有宿主路由 `changes.ops` 供给(live 日志优先、冷会话回放持久化记录,`afterSeq` 增量),primed 后用 `wait` 挂在宿主侧等下一个工具事件而不是重放整窗),badge 读 tab 轮询写入的同步缓存。页头是插件自绘的下划线 Tabs(与宿主会话页同一视觉:13px/500、未选中三级文字、选中态品牌色 + 2px 下划线压在页头分隔线上、24px 间距;`role="tablist"` + `aria-selected`/`aria-controls` 关联、左右方向键与 Home/End 漫游焦点)。宿主没有公开的下划线 Tabs 组件,早期复用的宿主私有哈希类名会随宿主升级失效(#1098),所以样式只落在 `changes.module.css` 的主题 Token 上。两视角共用底部可拖拽预览面板(`tab.meta.lens/previewH` 持久化),diff 渲染统一走 `src/client/diff/`(`DiffRows`/`DiffFiles`:mod 配对 + 行内高亮 + 语法着色 + 上下文折叠);Git 目标可展开为独立 diff tab(落进工作台的 diff 分栏) | +| `subagent` | 18 | 是 | 否 | 任务管理(工作流图/树、团队任务板、后台任务抽屉) | +| `sidechat` | 15 | 否(`sidechat:`,按 `meta.threadId` 去重) | 否 | 侧边对话(默认共用一页;设置可切换「每个对话独立页」):共用页再次打开聚焦同一页并回到本会话最近线程;独立页每个线程一个原生 occurrence,按 contentId 精确恢复。打开即建空线程(首条消息赢得标签并同步标题);线程 = 插件自建子会话(种子继承父会话上下文,进行中回合以 `interrupted` 闭合;种子带合法 `subagent/descriptor`,SubagentView 按 `Side: ` 前缀过滤),`origin:'subagent'` 隐藏于主列表;走 `/sidebar/api/sidechat.*` 路由;头部菜单切换/重开(`parkSidechatReopen` + 确定性 id),关 Tab 释放 live agent;重开经 `collectOwnEvents` 回源到种子边界;「保存为新会话」= `session.fork`(`this` 敏感)。[设计文档](plans/2026-08-20-sidechat-tab-design.md) | | `diff` | -1 | 否(按 id 去重) | 是 | 差异查看(changes tab 的预览面板「展开为独立页签」触发,同一渲染栈) | | `terminal-bottom` | 40 | 否(`createTab` 每次铸新 id) | 否 | 底部工作台的终端(#774)。**`bottomOnly`**(见 §4 与「原生承载面」表的说明):没有原生 tab 类型、不占 guide 条目,只在底部 `+` 菜单里。页面是插件自绘的 xterm(`lib/client-terminal.js` chunk),**进程由宿主的会话级终端服务 `ctx.webTerminals` 供给**(结构化探测,不写进 `dsh.client.inject`——缺服务只会让这一行置灰,不会把整行拖成 `pending`)。恢复靠宿主持久化的 `(sessionId, contentId) → 终端 id` 绑定(`contentId` 形如 `dsh-better-sidebar:terminal-bottom:`,**每个页签一个实例**,#926),关页签走 `onClose` → `webTerminals.close()` 结束进程(卸载**不**关:宿主的契约是「视图跨 DOM 卸载存活」,刷新要能认回同一个 shell),`tab.meta.terminalRun`(默认 0)是「新建终端」换代号用的代号位。[设计文档](plans/2026-10-05-bottom-terminal-tab.md) | diff --git a/src/client/builtins/clues.tsx b/src/client/builtins/clues.tsx index 078220fb..c404b88c 100644 --- a/src/client/builtins/clues.tsx +++ b/src/client/builtins/clues.tsx @@ -19,9 +19,8 @@ export const cluesTab: TabDescriptor = { title: () => t('clueTabTitle'), description: () => t('guideDescClues'), icon: cluesTabIcon, - // Between Changes (20) and Tasks (30): the page is a working surface, not a - // diagnostic, and the four host-facing pages keep their own order. - order: 25, + // Keep Clues between Changes and Tasks in the default guide order. + order: 17, single: true, settings: { pluginToggles: [{ diff --git a/src/client/builtins/tabs.tsx b/src/client/builtins/tabs.tsx index d7ade19e..c37f02a0 100644 --- a/src/client/builtins/tabs.tsx +++ b/src/client/builtins/tabs.tsx @@ -215,7 +215,7 @@ export function builtinTabs(ctx: Context): readonly TabDescriptor[] { title: () => t('changes'), description: () => t('guideDescGit'), icon: changesTabIcon, - order: 20, + order: 16, single: true, // Custom settings panel (not a declarative toggle row): the pinned // commit-message model is picked from the DISCOVERED catalog, so the @@ -244,7 +244,7 @@ export function builtinTabs(ctx: Context): readonly TabDescriptor[] { title: () => t('subagent'), description: () => t('guideDescSubagent'), icon: tasksTabIcon, - order: 30, + order: 18, single: true, // Declarative settings: auto-open, default view, task folding, and the // jobs drawer switches share the existing Tasks card's settings gear. @@ -315,7 +315,8 @@ export function builtinTabs(ctx: Context): readonly TabDescriptor[] { title: () => t('sideChat'), description: () => t('guideDescSidechat'), icon: sidechatTabIcon, - order: 35, + // The host's New terminal guide stays at 20; keep the other pages before it. + order: 15, // Codex-style: EVERY side conversation is its own tab. A plain open // mints a fresh tab flagged `autoCreate` (the view creates the EMPTY // thread on mount); a thread switch from the header menu parks the @@ -412,7 +413,7 @@ export function builtinTabs(ctx: Context): readonly TabDescriptor[] { title: () => t('terminal'), description: () => t('guideDescTerminal'), icon: terminalTabIcon, - // Below the four host-facing pages (10..35) and above the hidden diff + // Below the host-facing pages (10..18) and above the hidden diff // tab: the terminal is a secondary tool, but a visible menu row. order: 40, bottomOnly: true, diff --git a/src/client/locales-de.ts b/src/client/locales-de.ts index ba14f9ee..3d26b570 100644 --- a/src/client/locales-de.ts +++ b/src/client/locales-de.ts @@ -529,7 +529,7 @@ export const de: Record = { subagentCount: '{count} Subagenten', subagentCountRunning: '{count} Subagenten · {running} läuft', subagentThinking: 'Denkt nach…', - sideChat: 'Seitenchat (beta)', + sideChat: 'Seitenchat', sideChatNew: 'Neuer Thread', sideChatUntitled: 'Neuer Thread', sideChatEmpty: 'Keine Seitenunterhaltungen', @@ -948,8 +948,8 @@ export const de: Record = { clueBrowserResolveAction: "Resolve", clueClearSearch: "Clear search", clueBrowserPinsFailed: "Could not load pinned clues. Retry, or keep browsing below.", - clueTabTitle: 'Hinweise', - guideDescClues: 'Hinweis-Pakete und mehrere Quellen; per @ in den Entwurf einfügen', + clueTabTitle: 'Hinweise (beta)', + guideDescClues: 'Kontextzentrale für lokale Dateien, Feishu und GitHub', clueFeishuDocsName: 'Feishu-Dokumente', clueFeishuTasksName: 'Feishu-Aufgaben', clueTabNoWorkspace: 'Diese Sitzung hat noch keinen Arbeitsbereich. Öffne zuerst eine Arbeitsbereichs-Sitzung und sammle dann Hinweise.', diff --git a/src/client/locales-es.ts b/src/client/locales-es.ts index eeba3eb8..3aab4079 100644 --- a/src/client/locales-es.ts +++ b/src/client/locales-es.ts @@ -544,7 +544,7 @@ export const es: Record = { subagentCount: "{count} subagentes", subagentCountRunning: "{count} subagentes · {running} en ejecución", subagentThinking: "Pensando…", - sideChat: "Chat lateral (beta)", + sideChat: 'Chat lateral', sideChatNew: "Nuevo hilo", sideChatUntitled: "Nuevo hilo", sideChatEmpty: "No hay conversaciones laterales", @@ -942,8 +942,8 @@ export const es: Record = { clueBrowserRefreshing: "Actualizando…", clueBrowserResolveAction: "Resolver", clueClearSearch: "Borrar búsqueda", - clueTabTitle: "Pistas", - guideDescClues: "Paquetes de pistas y navegación por varias fuentes; inserta en el borrador", + clueTabTitle: 'Pistas (beta)', + guideDescClues: 'Centro de contexto para archivos locales, Feishu y GitHub', clueFeishuDocsName: "Documentos de Feishu", clueFeishuTasksName: "Tareas de Feishu", clueTabNoWorkspace: "Esta sesión aún no tiene espacio de trabajo. Abre una sesión con espacio de trabajo y recopila pistas.", diff --git a/src/client/locales-fr.ts b/src/client/locales-fr.ts index 8f730997..b50ba041 100644 --- a/src/client/locales-fr.ts +++ b/src/client/locales-fr.ts @@ -535,7 +535,7 @@ export const fr: Record = { subagentCount: '{count} sous-agent(s)', subagentCountRunning: '{count} sous-agent(s) · {running} en cours', subagentThinking: 'Réflexion…', - sideChat: 'Discussion latérale (bêta)', + sideChat: 'Discussion latérale', sideChatNew: 'Nouvelle discussion', sideChatUntitled: 'Nouvelle discussion', sideChatEmpty: 'Aucune discussion latérale pour l’instant', @@ -954,8 +954,8 @@ export const fr: Record = { clueBrowserResolveAction: "Resolve", clueClearSearch: "Clear search", clueBrowserPinsFailed: "Could not load pinned clues. Retry, or keep browsing below.", - clueTabTitle: 'Indices', - guideDescClues: 'Packs d’indices et sources multiples ; insertion dans le brouillon', + clueTabTitle: 'Indices (bêta)', + guideDescClues: 'Centre de contexte pour les fichiers locaux, Feishu et GitHub', clueFeishuDocsName: 'Documents Feishu', clueFeishuTasksName: 'Tâches Feishu', clueTabNoWorkspace: 'Cette session n’est associée à aucun espace de travail. Ouvrez d’abord une session d’espace de travail, puis collectez des indices.', diff --git a/src/client/locales-ja.ts b/src/client/locales-ja.ts index 26dbc073..4c2165f1 100644 --- a/src/client/locales-ja.ts +++ b/src/client/locales-ja.ts @@ -541,7 +541,7 @@ export const ja: Record = { subagentCount: '{count} 個のサブエージェント', subagentCountRunning: '{count} 個のサブエージェント ・ {running} 個実行中', subagentThinking: '思考中…', - sideChat: 'サイドチャット(beta)', + sideChat: 'サイドチャット', sideChatNew: '新規スレッド', sideChatUntitled: '新規スレッド', sideChatEmpty: 'サイド会話なし', @@ -958,8 +958,8 @@ export const ja: Record = { clueBrowserHint: "タイトルで詳細 · @ で資料を挿入 · ピンで常用に", clueBrowserResolveAction: "認識", clueClearSearch: "検索をクリア", - clueTabTitle: '手がかり', - guideDescClues: '手がかりパックと複数ソースの閲覧、@ で資料を挿入', + clueTabTitle: '手がかり(beta)', + guideDescClues: 'ローカルファイル・Feishu・GitHub のコンテキストを集約', clueFeishuDocsName: 'Feishu ドキュメント', clueFeishuTasksName: 'Feishu タスク', clueTabNoWorkspace: 'このセッションにはまだワークスペースがありません。先にワークスペースのセッションを開いてから手がかりを集めてください。', diff --git a/src/client/locales-pt.ts b/src/client/locales-pt.ts index 53d52529..4a84f814 100644 --- a/src/client/locales-pt.ts +++ b/src/client/locales-pt.ts @@ -526,7 +526,7 @@ export const pt: Record = { subagentCount: '{count} subagentes', subagentCountRunning: '{count} subagentes · {running} executando', subagentThinking: 'Pensando…', - sideChat: 'Chat lateral (beta)', + sideChat: 'Chat lateral', sideChatNew: 'Novo tópico', sideChatUntitled: 'Novo tópico', sideChatEmpty: 'Nenhuma conversa lateral', @@ -945,8 +945,8 @@ export const pt: Record = { clueBrowserResolveAction: "Resolve", clueClearSearch: "Clear search", clueBrowserPinsFailed: "Could not load pinned clues. Retry, or keep browsing below.", - clueTabTitle: 'Pistas', - guideDescClues: 'Pacotes e várias fontes; insira no rascunho com @', + clueTabTitle: 'Pistas (beta)', + guideDescClues: 'Central de contexto para arquivos locais, Feishu e GitHub', clueFeishuDocsName: 'Documentos Feishu', clueFeishuTasksName: 'Tarefas Feishu', clueTabNoWorkspace: 'Esta sessão ainda não tem uma área de trabalho. Abra primeiro uma sessão de área de trabalho e depois colete pistas.', diff --git a/src/client/locales-ru.ts b/src/client/locales-ru.ts index ea9000e6..0238c319 100644 --- a/src/client/locales-ru.ts +++ b/src/client/locales-ru.ts @@ -541,7 +541,7 @@ export const ru: Record = { subagentCount: '{count} субагентов', subagentCountRunning: '{count} субагентов · {running} выполняется', subagentThinking: 'Размышляет…', - sideChat: 'Боковой чат (бета)', + sideChat: 'Боковой чат', sideChatNew: 'Новый поток', sideChatUntitled: 'Новый поток', sideChatEmpty: 'Нет боковых диалогов', @@ -960,8 +960,8 @@ export const ru: Record = { clueBrowserResolveAction: "Resolve", clueClearSearch: "Clear search", clueBrowserPinsFailed: "Could not load pinned clues. Retry, or keep browsing below.", - clueTabTitle: 'Подсказки', - guideDescClues: 'Наборы и несколько источников; вставка в черновик через @', + clueTabTitle: 'Подсказки (бета)', + guideDescClues: 'Центр контекста для локальных файлов, Feishu и GitHub', clueFeishuDocsName: 'Документы Feishu', clueFeishuTasksName: 'Задачи Feishu', clueTabNoWorkspace: 'У этой сессии ещё нет рабочей области. Сначала откройте сессию рабочей области, затем собирайте подсказки.', diff --git a/src/client/locales.ts b/src/client/locales.ts index d4955e3f..88df0ff3 100644 --- a/src/client/locales.ts +++ b/src/client/locales.ts @@ -539,7 +539,7 @@ export const zh = { subagentCount: '{count} 个子代理', subagentCountRunning: '{count} 个子代理 · {running} 运行中', subagentThinking: '思考中…', - sideChat: '侧边对话(beta)', + sideChat: '侧边对话', sideChatNew: '新建对话', sideChatUntitled: '新对话', sideChatEmpty: '暂无侧边对话', @@ -961,8 +961,8 @@ export const zh = { clueBrowserRefreshing: '更新中…', clueBrowserResolveAction: "识别", clueClearSearch: "清除搜索", - clueTabTitle: '线索收集', - guideDescClues: '线索包与多来源浏览,点按或 @ 插入资料', + clueTabTitle: '线索收集(beta)', + guideDescClues: '本地文件、飞书与 GitHub 的上下文信息中心', clueFeishuDocsName: '飞书文档', clueFeishuTasksName: '飞书任务', clueTabNoWorkspace: '当前会话还没有关联工作区。先打开一个工作区会话,再收集线索。', @@ -1811,7 +1811,7 @@ export const en: Record = { subagentCount: '{count} subagents', subagentCountRunning: '{count} subagents · {running} running', subagentThinking: 'Thinking…', - sideChat: 'Side Chat (beta)', + sideChat: 'Side Chat', sideChatNew: 'New thread', sideChatUntitled: 'New thread', sideChatEmpty: 'No side conversations', @@ -2231,8 +2231,8 @@ export const en: Record = { clueBrowserRefreshing: 'Refreshing…', clueBrowserResolveAction: "Resolve", clueClearSearch: "Clear search", - clueTabTitle: 'Clues', - guideDescClues: 'Clue packs and multi-source browsing; insert into the draft', + clueTabTitle: 'Clues (beta)', + guideDescClues: 'A context hub for local files, Feishu and GitHub', clueFeishuDocsName: 'Feishu docs', clueFeishuTasksName: 'Feishu tasks', clueTabNoWorkspace: 'This session has no workspace yet. Open a workspace session, then collect clues.', diff --git a/tests/builtins.spec.ts b/tests/builtins.spec.ts index e4166698..129c0ce0 100644 --- a/tests/builtins.spec.ts +++ b/tests/builtins.spec.ts @@ -29,6 +29,8 @@ import { builtinTabs } from '../src/client/builtins/tabs.tsx' import { registerBuiltins } from '../src/client/builtins/index.ts' import { parkSidechatReopen } from '../src/client/SideChatView.tsx' import { terminalInstanceOf } from '../src/client/terminal-client.ts' +import { orderGuideEntries } from '../src/client/native/guide-layout.ts' +import { zh, en } from '../src/client/locales.ts' function setup(): { service: ReturnType; store: ReturnType; dispose: () => void } { const store = createSidebarStore() @@ -38,6 +40,30 @@ function setup(): { service: ReturnType; stor } describe('built-in tab registrations', () => { + it('exchanges the default chat and host terminal positions without overriding saved order', () => { + const { service } = setup() + // The host-owned New terminal guide is order 20; it is not terminal-bottom. + const entries = [ + ...service.getTabs().filter(tab => !tab.hidden && !tab.bottomOnly) + .map(tab => ({ key: tab.id, order: tab.order ?? 100 })), + { key: 'terminal', order: 20 }, + ].sort((a, b) => a.order - b.order) + expect(orderGuideEntries(entries, []).map(entry => entry.key)) + .toEqual(['editor', 'sidechat', 'git', 'clues', 'subagent', 'terminal']) + const saved = ['editor', 'terminal', 'git', 'clues', 'subagent', 'sidechat'] + expect(orderGuideEntries(entries, saved).map(entry => entry.key)).toEqual(saved) + }) + + it('describes the context hub directly and marks only Clues as beta', () => { + const { service } = setup() + expect((service.getTab('clues')!.title as () => string)()).toBe(en.clueTabTitle) + expect((service.getTab('clues')!.description as () => string)()).toBe('A context hub for local files, Feishu and GitHub') + expect((service.getTab('sidechat')!.title as () => string)()).toBe('Side Chat') + expect([zh.clueTabTitle, en.clueTabTitle]).toEqual(['线索收集(beta)', 'Clues (beta)']) + expect(zh.guideDescClues).toBe('本地文件、飞书与 GitHub 的上下文信息中心') + expect(zh.sideChat).toBe('侧边对话') + }) + it('registers the 7 built-in tabs (the host owns the right-sidebar terminal and browser)', () => { const { service } = setup() // S9 adds the clue collection page: the pack library and the multi-source @@ -139,10 +165,10 @@ describe('built-in tab registrations', () => { } }) - it('the side chat tab sits between tasks and the removed terminal slot in the + menu', () => { + it('the side chat tab follows Files in the default menu', () => { const { service } = setup() const sidechat = service.getTab('sidechat') - expect(sidechat?.order).toBe(35) + expect(sidechat?.order).toBe(15) expect(sidechat?.hidden).not.toBe(true) }) diff --git a/tests/e2e/mount.e2e.ts b/tests/e2e/mount.e2e.ts index f65f901c..6d15cfd0 100644 --- a/tests/e2e/mount.e2e.ts +++ b/tests/e2e/mount.e2e.ts @@ -416,6 +416,13 @@ test('plugin mounts into the DSH shell and survives a built-in tab sweep', async })) expect(startPageGeometry.columns).toBe(startPageGeometry.width >= 520 ? '2' : '1') expect(startPageGeometry.align).toBe('center') + expect(await startPage.locator('[data-sidebar-right-guide-entry]').evaluateAll(nodes => + nodes.map(node => node.getAttribute('data-sidebar-right-guide-entry')))) + .toEqual(['files', 'sidechat', 'git', 'clues', 'subagent', 'terminal']) + const clueCard = startPage.locator('[data-sidebar-right-guide-entry="clues"]') + await expect(clueCard).toContainText('Clues (beta)') + await expect(clueCard).toContainText('A context hub for local files, Feishu and GitHub') + await expect(startPage.locator('[data-sidebar-right-guide-entry="sidechat"]')).not.toContainText('beta') // The host's terminal card keeps its native shell menu under the takeover. await expect( page.locator('[data-sidebar-right-guide-entry="terminal"] [data-guide-shell-menu]'),