Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/@types/vscode.proposed.chatParticipantAdditions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ declare module 'vscode' {
isComplete?: boolean;
toolSpecificData?: ChatTerminalToolInvocationData;
fromSubAgent?: boolean;
presentation?: 'hidden' | 'hiddenAfterComplete' | undefined;

constructor(toolName: string, toolCallId: string, isError?: boolean);
}
Expand Down
22 changes: 1 addition & 21 deletions src/issues/shareProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,27 +218,7 @@ export class GitHubPermalinkAsMarkdownShareProvider extends GitHubPermalinkShare
}

private async getMarkdownLinkText(item: vscode.ShareableItem): Promise<string | undefined> {
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);
}
}

Expand Down