mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-04 23:27:00 -07:00
fix(core): trigger JIT directory provisioning synchronously in enter-plan-mode to restore sandbox compatibility
This fixes a regression where sandboxed environments (like Windows bwrap) would crash when attempting to bind the plans directory if it was lazily created after the sandbox was initialized. Additionally, documented the sticky extension context logic in AppContainer to address code review feedback.
This commit is contained in:
@@ -1384,12 +1384,19 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
|
||||
if (config) {
|
||||
if (parsedCommand.extensionContext) {
|
||||
// Explicit extension invocation sets the "sticky" context to that extension,
|
||||
// allowing subsequent multi-turn conversational replies (e.g. "yes, do that")
|
||||
// to continue interacting with the extension's isolated plan directory.
|
||||
if (config.hasExtensionPlanDir(parsedCommand.extensionContext)) {
|
||||
config.setActiveExtensionContext(parsedCommand.extensionContext);
|
||||
} else {
|
||||
// Extension doesn't have a plan dir registered, so fallback to default workspace context
|
||||
config.setActiveExtensionContext(undefined);
|
||||
}
|
||||
} else if (parsedCommand.commandToExecute?.name === 'plan') {
|
||||
// If the user explicitly runs the native global /plan command (e.g., "/plan copy"),
|
||||
// they are signaling an intent to manage their standard workspace plans,
|
||||
// so we clear the sticky extension context to avoid misdirecting the operation.
|
||||
config.setActiveExtensionContext(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user