fix: restore client UI on rc.7 and stop shadowing host packages - #4
fix: restore client UI on rc.7 and stop shadowing host packages#4AINightCoder wants to merge 2 commits into
Conversation
Two rc.6 -> rc.7 breakages kept the client face from ever activating: - dsh.client.inject referenced @deepseek-ai/dsh-client-ui-slots, which no longer exists in rc.7 (merged into other client packages). An unresolvable module name stops the whole client bundle from being served, so the host rows mounted while the settings panel never rendered and no console error appeared. - The settings slot settings.models.before was removed; rc.7 ships no .before slot family. Re-registered under settings.section so the panel gets its own Settings entry. ctx.slots itself is unchanged in rc.7, and tool.call.toolview still exists, so the image-generation tool view needed no change. Verified on DSH 0.1.0-rc.7: sign-in, quota, feature toggles, model list all render; native image input confirmed on GPT-5.6 Sol.
The seven @deepseek-ai/* entries are supplied by the DSH installation the
plugin is mounted into. Declaring them as regular dependencies makes the
package manager install a SECOND copy inside the profile, and that copy
shadows the flat fallback for every bare specifier resolved from the
profile directory.
That is not merely wasteful, it breaks tool dispatch. dsh-tools hands its
scheduler to dsh-agent-loop through a module-instance-unique key:
const TOOL_RUNTIME_SCHEDULER = Symbol('@deepseek-ai/dsh-tools.scheduler')
[TOOL_RUNTIME_SCHEDULER] = { prepare, dispatch, finalize, finish }
Symbol(), not Symbol.for(), so it is only shared within one module
instance. With a shadowing copy present the `tools` row mints the registry
from the profile-local dsh-tools while dsh-agent-loop resolves the
installation's copy and reads registry[its own symbol] -> undefined, and
every tool call dies with:
Cannot read properties of undefined (reading 'prepare')
Reproduced on a dsh-tui profile (base + dsh-tui + this plugin): every tool
call failed under both the standard and a custom preset. A web profile that
happened to resolve without the local copy was unaffected, which is what
identified shadowing rather than version drift as the cause. Removing the
profile-local copy fixed it; peerDependencies prevents it being installed
at all, on every profile and every machine.
Ranges moved to ^0.1.0-rc.7 to match the rest of this branch.
|
Added a third fix to this branch ( 3. Host packages are declared as
|
| profile | local @deepseek-ai/dsh-tools |
tool calls |
|---|---|---|
web (base + web-app + this plugin) |
absent, resolves to the installation copy | work |
dsh-tui (base + dsh-tui + this plugin) |
present, shadows the fallback | fail, every call |
The asymmetry is what ruled out version drift: both profiles ran identical dsh-tools bytes (0.1.0-rc.8, scheduler.prepare on the same line number), and the failure tracked the presence of the duplicate, not the version. It also reproduced under both the stock standard preset and a custom one, so it is not preset-specific.
Removing the profile-local copy by hand fixed it immediately. Moving the declarations to peerDependencies prevents it from being installed in the first place, on every profile and every machine. Verified after the change: zero @deepseek-ai/* packages under the profile's node_modules, tree composes identically (95 entries), plugin rows unchanged.
Ranges moved to ^0.1.0-rc.7 to match the rest of the branch. For reference, @deepseek-harness-tui/dsh-tui declares its 24 host packages the same way.
|
Correction on the third commit ( The two fixes are the same in effect, differing only in declaration style: #3 moves the host packages to
The part of this PR that #3 does not cover is |
Problem
On DSH
0.1.0-rc.7the plugin's host rows mount and reportMounted, Enabled, but the settings panel never renders and no console error appears. Two independent rc.6 → rc.7 breakages cause this.1.
dsh.client.injectreferences a package that no longer exists@deepseek-ai/dsh-client-ui-slotswas merged into other client packages and is absent from rc.7:An unresolvable module name stops the whole client bundle from being served, so
GET /plugins/@wnjxyk/dsh-codex-oauth/client.jsnever fires. The host face is unaffected, which is why the plugin looks healthy in the Plugin list.The
ctx.slotsservice is alive and unchanged in rc.7 (many first-party packages still inject it), so dropping the stale package name from the inject list is sufficient.2. Slot
settings.models.beforewas removedrc.7 ships no
.beforeslot family at all — grepping every first-partyclient.jsfor*.beforereturns zero matches.dsh-client-ui-settings-modelsnow registers undersettings.sectionandsettings.onboarding.Re-registered the panel under
settings.sectionwith a label, giving it its own Settings entry.settings.onboardingwas tried first and rejected: it renders outside the settings dialog.tool.call.toolviewis unchanged in rc.7, so the image-generation tool view needed no edit.Verification
Verified end to end on DSH
0.1.0-rc.7(Windows 11, Node 22.22.2):Pro / weekly 93% remainingGPT-5.6 Solfor the exact text and the three shape colors; it returnedDSH-VISION-7391andteal, yellow, red, none of which appear in the promptNotes
The panel now lives in its own
Codexsection rather than inside the Models page, since rc.7 has no equivalent tosettings.models.before. If you would rather keep it on the Models page, that likely needs an upstream slot request in DSH itself.Version bumped to
0.4.2-rc7fix.3only to distinguish local builds — retag as you see fit.