From 2d2b42722aa8e9661ca84f28a70c4e7c05c369cb Mon Sep 17 00:00:00 2001 From: mlosun <165387666@qq.com> Date: Fri, 21 Aug 2026 22:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=8E=A8=E8=8D=90=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=9B=AE=E5=BD=95=E6=96=B0=E5=A2=9E=20dsh-docs-panel?= =?UTF-8?q?=EF=BC=88=E5=85=A8=E5=B1=80=E6=96=87=E6=A1=A3=EF=BC=89=20(#230)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - plugins-tabs.ts:追加 dsh-docs-panel Tab 条目(npm 包名 id、GitHub 仓库、 安装命令先装 dsh-better-sidebar 再装本插件,与 dsh-sidebar-qa 同款硬依赖写法) - locales.ts:新增 pluginDocsPanelDesc 的 zh/en 翻译 Co-authored-by: Menghuan1918 --- src/client/locales.ts | 2 ++ src/client/plugins-tabs.ts | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/client/locales.ts b/src/client/locales.ts index c920120..d9f33ca 100644 --- a/src/client/locales.ts +++ b/src/client/locales.ts @@ -308,6 +308,7 @@ export const zh = { pluginSentinelDesc: '条件驱动的 agent 唤醒系统:文件/进程/端口/HTTP/命令/webhook 传感器,条件达成自动唤醒休眠会话;注册「哨兵」Tab 展示服务器全局监控表', pluginSidebarQaDesc: '基于 better-sidebar 的划选提问tab分页: 对话划选 → 右侧面板提问 → 同工作区独立追问会话(❓追问·主题):快速无思考模型压缩主对话上下文后与引文一起注入,不打断主对话;追问可嵌套、可继续、可归档', pluginVideoPreviewDesc: '在 better-sidebar 编辑器内联预览视频文件(.mp4/.webm/.mov/.mkv/.avi 等),自带支持 HTTP Range(206)的 /video 宿主路由,可拖动进度条、不受 20MB mediaLimit 限制', + pluginDocsPanelDesc: 'DSH 侧边栏里的「全局文档」:全局 Markdown 笔记,任何工作区随时可读——列表点选阅读、悬浮大纲跳转、Chrome / VS Code 外部打开、代码复制,目录可配置(默认 ~/.dsh/docs)', } /** The en dictionary (key-set-equal to zh, enforced by the type annotation). */ @@ -609,6 +610,7 @@ export const en: Record = { pluginSentinelDesc: 'Condition-driven agent wakeup: file/process/port/http/command/webhook sensors wake dormant sessions when conditions fire; registers a "Sentinel" tab with the server-wide watch table', pluginSidebarQaDesc: 'Select-and-ask: Select conversation text → ask in the right-side panel → a dedicated follow-up session (❓追问) in the same workspace; a fast no-thinking model compresses the main context and injects it with the quote, without interrupting the main conversation. Follow-ups nest, continue, and archive', pluginVideoPreviewDesc: 'Inline video preview (.mp4/.webm/.mov/.mkv/.avi etc.) for the better-sidebar editor, backed by a dedicated /video host route with HTTP Range (206) support — scrubbing works and files are not capped by the 20MB mediaLimit', + pluginDocsPanelDesc: 'Global docs in the DSH sidebar: read your own Markdown notes from any workspace — a file list, an outline, open in Chrome / VS Code, and copy buttons; the docs directory is configurable (default ~/.dsh/docs)', } /** diff --git a/src/client/plugins-tabs.ts b/src/client/plugins-tabs.ts index 7304940..d8d51f5 100644 --- a/src/client/plugins-tabs.ts +++ b/src/client/plugins-tabs.ts @@ -24,6 +24,15 @@ export const builtinTabPlugins: readonly PluginEntry[] = [ // context consistent with the other entries. install: 'cd ~/.dsh && dsh plugin --profile web add "github:fuhefei/dsh-sentinel#v0.7.0"', }, + { + id: 'dsh-docs-panel', + name: 'dsh-docs-panel 全局文档', + url: 'https://github.com/mlosun/dsh-docs-panel', + description: () => t('pluginDocsPanelDesc'), + // dsh-docs-panel hard-depends on dsh-better-sidebar (required peer), so + // the install line installs the prerequisite first, then the plugin. + install: 'cd ~/.dsh && dsh plugin --profile web add dsh-better-sidebar && dsh plugin --profile web add dsh-docs-panel', + }, { id: 'dsh-git-remotes', name: 'dsh-git-remotes Git 远程',