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

Function handlePlanModeTransition

src/bootstrap/state.ts:1365–1379  ·  view source on GitHub ↗
(
  fromMode: string,
  toMode: string,
)

Source from the content-addressed store, hash-verified

1363}
1364
1365export function handlePlanModeTransition(
1366 fromMode: string,
1367 toMode: string,
1368): void {
1369 // If switching TO plan mode, clear any pending exit attachment
1370 // This prevents sending both plan_mode and plan_mode_exit when user toggles quickly
1371 if (toMode === 'plan' && fromMode !== 'plan') {
1372 STATE.needsPlanModeExitAttachment = false
1373 }
1374
1375 // If switching out of plan mode, trigger the plan_mode_exit attachment
1376 if (fromMode === 'plan' && toMode !== 'plan') {
1377 STATE.needsPlanModeExitAttachment = true
1378 }
1379}
1380
1381export function needsAutoModeExitAttachment(): boolean {
1382 return STATE.needsAutoModeExitAttachment

Callers 3

transitionPermissionModeFunction · 0.50
callFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected