(
toolPermissionContext: ToolPermissionContext,
teamContext?: { leadAgentId: string },
)
| 86 | * @returns The next mode and the context to use (with dangerous permissions stripped if needed) |
| 87 | */ |
| 88 | export function cyclePermissionMode( |
| 89 | toolPermissionContext: ToolPermissionContext, |
| 90 | teamContext?: { leadAgentId: string }, |
| 91 | ): { nextMode: PermissionMode; context: ToolPermissionContext } { |
| 92 | const nextMode = getNextPermissionMode(toolPermissionContext, teamContext) |
| 93 | return { |
| 94 | nextMode, |
| 95 | context: transitionPermissionMode( |
| 96 | toolPermissionContext.mode, |
| 97 | nextMode, |
| 98 | toolPermissionContext, |
| 99 | ), |
| 100 | } |
| 101 | } |
| 102 |
no test coverage detected