* Clear conversation history and prepare an "implement this plan" message. * Used after ExitPlanMode with the "clear context" option.
(planContent: string, allowedPrompts?: string[])
| 220 | await refreshHookDisableFromSettings(this.toolContext.cwd).catch(() => {}); |
| 221 | } |
| 222 | |
| 223 | /** Register a callback for when mode changes (used by UI layer). */ |
| 224 | onModeChange(callback: (mode: PermissionMode, previousMode: PermissionMode) => void): void { |
| 225 | this.modeChangeCallback = callback; |
| 226 | } |
| 227 | |
| 228 | /** Switch the permission mode; restores the pre-plan mode when leaving plan mode. */ |
| 229 | setPermissionMode(mode: PermissionMode): void { |
| 230 | const previous = this.currentPermissionMode; |
| 231 | if (mode === "plan" && previous !== "plan") { |
| 232 | this.prePlanMode = previous; |
no test coverage detected