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 @@ -52,6 +52,7 @@ export class MockWorkspaceIndexStateReporter extends Disposable implements Works
interface ChatStatusItemState {
readonly primary: {
readonly message: string;
readonly icon?: string;
readonly busy?: boolean;
};
readonly details?: {
Expand Down Expand Up @@ -154,6 +155,7 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
return this._writeStatusItem({
primary: {
message: t('{0} repos with indexes', readyRepos.length),
icon: '$(warning)',
},
details: {
message: t(`[Try re-authenticating for {0} additional repos](${commandUri(reauthenticateCommandId, [inaccessibleRepo])} "${t('Try signing in again to use the codebase index')}")`, errorRepos.length),
Expand All @@ -164,6 +166,7 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
return this._writeStatusItem({
primary: {
message: t('Index unavailable'),
icon: '$(error)',
},
details: {
message: t(`[Try re-authenticating](${commandUri(reauthenticateCommandId, [inaccessibleRepo])} "${t('Try signing in again to use the codebase index')}")`),
Expand All @@ -180,6 +183,7 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
message: state.remoteIndexState.repos.every(repo => repo.status === CodeSearchRepoStatus.NotYetIndexed)
? t('Index not yet built')
: t('Index not yet built for a repo in the workspace'),
icon: '$(warning)',
},
details: {
message: `[${t`Build index`}](command:${buildRemoteIndexCommandId} "${t('Build Codebase Index')}")`,
Expand All @@ -202,7 +206,8 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
) {
return this._writeStatusItem({
primary: {
message: t('Index ready')
message: t('Index ready'),
icon: '$(check)',
},
});
}
Expand All @@ -212,6 +217,7 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
return this._writeStatusItem({
primary: {
message: t('Out of date'),
icon: '$(warning)',
},
details: {
message: `[${t`Update index`}](command:${buildRemoteIndexCommandId} "${t('Update Codebase Index')}")`,
Expand All @@ -231,6 +237,7 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
this._writeStatusItem({
primary: {
message: t('Codebase index not available'),
icon: '$(circle-slash)',
},
details: undefined
});
Expand All @@ -249,9 +256,11 @@ export class ChatStatusWorkspaceIndexingStatus extends Disposable {
this._statusItem.title = {
label: statusTitle,
link: codebaseSemanticSearchDocsLink,
helpText: t`Indexes your codebase for more relevant AI results.`,
};

this._statusItem.description = coalesce([
values.primary.icon,
values.primary.message,
values.primary.busy ? spinnerCodicon : undefined,
]).join(' ');
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/common/extHost.protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3642,7 +3642,7 @@ export interface MainThreadTestingShape {

export type ChatStatusItemDto = {
id: string;
title: string | { label: string; link: string };
title: string | { label: string; link: string; helpText?: string };
description: string;
detail: string | undefined;
};
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/api/common/extHostChatStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export class ExtHostChatStatus {
const item = Object.freeze<vscode.ChatStatusItem>({
id: id,

get title(): string | { label: string; link: string } {
get title(): string | { label: string; link: string; helpText?: string } {
return state.title;
},
set title(value: string | { label: string; link: string }) {
set title(value: string | { label: string; link: string; helpText?: string }) {
state.title = value;
syncState();
},
Expand Down
Loading
Loading