MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / askUser

Function askUser

src/cli/modes/headless.ts:113–126  ·  view source on GitHub ↗
(prompt: string, options: string[] = ['yes', 'no'])

Source from the content-addressed store, hash-verified

111 registry: opts.registry,
112 permissions: opts.permissions,
113 config, // contract budgets (if any) applied above
114 cwd: opts.cwd,
115 });
116
117 if (!initialMessages) {
118 initialMessages = await agent.buildInitialMessages(
119 effectivePrompt,
120 modeOverride,
121 explicitModelOverride ?? opts.config.defaults.model,
122 );
123 }
124
125 // Record user turn (the rendered prompt, so resume sees the real instructions)
126 store.recordTurn(sessionId, [{ role: 'user', content: effectivePrompt }], { input: 0, output: 0, costUsd: 0 });
127
128 let exitCode = 0;
129 // ── Contract-run telemetry, gathered regardless of --json ──

Callers

nothing calls this directly

Calls 2

errorMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected