mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
feat(cli): Partial threading of AgentLoopContext. (#22978)
This commit is contained in:
@@ -37,10 +37,11 @@ async function restoreAction(
|
||||
args: string,
|
||||
): Promise<void | SlashCommandActionReturn> {
|
||||
const { services, ui } = context;
|
||||
const { config, git: gitService } = services;
|
||||
const { agentContext, git: gitService } = services;
|
||||
const { addItem, loadHistory } = ui;
|
||||
|
||||
const checkpointDir = config?.storage.getProjectTempCheckpointsDir();
|
||||
const checkpointDir =
|
||||
agentContext?.config.storage.getProjectTempCheckpointsDir();
|
||||
|
||||
if (!checkpointDir) {
|
||||
return {
|
||||
@@ -116,7 +117,7 @@ async function restoreAction(
|
||||
} else if (action.type === 'load_history' && loadHistory) {
|
||||
loadHistory(action.history);
|
||||
if (action.clientHistory) {
|
||||
config?.getGeminiClient()?.setHistory(action.clientHistory);
|
||||
agentContext!.geminiClient?.setHistory(action.clientHistory);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,8 +141,9 @@ async function completion(
|
||||
_partialArg: string,
|
||||
): Promise<string[]> {
|
||||
const { services } = context;
|
||||
const { config } = services;
|
||||
const checkpointDir = config?.storage.getProjectTempCheckpointsDir();
|
||||
const { agentContext } = services;
|
||||
const checkpointDir =
|
||||
agentContext?.config.storage.getProjectTempCheckpointsDir();
|
||||
if (!checkpointDir) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user