-
Notifications
You must be signed in to change notification settings - Fork 143
Description
Describe the bug
When entering a prompt that contains a URL or file path followed by additional text, the text after the URL/path is visible in the input UI while typing. However, when pressing Enter to submit the request, only the URL/path portion is sent - all text after it gets truncated and disappears from the actual request.
The behavior is:
- Type a URL or path in the input field
- Type additional text after the URL/path
- The UI shows the complete text (URL/path + additional text)
- Press Enter to submit
- BUG: Only the URL/path is actually submitted - everything typed after it is truncated/lost
Affected version
Version: 0.0.334
Commit: 26896a6
Steps to reproduce the behavior
- Start Copilot CLI with
copilot
- Type a prompt that includes a URL or path, for example:
read https://github.com/github/copilot-cli/issues see if theres any issue about text being truncated when submitted
/path/to/file explain what this does
@/some/file.ts can you refactor this
- Observe that the full text is visible in the input field (URL/path + additional text)
- Press Enter to submit the prompt
- Observe: Only the URL/path portion is processed - the text after it is truncated
Expected behavior
The entire prompt including both the URL/path and the text after it should be submitted and processed by Copilot CLI. The full input visible in the UI should match what gets sent to the model.
Example:
- Input in UI:
https://github.com/github/copilot-cli/issues analyze the recent issues
- Expected submission:
https://github.com/github/copilot-cli/issues analyze the recent issues
Additional context
System Information
- OS: macOS (Darwin 24.6.0)
- Architecture: ARM64 (Apple Silicon)
- Terminal: Apple Terminal
- Shell: zsh
- Node version: v23.5.0
- Copilot CLI version: 0.0.334 (Commit: 26896a6)
Impact
This bug makes it impossible to provide context or instructions along with URLs/paths, forcing users to either:
- Submit the URL first, then provide context in a follow-up message
- Avoid using URLs/paths in prompts entirely
- Work around by putting the URL/path at the end of the prompt instead of the beginning
This appears to be an input parsing or submission bug where URLs/paths are being treated as delimiters or causing the subsequent text to be dropped during prompt submission, possibly related to how the CLI handles @
file mentions or URL parsing.