fix(mode): stabilize plan-mode model experience

This commit is contained in:
Tianyi Cui
2026-07-20 22:13:59 +08:00
parent 28a74d6d7e
commit 897dc82d9b
40 changed files with 620 additions and 298 deletions

View File

@@ -145,11 +145,14 @@ function elicitationForQuestion(
options: AskUserQuestionOption[],
): CreateElicitationRequest {
const title = question.header ?? 'Question'
const message = question.detail === undefined
? question.question
: `${question.question}\n\n${question.detail}`
if (options.length === 0) {
return {
sessionId,
mode: 'form',
message: question.question,
message,
requestedSchema: {
type: 'object',
title,
@@ -183,7 +186,7 @@ function elicitationForQuestion(
return {
sessionId,
mode: 'form',
message: question.question,
message,
requestedSchema: {
type: 'object',
title,
@@ -504,7 +507,7 @@ export function apply(ctx: Context, config: AcpConfig): void {
// --- Stream the harness event taxonomy to ACP session/update --------------
// --- Session modes (dsh-mode, opportunistic) ------------------------------
// The mode PICKER is dsh-mode's ACP surface (the plan-mode RFC): advertised
// The mode PICKER is dsh-mode's ACP surface (the plan-mode Agent Note): advertised
// as `modes` on session/new + session/load, switched via session/set_mode —
// optimistic `current_mode_update` (the pending mode IS the user's
// selection; the logged `mode/set` follows at the turn boundary) — and