Semidia/dsh-sampling-sliders

Semidia★ 1TypeScriptLast synced: 2026-08-15

Open on GitHub

DSH plugin: model sampling sliders (temperature/maxTokens) with hot & persist modes, for all providers

README excerpt

dsh-sampling-sliders 模型采样参数滑杆 — DeepSeek Harness (DSH) 插件。输入栏「采样」按钮弹出面板,用 temperature / maxTokens 滑杆微调每次模型调用的采样参数,经 agent/request 钩子作用于 所有 Provider (官方 DeepSeek 与第三方接入)。 Model sampling sliders for DeepSeek Harness: a "采样" button next to the model selector opens temperature / maxTokens sliders that tune every model call for all providers via the agent/request hook. 功能 / Features - 输入栏「采样」按钮( conversation.input.right ),点击弹出面板。 - temperature (0–2,步进 0.05)、 maxTokens (512–32768,步进 256)滑杆,各带「覆盖」开关;不勾选 = 跟随模型默认。 - 热调 / 持久化 两种模式: - 持久化:值写入 settings,长期生效(重启仍在)。 - 热调:值本次运行生效, 下次启动自动清除 。 - 作用于所有 Provider(拦截发生在 Provider 路由之前)。 原理 / How it works - Host ( src/index.ts ): inject: ['settings'] ,注册 sampling-sliders settings 命名空间(schema: { mode, temperature?, maxTokens? } ),并监听 agent/request 瀑布事件: await next() 拿到机器本会使用的 LlmCallConfig ,若命名空间里有数值就合并进返回的替换配置。启动时若发现残留的 mode: 'hot' 值会清空(热调语义)。 - Client ( dist/client.js ): window. ModuleLoader .load({ id, factory }) 浏览器 bundle,经 connection.api.settings.describe/update/replace 读写命名空间,渲染按钮与弹层。 安装 / Install Out-of-tree bundle(GitHub 直装,无需 npm 账号): 本包自带 dsh.client 元数据与 exports["./client"] ,客户端 bundle 随页面加载自动注入;无需 npm publish。 文件结构 / Files 已知限制 / Limitations …

View full README on GitHub →
Tools / Devdeepseek-harnessdsh-pluginagent

Category