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

rocklau /

rocklau/dsh-ui-tool-graph

已验证

Tool-call value graph tab for the DeepSeek Harness (dsh) Web UI: cost/duration/error weights over conversation trajectories with one-click next-turn optimization prompts.

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

dsh-ui-tool-graph

A tool-call value graph tab for the DeepSeek Harness (dsh) Web UI.

Agent trajectories bury their own economics: which tool ate the wall time, where calls failed, how many tokens each round burned, which calls repeated themselves verbatim. This plugin adds a Tool Graph (工具图谱) tab to the conversation view ring that folds the session log into one weighted relationship graph:

  • Nodes are tools, sized by the metric you pick (total duration, call count, errors) with an outer ring proportional to the error rate;
  • Edges are transitions, one per consecutive dispatch pair within a turn, weighted by transition count;
  • Insights call out the dominant bottleneck, error-prone tools, identical repeat calls, self-loops worth batching, the longest inter-call wait, and the step that produced the most output tokens;
  • Next-turn guidance renders those metrics into a self-contained analysis prompt you can copy to the clipboard or queue as your literal next message.

Everything is folded client-side from the durable session log — deterministic, replay-safe, no extra model calls, no persistence, zero token cost.

Tool graph in a real session

Features

  • Weighted radial graph — switch node weighting between total duration / call count / errors at any time; edge width ∝ transition count.
  • Optimization insights — rule-derived findings with severity dots: bottleneck share, error-prone tools, verbatim repeats (cache/dedup candidates), consecutive same-tool chains, model-generation waits, token-heavy steps.
  • Per-tool ranking table — total / average duration, calls, errors; click a row or node to drill into every individual call with its duration and argument excerpt.
  • Session totals strip — calls, running, failures, tool wall time, longest average gap, output tokens.
  • One-click next turn — copy the analysis prompt, or send it as your next queued message after an explicit second click.

Installation

This checkout targets Harness 0.2.0-rc.2 and Cordis 4.0.4. Place the repositories at ai/deepseek-harness and ai/dsh-plugins/dsh-ui-tool-graph, and build Harness first; development dependencies link to its built libraries. Build this package, then install its tarball.

pnpm install --ignore-scripts
pnpm run typecheck
pnpm test
pnpm build
pnpm pack
dsh plugin --profile web add ./dsh-ui-tool-graph-0.1.3.tgz

Restart the profile if the Plugin Manager reports that a restart is required. Every conversation gains a 工具图谱 (Tool Graph) tab.

For Desktop, install the generated tarball through Plugins in the running application, enable the bundle, and restart Desktop when requested. Open a conversation and select Tool Graph (工具图谱). A conversation without tool calls displays an empty state. The CLI commands here manage a Web profile, not Desktop's reserved profile.

Uninstall: dsh plugin --profile web remove dsh-ui-tool-graph.

How it works

Metric Definition
Call duration tool/result time − paired tool/call time (wall clock)
Tool wall time Sum over completed calls in the loaded window
Error rate Error results ÷ completed calls per tool
Transition edge Consecutive call pair within one turn, in log order
Average gap Per-edge mean of result→next-start latency (dominated by model generation wait)
Tokens Provider usage carried by each finalized assistant message, deduplicated per step

The view target folds incrementally (replace/apply over the event window), so totals cover exactly what the history window holds; page older turns in the Trajectory tab to extend coverage. Result-only records without their loaded call are excluded because the name and start time are unavailable. The plugin registers event definitions and its view through uiConversation and receives its per-session target through the framework-bound useToolGraph hook. Colors follow the application's light and dark theme tokens.

Known limitations

  • Nested sub-calls (delegations) fold as their parent result only.
  • The LLM-vs-tool wall-time split is approximated by inter-call gaps; per-request timing attribution is not yet surfaced.
  • Single-tool sessions render one node without edges — by definition.

Development

pnpm install
pnpm typecheck   # tsc --noEmit (strict)
pnpm test        # vitest: folding parity, layout purity, prompts, component behavior
pnpm build       # lib/index.js (node half) + lib/client.js (browser bundle)
pnpm pack        # installable tarball

The package is a dual-identity bundle: dsh.bundle ships the patch layer, dsh.client declares the web plugin. Runtime imports are limited to the host-shared React, Cordis, Client Store, UI Slots, UI Primitives, and Dockkit modules; feature plugins are accessed through type declarations and injected services.

License

MIT

—/ 5

暂无评分

已验证 DSH bundle

Commit 4eb6548b40c5

社区评论

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

DSH HUB

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

社区资源API关于