@@ -31,6 +31,7 @@ import { IEditorService } from '../../../../services/editor/common/editorService
31
31
import { IExtensionService , isProposedApiEnabled } from '../../../../services/extensions/common/extensions.js' ;
32
32
import { IHostService } from '../../../../services/host/browser/host.js' ;
33
33
import { VIEW_ID as SEARCH_VIEW_ID } from '../../../../services/search/common/search.js' ;
34
+ import { UntitledTextEditorInput } from '../../../../services/untitled/common/untitledTextEditorInput.js' ;
34
35
import { IViewsService } from '../../../../services/views/common/viewsService.js' ;
35
36
import { FileEditorInput } from '../../../files/browser/editors/fileEditorInput.js' ;
36
37
import { AnythingQuickAccessProvider } from '../../../search/browser/anythingQuickAccess.js' ;
@@ -322,7 +323,7 @@ export class AttachContextAction extends Action2 {
322
323
isDynamic : true
323
324
} ) ;
324
325
} else if ( isIOpenEditorsQuickPickItem ( pick ) ) {
325
- for ( const editor of editorService . editors . filter ( e => e instanceof FileEditorInput || e instanceof DiffEditorInput ) ) {
326
+ for ( const editor of editorService . editors . filter ( e => e instanceof FileEditorInput || e instanceof DiffEditorInput || e instanceof UntitledTextEditorInput ) ) {
326
327
const uri = editor instanceof DiffEditorInput ? editor . modified . resource : editor . resource ;
327
328
if ( uri ) {
328
329
if ( chatEditingService ) {
@@ -545,7 +546,7 @@ export class AttachContextAction extends Action2 {
545
546
} ) ;
546
547
}
547
548
} else if ( context . showFilesOnly ) {
548
- if ( editorService . editors . filter ( e => e instanceof FileEditorInput || e instanceof DiffEditorInput ) . length > 0 ) {
549
+ if ( editorService . editors . filter ( e => e instanceof FileEditorInput || e instanceof DiffEditorInput || e instanceof UntitledTextEditorInput ) . length > 0 ) {
549
550
quickPickItems . push ( {
550
551
kind : 'open-editors' ,
551
552
id : 'open-editors' ,
@@ -606,7 +607,7 @@ export class AttachContextAction extends Action2 {
606
607
}
607
608
608
609
if ( isIOpenEditorsQuickPickItem ( item ) ) {
609
- for ( const editor of editorService . editors . filter ( e => e instanceof FileEditorInput || e instanceof DiffEditorInput ) ) {
610
+ for ( const editor of editorService . editors . filter ( e => e instanceof FileEditorInput || e instanceof DiffEditorInput || e instanceof UntitledTextEditorInput ) ) {
610
611
// There is an open editor that hasn't yet been attached to the chat
611
612
if ( editor . resource && ! attachedContext . has ( this . _getFileContextId ( { resource : editor . resource } ) ) ) {
612
613
return true ;
0 commit comments