概览
dsh-open-project
README / ZH
插件文档
目录摘要
dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
- **It does not change any working directory.** Registering a folder only adds a project record. A session's working directory is DSH's business, not this plugin's: DSH resolves it as the project's directory when a session is created from a project, and otherwise as the host process's own directory (`process.cwd()`), which is fixed when the application starts. The plugin never sets or changes a `cwd`, never retargets the app, and cannot move a session that is already running. What it does is make the folder *available* as a project; a session you then start from that project runs in that folder because DSH does that, not because the menu item changed anything. - **Windows only.** Other platforms have no Explorer context menu, no `HKCU`, and no `wscript.exe`. The host reports `supported: false` there, and the client row is not rendered at all — so nothing appears in Settings rather than a switch that cannot work. - **PowerShell is started once per action**, so the menu click and each settings toggle pay a process start-up (about 0.2 s with PowerShell 7, about 0.8 s with 5.1). - **Cold start needs the app executable to be discoverable.** `cli/app-path.ps1` checks `DSH_DESKTOP_APP_EXE`, then a running instance, then the `dsh://` protocol handler the installer registers, then the default Electron install locations. The protocol record covers custom install directories; an installation that registers neither needs `DSH_DESKTOP_APP_EXE`. Only the *starting* step is affected — registering works with any running instance. - **The menu icon is best-effort.** The same lookup decides the icon. If it finds nothing, the entry is written without an icon (`Icon` is removed), and the menu still works. - **The screenshots date from DSH desktop 0.2.1-rc.2** (see [Effect](#effect)); the row's exact appearance follows the app's own settings list, so a future release may style it differently. - **The settings row follows the browser language; the notifications and the menu label do not.** The row picks Chinese when `navigator.language` starts with `zh`, English otherwise. The success/failure notifications and dialogs come from `cli/open-project-in-dsh.ps1` and are hard-coded English. The folder-menu label is written by `cli/context-menu.ps1`, defaults to Chinese, and can be changed with `-Title`; the settings switch does not pass a title. - **Disabling the plugin does not remove the registry entry** — the switch is part of this plugin, so turn the switch off first (see [Uninstall](#uninstall)). Project records already in the sidebar are stored by DSH and stay after the plugin is disabled.
