DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

changguo1998 /

changguo1998/dsh-turtle-ui-prompt-extra

已验证

这个插件还没有填写简介。

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub
README来源: main@66532963

dsh-turtle-ui-prompt-extra

Extra top-bar slots for the official turtle-ui TUI of DeepSeek Harness.

turtle-ui (package @deepseek-ai/dsh-tui) lets a profile compose its top bar via theme.leftPrompt from a shared slot registry, ctx.tuiPrompt. It ships eight built-in slots (cwd, git/worktree, token_meter/cache_hit_rate, model, context, queued, symbol, indicator) — but no provider, no reasoning-effort, no clock. This plugin adds those.

Slot Widget Source Default on
${provider} current provider route (ustc) session request header → agentDefaultModel yes
${route} atomic ${provider}/${model}:${thinking} (ustc/deepseek-v4-flash:none) same yes
${thinking} reasoning effort (high, falls back to none) same yes
${time} wall clock, 24h/12h Date on a timer yes
${date} calendar date YYYY-MM-DD Date on a timer no
${session} short session id running agent id no

Unlike whole-TUI replacements (dsh-tui-pi, dsh-cc-tui), this plugin adds only prompt variables to the official TUI. No config here changes the top bar composition — that stays in your profile's theme.leftPrompt, exactly like turtle-ui's own built-in-slots-on-profile pattern.

Install

# in your profile dir (e.g. ~/.dsh/profiles/tui)
dsh plugin --profile tui add dsh-turtle-ui-prompt-extra

or, for a local checkout with a manual file-path row, see examples/.

Quick start

Append to your profile's cordis.patch.yml:

- insert:
    - id: prompt-extra
      name: "dsh-turtle-ui-prompt-extra"

- id: tui
  config:
    theme:
      leftPrompt: "${cwd} ${git/worktree} ${route} ${context} ${token_meter/cache_hit_rate} ${time}"
      rightPrompt: "${queued}"

Tip: prefer the atomic ${route} slot (provider/model:thinking) over gluing ${provider}/${model}:${thinking}. turtle-ui's built-in ${model} value carries its own leading whitespace (a glue-free default-template convention), so ${provider}/${model} renders a stray gap between the slash and the model. ${route} composes all three atomically instead — ustc/deepseek-v4-flash:none — and falls back to none while no session has started.

The - id: tui override replaces the bundle default, so any listed slot not registered (or empty at that moment) is pruned from the rendered bar. Run dsh --profile tui to see the new slots.

Config

- id: prompt-extra
  config:
    prefix: extra # namespace all slots: `${extra/time}`
    timeFormat: "24h" # or '12h'
    tickMs: 1000 # clock + lazy probe interval
    warnOnCollision: true # log instead of silently skip a collision
    slots: # absence keeps DEFAULT_SLOTS
      provider: true
      route: true
      thinking: true
      time: true
      date: false
      session: false

Slots are registered with the pattern prefix/name when prefix is set. Colliding names (already registered — e.g. a future turtle-ui builtin) are skipped, never thrown through the plugin boundary.

Degradation contract

  • No ctx.tuiPrompt service → the plugin stays silent (retries on each tick).
  • Non-turtle-ui host → no-op; never throws, never blocks boot.
  • Settings fetch failure → the slot value is undefined for that tick.

Development

pnpm install
pnpm typecheck
pnpm test       # > tests in src/index.test.ts
pnpm build      # emits dist/src/index.js

License

MIT


Also available in 简体中文.

—/ 5

暂无评分

已验证 DSH bundle

Commit 6653296350cc

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于