DSH Plugins Marketplace

DSH Plugins

Plugins

/

Models & Providers

/

dsh-model-endpoint-link

d

dsh-model-endpoint-link

Manifest valid

Broadcasts the current session's effective model selection as a window event at the moment it changes, for consumers that need the selection before the first request round, such as a balance widget sw

UI (client)hasBundlePatch

dsh-model-endpoint-link

English | 简体中文

DSH 浏览器端插件:把「当前会话选中的模型来源」广播成一个 window 事件(dsh:model-selected), 在用户选中模型的那一刻就通知到关心这件事的组件。已知主要消费者是右下角余额挂件 dsh-whale-widget(第三方插件)——它监听这个事件来切换自己的接入点记账。纯事件桥,不读不写任何挂件配置。

它解决什么

以余额挂件为例:挂件支持"分接入点记账",接入点 = DSH 的 provider 路由 id。 挂件自己的 view.mode = auto 虽然叫"跟随当前会话接入点",但要等一轮真正发请求之后才更新。

本插件补上"选中的那一刻就通知":用户在下拉里选模型 → 立刻广播该模型所属的来源。 任何监听 window 上 dsh:model-selected 事件的脚本都能收到 { provider, model }。

它怎么做到的(零改动消费者)

  • 挂在会话级插槽 conversation.session.header.utilities(零渲染组件,每会话一个)
  • 读会话投影 modelSelection:{ lastUsed, next },取 next ?? lastUsed ⇒ next = pending ?? lastUsed,用户刚选中(写 model/selection 事件)时 next 立刻就是新模型
  • 派发 window.dispatchEvent(new CustomEvent('dsh:model-selected', { detail: { provider, model } }))
  • 只在"当前正在看的那个会话"里派发(useSessions(s => s.current) === sessionId), 避免后台会话把消费者带跑偏
  • 同一 selection 去重;变化时会补发一次(900ms 后),防止消费者脚本尚未注册监听时丢事件
  • 不读不写任何第三方配置、不调任何第三方路由 —— 纯事件

开关

设置 → 通用 → 「挂件接入点跟随模型」,默认开启。关掉后各组件回到自身逻辑。

安装

dsh plugin --profile web add -w dsh-model-endpoint-link

手动等价方式:包放到 <DSH_HOME>/profiles/node_modules/dsh-model-endpoint-link/,在 cordis.patch.yml 加一条:

- insert:
    - id: model-endpoint-link
      name: 'dsh-model-endpoint-link'

卸载

删掉那条 insert(需要完整重启 DSH,插件行只在启动时组装)。

已知行为

  • 若切到的来源在挂件账本里还没有:挂件会在设置面板下拉里补一个占位 option (挂件自身既有行为,不落盘建接入点记录);挂件显示该来源的空账是预期结果。

兼容性

  • DeepSeek Harness 0.1.5-rc.1(web profile,浏览器端)
  • 客户端仅 require react / react/jsx-runtime(平台基线表内)
  • 事件契约 dsh:model-selected 由 dsh-whale-widget 定义并消费;本插件只做发射端

License

MIT

Comments

Loading…

Similar plugins

dsh-model-picker

by ttmouse

Model picker for the DSH web composer that replaces the model seat: a search-first popup whose left column indexes the suppliers and scrolls the grouped list, with a favorites group pinned at the top,

UI & ExperienceManifest valid

★ 4

↓ 211/wk

JavaScript

Oct 20, 2026

dsh plugin --profile web add dsh-model-picker

Provider-first three-level model selector for the DSH Web model seat: pick a provider, then a model from that provider, with inline search on both levels, failed-provider retry rows, and a Model · Pro

UI & ExperienceManifest valid

★ 0

dsh plugin --profile web add dsh-model-provider

DSH plugin: matches a model you declared on a custom gateway to the capability metadata it should have — context window, output cap, reasoning levels and image support — by looking the bare model name

Models & ProvidersManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add dsh-model-metadata

by ZZJQ678

按渠道商(Provider)分组、可折叠的 DSH 模型选择器:替换聊天输入框右下角原生选择器。仅在 DSH 桌面版实测通过,Web 版未测试。

Tools & CapabilitiesUI & ExperienceManifest valid

★ 0

MIT

JavaScript

Sep 19, 2026

dsh plugin --profile web add dsh-model-picker

Shows the selected model provider's account balance next to the composer's model seat once a model and reasoning effort are selected.

UI & ExperienceModels & ProvidersManifest valid

★ 0

dsh plugin --profile web add @kkbsgg/dsh-balance

为模型展示交付成果和下达精细微调指示的dsh desktop面板

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add dsh-plugin-middle-panel