microsoft / microsoft/TypeScript

Add support for OSC8 hyperlinks in TTY output

Offen
#63,082 2 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Awaiting More Feedback Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
132

Beschreibung

🔍 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Das Issue nennt Build-Ausgabe und TTY-Ausgabe als Umfang, enthält aber keine Dateien oder Tests. Beginne damit, nachzuverfolgen, wo tsc build Dateipfade und Terminaldiagnosen formatiert; die Aufgabe ist abgeschlossen, wenn Dateipfade mit OSC8-Markierungen umschlossen werden, ohne das bestehende JavaScript-Verhalten zu ändern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
cli, developer-experience
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.