Pasting file paths with line references (e.g. file.tsx:39-42) causes error and disables Enter button #2590

Open
opened 2026-02-16 17:36:21 -05:00 by yindo · 5 comments
Owner

Originally created by @itse4elhaam on GitHub (Nov 4, 2025).

Originally assigned to: @thdxr on GitHub.

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

  1. Paste a file name with lines appended without any spaces as described in the docs
  2. (Optional) use the require("sidekick.cli").send { msg = "{this}" } with SideKick.nvim

Screenshot and/or share link

Image

Operating System

Pop!_OS 22.04 LTS

Terminal

Ghostty

Originally created by @itse4elhaam on GitHub (Nov 4, 2025). Originally assigned to: @thdxr on GitHub. ### 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](https://github.com/folke/sidekick.nvim) ### OpenCode version 1.0.20 ### Steps to reproduce 1. Paste a file name with lines appended without any spaces as described in the docs 2. (Optional) use the `require("sidekick.cli").send { msg = "{this}" }` with [SideKick.nvim](https://github.com/folke/sidekick.nvim) ### Screenshot and/or share link <img width="1476" height="440" alt="Image" src="https://github.com/user-attachments/assets/d508eeeb-a194-4524-be87-b869fcfd5830" /> ### Operating System Pop!_OS 22.04 LTS ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 17:36:21 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2025):

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.

@github-actions[bot] commented on GitHub (Nov 4, 2025): 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.
Author
Owner

@thdxr commented on GitHub (Nov 4, 2025):

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 commented on GitHub (Nov 4, 2025): 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
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

@thdxr I just made a fix for that (the space)

@rekram1-node commented on GitHub (Nov 4, 2025): @thdxr I just made a fix for that (the space)
Author
Owner

@itse4elhaam commented on GitHub (Nov 4, 2025):

@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 commented on GitHub (Nov 4, 2025): > [@thdxr](https://github.com/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?)
Author
Owner

@rekram1-node commented on GitHub (Nov 4, 2025):

@itse4elhaam can u try v1.0.22?

@rekram1-node commented on GitHub (Nov 4, 2025): @itse4elhaam can u try v1.0.22?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2590