This section introduces the dsh-notify plugin. It is a static profile plugin that provides a notification panel on the right side of the input box. Any plugin or AI can push notifications (text/link), supporting chat-style stacking, drag-and-drop resizing, AI summaries, and persistence across restarts.
Installation and Enablement¶
Put the repository files into the local configuration directory and declare the dependency in package.json.
- Place the repository content into
~\.dsh\profiles\web\node_modules\dsh-notify\. - Edit
~\.dsh\profiles\web\package.json:- Add to
dependencies:"dsh-notify": "1.0.0" - Add to
dsh.profile.bundles:"dsh-notify"
- Add to
- Restart the server process. A new bundle requires a restart to take effect.
Core Features¶
- Notification panel on the right side of the input box: Located on the right side of the input box by default, with a bell icon and an unread badge.
- Message push: Any plugin or AI can push text or links.
- Chat-style stacking: Messages stack from the bottom upward, with the latest message at the bottom.
- Interaction: Supports double-click to expand/collapse, drag the bottom-right corner to resize, and drag the top-right corner to the top of the screen to maximize.
- AI summaries: Supports enabling the AI summary feature to summarize key points before pushing.
- Appearance customization: Background, opacity, blur, text color, and margins can be customized, with preset management.
Usage¶
1. Push a notification¶
The plugin provides three push methods:
- Tool call (recommended):
{ "text": "提醒内容", "link": "https://可选链接", "source": "来源名" }
* `text`: Required, the notification content.
* `link`: Optional, the link to open on click.
* `source`: Optional, displayed as "From: xxx".
- HTTP interface (host-side plugin):
POST /__notify/push
The body is the same as above.
- Client service (client-side plugin):
ctx.get('notifyCenter').push({ text, link, source })
2. Quick restart¶
Click the “🔄 Restart” button in the panel, or call the interface:
POST /dsh-market/restart
Notes¶
- Dependency requirements: The plugin requires the host to provide the
webServer,tools,systemPrompt, andconversation.input.left/right/overlayslots. Standard dsh web profiles include these slots; if a slot is missing, it degrades automatically. - CSS injection limitation: When statically injecting CSS on the client side, you must use
document.createElement('style'). Do not use thestylesproperty of dynamic plugins, as this may cause startup failure. - License: MIT.