microsoft / microsoft/TypeScript

Add support for OSC8 hyperlinks in TTY output

Aperta
#63,082 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Awaiting More Feedback Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

🔍 Search Terms

"OSC8", "hyperlinks", "terminal emulator", "tty", "build output"

✅ Viability Checklist
⭐ Suggestion

Wrap file paths from build output with OSC8 hyperlink markers.

📃 Motivating Example

When the build output contains errors, it is convenient to be able to CMD+click on files path to directly see the error in the editor.

Most modern terminal emulators (iTerm, Ghostty, tmux, etc.) support CMD+clicking on file names in order to open them in the default app. These terminals use two different approaches to enable this; OSC8 hyperlinks and RegExp. The issue with the Regexp based approach is that their behavior is inconsistent across terminal implementations, making them unreliable. OSC8 hyperlinks, on the other hand, are unambiguous and reliable.

💻 Use Cases
  1. What do you want to use this for?
    When building a TS project, a change in a dependency might cause issues in dependent code, causing tsc build to return errors.

  2. What shortcomings exist with current approaches?
    Currently, I can sometimes CMD+click the filename, but this often fails (because the terminal does not properly infer the actual file location using the RegExp based method)

  3. What workarounds are you using in the meantime?
    Manually copy the file path in the terminal output + Manually open IDE + Manually open file

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

La issue indica l’output di build e l’output TTY come ambito, ma non fornisce file o test. Inizia tracciando dove tsc build formatta i percorsi dei file e le diagnostiche del terminale; il lavoro è completato quando i percorsi dei file sono racchiusi da marcatori OSC8 senza modificare il comportamento JavaScript esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
cli, developer-experience
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.