mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-17 23:24:00 +03:00
fix(vscode): emit V2 mention syntax (@path#37-42) instead of V1 #L prefix (#60737)
Co-authored-by: Jason Sherron <jsherron@cloudflare.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
42287632a8
commit
500b101e66
@@ -11,7 +11,7 @@ This extension requires the [opencode CLI](https://opencode.ai) to be installed
|
||||
- **Quick Launch**: Use `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows/Linux) to open opencode in a split terminal view, or focus an existing terminal session if one is already running.
|
||||
- **New Session**: Use `Cmd+Shift+Esc` (Mac) or `Ctrl+Shift+Esc` (Windows/Linux) to start a new opencode terminal session, even if one is already open. You can also click the opencode button in the UI.
|
||||
- **Context Awareness**: Automatically share your current selection or tab with opencode.
|
||||
- **File Reference Shortcuts**: Use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references. For example, `@File#L37-42`.
|
||||
- **File Reference Shortcuts**: Use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references. For example, `@File#37-42`.
|
||||
|
||||
## Support
|
||||
|
||||
|
||||
@@ -86,10 +86,10 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
if (startLine === endLine) {
|
||||
// Single line selection
|
||||
filepathWithAt += `#L${startLine}`
|
||||
filepathWithAt += `#${startLine}`
|
||||
} else {
|
||||
// Multi-line selection
|
||||
filepathWithAt += `#L${startLine}-${endLine}`
|
||||
filepathWithAt += `#${startLine}-${endLine}`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user