dsh-search-chat: Search chat history across workspaces in the DSH right sidebar

Introduction

The philosophy of DSH is that “everything is a plugin”. As workspaces increase, historical sessions are scattered across various projects. To find a message said a few weeks ago, one usually relies on recalling keywords and scrolling through the conversation list one by one, which is costly. dsh-search-chat does exactly this: it provides session search in the right sidebar of DSH, performing literal matching across all workspaces on chat records. With a single click, you can jump to the original message.

It is maintained by QwQ2333333-QaQ, classified as “Memory” in the community plugin directory, with the current version being 0.4.1 and the license MIT. Below is an introduction to the positioning, installation methods, and usage details of this plugin.

What is it

This is a DSH host plugin, accessible from the right sidebar. It does not build a corpus, download models, or call external APIs. The data comes from DSH’s official sessionQuery session index. The goal is to allow developers to quickly locate historical messages in a multi-workspace environment, rather than performing semantic understanding.

Requirements

Requires DSH 0.2.2-rc.1 and above, depending on the right sidebar extension point and the sessionQuery service. Node.js requires >=20. Both Desktop and dsh web are supported. The plugin does not modify host files or other plugins.

Core Features

  • Cross-workspace search: Covers historical sessions of all workspaces.
  • Three literal match types: Whole phrase, all words contain, any word contains; supports Chinese, English, and code snippets.
  • Result verification: The index is used first to find candidates, followed by literal verification on each hit; if the index misses a result, it automatically degrades to a literal scan of each session.
  • Time sorting: Supports ascending and descending order; results are grouped by day.
  • Click to jump: Opens the session, loads to the target seq, scrolls to the matching message and highlights it for 2.4 seconds; failure is indicated with a clear prompt.
  • Date timeline: Select a date to load chat records for that day ±3 days, scroll to the boundary to continue loading by 3 days; if there is a keyword, filtering is done only within the window.
  • Calendar availability: Dates without conversations are dimmed and unselectable.
  • Search history: Automatically pops up when focusing the input box, prioritizing recent usage; supports re-search, single delete, and clearing all.
  • Local cache: The same query reads from cache directly on the second run; the status bar displays “Cache”.
  • Customizable appearance: Highlight background color/text color/bolding, panel background and opacity, panel text color; includes presets and restore defaults.
  • Bilingual copy: Supports both Chinese and English text.

Installation and Enabling

When developing locally, install using the DSH plugin manager in the directory where package.json is located using an absolute path:

plugin_manager install_bundle  target = D:\Deepseek Workpalcae\dsh-search-chat

After installation, if the right sidebar does not appear immediately, restart the DSH client, as host routes and client modules are loaded during startup.

After publishing to npm, install by package name:

plugin_manager install_bundle  target = dsh-search-chat

To uninstall:

plugin_manager remove_bundle  target = dsh-search-chat

Typical Usage

  1. Click “Session Search” in the right sidebar, or the same-named entry in the sidebar guide page.
  2. Enter the text to search for. By default, it is “Whole phrase matching”, but you can switch to “All words” or “Any word”.
  3. Switch the scope and time order if needed.
  4. Click a result: The plugin will open that session, load the history, and scroll near the matching message while flashing a highlight.

The status bar will display the total number of hits, the time taken, and whether the results came from “Index” or “Scan”.

Appearance and Highlight Settings

Click the settings icon next to the title to expand “Appearance Settings”. The default background color for matching keywords is #ffd54f (bright yellow) with a 1px dark border. Highlighted text defaults to black or white based on the background brightness to ensure contrast. Keyword bolding is enabled by default.

The panel background is transparent by default, inheriting the host theme. If you want better readability, you can select a color and adjust the opacity using a slider. If a dark panel background is selected, it is recommended to change the panel text to light. Presets include “Default / High Contrast / Soft”, and the “Restore Default” at the bottom returns to a transparent background with bright yellow highlights.

Changes take effect immediately. They are automatically saved to $DSH_HOME/.dsh-search-chat.json after about 0.5 seconds; refreshing the page, restarting the client, or reinstalling the plugin will preserve them. If saving fails, the interface will prompt “Effective for this session only” and will not affect searching.

Date Timeline, Search History, and Local Cache

The date timeline calendar aggregates event times from the last 100 sessions. Dates without conversations are dimmed and unclickable. After selecting a date, records for that day ±3 days are loaded and sorted in chronological order. “Load earlier 3 days” / “Load later 3 days” appear at the top and bottom of the list, and loading continues automatically when scrolling to the edge. If there is a keyword, literal matching is performed only within the window. Clearing the date returns to global keyword search.

Search history is sorted by recent usage time. Clicking any item fills in the conditions and immediately searches again. The same conditions will hit the cache. Hovering the mouse shows a single delete option; “Clear History” at the bottom requires double confirmation. History is saved in $DSH_HOME/dsh-search-chat/history.json.

Keyword search and time window results are cached based on “Request Key + Corpus Signature”. The same query reads directly from cache on the second run, and the status bar displays “Cache”. The corpus signature is composed of the number of sessions, the latest session time, and the current date; it automatically invalidates when changed. If the window includes today, only memory cache is used to avoid reading old snapshots of active sessions. The cache file is in $DSH_HOME/dsh-search-chat/cache/, performs automatic LRU cleanup, and has a limit of 200 items / 20MB.

Applicable Scenarios and Notes

Suitable for developers who frequently switch between multiple DSH workspaces and need to find historical messages via keywords. If you just want to find the “gist”, literal matching is not applicable, and you must try a few different keywords. Semantic retrieval is in the roadmap and is disabled by default.

There are three known limitations to note. First, keyword search is fixed to scan a maximum of 80 sessions with 8 hits per session; the date timeline has a maximum of 500 items per window and 200 per session. Exceeding these limits will truncate results; using date windows can significantly narrow the scope. Second, jump positioning prioritizes the matching fragment within the chat line, followed by turn positioning; if the currently open session is not in “Chat” view, it will prompt that location cannot be found. Third, the jump uses the data-chat-* attributes of chat lines, which are internal product attributes rather than a public API. The selectors are concentrated in the jump section of lib/client.js. After a DSH upgrade, you only need to adjust this one place; details are in docs/API-NOTES.md.

Regarding permissions: The plugin runs with the permissions of the current DSH process. You should check the source code and license (MIT) before installing. Regarding privacy: Search, history, and cache are completed entirely locally, with no telemetry and no external requests. It does not read or return any credentials. Host routes only accept loopback address requests and reject cross-site and cross-origin requests. Query content and results are not written to logs.

Conclusion

dsh-search-chat solves a specific problem: how to quickly retrieve a chat record in a multi-workspace environment. It uses index plus literal verification to ensure result reliability, and also makes searching history smooth with date timelines, search history, and local caching. If your workspaces are starting to pile up with sessions, you can install and try it from the entry below.

  • Directory Page: https://www.skillhub.cn/plugins/QwQ2333333-QaQ/dsh-search-chat
  • Repository: https://github.com/QwQ2333333-QaQ/dsh-search-chat

It should be noted that the community directory is an independent site with no official affiliation with DeepSeek / HF, and it is not an official app store.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye