前言¶
DeepSeek Harness(DSH)默認把智能體當成編碼助手:改文件、跑命令、委派子任務都在工具面板上。日常答疑、方案討論、讀文檔時,同一套能力容易把對話拉成「先改再說」的節奏。若只靠臨時改 system prompt,很難在「本會話關工具、其他會話照舊」之間切換,也不利於 resume、fork 後狀態一致。
dsh-convo-mode 是 stansz 維護的 DSH bundle:在同一 agent 上增加按會話啓用的 conversation mode,用 composer 上的芯片或 /conversation 切換,並在激活時疊加對話策略 prompt、把工具收成只讀白名單。
這是什麼¶
dsh-convo-mode 面向 DeepSeek Harness,提供 per-session conversation mode——仍是同一個 agent,但被引導爲對話型助手,編碼類工具在模式內不可調用。實現形態是 DSH bundle:cordis.patch.yml 一行配置、Host 插件與 Web 客戶端插件一併裝入 profile,對該 profile 下所有 workspace 的會話生效。
- 維護者:stansz
- 分類:客戶端(Web client 注入 composer 區域)
- 許可證:MIT(見倉庫 LICENSE)
- 包版本(package.json):1.0.0
社區目錄頁:skillhub.cn/plugins/stansz/dsh-convo-mode(獨立站點,與 DeepSeek / 幻方無從屬關係)。源碼:github.com/stansz/dsh-convo-mode。
核心功能¶
對話策略(Prompt)¶
模式激活時,向 system prompt 追加一節,約束助手:自然 prose、篇幅貼合問題、不主動產出 artifacts、不確定時先問一句澄清而非猜測;代碼僅作聊天中的說明性示例。
只讀工具策略(Tools)¶
模式內 agent 的工具範圍限制在只讀 allow list,例如 read、glob、grep、read_image、web search/fetch、ask_user_question、skill 以及會話歷史讀取類工具。寫文件、編輯、shell、作業、終端、委派與工作流類工具不會呈現給模型,也無法調用。策略綁定在當前 agent,退出模式後釋放。
若配置爲 tools: unrestricted,則不受上述只讀限制(見下文配置)。
客戶端入口¶
Web 端在 composer 工具行左側註冊 Chat 芯片(掛載點 conversation.input.left),讀取 Host 側投影狀態,與 slash 命令共用同一切換邏輯;樣式使用 --dsw-alias-* 主題 token,不依賴 Harness Client 包導入。
狀態持久化¶
模式狀態通過 session 上的 conversation 投影摺疊 /conversation 的 command/run / command/done 記錄實現,不追加私有 session 事件類型,因此 resume、fork、重啓後仍可恢復;且 按會話隔離——其他會話、子 agent、協作者仍保持原有編碼配置。
安裝與啓用¶
bundle 以 profile 插件方式安裝,與 dsh-frontend-review、dsh-git 等 GitHub bundle 相同。安裝後掛載一行 id: dsh-convo-mode,名稱爲 dsh-convo-mode。
方式一(推薦):從 GitHub URL 安裝
在 Web UI 打開 Plugins → install a bundle,指向:
https://github.com/stansz/dsh-convo-mode
插件管理器會解析包、加入 profile 並激活,無需重啓。倉庫爲 private,機器需已登錄 GitHub 賬號 stansz(例如 gh auth status 顯示該賬號)。
方式二:本地目錄安裝
在已具備倉庫訪問權限的機器上,將 clone 後的目錄通過 Plugin Manager 的 local bundle / 與其他本地 bundle 相同的 package-directory 方式安裝。
profile 被該 profile 下所有 session 共享,因此模式在該 profile 的全部 workspace 中可用。
典型用法¶
- 點擊 composer 工具行左側的 Chat 芯片,或輸入
/conversation進入對話模式。 /conversation <message>可在一步內進入模式併發送該條消息。/conversation off退出;芯片也可再次點擊切換。
模式寫入 session log,跨 resume、fork 與重啓保持;僅影響當前會話。
配置¶
兩處等價:
- Web UI:Settings → Plugins → Conversation Mode → Configure(含引導文案、只讀/ unrestricted、allow list、「新會話默認進入模式」等 schema 字段)。
- Profile patch:
$DSH_HOME/profiles/<profile>/cordis.patch.yml中按id: dsh-convo-mode覆蓋config(整段替換該行 config)。
示例(來自 README):
- id: dsh-convo-mode
config:
section: | # model-facing guidance while active
Be a warm, concise conversational partner...
tools: readonly # or "unrestricted"
allow: [read, web_search] # override the read-only allow list
defaultActive: false # true starts every session in the mode
加載時會校驗:未知鍵或類型錯誤會導致插件加載失敗,而不是靜默忽略。
自測(維護者)¶
Host 半部提供無外部依賴測試:
node test/host-half.test.mjs # prints ALL HOST HALF TESTS PASSED
適用場景與注意¶
適合:在同一 DSH profile 裏,部分會話只想聊天、查資料、只讀瀏覽代碼,又不想全局關掉編碼工具;需要 UI 一鍵切換且狀態可隨會話日誌恢復的場景。
注意:
- 插件以當前 DSH 進程權限運行;安裝前請閱讀源碼與 MIT 許可證,並確認 private 倉庫的訪問與信任邊界。
tools: unrestricted會取消只讀限制,與「對話模式隔離寫操作」的初衷相悖時需自行權衡。- 子 agent、其他會話不受本會話模式影響,勿誤以爲全 profile 已進入純對話環境。
結尾¶
dsh-convo-mode 把「對話助手」做成可切換、可持久、按會話隔離的 DSH bundle:composer 芯片與 /conversation 負責入口,prompt 與 agent 級工具策略負責行爲邊界。進一步瞭解可訪問目錄頁 skillhub.cn/plugins/stansz/dsh-convo-mode 與 GitHub 倉庫 github.com/stansz/dsh-convo-mode。