Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
Open
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 @@ -1460,7 +1460,10 @@ export class CopilotCLIChatSessionParticipant extends Disposable {
const worktreeProperties = await this.copilotCLIWorktreeManagerService.getWorktreeProperties(session.sessionId);
const repositoryPath = worktreeProperties?.repositoryPath ? Uri.file(worktreeProperties.repositoryPath) : getWorkingDirectory(session.workspace);
const repository = repositoryPath ? await this.gitService.getRepository(repositoryPath) : undefined;
const hasChanges = (repository?.changes?.indexChanges && repository.changes.indexChanges.length > 0);
const hasChanges = !!repository?.changes && (
repository.changes.indexChanges.length > 0
|| repository.changes.workingTree.length > 0
);

if (hasChanges) {
stream.warning(l10n.t('You have uncommitted changes in your workspace. The cloud agent will start from the last committed state. Consider committing your changes first if you want to include them.'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,10 @@ export class CopilotCLIChatSessionParticipant extends Disposable {
const worktreeProperties = await this.copilotCLIWorktreeManagerService.getWorktreeProperties(session.sessionId);
const repositoryPath = worktreeProperties?.repositoryPath ? Uri.file(worktreeProperties.repositoryPath) : getWorkingDirectory(session.workspace);
const repository = repositoryPath ? await this.gitService.getRepository(repositoryPath) : undefined;
const hasChanges = (repository?.changes?.indexChanges && repository.changes.indexChanges.length > 0);
const hasChanges = !!repository?.changes && (
repository.changes.indexChanges.length > 0
|| repository.changes.workingTree.length > 0
);

if (hasChanges) {
stream.warning(l10n.t('You have uncommitted changes in your workspace. The cloud agent will start from the last committed state. Consider committing your changes first if you want to include them.'));
Expand Down

This file was deleted.

Loading