@@ -9,6 +9,7 @@ import { Button } from '../../../../../base/browser/ui/button/button.js';
99import { getDefaultHoverDelegate } from '../../../../../base/browser/ui/hover/hoverDelegateFactory.js' ;
1010import { Codicon } from '../../../../../base/common/codicons.js' ;
1111import { Disposable , DisposableStore } from '../../../../../base/common/lifecycle.js' ;
12+ import { Schemas } from '../../../../../base/common/network.js' ;
1213import { basename , dirname } from '../../../../../base/common/resources.js' ;
1314import { ThemeIcon } from '../../../../../base/common/themables.js' ;
1415import { URI } from '../../../../../base/common/uri.js' ;
@@ -53,15 +54,15 @@ export class ImplicitContextAttachmentWidget extends Disposable {
5354 dom . clearNode ( this . domNode ) ;
5455 this . renderDisposables . clear ( ) ;
5556
56- const attachmentTypeName = ( this . attachment . isPromptFile === false )
57- ? localize ( 'file.lowercase' , "file" )
58- : localize ( 'prompt.lowercase' , "prompt" ) ;
59-
6057 this . domNode . classList . toggle ( 'disabled' , ! this . attachment . enabled ) ;
6158 const label = this . resourceLabels . create ( this . domNode , { supportIcons : true } ) ;
6259 const file = URI . isUri ( this . attachment . value ) ? this . attachment . value : this . attachment . value ! . uri ;
6360 const range = URI . isUri ( this . attachment . value ) || ! this . attachment . isSelection ? undefined : this . attachment . value ! . range ;
6461
62+ const attachmentTypeName = ( this . attachment . isPromptFile === false )
63+ ? file . scheme === Schemas . vscodeNotebookCell ? localize ( 'cell.lowercase' , "cell" ) : localize ( 'file.lowercase' , "file" )
64+ : localize ( 'prompt.lowercase' , "prompt" ) ;
65+
6566 const fileBasename = basename ( file ) ;
6667 const fileDirname = dirname ( file ) ;
6768 const friendlyName = `${ fileBasename } ${ fileDirname } ` ;
0 commit comments