dsh-client-ui-route-badge
界面增强 活跃维护

dsh-client-ui-route-badge

zhanghao3693/dsh-client-ui-route-badge

轻量级路由日志徽章 UI 插件,在页面角落挂载可折叠徽章,实时统计路由跳转次数,点击展开查看当前路径与历史记录,支持主题跟随、位置与徽章样式自定义。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
None
开源协议
14 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:zhanghao3693/dsh-client-ui-route-badge
git clone https://github.com/zhanghao3693/dsh-client-ui-route-badge.git
git clone git@github.com:zhanghao3693/dsh-client-ui-route-badge.git
README.md main

dsh-client-ui-route-badge

Shows which backend model actually served each request when using auto route.

A client-side UI plugin for DeepSeek Harness Web that injects a "Route Log" panel into the conversation view, displaying real-time routing decisions from dsh-llm-router.

Features

  • 📊 Live route log table in conversation view (injected via conversation.view slot)
  • 🏷️ Color-coded kind badges: Default (blue), Vision (purple), Long Context (orange), Fallback (red)
  • 🔢 Fallback depth indicator (— / #1 / #2)
  • ⏱️ Relative timestamps (刚刚 / N秒前 / N分钟前)
  • 🎨 DSW design token theming (var(--dsw-alias-*)) — follows light/dark mode
  • 🌐 i18n support (zh/en) via ctx.locale.register
  • 🔄 Auto-refresh every 4 seconds via polling /api/llm-router/routes
  • 📦 Zero host-side dependency — pure client plugin

Screenshot

(Route log panel showing recent requests with kind badges, actual models, and fallback indices)

Install

Requires dsh-llm-router installed first:

dsh plugin --profile web add dsh-llm-router
dsh plugin --profile web add dsh-client-ui-route-badge

How it works

  1. Extracts session ID from URL path (/sessions/<sessionId>)
  2. Polls GET /api/llm-router/routes?sessionId=<id>&limit=50 every 4s
  3. Renders results as an HTML table with styled badges

License

MIT