Files
deepseek-harness/packages/client/ui-question
imccyu cdd4d59ea0 chore(lint): clear the semantic .tsx backlog
Hand fixes for the findings --fix cannot touch, mirroring the fixes
already applied on the fe-docs feature branch (same file, same shape)
so its eventual rebase resolves cleanly:

- restore the return the no-confusing-void-expression autofix ate in
  useAbsentSnapshot (typed S | undefined; hook call kept for hook-order
  stability, undefined returned explicitly);
- re-type DOM queries the no-unnecessary-type-assertion autofix broke:
  getByRole<HTMLButtonElement>(...) generics instead of the removed
  as-casts (the eslint program and the client tsconfig aggregate
  disagree about these casts; the generic form satisfies both);
- justified eslint-disable for the deliberate legacy paths: keyCode 229
  IME-composition detection, execCommand clipboard fallbacks, lib.dom
  clipboard optionality, and the any-typed Reflect.get/this probes in
  test fakes;
- drop the dead react/no-danger directive (eslint-plugin-react is not
  loaded, so the rule never applied) keeping its shiki rationale;
- delete the tautological 'Z' comparison and the renameTarget null
  check already implied by renameBlocked;
- css-module non-null assertions replaced by type widening
  (Button className, TAG_CLASS Record) per the established pattern;
- misc: max-len comment wraps, void generic drop in the deferred test
  helper, unused type imports, floating selectWorkspace promises voided,
  member-delimiter newlines in inline type literals.
2026-07-27 22:23:41 +08:00
..
2026-07-26 05:06:39 +08:00
2026-07-26 05:06:39 +08:00

@deepseek-ai/dsh-client-ui-question

English | 中文

Web ask_user_question feature plugin. Its host half mounts dsh-tool-ask-user only when the Web feature is selected; its browser half registers the question entry in the conversation-owned conversation.composer keyed slot.

The component renders one question at a time with progress navigation, single- and multi-select choices, recommendation badges derived from label suffixes, and custom answers. Single-select choices advance immediately, and Enter submits once every question is answered or skipped; Enter during IME composition confirms the input candidate without advancing. It submits one structured answer batch for the whole request: “Skip this question” retains other drafts and emits the existing blank { selected: [] } shape for that item, while close rejects the whole wait as ASK_CANCELLED.

Selection state is local to a component keyed by the request rpcId. A replay with the same id preserves a still-mounted draft, while question/resolved from the host removes the composer. The host remains authoritative: successful HTTP delivery does not remove pending state locally.

Model Experience

Indirectly, through dsh-tool-ask-user; that package owns the model-visible tool schema and structured result.

KV Cache effect

No direct invalidation; dsh-tool-ask-user owns the model-visible tool call and result.

Known Limitations and Deferred Work

  • Unsubmitted drafts are not durable — reconnect resync or a full page reload restores the host-owned pending request with the same rpcId, but a composer unmount resets local option and custom-text drafts.
  • One request owns the composer at a time — later pending requests remain in the session snapshot and become visible after the earlier request resolves.