Skip to content

Text truncated after URL/path when submitting prompt - only URL visible, rest of input disappears #208

@vuyelwadr

Description

@vuyelwadr

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:

  1. Type a URL or path in the input field
  2. Type additional text after the URL/path
  3. The UI shows the complete text (URL/path + additional text)
  4. Press Enter to submit
  5. 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

  1. Start Copilot CLI with copilot
  2. 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
  3. Observe that the full text is visible in the input field (URL/path + additional text)
  4. Press Enter to submit the prompt
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions