When debugging an agent, developers need to quickly locate input, Token consumption, or tool call details within massive message streams. The original view often lacks structured grouping, making it hard to see the context at a glance.
trajectory-clean is a clean trajectory view plugin for DeepSeek Harness. It is maintained by gaogx96 and aims to solve information overload when viewing trajectories through a cleaner interface and structured information presentation.
Core Features¶
The plugin restructures the conversation view using tabs and groups:
- Tab integration: Adds a “Trajectory” tab at the top of the conversation, alongside the original “Chat” tab.
- Message grouping: Groups by user messages, with titles directly showing the input content for quick location.
- Type labels: Displays a type label for each message (user/model/tool/command/error, etc.).
- Token statistics: Shows Token consumption for input, output, and cache hits (chip-style labels).
- Expandable details: Click to expand and view text, thinking process, tool parameters and results, Token details, model name, and first Token latency.
- Top overview: Provides a statistical overview of total records, rounds, input/output Tokens, cache, errors, and tool calls.
- Theme adaptation: Uses
--dsw-alias-*CSS variables and adapts to all themes (including the Deep Sea Maid skin, etc.). - Minimal style: The interface has no emoji and no decorative AI elements, keeping a clean tool-style appearance.
Installation and Enablement¶
Three installation methods are supported; choose one based on your project structure.
Method 1: Local Package Installation¶
- Copy the entire
trajectory-cleandirectory to your project directory. - Add
"trajectory-clean"to thedsh.profile.bundlesarray inpackage.json.
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"trajectory-clean"
]
}
}
}
- Restart
dsh webor refresh the page.
Method 2: NPM Installation¶
- Publish to npm:
npm publish
Or other users can install:
npm install trajectory-clean
- Add the dependency and bundle to the web profile’s
package.json.
Method 3: dshmarket Package¶
- Package according to the dshmarket specification.
- Publish to the dshmarket repository.
- Other users install it through dshmarket.
Typical Usage¶
After installation, click the “Trajectory” tab at the top of the conversation:
- Quick location: Use the user-message group titles to quickly find specific input content.
- Check consumption: View Token statistics in the overview bar or message rows, including cache-hit status.
- Deep debugging: Expand any message to view the model’s thinking process, the specific parameters and returned results of tool calls, and details such as first Token latency.
Use Cases and Notes¶
- Audience: Developers who frequently need to analyze agent run trajectories, debug tool calls, or monitor Token consumption.
- Runtime mechanism: During plugin execution, the session snapshot is automatically read via
useSession. - Dependencies: Depends on
@deepseek-ai/dsh-client-ui-conversationand@deepseek-ai/dsh-client-ui-trajectory. - License: MIT License.
- Security note: The plugin runs with the current DSH process permissions; check the source code and license before installing.
Summary¶
trajectory-clean provides a structured, low-distraction trajectory viewing solution. Through tabs, grouping, and clear information hierarchy, it helps developers analyze conversation data more efficiently.