mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 07:01:09 -07:00
fix(cli): resolve environment loading and auth validation issues in ACP mode (#18025)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -41,7 +41,10 @@ function getInitialTrustState(
|
||||
};
|
||||
}
|
||||
|
||||
const { isTrusted, source } = isWorkspaceTrusted(settings.merged);
|
||||
const { isTrusted, source } = isWorkspaceTrusted(
|
||||
settings.merged,
|
||||
process.cwd(),
|
||||
);
|
||||
|
||||
const isInheritedTrust =
|
||||
isTrusted &&
|
||||
@@ -99,7 +102,10 @@ export const usePermissionsModifyTrust = (
|
||||
}
|
||||
|
||||
// All logic below only applies when editing the current workspace.
|
||||
const wasTrusted = isWorkspaceTrusted(settings.merged).isTrusted;
|
||||
const wasTrusted = isWorkspaceTrusted(
|
||||
settings.merged,
|
||||
process.cwd(),
|
||||
).isTrusted;
|
||||
|
||||
// Create a temporary config to check the new trust status without writing
|
||||
const currentConfig = loadTrustedFolders().user.config;
|
||||
@@ -107,6 +113,7 @@ export const usePermissionsModifyTrust = (
|
||||
|
||||
const { isTrusted, source } = isWorkspaceTrusted(
|
||||
settings.merged,
|
||||
process.cwd(),
|
||||
newConfig,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user