feat: add question type presentation controls

This commit is contained in:
Erik Kotsiuba
2026-05-06 12:44:37 +02:00
parent b218b8b188
commit f1a0a5d5e5
28 changed files with 761 additions and 44 deletions
+5 -1
View File
@@ -13,6 +13,7 @@ import {
successfulResponse,
validateParams,
} from "./ask-tool-helpers.ts";
import { getAskConfigStore } from "./config/store.ts";
import { AskParamsSchema } from "./schema.ts";
import type { AskParams } from "./types.ts";
import { runAskFlow } from "./ui/controller.ts";
@@ -48,7 +49,10 @@ async function executeAskTool(
_onUpdate: unknown,
ctx: ExtensionContext
) {
const validation = validateParams(params);
const config = await getAskConfigStore().getConfig();
const validation = validateParams(params, {
presentSingleAsMulti: config.behaviour.presentSingleAsMulti,
});
if (!validation.ok) {
return invalidPayloadResponse(params, validation.issues);
}