MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / confirmShellCommand

Function confirmShellCommand

compatible-shell/src/cli.mjs:188–201  ·  view source on GitHub ↗
(command, state, rl)

Source from the content-addressed store, hash-verified

186}
187
188async function confirmShellCommand(command, state, rl) {
189 if (state.autoApproveShell) {
190 return true
191 }
192
193 if (!rl) {
194 return false
195 }
196
197 const answer = await rl.question(
198 `[shell_command approval]\n${command}\nRun this command? [y/N] `,
199 )
200 return /^y(es)?$/i.test(answer.trim())
201}
202
203async function persistSession(state) {
204 if (state.noSave) {

Callers 2

runShellCommandFunction · 0.85
runUserTurnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected