Files
deepseek-harness/packages/client/web-react
imccyu 90addbf53c feat(gui): useProjection — the fifth framework hook seat through the standard kit
React half of the session-projection client base: the renderer contract gains
an open-key projections face on SessionMaybeProvideInfo (cellOf(key), distinct
from the static hooks roster), web-react mints projectionHook (per-bundle cache;
per-cell uSES binding via the shared observableHook cache; unresolved keys read
undefined through the absent source so hook order stays constant), standardKit
delivers kit.useProjection, and the runtime merges UseProjection into
SessionStandardProps/SessionMaybeStandardProps (overloads mirror useSession).
3 jsdom specs (kit delivery + live re-render, selector over undefined, faceless
bundle = all absent); existing direct-prop-feed specs gain the one-line stub the
new required seat mandates.
2026-07-27 22:58:53 +08:00
..
2026-07-26 05:06:39 +08:00
2026-07-26 05:06:39 +08:00

@deepseek-ai/dsh-client-web-react

English | 中文

Shell-side React glue for the slot terminal design: createSlotRenderer (the SlotRenderer implementation the shell installs into the runtime SlotsService), SessionProvider (framework-wired render prop, also injected as a standard seat to entries declaring session-scope children), bindSnapshotSelector (the one hook constructor — hosts and engines traffic in bare observable sources; every hook binds here, cached per source), useInvoke. Chain-slot outlets run the registered selectors in chain order at render time and mount only the elected entry, its select return joining the props as matched; the renderSlotChain binding is per-entry cached like renderSlot. The snapshot-store engine and defineStore live in runtime (store relocation); business plugins depend on ui-slots types only, never on this package.

Model Experience

None, as the ctx↔React machinery runs entirely in the browser; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • The persist middleware corrupts primitive-state stores — it object-spreads state on save, so a SnapshotStore<string> round-trips as a character map; the engine hand-rolls persistence instead (see attachPersistence).
  • UseSession is deliberately wide (object snapshot) — the dependency direction (runtime → web-react, never the reverse) keeps the real ConversationSnapshot type out of reach; session-slot consumers narrow once at their boundary.
  • renderSlot is the single P-I form — no Suspense, no per-entry lazy loading; the progressive-rendering surface returns with its own project.