Files
deepseek-harness/website/zh-CN/api/harness/user-interaction.md
T
lintianle efba9fab0a website: generate the API reference from source (cordis + all 15 harness services)
scripts/gen-website-api.ts renders website/zh-CN/api/{cordis,harness}/* and the
api-sidebar.json fragment the VitePress config imports, so pages and navigation
can never drift from the code: signatures, @param/@returns prose, dispatch
modes, and GitHub source links are extracted, never transcribed, and the
generator hard-errors on any rendered member missing docs. verify-website-api
(doc-sync + run-gates) is the freshness gate.

Replaces the hand-written zh api pages (7 pages covering 7 of 15 services,
with phantom APIs: Context.current/Context.events, agent/post-step, tool/call,
compact/*, llm/pre-request none of which exist) with generated English
references: 5 cordis pages, 15 per-service pages, and a 35-event catalog
grouped by scope. The hand-written hub api/index.md stays and now indexes the
full surface; zh for these pages arrives with the unified translation flow.
2026-07-16 18:13:34 +08:00

1.3 KiB

ctx.userInteraction

UserInteractionService — provided by @deepseek-ai/dsh-user-interaction.

ctx.userInteraction: one active UI provider plus an ask() surface.

Source

ctx.userInteraction.registerProvider(provider)

registerProvider(provider: UserInteractionProvider): () => void

Register the UI provider. Only one provider may be active in a context.

  • provider — UI-side implementation that collects answers.

Returns Disposer that unregisters this provider.

Source

ctx.userInteraction.ask(request)

async ask(request: AskUserQuestionRequest): Promise<AskUserQuestionAnswer>

Ask the active UI provider and wait for the user's answer.

  • request — Questions, owner agent, and abort signal.

Returns The answer chosen or typed by the human.

Source