fix: resolve conflict markers in geminiChat.ts for Stage 1

This commit is contained in:
Aishanee Shah
2026-05-19 16:34:00 +00:00
parent a7936df7c5
commit 865130cd54
2 changed files with 12 additions and 31 deletions
+8 -14
View File
@@ -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))
}
/**
+4 -17
View File
@@ -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,
},
};