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
5 changes: 5 additions & 0 deletions .changeset/slimy-paths-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"roo-cline": patch
---

Fixed bug that prevented some file links from working in the Agent output
4 changes: 3 additions & 1 deletion src/integrations/misc/open-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ export async function openFile(filePath: string, options: OpenFileOptions = {})

const document = await vscode.workspace.openTextDocument(uri)
const selection =
options.line !== undefined ? new vscode.Selection(options.line - 1, 0, options.line - 1, 0) : undefined
options.line !== undefined
? new vscode.Selection(Math.max(options.line - 1, 0), 0, Math.max(options.line - 1, 0), 0)
: undefined
await vscode.window.showTextDocument(document, {
preview: false,
selection,
Expand Down
Loading