Skip to content

[BUG] Model Download URLs Not Clickable #63

@eureka0928

Description

@eureka0928

Project

vgrep

Description

The models info command displays URLs for model downloads as plain text. Modern terminals support OSC 8 hyperlinks, allowing URLs to be clickable. Currently users must manually copy/paste URLs.

Error Message

$ vgrep models info
Available models:
  qwen3-embedding-0.6b
    Size: 620 MB
    URL: https://huggingface.co/Qwen/Qwen3-Embedding-0.6B-GGUF/resolve/main/qwen3-embedding-0.6b-f16.gguf

# URL is plain text, not clickable in terminal

Debug Logs

System Information

OS: Ubuntu 24.04.3 LTS
CPU: Intel(R) Core(TM) i9-14900HX (8 cores)
RAM: 16 GB

Screenshots

No response

Steps to Reproduce

  1. Run vgrep models info
  2. Observe URLs displayed as plain text
  3. Attempt to click URL (nothing happens in supporting terminals)
  4. Must manually select and copy URL to browser

Expected Behavior

  • URLs rendered as OSC 8 hyperlinks in supporting terminals
  • Clicking URL opens browser (in terminals like iTerm2, Windows Terminal, GNOME Terminal)
  • Graceful fallback to plain text in unsupporting terminals

Actual Behavior

  • URLs displayed as plain text only
  • No hyperlink escape sequences
  • Manual copy/paste required
  • Suboptimal UX in modern terminals

Additional Context

Added OSC 8 hyperlink support in src/ui/console.rs:

/// Create a clickable hyperlink using OSC 8 escape sequence.
/// Falls back to plain text display in unsupporting terminals.
pub fn hyperlink(url: &str, text: &str) -> String {
    format!("\x1b]8;;{}\x07{}\x1b]8;;\x07", url, text)
}

/// Create a hyperlink where the URL is also the display text.
pub fn hyperlink_url(url: &str) -> String {
    hyperlink(url, url)
}

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvalidValid issuevgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions