Introduction¶
In DSH Web sessions, workspaces often contain temporary records, to-dos, or snippets that need to be quickly noted down. dsh-sticky-notes is a lightweight plugin maintained by flyhigao. It provides a sticky note entry on the right side of the current session header, used to create, edit, and delete multiple sticky notes for the selected workspace.
The plugin uses the MIT license and supports DSH versions 0.1.0-rc.6, 0.1.0-rc.8, 0.1.1-rc.2, 0.1.2-alpha.2, and later.
Core Capabilities¶
- Current session header shortcut, does not occupy sidebar space.
- Multi-note management: list preview, click to edit, create, save, delete.
- Workspace dropdown box provided within the modal, defaults to the current session workspace, but can be switched to other registered workspaces on the local machine.
- Interface language follows DSH’s current language settings, supporting both Chinese and English.
- Before switching notes, switching workspaces, or closing the window, unsaved edited content will be automatically saved.
- Each note is saved as a Markdown file, making it convenient to view and modify directly with an editor.
Installation¶
Install from GitHub:
dsh plugin --profile web add github:flyhigao/dsh-sticky-notes
After installation, restart dsh web. When entering a session, you can see the sticky note icon on the right side of the session header.
For local development installation, after cloning the repository, execute:
dsh plugin --profile web add file:/path/to/dsh-sticky-notes
Then restart dsh web.
Usage¶
- Open a DSH session.
- Click the sticky note icon on the right side of the session header.
- Select the workspace at the top of the popup; it defaults to the current session workspace, but you can also switch to other registered workspaces on the local machine.
- Preview notes in the list, or create, edit, or delete notes.
- After saving, the content is written to the
dsh-notes/directory of the selected workspace.
The file path format after saving is:
<working-directory>/dsh-notes/<note-id>.md
Data and Interfaces¶
Each note corresponds to a Markdown file. Deleting a note is equivalent to deleting the corresponding .md file; there is no additional index. After manually modifying or adding .md files, reopen the sticky note panel to see the changes.
The plugin provides the following HTTP API:
GET /dsh-sticky-notes/list?workspaceId=<id>
POST /dsh-sticky-notes/save
POST /dsh-sticky-notes/delete
These interfaces are used for listing, saving, and deleting. Write operations only accept same-origin POSTs to prevent cross-site requests. The server parses the workspace path via workspaceRegistry and does not trust arbitrary paths passed by the browser.
Use Cases and Notes¶
This plugin is suitable for scenarios where quick recording of scattered content in a workspace is needed and the content needs to be retained in the form of Markdown files. It uses the official DSH additive slot conversation.session.header.actions, does not replace the entire session header, and does not occupy that position exclusively.
The plugin uses a unique ID sticky-notes, sort order order: 30, HTTP API prefix /dsh-sticky-notes/*, and modal class name dsh-sticky-notes-modal to reduce conflicts with other plugins.
The current version is a manually maintained lightweight implementation, requiring no extra build steps, zero external runtime dependencies, and does not rely on the deprecated dsh-client-runtime.
Since the plugin runs with the permissions of the current dsh process, it is recommended to check the source code and the MIT license before installation.
Conclusion¶
The value of dsh-sticky-notes lies in making “workspace sticky notes” a lightweight, transparent, and directly editor-maintainable Markdown file entry point.
GitHub Repository: https://github.com/flyhigao/dsh-sticky-notes
The directory page address provided by the plugin clue is: https://www.skillhub.cn/plugins/flyhigao/dsh-sticky-notes (this address has not been directly confirmed in the collected data).