microsoft / microsoft/TypeScript

Add support for OSC8 hyperlinks in TTY output

オープン
#63,082 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Awaiting More Feedback Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

🔍 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue では build 出力と TTY 出力を対象範囲として示していますが、ファイルやテストは提供されていません。まず、tsc build がファイルパスとターミナル診断をどこでフォーマットしているかを追跡します。ファイルパスが OSC8 マーカーで囲まれ、既存の JavaScript の動作を変更していなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
cli, developer-experience
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。