the-ninth-moon/dsh-preset-switch
the-ninth-moon★ 1JavaScriptLast synced: 2026-08-16
Mid-session agent-preset switch for DeepSeek Harness: composer button beside the access-mode control + /preset command
README excerpt
dsh-preset-switch 在 DeepSeek Harness(dsh)Web 界面中,为 运行中的会话 提供 Agent 模式(agent preset)中途切换能力: - 在输入框工具行、 权限(访问模式)按钮旁边 新增一个「⇄ 模式」按钮; - 点击弹出预设菜单(内置 + 自定义),选择后 立即切换当前会话的模式 ,无需新建会话; - 切换通过 agentPresets.recompose 实时重链 agent scope,并在会话日志记录 agent-preset/selected 事件; - 向模型追加一条 通知,让模型知道自己的工具与提示词已切换到新模式; - 也支持直接输入斜杠命令 /preset 完成切换。 安装 前提:dsh Web 版(本包依赖 host 侧 commands 与 agentPresets 服务,两者在默认 profile 中均已挂载)。 重要:本包是零依赖的 (host 半不 import 任何 @deepseek-ai/ 包,只使用 ctx 上的公共服务;client 半仅 require("react") ,由浏览器模块表提供)。它 必须 作为唯一的包实例加载——dsh 的 agent scope 依赖 @deepseek-ai/dsh-scope 的模块私有 Symbol,任何 @deepseek-ai/ 核心包出现第二份副本都会让 scope 识别失效、所有会话无法创建。所以不要把本包(或任何会带入 @deepseek-ai peer 依赖的包)装进 profiles/web/node modules ,也不要给它加 peerDependencies 。 手动安装 1. 在 profile 根安装包(注意:不是 profiles/web 下,避免双包): 若你的 profiles/node modules 不是 junction 而是真实目录,安装后请把 profiles/node modules/dsh-preset-switch 放进 dsh 实际解析模块的根(与 @deepseek-ai 同级的目录)。 2. 编辑 $DSH HOME/profiles/web/cordis.patch.yml ,加入: 大概长这样 3. 重启 dsh 后生效。 使用 1. 打开任意会话(无论哪种模式); 2. 输入框左下角、权限按钮右侧出现「⇄ 模式」按钮; 3. 点击 → 选择目标模式 → 当前会话立即切换; 4. 模型下一轮会收到模式切换通知。 也可以直接输入 /preset (如 /preset minimal-v3 )。 工作原理 - Client 半 ( lib/client.js ):注册到 conversation.input.left 槽位;菜单数据来自现有 agentPresets.list R…
View full README on GitHub →Category
🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards, slides, images & video — real files, HTML/PDF/PPTX/MP4 export. 🤖 Claude Code / Codex / Cursor / DeepSeek Harness / OpenCode & 20+ CLIs via BYOK.
★ 87,829
volcengine/OpenVikingSelf-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
★ 28,745
titanwings/colleague-skill将冰冷的离别化为温暖的 Skill,欢迎加入数字生命1.0!Transforming cold farewells into warm skills? It's giving rebirth era. Welcome to Digital Life 1.0. 🫶
★ 22,971