diff --git a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts index 71520fa1ec..aa7001a3d2 100644 --- a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts +++ b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts @@ -105,6 +105,7 @@ declare module 'vscode' { isComplete?: boolean; toolSpecificData?: ChatTerminalToolInvocationData; fromSubAgent?: boolean; + presentation?: 'hidden' | 'hiddenAfterComplete' | undefined; constructor(toolName: string, toolCallId: string, isError?: boolean); } diff --git a/src/issues/shareProviders.ts b/src/issues/shareProviders.ts index 2b98217004..f652a0c9d2 100644 --- a/src/issues/shareProviders.ts +++ b/src/issues/shareProviders.ts @@ -218,27 +218,7 @@ export class GitHubPermalinkAsMarkdownShareProvider extends GitHubPermalinkShare } private async getMarkdownLinkText(item: vscode.ShareableItem): Promise { - const fileName = pathLib.basename(item.resourceUri.path); - - if (item.selection) { - const document = await vscode.workspace.openTextDocument(item.resourceUri); - - const editorSelection = item.selection.start === item.selection.end - ? item.selection - : new vscode.Range(item.selection.start, new vscode.Position(item.selection.start.line + 1, 0)); - - const selectedText = document.getText(editorSelection); - if (selectedText) { - return selectedText; - } - - const wordRange = document.getWordRangeAtPosition(item.selection.start); - if (wordRange) { - return document.getText(wordRange); - } - } - - return fileName; + return pathLib.basename(item.resourceUri.path); } }