Meredith2328/dsh-sidebar-mode 预览 preview

Meredith2328/dsh-sidebar-mode

把默认的四种模式切换塞进「新会话」按钮里,新会话创建更方便(标准/PTC/创造/极简,与设置双向同步)

Project Overview项目介绍

dsh-sidebar-mode is a native DSH profile plugin that consolidates agent preset switching into the existing New Session button of DSH Desktop. Instead of adding an extra standalone button or icon, it places small text labels for available presets directly inside the New Session button, with no extra UI clutter. Users can click the small text label on the far left of the button to open the preset selection menu, and clicking any other area of the button works as normal to create a new session with the current default preset.

The plugin automatically discovers all available agent presets, including the four default official presets (Standard, PTC, Creative, Minimal) and any custom presets a user adds to DSH. Presets that fail to load are automatically excluded per DSH’s official rules, so no manual edits to the plugin are ever required to add new custom presets. If a preset name is too long to fit inside the button, it is automatically truncated with an ellipsis, and hovering over the truncated name shows the full name just like in DSH’s official settings panel.

To install the plugin, you first need to navigate to your local DSH web profiles directory, run the command pnpm add github:Meredith2328/dsh-sidebar-mode, add the plugin to the dsh.profile.bundles array in your package.json, then restart DSH Desktop to activate it. The plugin follows DSH’s light and dark theme system using official DSH theme tokens, and automatically hides when the sidebar is collapsed to an icon bar. It is released under the permissive MIT license, only modifies the global default preset, and does not alter any already running sessions.

这是一个原生的 DSH 配置文件插件,它将原本分散的代理模式切换功能整合到「新会话」按钮中。点击按钮左侧的小字标签即可弹出预设菜单,无需进入设置页面就能切换模式,让创建带指定预设的新会话更快捷。它和设置页里的官方「Agent 预设」双向同步,切换后新默认会立即应用到当前空白会话,新会话页的预设徽章也会实时更新。

它支持自动发现所有预设,除了官方自带的标准、PTC、创造、极简四种模式外,用户自定义的所有预设也会自动出现在菜单中,加载失败的预设会按官方规则自动排除,无需修改插件就能直接使用。过长的预设名称会自动截断为省略号,不会挤掉「新会话」按钮文字,鼠标悬浮时仍能显示完整名称,和官方设置面板的截断策略保持一致。

安装时需要进入 DSH 的 web 配置目录,通过 pnpm 添加本仓库,然后将插件加入 package.json 的 dsh.profile.bundles 列表,重启 DSH Desktop 即可生效。它跟随 DSH 日间/夜间主题,全部使用官方主题令牌,侧边栏收起为图标条时会自动隐藏,仅修改全局默认预设,不影响已有运行中的会话,采用 MIT 许可证开源。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:Meredith2328/dsh-sidebar-mode

把 Meredith2328/dsh-sidebar-mode 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-sidebar-mode

示意图:新会话按钮内嵌预设标签,点击弹出预设菜单

把默认的四种模式(标准 / PTC / 创造 / 极简)切换塞进「新会话」按钮里: 点按钮最左边的小字就弹出预设菜单,即点即用——不用再进设置页切换,新会话创建更方便。

与设置 → Agent 预设双向同步:切换时会把新默认立即应用到当前空白会话, 新会话页的预设徽章实时翻转,无需再手动点徽章。

特性

  • 无独立按钮、无三角:小字标签直接嵌在「新会话」按钮内,点击标签弹出菜单; 点击按钮其他区域照常新建会话。
  • 预设清单自动发现:菜单里除了出厂的标准 / PTC / 创造 / 极简四种模式,你自己 复制或新建的预设(比如第五个自定义模式)也会自动出现在菜单里,随用随有, 无需改插件;加载失败的预设会按官方规则自动排除。
  • 预设名过长时,按钮内的小字标签自动截断成省略号,不会把「新会话」几个字挤掉; 鼠标悬浮仍显示完整名称(和官方设置面板同一套截断策略)。
  • 读写与官方设置面板同一数据通道(agent-presets.default + agentPresets.select), 设置面板 / 侧边栏按钮 / 新会话页徽章三者一致。
  • 跟随日间/夜间主题(全部使用 DSH 主题令牌)。
  • 侧边栏收起成图标条时自动隐藏。
  • 会话创建即固定预设是 DSH 的设计;本插件只改全局默认,并把新默认应用到 当前空白会话,不影响已运行的会话。

安装(profile 插件,随 DSH 常驻)

cd "$(dsh home)/profiles/web"    # Windows: C:\Users\<you>\.dsh\profiles\web
pnpm add "github:Meredith2328/dsh-sidebar-mode"

并把 dsh-sidebar-mode 加入 package.json 的 dsh.profile.bundles 列表, 然后重启 DSH Desktop。

使用

  • 点「新会话」按钮里最左侧的小字 → 弹出预设菜单(出厂四种 + 你自定义的所有 预设,自动发现,当前项打 ✓)。
  • 点选即切换:写入全局默认 + 应用到当前空白会话(若有)。
  • 卸载:从 dsh.profile.bundles 移除并 pnpm remove dsh-sidebar-mode。

结构

  • lib/client.js — 浏览器半(__ModuleLoader__ 格式),全部逻辑在此。
  • lib/index.mjs — Node 半,空 apply(纯 client 插件)。
  • cordis.patch.yml — bundle patch:向组合插入本插件行。
← 上一个 Prev dsh-revdiff 下一个 Next dsh-multi-model-provider →