Pasting file paths with line references (e.g. file.tsx:39-42) causes error and disables Enter button
Description
When a file with line reference (@src/components/checkout/MultiStep.tsx:39-42) is pasted, an error is shown (please see the screenshot), and the enter button is disabled (does not work).
I know this is probably intentional, but in the earlier versions (pre 1.0), it used to pick up the file correctly regardless of he format.
The use case for this comes up with this is used in Neovim using SideKick.nvim
OpenCode version
1.0.20
Steps to reproduce
- Paste a file name with lines appended without any spaces as described in the docs
- (Optional) use the
require("sidekick.cli").send { msg = "{this}" }with SideKick.nvim
Screenshot and/or share link
Operating System
Pop!_OS 22.04 LTS
Terminal
Ghostty
This issue might be a duplicate of existing issues. Please check:
- #3624: 1.0.0 - pasting file path into terminal doesn't 'link' to proper file path - Similar issue with pasting file paths not working in v1.0.0
- #3714: OpenTUI: Opening a chat with a file path breaks OpenCode - Similar issue where pasting file paths causes OpenCode to break
Both issues describe problems with file path handling in the OpenTUI version (v1.0+) that worked in previous versions.
Feel free to ignore if none of these address your specific case with line references.
it's because the autocomplete opened and couldn't find any results - we currently don't dismiss autocomplete until you press "Escape" but maybe we should on space
@thdxr I just made a fix for that (the space)
@thdxr I just made a fix for that (the space)
Will the fix be available in the next release or can I install it (By building it from source, if that is an option?)
@itse4elhaam can u try v1.0.22?