@@ -20,7 +20,7 @@ import { IUntitledTextResourceEditorInput } from '../../../../common/editor.js';
2020import { IEditorService } from '../../../../services/editor/common/editorService.js' ;
2121import { IChatDebugEvent , IChatDebugService } from '../../common/chatDebugService.js' ;
2222import { formatEventDetail } from './chatDebugEventDetailRenderer.js' ;
23- import { renderFileListContent , fileListToPlainText } from './chatDebugFileListRenderer .js' ;
23+ import { renderCustomizationDiscoveryContent , fileListToPlainText } from './chatCustomizationDiscoveryRenderer .js' ;
2424import { renderUserMessageContent , renderAgentResponseContent , messageEventToPlainText , renderResolvedMessageContent , resolvedMessageToPlainText } from './chatDebugMessageContentRenderer.js' ;
2525
2626const $ = DOM . $ ;
@@ -36,6 +36,7 @@ export class ChatDebugDetailPanel extends Disposable {
3636 readonly onDidHide = this . _onDidHide . event ;
3737
3838 readonly element : HTMLElement ;
39+ private readonly contentContainer : HTMLElement ;
3940 private readonly detailDisposables = this . _register ( new DisposableStore ( ) ) ;
4041 private currentDetailText : string = '' ;
4142 private currentDetailEventId : string | undefined ;
@@ -51,6 +52,7 @@ export class ChatDebugDetailPanel extends Disposable {
5152 ) {
5253 super ( ) ;
5354 this . element = DOM . append ( parent , $ ( '.chat-debug-detail-panel' ) ) ;
55+ this . contentContainer = $ ( '.chat-debug-detail-content' ) ;
5456 DOM . hide ( this . element ) ;
5557
5658 // Handle Ctrl+A / Cmd+A to select all within the detail panel
@@ -83,10 +85,12 @@ export class ChatDebugDetailPanel extends Disposable {
8385
8486 DOM . show ( this . element ) ;
8587 DOM . clearNode ( this . element ) ;
88+ DOM . clearNode ( this . contentContainer ) ;
8689 this . detailDisposables . clear ( ) ;
8790
8891 // Header with action buttons
8992 const header = DOM . append ( this . element , $ ( '.chat-debug-detail-header' ) ) ;
93+ this . element . appendChild ( this . contentContainer ) ;
9094
9195 const fullScreenButton = this . detailDisposables . add ( new Button ( header , { ariaLabel : localize ( 'chatDebug.openInEditor' , "Open in Editor" ) , title : localize ( 'chatDebug.openInEditor' , "Open in Editor" ) } ) ) ;
9296 fullScreenButton . element . classList . add ( 'chat-debug-detail-button' ) ;
@@ -112,27 +116,27 @@ export class ChatDebugDetailPanel extends Disposable {
112116 if ( resolved && resolved . kind === 'fileList' ) {
113117 this . currentDetailText = fileListToPlainText ( resolved ) ;
114118 const { element : contentEl , disposables : contentDisposables } = this . instantiationService . invokeFunction ( accessor =>
115- renderFileListContent ( resolved , this . openerService , accessor . get ( IModelService ) , accessor . get ( ILanguageService ) , this . hoverService , accessor . get ( ILabelService ) )
119+ renderCustomizationDiscoveryContent ( resolved , this . openerService , accessor . get ( IModelService ) , accessor . get ( ILanguageService ) , this . hoverService , accessor . get ( ILabelService ) )
116120 ) ;
117121 this . detailDisposables . add ( contentDisposables ) ;
118- this . element . appendChild ( contentEl ) ;
122+ this . contentContainer . appendChild ( contentEl ) ;
119123 } else if ( resolved && resolved . kind === 'message' ) {
120124 this . currentDetailText = resolvedMessageToPlainText ( resolved ) ;
121125 const { element : contentEl , disposables : contentDisposables } = renderResolvedMessageContent ( resolved ) ;
122126 this . detailDisposables . add ( contentDisposables ) ;
123- this . element . appendChild ( contentEl ) ;
127+ this . contentContainer . appendChild ( contentEl ) ;
124128 } else if ( event . kind === 'userMessage' ) {
125129 this . currentDetailText = messageEventToPlainText ( event ) ;
126130 const { element : contentEl , disposables : contentDisposables } = renderUserMessageContent ( event ) ;
127131 this . detailDisposables . add ( contentDisposables ) ;
128- this . element . appendChild ( contentEl ) ;
132+ this . contentContainer . appendChild ( contentEl ) ;
129133 } else if ( event . kind === 'agentResponse' ) {
130134 this . currentDetailText = messageEventToPlainText ( event ) ;
131135 const { element : contentEl , disposables : contentDisposables } = renderAgentResponseContent ( event ) ;
132136 this . detailDisposables . add ( contentDisposables ) ;
133- this . element . appendChild ( contentEl ) ;
137+ this . contentContainer . appendChild ( contentEl ) ;
134138 } else {
135- const pre = DOM . append ( this . element , $ ( 'pre' ) ) ;
139+ const pre = DOM . append ( this . contentContainer , $ ( 'pre' ) ) ;
136140 pre . tabIndex = 0 ;
137141 if ( resolved ) {
138142 this . currentDetailText = resolved . value ;
@@ -147,6 +151,7 @@ export class ChatDebugDetailPanel extends Disposable {
147151 this . currentDetailEventId = undefined ;
148152 DOM . hide ( this . element ) ;
149153 DOM . clearNode ( this . element ) ;
154+ DOM . clearNode ( this . contentContainer ) ;
150155 this . detailDisposables . clear ( ) ;
151156 this . _onDidHide . fire ( ) ;
152157 }
0 commit comments