fix(vscode,cli): make plan_exit "Continue here" work again
Restore custom: false on the plan follow-up question — the "Type your own answer" row was redundant because the main prompt already routes typed text as a question reply. Auto-submit single-question single-select option picks in the VS Code QuestionDock so the button behaves like the TUI instead of silently waiting for a second Submit click.
This commit is contained in:
@@ -266,6 +266,36 @@ describe("plan follow-up", () => {
|
||||
await expect(pending).resolves.toBe("break")
|
||||
}))
|
||||
|
||||
test("ask - emits a non-custom single-select question with the canonical answers", () =>
|
||||
withInstance(async () => {
|
||||
const seeded = await seed({ text: "1. Build" })
|
||||
const pending = PlanFollowup.ask({
|
||||
sessionID: seeded.sessionID,
|
||||
messages: seeded.messages,
|
||||
abort: AbortSignal.any([]),
|
||||
})
|
||||
|
||||
const item = await waitQuestion(seeded.sessionID)
|
||||
expect(item).toBeDefined()
|
||||
if (!item) return
|
||||
const q = item.questions[0]
|
||||
expect(q).toBeDefined()
|
||||
if (!q) return
|
||||
|
||||
// custom must stay false — "Type your own answer" is redundant because the main prompt
|
||||
// input already routes typed text as a question reply. Regressed once during the v1.4.4
|
||||
// upstream merge, so pin it here.
|
||||
expect(q.custom).toBe(false)
|
||||
expect(q.multiple).not.toBe(true)
|
||||
expect(q.options.map((item) => item.label)).toEqual([
|
||||
PlanFollowup.ANSWER_NEW_SESSION,
|
||||
PlanFollowup.ANSWER_CONTINUE,
|
||||
])
|
||||
|
||||
await question.reject(item.id)
|
||||
await expect(pending).resolves.toBe("break")
|
||||
}))
|
||||
|
||||
test("ask - returns continue and creates code message on Continue here", () =>
|
||||
withInstance(async () => {
|
||||
const get = spyOn(PlanFollowupRuntime, "agent").mockImplementation(async (name: string) => {
|
||||
|
||||
Reference in New Issue
Block a user