niushuanan/xiaozhuang-dsh--plugins-product-companion ↗★ 2
@deepseek-ai/dsh-client-ui-product-companion
Native cross-page product companion for DeepSeek Harness, driven by live session state
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:niushuanan/xiaozhuang-dsh#bb949c3d291ea55d378cc5fdb1b237b4f63127b6&path:plugins/product-companion说明文档
阅读完整 README ↗@deepseek-ai/dsh-client-ui-product-companion
English | 中文
The plugin owns its original whale icon in Settings; its icon contribution is removed with the plugin.
Native cross-page character and microphone-dictation plugin for Xiaozhuang DSH. The default character is Whale Girl, with “Whale” carrying DeepSeek's whale-inspired visual identity. Users can rename her directly in the settings page bearing her current name; the settings navigation, accessible name, action menu, visibility switch, and page heading share one persisted preference while only the technical plugin id remains stable. The plugin contributes one additive entry to shell.overlay, so the character stays mounted while users switch conversations and product pages. It reads the existing session-list projection and selects a generated frame:
- Working with one short focus pulse when the current conversation starts or reports real progress; it then settles.
- Waiting when a task needs approval, an answer, or plan review.
- Success for a short moment when running work settles.
- Idle and sleep while the workspace is quiet.
The companion lives directly above the real composer at a horizontal berth the user can drag anywhere along the card. The dragged offset persists as a 0–1 ratio of the card's usable width, so every later composer move or resize returns her to the same relative spot; without a preference she rests at the right edge. Quiet, working, waiting, and completion states remain prone. Working is intentionally low-distraction: it uses no independent whole-body wobble, and background sessions only affect the task count and list instead of animating the character. V14 character drawings keep one consistently leaner silhouette below the waist and transparent negative space around the hips, raised legs, and boots. Both forearm guards use pearl white, very pale ice-blue highlights, and thin cobalt edging while black gloves, cobalt upper-arm plates, and the dark costume remain unchanged. All four states and both skins therefore keep the arms visually separate from the torso without changing apparent build.
The visual canvas remains above the product, but it does not own every primary click beneath its rectangle. When a native input, button, link, selector, or editor is covered, the primary press is delegated to that control; the companion's configured single- and double-click action runs only in uncovered space. Right click stays reserved for the companion's close/menu gesture.
When a switch to another conversation page produces a different composer anchor, the current character drawing and root size are frozen while 48 V13 material masks are applied directly to that same bitmap. The masks are derived only from the real-pixel union of all 136 production character frames. Boots, hair tips, and garment edges release first as small source-colored fragments while the face remains intact until the final phase; no random foam exists outside the character. Coordinates change only after the character has disappeared, and arrival reverses the same masks to reconstruct her. The side-switch and task-count controls share this lifecycle: they disable and fade out by the early part of departure, remain absent at the hidden coordinate switch, and regain visibility only while the character reforms at the new anchor. Each one-way phase lasts 1040 ms and neighbor masks transition for 28 ms. Standard 132 × 118 and Large 164 × 147 therefore retain one unchanged identity, with no independent foam cloud, doorway, generated transition person, or scale jump. A MutationObserver/ResizeObserver loop continuously measures the real composer. Within one conversation, textarea growth, shrinkage, width changes, and pane reflow move the character and round controls directly with the latest top edge, treating them as one visual part of the composer without entering the dissolve track. Only a current-conversation change opens the 360 ms trailing-edge settle window for the destination page, with measurement noise below 6 px ignored. A temporary composer that returns to the same anchor never triggers dissolution; page-transition changes coalesce into the latest stable target. If the user leaves a page before that window closes, its latest measured berth becomes the next transition's departure point, so a rapid new-conversation-to-history switch still dissolves on the first click instead of collapsing onto stale coordinates. Single click, double click, and right click remain independently configurable. Semantic acting still uses 24 fps exposure sheets, while the browser decodes only the next two frames of the active track and the next dissolve masks instead of all 152 assets at mount.
The left round control moves the companion to the opposite half of the composer. Her current ratio is compared with the midpoint: the right half shows a left arrow and moves to the 10% berth, while the left half shows a right arrow and moves to the 90% berth. The action persists the new ratio and reuses the same material dissolve and reconstruction instead of sliding across the input. Direct horizontal dragging remains available for exact placement between those shortcuts.
One compact bubble shows the current live conversation title, phase, and observed elapsed time without pretending an indeterminate response has a percentage. The number below the character is the product-wide total of running or attention-blocked conversations. Clicking it expands prioritized task bubbles: user-blocked work first, then the current conversation and recently updated background work. Bubbles enter from the character upward with short staggered motion. Opening one navigates through the existing Session Runtime while keeping the whole task layer open, so the user can continue switching among concurrent work; clicking the number again, pressing Escape, or clicking outside collapses the bubbles back toward the character with the reverse stagger.
Browser-native speech recognition inserts the raw transcript at the current selection or caret in the real composer. The default ⌥ Space shortcut starts and ends dictation without occupying a round control below the character, and dictation can also be assigned to the single-click, double-click, or right-click companion action. The product adds no dictation countdown. If the browser ends an underlying segment because of silence or service rotation, the plugin preserves collected text and renews recognition until the user stops, disables the feature, or system permission interrupts it. The path does not read the model catalog, call an LLM, or run AI rewriting. Settings persist only the microphone switch and in-app shortcut; recordings and transcript history are never stored. Ordinary draft detection still retains only whether the composer is non-empty.
Preferences live in the Settings section named after the current character, with custom naming, blue/black skin selection, Standard/Large size, gesture bindings, microphone dictation, visibility, and the status-bubble switch. The rename editor has a compact fixed width, reserved focus-outline space, and one short explanation so it remains inside the dialog. The same page edits ~/.dsh/AGENTS.md: DSH re-reads the saved file for every model step and injects it as its protected final system section, above every other DSH-supplied instruction. The editor loads the complete current document, automatically refreshes external edits while the visible draft is clean, uses one consistent Save Changes action, and applies successful saves to every conversation from its next turn. Revision conflicts never overwrite a newer external version and expose an explicit load-latest action. The editor remains a companion-owned, hot-pluggable capability while the Host prompt pipeline owns instruction authority. V14 retains the accepted lean prone semantic character drawings and pale arm guards; V13 contains 48 body and 48 fragment masks only, never a second character identity. Active semantic frames and neighboring dissolve masks are decoded just ahead of playback and deduplicated for the mounted companion. Runtime checks cover bracer readability in both skins, masks staying inside real character pixels, monotonic material loss, stable semantic loops, immutable character sources and dimensions, same-origin loading, and hidden-midpoint coordinate switching.
The Host half serves the whitelisted immutable V14 character frames and V13 body-material masks from /plugins/ui-product-companion/assets and, within the same plugin lifecycle, the fixed global AGENTS.md API. The rules endpoint resolves the actual DSH Home and can read or write only that runtime's ~/.dsh/AGENTS.md; it accepts neither a browser-supplied project directory nor an arbitrary filename. Writes use a loaded-content revision and an atomic same-directory temporary replacement. The browser half owns state derivation, microphone speech recognition, composer insertion, semantic exposure-sheet playback, composer geometry observation, clean-draft rule synchronization, and two-phase material dissolution. Non-modal product panels such as Model Usage do not unmount it; only a true full-surface modal temporarily yields the canvas. Removing or disabling the ui-product-companion Loader row hot-unmounts the character, global-rule editor, side-switch control, dictation shortcut, and Host APIs without altering sessions, the sidebar, the conversation UI, or another plugin. Enabling that row mounts the whole capability again without restarting the Web process.
Model Experience
Indirectly, through the saved ~/.dsh/AGENTS.md the Host prompt pipeline re-reads every model step and injects as its protected final system section.
KV Cache effect
The injected section is stable while the file is unchanged, so its tokens stay reusable across requests; a save changes the section from the next turn and invalidates reuse from those tokens.
Known Limitations and Deferred Work
- The companion intentionally has no second chat box, feeding loop, currency, growth system, or minigame. Those concepts duplicate the main product workflow and add ongoing attention cost.
- A session that completed before this plugin mounted does not replay the success frame; only live running-to-settled transitions celebrate.
- Elapsed time is an honest browser-observed duration. Reloading the page in the middle of a task restarts that local counter instead of inventing an earlier start time.
- The companion appears only where the real composer exists; Settings dialogs and pages without a composer intentionally leave the surface clear.
- A save does not rewrite an already-running model call; every conversation reads the new global instructions from its next turn.
- This version uses the browser-provided speech-recognition interface. First use needs microphone permission, and offline behavior or supported languages depend on the browser and operating system. The shortcut is in-app while the DSH window is focused; a system-wide shortcut still requires a future native macOS helper.