Preface

The DSH (DeepSeek Harness) Web UI plugin ecosystem allows developers to extend the conversation interface. dsh-session-memo is a conversation-side memo plugin that aggregates the current session workspace’s GitHub sync status / npm publish status / project version / memo tags into a floating panel that can be summoned at any time, making it easy to quickly grasp project context during conversations.

Plugin Overview

  • Name: dsh-session-memo
  • Maintainer: LucienLL
  • Category: Client
  • License: MIT

This plugin aims to address the need to quickly check the current project status (such as Git sync status and npm version differences) in DSH conversations, while also providing functionality for manually recording memos.

Core Features

  1. Automatic Git status detection: Detects the current Git branch, sync status with upstream (ahead/behind), number of uncommitted changes (dirty), and number of conflicts.
  2. npm publish status comparison: Compares the local package.json version with the latest version in the npm registry and determines whether it is behind.
  3. Project version management: Automatically detects the project version and supports manual input to override.
  4. Memo tags and notes: Supports freely adding/removing memo tags and free-form text entry for notes.
  5. Status linkage: Loosely linked with the status label of the dsh-session-status plugin; the panel header displays the current session status and can be clicked to switch.

Installation and Activation

Run the following command under a DSH profile to install:

dsh plugin --profile web add dsh-session-memo

After installation is complete, restart dsh web for it to take effect.

Usage

  1. Open the panel: Click the 📋 button in the DSH Web conversation header. The status is automatically detected once when the panel is opened; you can also refresh manually within the panel.
  2. GitHub sync: The panel displays the current branch, upstream address, and sync status.
    • When behind > 0 or dirty > 0, the status is amber (such as “Behind 2 · 3 uncommitted”).
    • When conflicts exist, the status is displayed in red.
    • When fully synchronized, it displays green “Synced”.
  3. npm publish: Displays the package name and a comparison between the local version and the latest Registry version. If behind, it prompts “A new version can be published”. You can click “Mark as published” to manually record the publish time, but automatic comparison still shows the actual status.
  4. Version override: Manually enter a version number in the version input box and press Enter or blur to save. Click the “Restore” button to return to automatic detection mode.
  5. Memo tags and notes: Freely enter tag content; it is automatically saved after blurring. Notes are free-form text and are automatically saved after blurring.
  6. Status switching: The panel header displays the current status Pill of dsh-session-status; clicking cycles through the statuses (In Progress → Closed → On Hold → None).

Working Principle

The plugin adopts a Host + Browser dual-end architecture.

  • Host end:
    • lib/index.js: Registers the settings namespace dsh-session-memo and the GET /dsh-session-memo/probe route.
    • lib/memo.js: Responsible for pure logic processing, including parsing git porcelain, semver version comparison, parsing package.json, and orchestrating MemoService (executing read-only git detection, reading fs, fetching npm registry).
  • Browser end:
    • lib/client.js: Responsible for injecting the entry button through conversation.session.header.actions, rendering the floating panel using shell.overlay, and reading/writing data through settingsScope.

Permission Boundaries:
* Git only uses read-only commands (such as status --porcelain=v1 -b, log -1, remote -v, rev-parse --show-toplevel).
* npm only executes GET requests.
* File system only reads package.json.

Data Flow:
* Automatic detection results are not persisted to disk; they are only displayed in memory.
* Manual override data such as version, notes, and tags are written to the settings namespace to achieve cross-session persistence.

Cautions

  • Detection is only executed when the panel is opened or when manually refreshing; it does not run continuous polling.
  • Git commands have a graceMs=5000 timeout as a fallback, npm queries have an 8s timeout, and on failure only the display of that field is degraded.
  • After installation, the plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license before installation.

Conclusion

By making project status visual, dsh-session-memo reduces the time spent switching to a terminal to check status during conversations. For more details and source code, visit its GitHub repository.