DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

changguo1998 /

dsh-turtle-ui-prompt-extra

Verified

This repository has no description yet.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@dd82a5e3

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
${thinking} reasoning effort (high) 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} ${provider}/${model}:${thinking} ${context} ${token_meter/cache_hit_rate} ${time}"
      rightPrompt: "${queued}"

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
      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

No ratings yet

Verified DSH bundle

Commit dd82a5e39802

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout