agent sessions - empty description for local chats that have not started (#278804)

* agent sessions - empty description for local chats that have not started

* .
This commit is contained in:
Benjamin Pasero
2025-11-21 17:37:13 +01:00
committed by GitHub
parent 8161a43cf5
commit daaf36b4f5

View File

@@ -224,14 +224,14 @@ export class LocalChatSessionsProvider extends Disposable implements IChatSessio
private getSessionDescription(chatModel: IChatModel): string | undefined { private getSessionDescription(chatModel: IChatModel): string | undefined {
const requests = chatModel.getRequests(); const requests = chatModel.getRequests();
if (requests.length === 0) { if (requests.length === 0) {
return undefined; return ''; // signal Chat that has not started yet
} }
// Get the last request to check its response status // Get the last request to check its response status
const lastRequest = requests[requests.length - 1]; const lastRequest = requests[requests.length - 1];
const response = lastRequest?.response; const response = lastRequest?.response;
if (!response) { if (!response) {
return undefined; return ''; // signal Chat that has not started yet
} }
// If the response is complete, show Finished // If the response is complete, show Finished