MCPcopy Create free account
hub / github.com/Noumena-Network/code / checkPermissions

Function checkPermissions

src/tools/REPLTool/javascriptReplFactory.tsx:406–422  ·  view source on GitHub ↗
(input, context)

Source from the content-addressed store, hash-verified

404 return input.code
405 },
406 async checkPermissions(input, context): Promise<PermissionResult> {
407 const mode = context.getAppState().toolPermissionContext.mode
408 if (mode === 'acceptEdits') {
409 return {
410 behavior: 'allow',
411 updatedInput: input,
412 decisionReason: {
413 type: 'mode',
414 mode,
415 },
416 }
417 }
418 return {
419 behavior: 'passthrough',
420 updatedInput: input,
421 }
422 },
423 async prompt() {
424 return typeof config.prompt === 'function' ? config.prompt() : config.prompt
425 },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected