In the DSH (DeepSeek Harness) environment, session counts often surge with the use of cross-workspace and SSH routing. Manually organizing these chat records, tracking working hours, and generating summary reports can be very time-consuming. The dsh-worklog plugin provides an automated solution: it aggregates all sessions, records daily work hours and content summaries, and supports generating reports in multiple formats.

Core Features

dsh-worklog mainly addresses the organization and reporting of session records, with the following capabilities:

  • Full Aggregation: Uses ctx.sessionQuery to read all sessions on local and SSH-routed connections, including finished sessions.
  • Conversation Node-Level Summaries: Splits conversations into “user message → model completion” nodes, generates a summary for each node, and assigns it to the local date.
  • Active / Manual Summaries: Enable “Active Mode” to generate missing summaries immediately; the workbench provides a “Generate Summary (Node Slice)” button to support forced recalculation on demand.
  • Independent LLM Configuration: Supports DSH built-in, OpenAI-compatible, and Anthropic interfaces. You can configure baseUrl, apiKey, model, context, and a custom summary prompt.
  • Report Generation: Select a date range in the calendar view, check entries (supports select all / deselect all), and generate daily / weekly / monthly / half-year summaries in Markdown format.
  • Model Tools: Provides worklog_status / day / range / report / rescan tools that can be used in any session.

Installation and Enablement

Prerequisites: DSH (deepseek-harness) environment and Node.js version ≥ 22.

Install using the official repository address:

dsh plugin --profile web add github:aijunjiang/dsh-worklog

After installation, you need to restart dsh web to complete automatic registration of the host plugin, scanner, summary tools, and the “Workbench” client module. bundle.gui.patch.yml already includes the relevant configuration, so there is no need to manually modify the profile.

pnpm dsh web

The uninstall command is as follows:

dsh plugin --profile web remove dsh-worklog

How to Use

  1. View the Workbench: In the header view switcher of any session, click the “Workbench” tab to see the monthly calendar view, showing daily session volume and duration.
  2. View Details for a Day: Click a date in the calendar to view entries for that day. It is collapsed by default; click “Expand N Nodes” to view the node-level summaries for that date. Click two dates to select a date range.
  3. Generate a Report: After selecting the date range, click “Select All / Deselect All” or check entries one by one, choose the report type (daily / weekly / monthly / half-year), and click “Generate Report”.
  4. Fill in Summaries: After selecting dates, click “Generate Summary (Node Slice)” to recalculate as needed.
  5. Configure the Summary Model: Go to “Settings → Plugins → Plugin Configuration”, find the “Worklog” configuration item, and set the summary model, prompt, and Active Mode.

Configuration and Data

Summary Settings

In “Settings → Plugins → Worklog”, you can configure the following items:

Item Default Description
Model Interface Format dsh dsh (built-in default model) / openai (OpenAI-compatible) / anthropic
Base URL — External interface URL (for openai/anthropic)
API Key — If left empty, falls back to environment variable / credential store GJSL_API_KEY
Model Name — External model name
Context Window 0 Input context window tokens
Summary Prompt Built-in Customizable
Active Mode On Immediately fills in summaries for each date with new activity

Row-Level Configuration

If you need to override defaults (such as timezone offset, scan interval, silent threshold, output limit, summary concurrency, etc.), you can override by id in the profile’s cordis.patch.yml:

- id: worklog
  config:
    timezoneOffsetMinutes: 480   # 时区偏移(分钟),默认 480(UTC+8)
    scanIntervalMs: 300000       # 语料扫描间隔(毫秒)
    autoSummarize: true          # 会话结束后自动 LLM 摘要

Data and Cache

  • Data Directory: Defaults to $DSH_HOME/dsh-worklog/items.json.
  • Caching Mechanism: Each session stores nodes[], and node summaries carry a content fingerprint. If the fingerprint remains unchanged, it is reused; when a session has new activity, only newly added nodes are summed up, avoiding duplicate token consumption.

Notes

  • This plugin runs with the permissions of the current dsh process. It is recommended to check the source code and license before installation.
  • The plugin depends on Node.js ≥ 22.
  • Core plugin files are located in the src/ directory, including modules such as the host plugin entry, summary queue, node slicing, LLM calls, and report assembly.