In DeepSeek Harness (DSH), a new session is usually given a title generated automatically from the first message. If the first message is incomplete or contains too much noise, the generated title may not be suitable. dsh-session-namer modifies this workflow by adding a manual naming step before session creation, ensuring the title is directly defined by the user.
This is a DSH client-side plugin maintained by CHIP-PHILO-GH. It intercepts the action of creating a new session, uses a dialog box to let the user enter a name, and replaces the default automatic title logic. The project is licensed under MIT.
Core Features¶
- Prompt a naming dialog first when creating a new session: When clicking “New Session” in the sidebar, a dialog box is shown first instead of creating the session directly.
- Permanently pin the session name after entering a name: After confirmation, the session is created with that name and is not overwritten by automatic titles from later messages.
- Leave it blank to keep automatic naming based on the first message: Leave the dialog blank or press Enter directly to retain DSH’s original automatic naming behavior.
- Canceling the operation does not create a session: Press Esc or click the Cancel button, and no session is created.
- Real-time session name preview: While typing in the dialog, the display effect in the session list is shown in real time.
- Truncation reminder based on the host limit: Automatically detects and prompts truncation according to the host’s 80-byte limit.
- Automatic theme adaptation: Automatically follows DSH’s light/dark theme and skin.
Installation and Enablement¶
This is a pure client-side plugin. It is not published to npm and must be installed using a local link: method.
- Clone or extract it to a local directory, i.e., the
<package directory>. - Edit the profile’s
package.json(path:$env:DSH_HOME\profiles\<profile>\package.json):- Add the line
"dsh-session-namer"todsh.profile.bundles. - Add the line
"dsh-session-namer": "link:<package directory>"todependencies.
- Add the line
- Create a symbolic link:
New-Item -ItemType Junction `
-Path "$env:DSH_HOME\profiles\<profile>\node_modules\dsh-session-namer" `
-Target "<包所在目录>"
- Restart
dsh webto apply the changes. The client-side plugin code is loaded in the page, so refreshing the page does not take effect.
Typical Usage¶
- Click the “New Session” button in the sidebar.
- Enter a name in the dialog box and confirm; the session will be created with that name.
- Leave it blank or press Enter directly; the session will be named automatically based on the first message.
- Press Esc or click the Cancel button; no session is created.
Notes¶
- Dependency declarations: The plugin must declare the injected services
locale,slots,sessions, anduiWorkspace. If the declarations are missing, the plugin may silently fail due to missing services. - Permissions: The plugin runs with the permissions of the current dsh process. Check the source code and license before installing.
- Platform: Pure client-side plugin, running on the web platform.
- Truncation limit: Session names are truncated to the host’s 80-byte limit.
Conclusion¶
With this plugin, developers can more precisely control the initial naming of sessions, improving session management efficiency. For more technical details and source code, refer to the GitHub repository.