mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-10 00:27:05 -06:00
Fix duplicated file changes part for background sessions (#281635)
* Initial plan * Fix duplicated file changes for background sessions When chat.checkpoints.showFileChanges is enabled, only show file changes summary for local sessions since background sessions already have their own file changes part registered. Co-authored-by: osortega <48293249+osortega@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: osortega <48293249+osortega@users.noreply.github.com> Co-authored-by: Peng Lyu <penn.lv@gmail.com>
This commit is contained in:
parent
5dfbd3bdf5
commit
7261435ee3
@ -59,6 +59,8 @@ import { IChatChangesSummaryPart, IChatCodeCitations, IChatErrorDetailsPart, ICh
|
||||
import { getNWords } from '../common/chatWordCounter.js';
|
||||
import { CodeBlockModelCollection } from '../common/codeBlockModelCollection.js';
|
||||
import { ChatAgentLocation, ChatConfiguration, ChatModeKind, CollapsedToolsDisplayMode, ThinkingDisplayMode } from '../common/constants.js';
|
||||
import { localChatSessionType } from '../common/chatSessionsService.js';
|
||||
import { getChatSessionType } from '../common/chatUri.js';
|
||||
import { MarkUnhelpfulActionId } from './actions/chatTitleActions.js';
|
||||
import { ChatTreeItem, IChatCodeBlockInfo, IChatFileTreeInfo, IChatListItemRendererOptions, IChatWidgetService } from './chat.js';
|
||||
import { ChatAgentHover, getChatAgentHoverOptions } from './chatAgentHover.js';
|
||||
@ -1163,7 +1165,9 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
|
||||
}
|
||||
|
||||
private shouldShowFileChangesSummary(element: IChatResponseViewModel): boolean {
|
||||
return element.isComplete && this.configService.getValue<boolean>('chat.checkpoints.showFileChanges');
|
||||
// Only show file changes summary for local sessions - background sessions already have their own file changes part
|
||||
const isLocalSession = getChatSessionType(element.sessionResource) === localChatSessionType;
|
||||
return element.isComplete && isLocalSession && this.configService.getValue<boolean>('chat.checkpoints.showFileChanges');
|
||||
}
|
||||
|
||||
private getDataForProgressiveRender(element: IChatResponseViewModel) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user