dsh-message-reminder: Windows Desktop Message Reminder for DSH Inquiries

Introduction

When running long tasks in DSH (DeepSeek Harness), the agent often calls functions like ask_user_question requiring your confirmation or additional information. If the window is minimized, covered by another program, or you are viewing a different Session at that moment, the question card remains only in the Web client, making it easy to miss.

System-native notifications within the Electron shell often only enter the notification center without displaying banners. This plugin changes this behavior on Windows by popping up a clickable “Acrylic” (frosted glass) card at the bottom right of the desktop. Clicking it restores and brings the DSH window to the front, and navigates back to the Session that initiated the request. Maintainer: LJY4-bilibili. Category: Client Plugin. Source hosted on GitHub. License: MIT.

What is this

dsh-message-reminder is a client plugin for DSH. When DSH asks you a question via ask_user_question and you are not currently “watching the foreground window of that Session,” it pops up a notification card at the bottom right of the Windows desktop. Clicking the card restores the DSH window and returns to the corresponding Session. On non-Windows systems or when the PowerShell helper process cannot be used, the Host falls back to the in-page Notification.

The plugin does not modify the questioning process itself: the Host observes the user-questions/request waterfall with { prepend: true }. After recording the inquiry, it returns the response right to the original listener, and the card does not steal focus.

Core Features

Inquiry Triggering and Suppression

Timing Behavior
ask_user_question is called, and the page is not on that Session or the window is not in the foreground A frosted glass card pops up at the bottom right (inset approx. 18px), playing a configurable notification sound. The body contains a summary of the question; if multiple questions exist, it includes “N questions in total”.
The page is currently displaying that Session and the window is the active window By default, no card pops up and no sound plays (the question is already in the input area).
The question is answered or cancelled The card disappears as the helper process ends.

Whether “viewing that Session” is reported by client.js via mainView, page visibility, and focus status. The Host judges this using the AND relation of visibilityState === 'visible' and document.hasFocus(). The config item skipWhenViewingSession defaults to true; setting it to false disables suppression.

Windows Acrylic Card

On Windows 10 1803 and above, the card draws a borderless, always-on-top frosted glass window via SetWindowCompositionAttribute and DWMWA_WINDOW_CORNER_PREFERENCE, with text drawn using TextRenderer.DrawText. The README explains: renderer process Notification, NotifyIcon balloons, and WinRT toasts cannot display banners in this Electron environment, hence the custom-drawn window approach.

Clicking the card: Uses a tiered strategy to attempt restoring and bringing the DSH window to the front (process name defaults to DeepSeek Harness), then navigates back to the Session. Clicking the “✕” at the top right only closes the card without navigating. The body is truncated if it exceeds 160 characters; long titles are displayed with an ellipsis.

Channels and Diagnostics

The Host uses Node built-in modules (node:child_process, node:fs, node:path), registers a webServer route, and has no runtime npm dependencies. The page receives events such as ask / click / resolved via SSE (/message-reminder/events). Diagnostic interface: GET /message-reminder/status.

Environment Requirements

  • DSH, using the Web client.
  • Node.js >= 22.
  • Windows 10 1803+ required for acrylic cards; macOS / Linux or when PowerShell is unavailable, uses in-page Notification.

Installation and Activation

Once the plugin is listed on the DSH Plugin Market (dshmarket), it can be installed from the market; it can also be added manually to a profile. Local checkout is always available:

dsh plugin --profile <your-profile> add link:/path/to/dsh-message-reminder

After the package is published to npm, you can also:

dsh plugin --profile <your-profile> add dsh-message-reminder

dsh plugin add will execute pnpm add within the profile. The package includes dsh.bundle.patch, which inserts the corresponding lines when loading the profile; please ensure the profile’s bundle list contains the package name, for example:

// $DSH_HOME/profiles/<your-profile>/package.json
{
  "dsh": { "profile": { "bundles": ["...", "dsh-message-reminder"] } }
}

Configuration

Override by line id in the profile’s cordis.patch.yml (The config block replaces the entire default block, so retain fields you still wish to use):

- id: message-reminder
  config:
    title: DSH Message Reminder                    # Card title
    skipWhenViewingSession: true           # Do not pop up card when the inquiry Session is already in the main view (default)
    skipWhenFocused: false                 # When true, skip renderer notifications even if the page is focused
    windowProcessName: DeepSeek Harness    # Process window name to bring to front when clicking the card
    sound: true                            # true | false | asterisk / exclamation / question / hand / beep
    notifyMode: auto                       # auto | balloon | renderer

notifyMode: balloon refers to the Host-side PowerShell helper process card; renderer forces the use of page notifications for testing without spawning subprocesses. The notification sound only plays when the card is actually displayed.

Typical Usage

  1. Install via the command above in the profile and ensure the bundle list contains dsh-message-reminder.

  2. Modify items such as title, windowProcessName, and sound in cordis.patch.yml as needed.

  3. Start DSH, let the agent trigger ask_user_question in a background Session while minimizing DSH or switching to another program; you should see the card at the bottom right. Clicking the card should return to that Session and expand the pending questions.

  4. Access the Host-provided GET /message-reminder/status when troubleshooting is needed.

Use Cases and Notes

Suitable for Windows users who run DSH for long periods, often leave the window, yet need to answer ask_user_question promptly. The plugin runs with the permissions of the current DSH process; please read the source code and the MIT license before installing.

Known limitations (from README):

  • Cards are only available on Windows; other platforms use renderer process notifications.
  • If the acrylic call fails, the card degrades to a solid color background, but other functions remain available.
  • In some environments, AMSI may cause PowerShell compiled scripts to fail; the Host retries up to 5 times before falling back to renderer notifications.
  • The first card may be slightly slower (about 1 second) due to the helper process compiling the Win32 helper.

The DeepSeek Harness ecosystem emphasizes “Everything is a plugin”; the community plugin directory is an independent site and has no official affiliation with DeepSeek / Hithink RoyalFlush.

Links

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

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

Xiaoye