mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-25 02:37:53 -07:00
fix: resolve conflict markers in geminiChat.ts for Stage 1
This commit is contained in:
@@ -287,7 +287,6 @@ export class GeminiChat {
|
||||
messages?: MessageRecord[],
|
||||
) {
|
||||
validateHistory(history);
|
||||
<<<<<<< HEAD
|
||||
|
||||
let initialHistory: HistoryTurn[];
|
||||
// If history is passed, it is the most up-to-date in-memory state and takes precedence.
|
||||
@@ -316,11 +315,8 @@ export class GeminiChat {
|
||||
initialHistory = [];
|
||||
}
|
||||
|
||||
this.agentHistory = new AgentChatHistory(initialHistory);
|
||||
=======
|
||||
this.initialMessages = messages;
|
||||
this.agentHistory = new AgentChatHistory(history);
|
||||
>>>>>>> a9648de39 (feat: foundation for subagent trajectories (Stage 1))
|
||||
this.agentHistory = new AgentChatHistory(initialHistory);
|
||||
this.chatRecordingService = new ChatRecordingService(context);
|
||||
this.lastPromptTokenCount = estimateTokenCountSync(
|
||||
this.agentHistory.flatMap((c) => c.content.parts || []),
|
||||
@@ -338,27 +334,26 @@ export class GeminiChat {
|
||||
) {
|
||||
const messagesToUse = messages ?? this.initialMessages;
|
||||
await this.chatRecordingService.initialize(resumedSessionData, kind);
|
||||
<<<<<<< HEAD
|
||||
|
||||
if (messagesToUse) {
|
||||
this.chatRecordingService.resetMessages(messagesToUse);
|
||||
}
|
||||
|
||||
// Sync initial history with the recorder to ensure all turns (even bootstrapped ones)
|
||||
// are durable and coordinated.
|
||||
this.chatRecordingService.updateMessagesFromHistory(
|
||||
this.agentHistory.get(),
|
||||
);
|
||||
=======
|
||||
if (messagesToUse) {
|
||||
this.chatRecordingService.resetMessages(messagesToUse);
|
||||
}
|
||||
>>>>>>> a9648de39 (feat: foundation for subagent trajectories (Stage 1))
|
||||
}
|
||||
|
||||
setSystemInstruction(sysInstr: string) {
|
||||
this.systemInstruction = sysInstr;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
getSystemInstruction(): string {
|
||||
return this.systemInstruction;
|
||||
=======
|
||||
}
|
||||
|
||||
getConversation(): ConversationRecord | null {
|
||||
return this.chatRecordingService.getConversation();
|
||||
}
|
||||
@@ -369,7 +364,6 @@ export class GeminiChat {
|
||||
|
||||
async getSubagentTrajectories(): Promise<Record<string, ConversationRecord>> {
|
||||
return this.chatRecordingService.getSubagentTrajectories();
|
||||
>>>>>>> a9648de39 (feat: foundation for subagent trajectories (Stage 1))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -777,7 +771,7 @@ export class GeminiChat {
|
||||
}
|
||||
|
||||
throw new AgentExecutionBlockedError(
|
||||
beforeModelResult.reason || 'Model call blocked by hook',
|
||||
beforeModelResult.reason || 'Agent execution blocked by hook',
|
||||
syntheticResponse,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -33,26 +33,13 @@ export const SHADOW_REPO_AUTHOR_EMAIL = 'gemini-cli@google.com';
|
||||
*/
|
||||
const SHADOW_REPO_GIT_OPTIONS: Partial<SimpleGitOptions> = {
|
||||
unsafe: {
|
||||
allowUnsafeAlias: true,
|
||||
allowUnsafeAskPass: true,
|
||||
allowUnsafeConfigEnvCount: true,
|
||||
allowUnsafeConfigPaths: true,
|
||||
allowUnsafeCredentialHelper: true,
|
||||
allowUnsafeCustomBinary: true,
|
||||
allowUnsafeDiffExternal: true,
|
||||
allowUnsafeDiffTextConv: true,
|
||||
allowUnsafeEditor: true,
|
||||
allowUnsafeFilter: true,
|
||||
allowUnsafeFsMonitor: true,
|
||||
allowUnsafeGitProxy: true,
|
||||
allowUnsafeGpgProgram: true,
|
||||
allowUnsafeHooksPath: true,
|
||||
allowUnsafeMergeDriver: true,
|
||||
allowUnsafePack: true,
|
||||
allowUnsafePager: true,
|
||||
allowUnsafeProtocolOverride: true,
|
||||
allowUnsafePack: true,
|
||||
allowUnsafeSshCommand: true,
|
||||
allowUnsafeTemplateDir: true,
|
||||
allowUnsafeGitProxy: true,
|
||||
allowUnsafeHooksPath: true,
|
||||
allowUnsafeDiffExternal: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user