From 630762ae32379afb38f9526b118f520b50182aee Mon Sep 17 00:00:00 2001 From: awoodwhale Date: Sun, 20 Sep 2026 16:28:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(catalog):=20=E6=8E=A8=E8=8D=90=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=96=B0=E5=A2=9E=20dsh-agent-persona?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在「侧边栏内容」的添加插件弹窗里新增一条 Tab 插件:dsh-agent-persona(人设)。 - 按工作区或会话分发 system prompt 人设,可标一条默认人设兜底; - 该插件的「人设」Tab 通过本插件的 betterSidebar 服务注册,因此安装行先装 dsh-better-sidebar; - 包已发布到 npm,安装行用包名即可,无需 git 形式; - 同步 zh / en / ja 三份词典(新增 zh 键必须同步 ja,见 AGENTS.md §5)。 --- src/client/locales-ja.ts | 2 ++ src/client/locales.ts | 4 ++++ src/client/plugins-tabs.ts | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/src/client/locales-ja.ts b/src/client/locales-ja.ts index 71483ff0..d307709a 100644 --- a/src/client/locales-ja.ts +++ b/src/client/locales-ja.ts @@ -411,6 +411,7 @@ export const ja: Record = { openPlugin: '開く', copyInstall: 'インストールコマンドをコピー', pluginMdExportDesc: 'better-sidebar の Markdown ツールバーに「エクスポート」ボタンを追加:現在の .md を単体 HTML(テーブル・コードブロック・Mermaid 図表をインライン化、プレビューテーマに追従したレイアウト)にレンダリングして .md と同じディレクトリに保存、または印刷ダイアログ経由で PDF にエクスポート', + pluginAgentPersonaDesc: 'ワークスペースまたはセッションごとに system prompt のペルソナを割り当て:1 つのペルソナを複数のワークスペースディレクトリと複数のセッションに適用でき、完全一致 / 前方一致 / 部分一致 / 正規表現で照合、より具体的な方が優先、1 件を既定ペルソナとして指定可能。設定ページと会話の「人設」タブで管理し、次のメッセージから有効', pluginOfficeDesc: 'better-sidebar エディター向け Office スイートプレビュー(.docx / .xlsx / .pptx)。重い Office レンダリングライブラリをコアバンドルから分離、必要に応じてインストール', pluginFlowglassDesc: 'ライブセッションフローグラフ:ユーザー、アシスタント、ツール呼び出しの 3 レーン泳道、並列グループ、サブエージェント支線、ドリルダウン、ライブ状態をサポート。better-sidebar インストール時にネイティブ「Flowglass」Tab を登録、未インストール時は独立ドロワーを保持', pluginGitForgeDesc: 'better-sidebar「Git Forge」Tab:GitHub/Gitea 等 Forge アカウントライブラリ + プロジェクト単位の認可 + push ポリシー硬核拒絶。token はローカル secrets のみ、モデルコンテキストに入らない。読み取り専用 GitForge ツールと agent HTTPS credential helper を提供', @@ -434,6 +435,7 @@ export const ja: Record = { changesRedactOnLabel: "マスキング中", changesRedactOffLabel: "マスキング解除", changesRedactBanner: "マスク済み", + pluginAgentPersonaName: 'dsh-agent-persona ペルソナ', pluginSentinelName: 'dsh-sentinel ウェイクアップシステム', pluginEgoBrowserName: 'ego-browser エージェントブラウザー', pluginBetterOverleafName: 'dsh-better-overleaf Overleaf タブ', diff --git a/src/client/locales.ts b/src/client/locales.ts index f418f866..890891f5 100644 --- a/src/client/locales.ts +++ b/src/client/locales.ts @@ -423,6 +423,7 @@ export const zh = { openPlugin: '跳转', copyInstall: '复制安装命令', pluginMdExportDesc: '在 better-sidebar 的 Markdown 工具栏上新增「导出」按钮:一键把当前 .md 渲染为独立 HTML(表格/代码块/Mermaid 图表内联,布局跟随预览主题)直接保存到同目录,或通过打印对话框导出为 PDF', + pluginAgentPersonaDesc: '按工作区或会话分发 system prompt 人设:一条人设可同时作用于多个工作区目录与会话,支持完全一致 / 前缀 / 包含 / 正则,越具体越优先,可标一条默认人设兜底;在设置页与对话页「人设」Tab 里管理,改完下一条消息生效', pluginOfficeDesc: '为 better-sidebar 编辑器提供 Office 三件套预览(.docx / .xlsx / .pptx),把重型 Office 渲染库拆出主包、按需安装', pluginFlowglassDesc: '实时会话流程图:三列泳道展示用户、助手与工具调用,支持并行分组、子代理支线、逐层钻取和实时状态;安装 better-sidebar 后注册原生「流镜」Tab,未安装时保留独立抽屉', pluginGitForgeDesc: 'better-sidebar「Git 凭据」Tab:GitHub/Gitea 等 Forge 账号库 + 按项目授权 + push 策略硬拦;token 仅存本地 secrets,不进模型上下文;提供只读 GitForge 工具与 agent HTTPS credential helper', @@ -441,6 +442,7 @@ export const zh = { pluginDocsPanelDesc: 'DSH 侧边栏里的「全局文档」:全局 Markdown 笔记,任何工作区随时可读——列表点选阅读、悬浮大纲跳转、Chrome / VS Code 外部打开、代码复制,目录可配置(默认 ~/.dsh/docs)', pluginEgoBrowserDesc: '把 CitroLabs/ego-lite 接进 DeepSeek Harness 的 agent 浏览器:32 个 ego_* 工具驱动真实 Chromium,侧边栏原生「ego 浏览器」Tab 实时观察 agent 逛的每个页面,可直接点击/拖拽/输入接管;装 better-sidebar 时自动注册 Tab,没装则退回浮动浮窗', pluginBilingualReaderDesc: '在 DSH 侧边栏读论文 PDF:原生 PDF 显示,选中一段文字即用大模型划词翻译,结合上下文、完全隔离主对话,只作阅读辅助', + pluginAgentPersonaName: 'dsh-agent-persona Agent 人设', pluginSentinelName: 'dsh-sentinel 唤醒系统', pluginEgoBrowserName: 'ego-browser Agent 浏览器', pluginBetterOverleafName: 'dsh-better-overleaf Overleaf 标签页', @@ -865,6 +867,7 @@ export const en: Record = { openPlugin: 'Open', copyInstall: 'Copy install command', pluginMdExportDesc: 'Adds an "Export" button to the Markdown toolbar in better-sidebar: one click renders the current .md into standalone HTML (tables / code blocks / Mermaid diagrams inlined, layout follows the preview theme) and saves it next to the .md, or exports to PDF via the print dialog', + pluginAgentPersonaDesc: 'System-prompt personas by workspace or session: one persona can cover several workspace directories and several sessions, matched exactly, by prefix, by substring or by regex, most specific wins, and one persona can be marked as the default; managed from a settings page and a 「人设」tab on the conversation, effective on the next message', pluginOfficeDesc: 'Office-suite preview (.docx / .xlsx / .pptx) for the better-sidebar editor, keeping the heavy Office render libraries out of the core bundle', pluginFlowglassDesc: 'Live session flowgraph with three lanes for user, assistant, and tool calls, plus parallel groups, sub-agent branches, drill-down, and live status; registers a native Flowglass tab when better-sidebar is installed and keeps its standalone drawer as a fallback', pluginGitForgeDesc: 'Git Forge tab: GitHub/Gitea (and other forge) account library + per-project grants + hard push policy; tokens stay in local secrets (never in model context); read-only GitForge tool and agent HTTPS credential helper', @@ -883,6 +886,7 @@ export const en: Record = { pluginEgoBrowserDesc: 'The agent browser for DeepSeek Harness: 32 ego_* tools drive a real Chromium, with a native sidebar "ego browser" tab giving a live view of every page the agent visits — you can click, drag, and type to take over. Registers the tab automatically when better-sidebar is present, otherwise falls back to a floating bubble', pluginBetterOverleafDesc: 'Overleaf tab for better-sidebar: direct-CDP browser login (third-party Chromium supported), project list/switch, local git mirrors under /overleaf/, two-way git sync with read-only API fallback, and file preview through the sidebar workbench', pluginBilingualReaderDesc: 'Read paper PDFs in the DSH sidebar: native PDF rendering, select text to translate it with the LLM, using context while staying fully isolated from the main conversation — a reading aid only', + pluginAgentPersonaName: 'dsh-agent-persona Personas', pluginSentinelName: 'dsh-sentinel Wake-up System', pluginEgoBrowserName: 'ego-browser Agent Browser', pluginBetterOverleafName: 'dsh-better-overleaf Overleaf Tab', diff --git a/src/client/plugins-tabs.ts b/src/client/plugins-tabs.ts index 4a05162a..1cd35ba2 100644 --- a/src/client/plugins-tabs.ts +++ b/src/client/plugins-tabs.ts @@ -33,6 +33,17 @@ export const builtinTabPlugins: readonly PluginEntry[] = [ // better-sidebar (auto-tab when present, floating bubble when not). install: 'cd ~/.dsh && dsh plugin --profile web add dsh-better-sidebar && dsh plugin --profile web add git+https://github.com/Fisfzy/ego-browser.git', }, + { + id: 'dsh-agent-persona', + name: () => t('pluginAgentPersonaName'), + url: 'https://github.com/Awoodwhale/dsh-agent-persona', + description: () => t('pluginAgentPersonaDesc'), + // Scopes system-prompt personas by workspace or session and serves them from a + // 「人设」tab (with its own settings page). The tab registers through this plugin's + // service, so better-sidebar is installed first; the package is on npm, so the + // install line needs no git form. + install: 'cd ~/.dsh && dsh plugin --profile web add dsh-better-sidebar && dsh plugin --profile web add dsh-agent-persona', + }, { id: 'dsh-better-overleaf', name: () => t('pluginBetterOverleafName'),