MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / setPermission

Method setPermission

packages/node-sdk/src/session.ts:208–217  ·  view source on GitHub ↗
(mode: PermissionMode)

Source from the content-addressed store, hash-verified

206 }
207
208 async setPermission(mode: PermissionMode): Promise<void> {
209 this.ensureOpen();
210 if (!isPermissionMode(mode)) {
211 throw new KimiError(
212 ErrorCodes.SESSION_PERMISSION_MODE_INVALID,
213 'Session permission mode must be yolo, manual, or auto',
214 );
215 }
216 await this.rpc.setPermission({ sessionId: this.id, mode });
217 }
218
219 async setPlanMode(enabled: boolean): Promise<void> {
220 this.ensureOpen();

Callers 12

setPermissionFunction · 0.45
mainFunction · 0.45
activateRuntimeMethod · 0.45
handleYoloCommandFunction · 0.45
handleAutoCommandFunction · 0.45
applyPermissionChoiceFunction · 0.45
setPermissionForGoalFunction · 0.45
setPermissionForSwarmFunction · 0.45
restorePermissionFunction · 0.45
forcePromptPermissionFunction · 0.45

Calls 2

ensureOpenMethod · 0.95
isPermissionModeFunction · 0.85

Tested by

no test coverage detected