@@ -266,65 +266,69 @@ async function processXmlContent(xmlContent: string) {
266
266
if ( changedFiles . length > 0 || newFiles . length > 0 ) {
267
267
// Create quick pick items for all changed/new files
268
268
const quickPickItems : vscode . QuickPickItem [ ] = [
269
- ...changedFiles . map ( f => ( {
269
+ ...changedFiles . map ( ( f ) => ( {
270
270
label : `📝 ${ f . path } ` ,
271
- description : ' Modified' ,
272
- uri : f . uri
271
+ description : " Modified" ,
272
+ uri : f . uri ,
273
273
} ) ) ,
274
- ...newFiles . map ( f => ( {
274
+ ...newFiles . map ( ( f ) => ( {
275
275
label : `✨ ${ f . path } ` ,
276
- description : ' New' ,
277
- uri : f . uri
278
- } ) )
276
+ description : " New" ,
277
+ uri : f . uri ,
278
+ } ) ) ,
279
279
] ;
280
280
281
281
// Show information message with multiple actions
282
- vscode . window . showInformationMessage (
283
- `Files have been updated successfully. ${ changedFiles . length } modified, ${ newFiles . length } new.` ,
284
- 'Show Details' ,
285
- 'Open Changed Files'
286
- ) . then ( async selection => {
287
- if ( selection === 'Show Details' ) {
288
- // Create and show output channel with details and clickable links
289
- const channel = vscode . window . createOutputChannel ( 'Files2Prompt Changes' ) ;
290
- channel . clear ( ) ;
291
-
292
- if ( changedFiles . length > 0 ) {
293
- channel . appendLine ( 'Modified files:' ) ;
294
- changedFiles . forEach ( file => {
295
- channel . appendLine ( `${ file . path } ` ) ;
296
- } ) ;
297
- channel . appendLine ( '' ) ;
298
- }
299
-
300
- if ( newFiles . length > 0 ) {
301
- channel . appendLine ( 'New files:' ) ;
302
- newFiles . forEach ( file => {
303
- channel . appendLine ( `${ file . path } ` ) ;
282
+ vscode . window
283
+ . showInformationMessage (
284
+ `Files have been updated successfully. ${ changedFiles . length } modified, ${ newFiles . length } new.` ,
285
+ "Show Details" ,
286
+ "Open Changed Files"
287
+ )
288
+ . then ( async ( selection ) => {
289
+ if ( selection === "Show Details" ) {
290
+ // Create and show output channel with details and clickable links
291
+ const channel = vscode . window . createOutputChannel (
292
+ "Files2Prompt Changes"
293
+ ) ;
294
+ channel . clear ( ) ;
295
+
296
+ if ( changedFiles . length > 0 ) {
297
+ channel . appendLine ( "Modified files:" ) ;
298
+ changedFiles . forEach ( ( file ) => {
299
+ channel . appendLine ( `${ file . path } ` ) ;
300
+ } ) ;
301
+ channel . appendLine ( "" ) ;
302
+ }
303
+
304
+ if ( newFiles . length > 0 ) {
305
+ channel . appendLine ( "New files:" ) ;
306
+ newFiles . forEach ( ( file ) => {
307
+ channel . appendLine ( `${ file . path } ` ) ;
308
+ } ) ;
309
+ }
310
+
311
+ channel . show ( ) ;
312
+ } else if ( selection === "Open Changed Files" ) {
313
+ // Show quick pick with all changed files
314
+ const selected = await vscode . window . showQuickPick ( quickPickItems , {
315
+ placeHolder : "Select files to open" ,
316
+ canPickMany : true ,
304
317
} ) ;
305
- }
306
-
307
- channel . show ( ) ;
308
- } else if ( selection === 'Open Changed Files' ) {
309
- // Show quick pick with all changed files
310
- const selected = await vscode . window . showQuickPick ( quickPickItems , {
311
- placeHolder : 'Select files to open' ,
312
- canPickMany : true
313
- } ) ;
314
-
315
- if ( selected ) {
316
- // Open each selected file
317
- for ( const item of selected ) {
318
- const uri = ( item as any ) . uri ;
319
- if ( uri ) {
320
- const doc = await vscode . workspace . openTextDocument ( uri ) ;
321
- await vscode . window . showTextDocument ( doc , { preview : false } ) ;
318
+
319
+ if ( selected ) {
320
+ // Open each selected file
321
+ for ( const item of selected ) {
322
+ const uri = ( item as any ) . uri ;
323
+ if ( uri ) {
324
+ const doc = await vscode . workspace . openTextDocument ( uri ) ;
325
+ await vscode . window . showTextDocument ( doc , { preview : false } ) ;
326
+ }
322
327
}
323
328
}
324
329
}
325
- }
326
- } ) ;
330
+ } ) ;
327
331
} else {
328
- vscode . window . showInformationMessage ( ' No files were changed.' ) ;
332
+ vscode . window . showInformationMessage ( " No files were changed." ) ;
329
333
}
330
334
}
0 commit comments