Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class ChatSessionWorktreeCheckpointService extends Disposable implements
const repositoryUri = await this._getSessionRepository(sessionId);
const repository = repositoryUri ? await this.gitService.getRepository(repositoryUri) : undefined;

if (!repository) {
if (!repository || !repository.headCommitHash) {
this.logService.warn(`[ChatSessionWorktreeCheckpointService][handleRequest] No repository found for session ${sessionId}, skipping baseline checkpoint creation`);
return;
}
Expand Down Expand Up @@ -83,7 +83,7 @@ export class ChatSessionWorktreeCheckpointService extends Disposable implements
const repositoryUri = await this._getSessionRepository(sessionId);
const repository = repositoryUri ? await this.gitService.getRepository(repositoryUri) : undefined;

if (!repository) {
if (!repository || !repository.headCommitHash) {
this.logService.warn(`[ChatSessionWorktreeCheckpointService][handleRequestCompleted] No repository found for session ${sessionId}, skipping post-turn checkpoint`);
return;
}
Expand Down Expand Up @@ -165,7 +165,7 @@ export class ChatSessionWorktreeCheckpointService extends Disposable implements
}
const repoUri = Uri.file(props.worktreePath);
const repository = await this.gitService.getRepository(repoUri);
if (!repository) {
if (!repository || !repository.headCommitHash) {
this.logService.warn(`[ChatSessionWorktreeCheckpointService][handleAdditionalWorktreesRequest] No repository found for additional worktree ${props.worktreePath}`);
continue;
}
Expand All @@ -187,7 +187,7 @@ export class ChatSessionWorktreeCheckpointService extends Disposable implements
}
const repoUri = Uri.file(props.worktreePath);
const repository = await this.gitService.getRepository(repoUri);
if (!repository) {
if (!repository || !repository.headCommitHash) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export abstract class FolderRepositoryManager extends Disposable implements IFol
repositoryUri = vscode.Uri.file(worktreeProperties.repositoryPath);
} else {
const repoContext = await this.gitService.getRepository(selectedFolder);
const branchBase = repoContext?.headBranchName
const branchBase = repoContext?.headBranchName && repoContext.headCommitHash
? await this.gitService.getBranchBase(repoContext.rootUri, repoContext.headBranchName)
: undefined;

Expand Down
Loading