dsh-soul
The DeepSeek Harness Personalization Settings plugin is used to configure the nickname, response style, tone, and custom commands of the Agent.
- Stars
- 2
- Language
- JavaScript
- Created
- Aug 31, 2026
- Updated
- Aug 31, 2026
Introduction
dsh-soul
DeepSeek Harness 个性化设置插件,用于配置 Agent 的昵称、回复风格、语调和自定义指令。
功能
- Web UI 个性化设置页面
- 启用或禁用个性化设置
- 设置用户昵称
- 选择回复风格:
professional、casual、friendly、humorous、academic - 选择语调:
neutral、formal、informal、enthusiastic、calm - 输入自定义指令和使用示例模板
- 配置持久化保存
- 配置更新后同步到所有活动 Agent
安装
dsh plugin --profile web add dsh-soul
dsh --profile web web
插件配置由 cordis.patch.yml 提供:
- insert:
- id: soul
name: dsh-soul
使用
启动 DSH 后,进入设置页面中的「个性化设置」栏目,修改配置并点击「保存设置」。
也可以使用斜杠命令:
/soul show 查看当前配置
/soul reset 重置配置
/soul enable 启用个性化设置
/soul disable 禁用个性化设置
/soul 小明 设置昵称
配置保存后会同步到所有活动 Agent,当前会话下一次请求即可使用最新配置。
配置文件
插件将配置保存到 DSH 的用户数据目录,文件名为:
soul-config.json
配置示例:
{
"enabled": true,
"nickname": "小明",
"style": "professional",
"tone": "neutral",
"customInstructions": "请保持简洁,优先给出结论。"
}
实现原理
插件通过 compilePrompt() 将昵称、风格、语调和自定义指令编译成 system prompt,并注册到 DSH:
spCtx.systemPrompt.section({
name: 'soul:persona',
order: 0,
text: () => compilePrompt(configCache || DEFAULT_CONFIG)
})
配置更新后,插件会遍历所有活动 Agent,使用标准 UserMessage 调用 agent.inject():
agent.inject(createUserMessage({
content: [{ type: 'text', text: prompt }],
source: {
kind: 'plugin',
plugin: 'dsh-soul',
form: 'snapshot',
sections: [{ name: 'soul:persona', text: prompt }]
}
}))
agent.inject() 会将最新配置放入 Agent 的待处理上下文,在下一次请求中生效;不会主动触发新请求,也不会修改历史消息。
许可证
MIT License