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

Function interpretApprovalAnswer

src/tools/filesystem/edit-approval.ts:33–39  ·  view source on GitHub ↗
(answer: string)

Source from the content-addressed store, hash-verified

31export const APPROVE_OPTIONS = ['accept', 'always yes', 'edit', 'continue', 'reject'];
32
33export { isAlwaysYesAnswer } from '../../security/permissions.js';
34
35export function interpretApprovalAnswer(answer: string): 'accept' | 'edit' | 'revise' | 'reject' {
36 const a = (answer || '').trim().toLowerCase();
37 if (a === 'accept' || a === 'yes' || a === 'y' || isAlwaysYesAnswer(a)) return 'accept';
38 if (a === 'edit' || a === 'e') return 'edit';
39 if (a === 'continue' || a === 'c' || a === 'revise') return 'revise';
40 return 'reject'; // 'no' / 'n' / 'reject' / anything unrecognized → safe default
41}
42

Callers 2

confirmEditFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected