MCPcopy Create free account
hub / github.com/ConardLi/easy-agent / clearContextAndImplement

Method clearContextAndImplement

src/core/queryEngine.ts:222–229  ·  view source on GitHub ↗

* Clear conversation history and prepare an "implement this plan" message. * Used after ExitPlanMode with the "clear context" option.

(planContent: string, allowedPrompts?: string[])

Source from the content-addressed store, hash-verified

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;

Callers 1

useAgentSessionFunction · 0.80

Calls 2

invalidateUsageAnchorMethod · 0.95
addSessionAllowRulesMethod · 0.95

Tested by

no test coverage detected