dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
English | 中文
A DSH Web GUI plugin that provides a simple tool call collapsing: consecutive tool calls are collapsed into a single compact bar showing only a one‑line summary of the last call. Click to expand/collapse.
It does not replace any built‑in renderer, and uninstallation restores the UI completely.
dsh plugin --profile web add dsh-toolfold
# From GitHub
dsh plugin --profile web add github:Minecraftbe/dsh-toolfold
# From source
git clone https://github.com/Minecraftbe/dsh-toolfold.git
dsh plugin --profile web add ./dsh-toolfold
After installation, restart dsh and refresh your browser – the plugin will be active. You can verify that it is included in the final bundle with:
dsh --profile web --dump-config
dsh plugin --profile web remove dsh-toolfold
After restart, the interface returns to its original state.
⚠️ Version support: the supported DSH range is whatever
engines.dshinpackage.jsondeclares. On DSH versions outside this range, the settings card shows a version-mismatch warning (hover for the live range) and folding may not work correctly.
Once installed, consecutive tool calls are automatically folded into a single bar in any DSH conversation.
Enter / Space also work)The plugin works immediately after installation, but you might notice two things that seem “unexpected” at first. Both are intentional defaults and can be changed easily.
Reason: “Thinking display” defaults to “Auto-follow official fold” — completed thinking is hidden unless the official Compact view folds the whole process block.
How to restore: go to Settings → Plugins → Tool Fold and set “Thinking display” to “Always keep”.
Reason: “Split thinking across call groups” is on by default (splitThink: true). The plugin treats a completed thinking block as a logical separator, folding calls before and after it independently.
How to merge them: go to Settings → Plugins → Tool Fold and turn off “Split thinking across call groups”.
Ongoing (streaming) thinking is always visible regardless of these settings, and will only be processed according to the rules once it finishes.
Settings are found at: Settings → Plugins → Tool Fold (the card looks like other built‑in plugin cards and follows the light/dark theme).
| Option | Description |
|---|---|
| Expand animation duration | Duration of the expand/collapse animation per card (0–1000 ms, default 240 ms; 0 = instant) |
| Thinking display | How completed thinking is shown: auto-follow official fold (default) / always keep / always hide |
| Split thinking across call groups | Enabled by default: a completed thinking block separates tool calls before and after it into independent fold bars. Disabled: thinking is folded together with the surrounding call group (legacy behaviour) |
| Performance stats | Show real‑time plugin timing in the card (cumulative count and ms/s for observation callbacks, engine refresh, merge recalculation, safe rescan, summary cloning, plus the number of streaming batches short‑circuited with zero overhead) |
Plugin settings are persisted automatically, with the following priority:
Primary (installed/bundle mode) – stored via the DSH settings service in ~/.dsh/settings.yaml (namespace toolfold). They follow the dsh host, so they persist across browsers/devices. You can also edit the file manually:
toolfold:
durMs: 240 # expand animation duration 0–2000 ms
thinkMode: auto # completed-thinking display: auto-follow official fold / keep always / hide always
splitThink: true # whether to split call groups by thinking
stats: false # whether to enable performance stats
Fallback (when settings service is unavailable) – falls back to browser localStorage (key dsh-toolfold.settings.v1), so settings are only kept in that browser. The old key dsh-codex-collapse.settings.v1 is automatically migrated on first load.
The settings card shows the current storage method (“Settings saved in DSH host config” or “Saved only in this browser”).
MutationObserver and requestAnimationFrame. If unsupported, it falls back to “fold once on initial render”.~/.dsh/settings.yaml) when available; only falls back to localStorage when the host bridge is unreachable (in which case settings are browser‑local only).This project is entirely built with dsh + deepseek v4 flash(max).