@@ -26,14 +26,15 @@ import { createSingleCallFunction } from '../../../util/vs/base/common/functiona
26
26
import { DisposableStore , toDisposable } from '../../../util/vs/base/common/lifecycle' ;
27
27
import { isEqual } from '../../../util/vs/base/common/resources' ;
28
28
import { IInstantiationService } from '../../../util/vs/platform/instantiation/common/instantiation' ;
29
- import { EndOfLine , EventEmitter , LanguageModelPromptTsxPart , LanguageModelTextPart , LanguageModelToolResult , NotebookCellData , NotebookCellKind , NotebookEdit , NotebookRange , Position , Range , TextEdit } from '../../../vscodeTypes' ;
29
+ import { EndOfLine , EventEmitter , LanguageModelPromptTsxPart , LanguageModelTextPart , LanguageModelToolResult , MarkdownString , NotebookCellData , NotebookCellKind , NotebookEdit , NotebookRange , Position , Range , TextEdit } from '../../../vscodeTypes' ;
30
30
import { IBuildPromptContext } from '../../prompt/common/intents' ;
31
31
import { renderPromptElementJSON } from '../../prompts/node/base/promptRenderer' ;
32
32
import { Tag } from '../../prompts/node/base/tag' ;
33
33
import { EXISTING_CODE_MARKER } from '../../prompts/node/panel/codeBlockFormattingRules' ;
34
34
import { CodeBlock } from '../../prompts/node/panel/safeElements' ;
35
35
import { ToolName } from '../common/toolNames' ;
36
36
import { ICopilotTool , ToolRegistry } from '../common/toolsRegistry' ;
37
+ import { formatUriForFileWidget , resolveToolInputPath } from './toolUtils' ;
37
38
38
39
export interface IEditNotebookToolParams {
39
40
filePath : string ;
@@ -298,9 +299,9 @@ export class EditNotebookTool implements ICopilotTool<IEditNotebookToolParams> {
298
299
}
299
300
300
301
prepareInvocation ( options : vscode . LanguageModelToolInvocationPrepareOptions < IEditNotebookToolParams > , token : vscode . CancellationToken ) : vscode . ProviderResult < vscode . PreparedToolInvocation > {
302
+ const uri = resolveToolInputPath ( options . input . filePath , this . promptPathRepresentationService ) ;
301
303
return {
302
- invocationMessage : l10n . t ( 'Editing notebook' ) ,
303
- presentation : 'hidden'
304
+ invocationMessage : new MarkdownString ( l10n . t ( 'Edit {0}' , formatUriForFileWidget ( uri ) ) )
304
305
} ;
305
306
}
306
307
0 commit comments