dsh-gitbash-shell 0.21.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/client.js +42 -42
- package/src/index.js +117 -21
- package/src/shell.js +9 -5
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "Windows 全模式 Git Bash:用 Git for Windows bash 替换 PowerShell 执行器,并物化 standard/minimal/code/cordis 的 Git Bash 变体 preset。双 era 适配 dsh <= 0.1.1(内置 id 'code')与 >= 0.1.2(改名 'ptc'),启动探测自动选择,preset id 永不变。联动:dsh-ptc-cordis-preset(两者同装时 PTC 创造模式自动物化为 Git Bash 版)+ dsh-better-sidebar(终端 UI 标签与模型 terminal_* 工具自动切到 Git Bash)。",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Windows 上让 agent 的每条 shell 命令改经 Git for Windows bash 执行;物化四个内置预设的 Git Bash 变体,统一 MSYS 盘根路径方言,侧栏终端接管可开关。· Run every agent shell command through Git for Windows bash on Windows; materialize Git Bash variants of the built-in presets, unify the MSYS drive-root path dialect, and adopt the sidebar terminal behind a switch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/client.js
CHANGED
|
@@ -68,13 +68,13 @@ window.__ModuleLoader__.load({
|
|
|
68
68
|
"mnts.label": "虚拟路径挂载",
|
|
69
69
|
"mnts.hint": "bash 的原生路径习惯——~ 家目录、/tmp、/usr 等——按 Git Bash 挂载表在所有工具解析;关闭则仅 /c/ 盘根形式。",
|
|
70
70
|
"errs.label": "报错路径翻译",
|
|
71
|
-
"errs.hint": "
|
|
71
|
+
"errs.hint": "文件工具与 run_code 报错里的 Windows 路径翻回 /c/ 形式(含程序里捕获到的错误消息)并附设备路径引导;关闭则保留原文(便于排障复制)。",
|
|
72
72
|
"split.label": "glob 绝对路径拆分",
|
|
73
73
|
"split.hint": "glob 的绝对 pattern(/c/.../*.md)自动拆为 path + 相对 pattern;关闭则原样传递。",
|
|
74
74
|
"code.label": "run_code 程序内路径",
|
|
75
75
|
"code.hint": "run_code 程序里写的 /c/... 等路径字面量在执行前按同一张挂载表翻译;注释、插值模板、$VAR 与非路径字符串不动,扫描有任何不确定就整份不改。 并给程序补 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 会得到 undefined\\temp,程序会静默写错地方。",
|
|
76
76
|
"eol.label": "Git 行尾(与 Linux 一致)",
|
|
77
|
-
"eol.hint": "模型跑的 git 命令按 Linux 行为:core.autocrlf=
|
|
77
|
+
"eol.hint": "模型跑的 git 命令按 Linux 行为:core.autocrlf=input、core.eol=lf。你自己终端的 git 与仓库里的 .gitattributes 都不受影响。",
|
|
78
78
|
"bash.label": "Git Bash 路径",
|
|
79
79
|
"bash.hint": "自定义 bash.exe 完整路径,用于 /usr 等挂载的 Git 根解析;留空自动探测默认安装与 PATH。",
|
|
80
80
|
"bash.save": "保存",
|
|
@@ -98,13 +98,13 @@ window.__ModuleLoader__.load({
|
|
|
98
98
|
"mnts.label": "Virtual path mounts",
|
|
99
99
|
"mnts.hint": "Bash-native habits — ~ home, /tmp, /usr — resolve through the Git Bash mount table in every tool; off = /c/ drive roots only.",
|
|
100
100
|
"errs.label": "Error-path translation",
|
|
101
|
-
"errs.hint": "Windows paths in file-tool
|
|
101
|
+
"errs.hint": "Windows paths in file-tool and run_code failures rewrite back to /c/ — including the message a run_code program catches — with NUL guidance; off keeps raw text (easier to copy while debugging).",
|
|
102
102
|
"split.label": "Glob absolute-pattern split",
|
|
103
103
|
"split.hint": "An absolute glob pattern (/c/.../*.md) splits into path + relative pattern; off passes it through verbatim.",
|
|
104
104
|
"code.label": "run_code program paths",
|
|
105
105
|
"code.hint": "Path literals inside a run_code program are translated through the same mount table before it runs; comments, interpolated templates, $VARs and non-path strings stay untouched, and any uncertainty leaves the whole program as written. It also seeds TEMP/TMP for the program: with an empty env Windows' os.tmpdir() returns undefined\\temp and writes land in a bogus folder.",
|
|
106
106
|
"eol.label": "Git line endings (Linux match)",
|
|
107
|
-
"eol.hint": "Git commands the model runs behave like Linux: core.autocrlf=
|
|
107
|
+
"eol.hint": "Git commands the model runs behave like Linux: core.autocrlf=input, core.eol=lf. Your own terminal's git and a repository's .gitattributes are unaffected.",
|
|
108
108
|
"bash.label": "Git Bash path",
|
|
109
109
|
"bash.hint": "Full path of a custom bash.exe for resolving /usr mounts; empty = auto-detect the default install and PATH.",
|
|
110
110
|
"bash.save": "Save",
|
|
@@ -138,13 +138,13 @@ window.__ModuleLoader__.load({
|
|
|
138
138
|
"mnts.label": "التركيبات الافتراضية للمسارات",
|
|
139
139
|
"mnts.hint": "عادات bash الأصلية — ~ و /tmp و /usr — تُحل عبر جدول تحميلات Git Bash في كل أداة؛ الإيقاف يعني جذور الأقراص /c/ فقط.",
|
|
140
140
|
"errs.label": "ترجمة مسارات الأخطاء",
|
|
141
|
-
"errs.hint": "مسارات Windows في أخطاء أدوات الملفات تُعاد بصيغة /c/ مع إرشاد NUL؛ الإيقاف يحتفظ بالنص الأصلي.",
|
|
141
|
+
"errs.hint": "مسارات Windows في أخطاء أدوات الملفات و run_code تُعاد بصيغة /c/ — بما فيها الرسالة التي يلتقطها البرنامج — مع إرشاد NUL؛ الإيقاف يحتفظ بالنص الأصلي.",
|
|
142
142
|
"split.label": "تقسيم نمط glob المطلق",
|
|
143
143
|
"split.hint": "نمط glob المطلق يُقسم إلى path + نمط نسبي؛ الإيقاف يمرره كما هو.",
|
|
144
144
|
"code.label": "مسارات برامج run_code",
|
|
145
145
|
"code.hint": "تُترجم السلاسل النصية للمسارات المكتوبة داخل برنامج run_code عبر جدول التحميل نفسه قبل التشغيل؛ وتبقى التعليقات والقوالب ذات الإدراج و$VAR والسلاسل غير المسارية كما هي، وأي التباس يُبقي البرنامج كاملًا دون تغيير. وتُهيَّأ أيضًا TEMP/TMP للبرنامج: مع بيئة فارغة يعيد os.tmpdir() على ويندوز القيمة undefined\\temp فيُكتب في مكان خاطئ.",
|
|
146
146
|
"eol.label": "نهايات أسطر Git (مطابقة لينكس)",
|
|
147
|
-
"eol.hint": "أوامر git التي يشغّلها النموذج تتبع سلوك لينكس: core.autocrlf=
|
|
147
|
+
"eol.hint": "أوامر git التي يشغّلها النموذج تتبع سلوك لينكس: core.autocrlf=input و core.eol=lf؛ لا يتأثر طرفيتك ولا ملف .gitattributes للمستودع.",
|
|
148
148
|
"bash.label": "مسار Git Bash",
|
|
149
149
|
"bash.hint": "المسار الكامل لنسخة bash.exe مخصصة؛ فارغ = اكتشاف تلقائي.",
|
|
150
150
|
"bash.save": "حفظ",
|
|
@@ -168,13 +168,13 @@ window.__ModuleLoader__.load({
|
|
|
168
168
|
"mnts.label": "Virtuelle Pfad-Mounts",
|
|
169
169
|
"mnts.hint": "Bash-eigene Gewohnheiten — ~ Home, /tmp, /usr — werden über die Git-Bash-Mount-Tabelle in jedem Tool aufgelöst; aus = nur /c/-Laufwerkswurzeln.",
|
|
170
170
|
"errs.label": "Fehlerpfad-Übersetzung",
|
|
171
|
-
"errs.hint": "Windows-Pfade in
|
|
171
|
+
"errs.hint": "Windows-Pfade in Fehlern von Dateitools und run_code werden zu /c/ zurückgeschrieben — auch die im Programm gefangene Meldung; aus erhält den Originaltext.",
|
|
172
172
|
"split.label": "Glob-Absolutmuster-Split",
|
|
173
173
|
"split.hint": "Ein absolutes Glob-Muster zerfällt in Pfad + relatives Muster; aus übergibt es unverändert.",
|
|
174
174
|
"code.label": "Pfade in run_code-Programmen",
|
|
175
175
|
"code.hint": "Pfadliterale in einem run_code-Programm werden vor dem Start über dieselbe Mount-Tabelle übersetzt; Kommentare, interpolierte Templates, $VARs und Nicht-Pfad-Strings bleiben unangetastet, und bei Unklarheit bleibt das ganze Programm unverändert. Zusätzlich werden TEMP/TMP für das Programm gesetzt: bei leerer Umgebung liefert os.tmpdir() unter Windows undefined\\temp und schreibt an einen falschen Ort.",
|
|
176
176
|
"eol.label": "Git-Zeilenenden (Linux-gleich)",
|
|
177
|
-
"eol.hint": "Vom Modell ausgeführte git-Befehle verhalten sich wie unter Linux: core.autocrlf=
|
|
177
|
+
"eol.hint": "Vom Modell ausgeführte git-Befehle verhalten sich wie unter Linux: core.autocrlf=input, core.eol=lf. Dein eigenes Terminal und die .gitattributes eines Repos bleiben unberührt.",
|
|
178
178
|
"bash.label": "Git-Bash-Pfad",
|
|
179
179
|
"bash.hint": "Vollständiger Pfad einer benutzerdefinierten bash.exe; leer = automatische Erkennung.",
|
|
180
180
|
"bash.save": "Speichern",
|
|
@@ -198,13 +198,13 @@ window.__ModuleLoader__.load({
|
|
|
198
198
|
"mnts.label": "Montages de chemins virtuels",
|
|
199
199
|
"mnts.hint": "Les habitudes natives de bash — ~ home, /tmp, /usr — se résolvent via la table de montages de Git Bash dans chaque outil ; désactivé = racines /c/ uniquement.",
|
|
200
200
|
"errs.label": "Traduction des chemins d'erreur",
|
|
201
|
-
"errs.hint": "Les chemins Windows dans les erreurs des outils fichiers sont réécrits en /c/ ; désactivé conserve le texte brut.",
|
|
201
|
+
"errs.hint": "Les chemins Windows dans les erreurs des outils fichiers et de run_code sont réécrits en /c/ — y compris le message capturé par le programme ; désactivé conserve le texte brut.",
|
|
202
202
|
"split.label": "Découpage des motifs glob absolus",
|
|
203
203
|
"split.hint": "Un motif glob absolu se scinde en chemin + motif relatif ; désactivé le passe tel quel.",
|
|
204
204
|
"code.label": "chemins dans les programmes run_code",
|
|
205
205
|
"code.hint": "Les littéraux de chemin écrits dans un programme run_code sont traduits via la même table de montage avant exécution; commentaires, gabarits interpolés, $VAR et chaînes non-chemin restent intacts, et la moindre incertitude laisse le programme tel quel. TEMP/TMP sont aussi fournis au programme : avec un env vide, os.tmpdir() sous Windows renvoie undefined\\temp et écrit au mauvais endroit.",
|
|
206
206
|
"eol.label": "fins de ligne Git (comme Linux)",
|
|
207
|
-
"eol.hint": "Les commandes git lancées par le modèle suivent le comportement Linux : core.autocrlf=
|
|
207
|
+
"eol.hint": "Les commandes git lancées par le modèle suivent le comportement Linux : core.autocrlf=input, core.eol=lf. Votre terminal et les .gitattributes du dépôt ne sont pas touchés.",
|
|
208
208
|
"bash.label": "Chemin Git Bash",
|
|
209
209
|
"bash.hint": "Chemin complet d'un bash.exe personnalisé ; vide = détection automatique.",
|
|
210
210
|
"bash.save": "Enregistrer",
|
|
@@ -228,13 +228,13 @@ window.__ModuleLoader__.load({
|
|
|
228
228
|
"mnts.label": "वर्चुअल पथ माउंट",
|
|
229
229
|
"mnts.hint": "bash की मूल आदतें — ~ होम, /tmp, /usr — हर टूल में Git Bash माउंट तालिका से हल होती हैं; बंद = केवल /c/ ड्राइव-रूट।",
|
|
230
230
|
"errs.label": "त्रुटि-पथ अनुवाद",
|
|
231
|
-
"errs.hint": "फ़ाइल टूल की त्रुटियों में Windows पथ /c/ रूप में लिखे जाते
|
|
231
|
+
"errs.hint": "फ़ाइल टूल और run_code की त्रुटियों में Windows पथ /c/ रूप में लिखे जाते हैं — प्रोग्राम में पकड़े गए संदेश सहित; बंद = मूल पाठ।",
|
|
232
232
|
"split.label": "glob एब्सोल्यूट-पैटर्न विभाजन",
|
|
233
233
|
"split.hint": "एब्सोल्यूट glob पैटर्न path + रिलेटिव पैटर्न में विभाजित होता है; बंद इसे वैसे ही पास करता है।",
|
|
234
234
|
"code.label": "run_code प्रोग्राम पथ",
|
|
235
235
|
"code.hint": "run_code प्रोग्राम में लिखे पथ लिटरल चलने से पहले उसी माउंट तालिका से अनूदित होते हैं; टिप्पणियाँ, इंटरपोलेटेड टेम्पलेट, $VAR और गैर-पथ स्ट्रिंग अछूते रहते हैं, और किसी भी अनिश्चितता पर पूरा प्रोग्राम अपरिवर्तित रहता है। साथ ही प्रोग्राम के लिए TEMP/TMP भर दिए जाते हैं: खाली env में Windows पर os.tmpdir() undefined\\temp देता है और गलत जगह लिखता है।",
|
|
236
236
|
"eol.label": "Git पंक्ति-अंत (Linux जैसा)",
|
|
237
|
-
"eol.hint": "मॉडल द्वारा चलाए git कमांड Linux व्यवहार अपनाते हैं: core.autocrlf=
|
|
237
|
+
"eol.hint": "मॉडल द्वारा चलाए git कमांड Linux व्यवहार अपनाते हैं: core.autocrlf=input, core.eol=lf। आपका टर्मिनल और रेपो का .gitattributes अछूते रहते हैं।",
|
|
238
238
|
"bash.label": "Git Bash पथ",
|
|
239
239
|
"bash.hint": "कस्टम bash.exe का पूर्ण पथ; खाली = ऑटो-डिटेक्ट।",
|
|
240
240
|
"bash.save": "सहेजें",
|
|
@@ -258,13 +258,13 @@ window.__ModuleLoader__.load({
|
|
|
258
258
|
"mnts.label": "Mount path virtual",
|
|
259
259
|
"mnts.hint": "Kebiasaan asli bash — ~ home, /tmp, /usr — diselesaikan lewat tabel mount Git Bash di setiap alat; nonaktif = hanya akar drive /c/.",
|
|
260
260
|
"errs.label": "Terjemahan path error",
|
|
261
|
-
"errs.hint": "Path Windows di error alat berkas ditulis balik ke /c
|
|
261
|
+
"errs.hint": "Path Windows di error alat berkas dan run_code ditulis balik ke /c/ — termasuk pesan yang ditangkap program; nonaktif mempertahankan teks asli.",
|
|
262
262
|
"split.label": "Pemisahan pattern glob absolut",
|
|
263
263
|
"split.hint": "Pattern glob absolut dipecah menjadi path + pattern relatif; nonaktif meneruskannya apa adanya.",
|
|
264
264
|
"code.label": "jalur dalam program run_code",
|
|
265
265
|
"code.hint": "Literal jalur yang ditulis di program run_code diterjemahkan lewat tabel mount yang sama sebelum dijalankan; komentar, template berinterpolasi, $VAR, dan string non-jalur dibiarkan, dan bila ada keraguan seluruh program tidak diubah. TEMP/TMP juga diisi untuk program: dengan env kosong, os.tmpdir() di Windows mengembalikan undefined\\temp dan menulis ke lokasi salah.",
|
|
266
266
|
"eol.label": "akhir baris Git (sama seperti Linux)",
|
|
267
|
-
"eol.hint": "Perintah git yang dijalankan model mengikuti perilaku Linux: core.autocrlf=
|
|
267
|
+
"eol.hint": "Perintah git yang dijalankan model mengikuti perilaku Linux: core.autocrlf=input, core.eol=lf. Terminal Anda dan .gitattributes repo tidak terpengaruh.",
|
|
268
268
|
"bash.label": "Path Git Bash",
|
|
269
269
|
"bash.hint": "Path lengkap bash.exe kustom; kosong = deteksi otomatis.",
|
|
270
270
|
"bash.save": "Simpan",
|
|
@@ -288,13 +288,13 @@ window.__ModuleLoader__.load({
|
|
|
288
288
|
"mnts.label": "Mount di percorsi virtuali",
|
|
289
289
|
"mnts.hint": "Le abitudini native di bash — ~ home, /tmp, /usr — si risolvono tramite la tabella di mount di Git Bash in ogni strumento; off = solo radici /c/.",
|
|
290
290
|
"errs.label": "Traduzione dei percorsi d'errore",
|
|
291
|
-
"errs.hint": "I percorsi Windows negli errori degli strumenti file tornano in /c
|
|
291
|
+
"errs.hint": "I percorsi Windows negli errori degli strumenti file e di run_code tornano in /c/ — incluso il messaggio catturato dal programma; off mantiene il testo originale.",
|
|
292
292
|
"split.label": "Suddivisione pattern glob assoluti",
|
|
293
293
|
"split.hint": "Un pattern glob assoluto si divide in percorso + pattern relativo; off lo passa invariato.",
|
|
294
294
|
"code.label": "percorsi nei programmi run_code",
|
|
295
295
|
"code.hint": "I letterali di percorso scritti in un programma run_code vengono tradotti con la stessa tabella di mount prima dell'esecuzione; commenti, template interpolati, $VAR e stringhe non di percorso restano intatti e qualsiasi incertezza lascia il programma invariato. Inoltre TEMP/TMP vengono forniti al programma: con env vuoto, os.tmpdir() su Windows restituisce undefined\\temp e scrive nel posto sbagliato.",
|
|
296
296
|
"eol.label": "fine riga Git (come Linux)",
|
|
297
|
-
"eol.hint": "I comandi git eseguiti dal modello seguono il comportamento Linux: core.autocrlf=
|
|
297
|
+
"eol.hint": "I comandi git eseguiti dal modello seguono il comportamento Linux: core.autocrlf=input, core.eol=lf. Il tuo terminale e i .gitattributes del repo non vengono toccati.",
|
|
298
298
|
"bash.label": "Percorso Git Bash",
|
|
299
299
|
"bash.hint": "Percorso completo di un bash.exe personalizzato; vuoto = rilevamento automatico.",
|
|
300
300
|
"bash.save": "Salva",
|
|
@@ -318,13 +318,13 @@ window.__ModuleLoader__.load({
|
|
|
318
318
|
"mnts.label": "仮想パスマウント",
|
|
319
319
|
"mnts.hint": "bash 固有の習慣——~ ホーム、/tmp、/usr——は Git Bash のマウントテーブルで全ツールに解決;オフなら /c/ ドライブルートのみ。",
|
|
320
320
|
"errs.label": "エラーパス翻訳",
|
|
321
|
-
"errs.hint": "
|
|
321
|
+
"errs.hint": "ファイルツールと run_code のエラー内の Windows パスを /c/ 形式に書き戻します(プログラムが捕捉したメッセージも含む);オフなら原文維持。",
|
|
322
322
|
"split.label": "glob 絶対パターン分割",
|
|
323
323
|
"split.hint": "絶対 glob パターンを path + 相対パターンに分割;オフならそのまま渡します。",
|
|
324
324
|
"code.label": "run_code プログラム内のパス",
|
|
325
325
|
"code.hint": "run_code プログラム内に書いた /c/... などのパスリテラルは実行前に同じマウント表で変換されます。コメント・補間テンプレート・$VAR・パス以外の文字列は変更せず、解析に不確かさがあればプログラム全体をそのまま実行します。 さらにプログラムに TEMP/TMP を渡します: 空の env では Windows の os.tmpdir() が undefined\\temp を返し、誤った場所に書き込みます。",
|
|
326
326
|
"eol.label": "Git の行末(Linux と同じ)",
|
|
327
|
-
"eol.hint": "モデルが実行する git コマンドは Linux と同じ挙動になります: core.autocrlf=
|
|
327
|
+
"eol.hint": "モデルが実行する git コマンドは Linux と同じ挙動になります: core.autocrlf=input、core.eol=lf。あなたのターミナルやリポジトリの .gitattributes は影響を受けません。",
|
|
328
328
|
"bash.label": "Git Bash パス",
|
|
329
329
|
"bash.hint": "カスタム bash.exe の完全パス;空欄なら自動検出。",
|
|
330
330
|
"bash.save": "保存",
|
|
@@ -348,13 +348,13 @@ window.__ModuleLoader__.load({
|
|
|
348
348
|
"mnts.label": "가상 경로 마운트",
|
|
349
349
|
"mnts.hint": "bash 고유 습관——~ 홈, /tmp, /usr——은 Git Bash 마운트 테이블로 모든 도구에서 해석; 끄면 /c/ 드라이브 루트만.",
|
|
350
350
|
"errs.label": "오류 경로 번역",
|
|
351
|
-
"errs.hint": "파일
|
|
351
|
+
"errs.hint": "파일 도구와 run_code 오류의 Windows 경로를 /c/ 형식으로 되돌립니다(프로그램이 잡은 메시지 포함); 끄면 원문 유지.",
|
|
352
352
|
"split.label": "glob 절대 패턴 분할",
|
|
353
353
|
"split.hint": "절대 glob 패턴을 path + 상대 패턴으로 분할; 끄면 그대로 전달.",
|
|
354
354
|
"code.label": "run_code 프로그램 경로",
|
|
355
355
|
"code.hint": "run_code 프로그램에 쓴 /c/... 경로 리터럴은 실행 전에 같은 마운트 표로 변환됩니다. 주석, 보간 템플릿, $VAR, 경로가 아닌 문자열은 그대로 두고, 스캔이 불확실하면 프로그램 전체를 그대로 둡니다. 또한 프로그램에 TEMP/TMP를 채워 줍니다: 빈 env에서 Windows의 os.tmpdir()는 undefined\\temp를 반환해 엉뚱한 곳에 씁니다.",
|
|
356
356
|
"eol.label": "Git 줄바꿈(Linux와 동일)",
|
|
357
|
-
"eol.hint": "모델이 실행하는 git 명령은 Linux 동작을 따릅니다: core.autocrlf=
|
|
357
|
+
"eol.hint": "모델이 실행하는 git 명령은 Linux 동작을 따릅니다: core.autocrlf=input, core.eol=lf. 사용자의 터미널과 저장소의 .gitattributes는 영향을 받지 않습니다.",
|
|
358
358
|
"bash.label": "Git Bash 경로",
|
|
359
359
|
"bash.hint": "사용자 bash.exe 전체 경로; 비우면 자동 감지.",
|
|
360
360
|
"bash.save": "저장",
|
|
@@ -378,13 +378,13 @@ window.__ModuleLoader__.load({
|
|
|
378
378
|
"mnts.label": "Virtuele pad-mounts",
|
|
379
379
|
"mnts.hint": "Bash-eigen gewoonten — ~ home, /tmp, /usr — lossen op via de Git Bash-mount tabel in elke tool; uit = alleen /c/-schijfwortels.",
|
|
380
380
|
"errs.label": "Foutpad-vertaling",
|
|
381
|
-
"errs.hint": "Windows-paden in fouten van bestandstools keren terug als /c
|
|
381
|
+
"errs.hint": "Windows-paden in fouten van bestandstools en run_code keren terug als /c/ — ook het bericht dat een programma opvangt; uit behoudt de brontekst.",
|
|
382
382
|
"split.label": "Glob absoluut-patroon-splitsing",
|
|
383
383
|
"split.hint": "Een absoluut glob-patroon splitst in pad + relatief patroon; uit geeft het ongewijzigd door.",
|
|
384
384
|
"code.label": "paden in run_code-programma's",
|
|
385
385
|
"code.hint": "Pad-literalen in een run_code-programma worden vóór uitvoering via dezelfde mounttabel vertaald; opmerkingen, geïnterpoleerde templates, $VAR's en niet-pad-strings blijven ongemoeid, en bij twijfel blijft het hele programma ongewijzigd. Ook worden TEMP/TMP voor het programma gezet: met een lege env geeft os.tmpdir() op Windows undefined\\temp en schrijft het op de verkeerde plek.",
|
|
386
386
|
"eol.label": "Git regeleinden (zoals Linux)",
|
|
387
|
-
"eol.hint": "Git-opdrachten die het model uitvoert volgen Linux-gedrag: core.autocrlf=
|
|
387
|
+
"eol.hint": "Git-opdrachten die het model uitvoert volgen Linux-gedrag: core.autocrlf=input, core.eol=lf. Je eigen terminal en de .gitattributes van een repo blijven onaangetast.",
|
|
388
388
|
"bash.label": "Git Bash-pad",
|
|
389
389
|
"bash.hint": "Volledig pad van een aangepaste bash.exe; leeg = automatisch detecteren.",
|
|
390
390
|
"bash.save": "Opslaan",
|
|
@@ -408,13 +408,13 @@ window.__ModuleLoader__.load({
|
|
|
408
408
|
"mnts.label": "Wirtualne montowanie ścieżek",
|
|
409
409
|
"mnts.hint": "Natywne nawyki basha — ~ home, /tmp, /usr — rozwiązują się przez tablicę montowań Git Bash w każdym narzędziu; wył. = tylko korzenie /c/.",
|
|
410
410
|
"errs.label": "Tłumaczenie ścieżek błędów",
|
|
411
|
-
"errs.hint": "Ścieżki Windows w błędach narzędzi plikowych wracają jako /c
|
|
411
|
+
"errs.hint": "Ścieżki Windows w błędach narzędzi plikowych i run_code wracają jako /c/ — także komunikat przechwycony przez program; wył. zachowuje oryginalny tekst.",
|
|
412
412
|
"split.label": "Podział wzorców glob absolutnych",
|
|
413
413
|
"split.hint": "Absolutny wzorzec glob dzieli się na ścieżkę + wzorzec względny; wył. przekazuje bez zmian.",
|
|
414
414
|
"code.label": "ścieżki w programach run_code",
|
|
415
415
|
"code.hint": "Literały ścieżek w programie run_code są tłumaczone przez tę samą tabelę montowania przed uruchomieniem; komentarze, szablony z interpolacją, $VAR i ciągi niebędące ścieżkami pozostają nietknięte, a każda niepewność pozostawia program bez zmian. Dodatkowo ustawiane są TEMP/TMP dla programu: przy pustym env Windows zwraca z os.tmpdir() undefined\\temp i zapisuje w złym miejscu.",
|
|
416
416
|
"eol.label": "końce linii Git (jak w Linuksie)",
|
|
417
|
-
"eol.hint": "Polecenia git uruchamiane przez model działają jak w Linuksie: core.autocrlf=
|
|
417
|
+
"eol.hint": "Polecenia git uruchamiane przez model działają jak w Linuksie: core.autocrlf=input, core.eol=lf. Twój terminal i .gitattributes repozytorium pozostają nietknięte.",
|
|
418
418
|
"bash.label": "Ścieżka Git Bash",
|
|
419
419
|
"bash.hint": "Pełna ścieżka własnego bash.exe; puste = autodetekcja.",
|
|
420
420
|
"bash.save": "Zapisz",
|
|
@@ -438,13 +438,13 @@ window.__ModuleLoader__.load({
|
|
|
438
438
|
"mnts.label": "Montagens de caminhos virtuais",
|
|
439
439
|
"mnts.hint": "Hábitos nativos do bash — ~ home, /tmp, /usr — resolvem pela tabela de montagens do Git Bash em cada ferramenta; desligado = só raízes /c/.",
|
|
440
440
|
"errs.label": "Tradução de caminhos de erro",
|
|
441
|
-
"errs.hint": "Caminhos Windows nos erros das ferramentas voltam como /c
|
|
441
|
+
"errs.hint": "Caminhos Windows nos erros das ferramentas e do run_code voltam como /c/ — incluindo a mensagem capturada pelo programa; desligado mantém o texto original.",
|
|
442
442
|
"split.label": "Divisão de padrão glob absoluto",
|
|
443
443
|
"split.hint": "Um padrão glob absoluto divide em caminho + padrão relativo; desligado passa-o inalterado.",
|
|
444
444
|
"code.label": "caminhos em programas run_code",
|
|
445
445
|
"code.hint": "Literais de caminho escritos num programa run_code são traduzidos pela mesma tabela de montagem antes da execução; comentários, modelos interpolados, $VAR e strings que não são caminhos ficam intactos, e qualquer incerteza deixa o programa como está. Também são definidos TEMP/TMP para o programa: com env vazio, os.tmpdir() no Windows devolve undefined\\temp e grava no lugar errado.",
|
|
446
446
|
"eol.label": "fins de linha do Git (como no Linux)",
|
|
447
|
-
"eol.hint": "Os comandos git executados pelo modelo seguem o comportamento do Linux: core.autocrlf=
|
|
447
|
+
"eol.hint": "Os comandos git executados pelo modelo seguem o comportamento do Linux: core.autocrlf=input, core.eol=lf. O seu terminal e os .gitattributes do repositório não são afetados.",
|
|
448
448
|
"bash.label": "Caminho do Git Bash",
|
|
449
449
|
"bash.hint": "Caminho completo de um bash.exe personalizado; vazio = detecção automática.",
|
|
450
450
|
"bash.save": "Salvar",
|
|
@@ -468,13 +468,13 @@ window.__ModuleLoader__.load({
|
|
|
468
468
|
"mnts.label": "Виртуальные монтирования путей",
|
|
469
469
|
"mnts.hint": "Собственные привычки bash — ~ домашний, /tmp, /usr — разрешаются через таблицу монтирований Git Bash в каждом инструменте; выкл = только корни /c/.",
|
|
470
470
|
"errs.label": "Перевод путей в ошибках",
|
|
471
|
-
"errs.hint": "Пути Windows в ошибках файловых инструментов возвращаются как /c
|
|
471
|
+
"errs.hint": "Пути Windows в ошибках файловых инструментов и run_code возвращаются как /c/ — включая сообщение, перехваченное программой; выкл сохраняет исходный текст.",
|
|
472
472
|
"split.label": "Разбор абсолютного glob-шаблона",
|
|
473
473
|
"split.hint": "Абсолютный glob-шаблон разбивается на path + относительный шаблон; выкл передаёт как есть.",
|
|
474
474
|
"code.label": "пути в программах run_code",
|
|
475
475
|
"code.hint": "Строковые литералы путей в программе run_code переводятся по той же таблице монтирования до запуска; комментарии, шаблоны с интерполяцией, $VAR и строки-не-пути не трогаются, а при любой неопределённости программа остаётся без изменений. Также программе задаются TEMP/TMP: при пустом env в Windows os.tmpdir() возвращает undefined\\temp и запись идёт не туда.",
|
|
476
476
|
"eol.label": "переводы строк Git (как в Linux)",
|
|
477
|
-
"eol.hint": "Команды git, запускаемые моделью, ведут себя как в Linux: core.autocrlf=
|
|
477
|
+
"eol.hint": "Команды git, запускаемые моделью, ведут себя как в Linux: core.autocrlf=input, core.eol=lf. Ваш терминал и .gitattributes репозитория не затрагиваются.",
|
|
478
478
|
"bash.label": "Путь Git Bash",
|
|
479
479
|
"bash.hint": "Полный путь кастомного bash.exe; пусто = автоопределение.",
|
|
480
480
|
"bash.save": "Сохранить",
|
|
@@ -498,13 +498,13 @@ window.__ModuleLoader__.load({
|
|
|
498
498
|
"mnts.label": "Virtuella sökvägsmonteringar",
|
|
499
499
|
"mnts.hint": "Bash egna vanor — ~ hem, /tmp, /usr — löses via Git Bash monteringstabell i varje verktyg; av = endast /c/-enhetsrötter.",
|
|
500
500
|
"errs.label": "Felsökvägsöversättning",
|
|
501
|
-
"errs.hint": "Windows-sökvägar i
|
|
501
|
+
"errs.hint": "Windows-sökvägar i fel från filverktyg och run_code skrivs tillbaka som /c/ — även meddelandet som ett program fångar; av behåller originaltexten.",
|
|
502
502
|
"split.label": "Glob absolut mönsterdelning",
|
|
503
503
|
"split.hint": "Ett absolut glob-mönster delas i sökväg + relativt mönster; av skickar det oförändrat.",
|
|
504
504
|
"code.label": "sökvägar i run_code-program",
|
|
505
505
|
"code.hint": "Sökvägslitteraler i ett run_code-program översätts via samma monteringstabell före körning; kommentarer, interpolerade mallar, $VAR och strängar som inte är sökvägar lämnas orörda, och vid minsta osäkerhet lämnas hela programmet oförändrat. Dessutom sätts TEMP/TMP för programmet: med tom env ger os.tmpdir() i Windows undefined\\temp och skriver på fel ställe.",
|
|
506
506
|
"eol.label": "Git radslut (som Linux)",
|
|
507
|
-
"eol.hint": "Git-kommandon som modellen kör följer Linux-beteende: core.autocrlf=
|
|
507
|
+
"eol.hint": "Git-kommandon som modellen kör följer Linux-beteende: core.autocrlf=input, core.eol=lf. Din egen terminal och repots .gitattributes påverkas inte.",
|
|
508
508
|
"bash.label": "Git Bash-sökväg",
|
|
509
509
|
"bash.hint": "Fullständig sökväg till egen bash.exe; tom = automatisk detektering.",
|
|
510
510
|
"bash.save": "Spara",
|
|
@@ -528,13 +528,13 @@ window.__ModuleLoader__.load({
|
|
|
528
528
|
"mnts.label": "จุดเมานต์เส้นทางเสมือน",
|
|
529
529
|
"mnts.hint": "พฤติกรรมดั้งเดิมของ bash — ~ โฮม, /tmp, /usr — แก้ผ่านตารางเมานต์ของ Git Bash ในทุกเครื่องมือ; ปิด = เฉพาะรากไดรฟ์ /c/",
|
|
530
530
|
"errs.label": "การแปลเส้นทางในข้อผิดพลาด",
|
|
531
|
-
"errs.hint": "เส้นทาง Windows
|
|
531
|
+
"errs.hint": "เส้นทาง Windows ในข้อผิดพลาดของเครื่องมือไฟล์และ run_code เขียนกลับเป็น /c/ — รวมถึงข้อความที่โปรแกรมจับได้; ปิดแล้วคงข้อความเดิม",
|
|
532
532
|
"split.label": "การแยก pattern glob แบบสัมบูรณ์",
|
|
533
533
|
"split.hint": "pattern glob สัมบูรณ์แยกเป็น path + pattern สัมพัทธ์; ปิดส่งต่อตามเดิม",
|
|
534
534
|
"code.label": "พาธในโปรแกรม run_code",
|
|
535
535
|
"code.hint": "สตริงพาธที่เขียนในโปรแกรม run_code จะถูกแปลผ่านตาราง mount เดียวกันก่อนรัน ความคิดเห็น เทมเพลตที่มีการแทรก $VAR และสตริงที่ไม่ใช่พาธจะไม่ถูกแตะ และหากไม่แน่ใจทั้งโปรแกรมจะไม่ถูกแก้ไข และเติม TEMP/TMP ให้โปรแกรมด้วย: เมื่อ env ว่าง os.tmpdir() บน Windows จะคืน undefined\\temp แล้วเขียนผิดที่",
|
|
536
536
|
"eol.label": "อักขระขึ้นบรรทัด Git (เหมือน Linux)",
|
|
537
|
-
"eol.hint": "คำสั่ง git ที่โมเดลรันจะใช้พฤติกรรมแบบ Linux: core.autocrlf=
|
|
537
|
+
"eol.hint": "คำสั่ง git ที่โมเดลรันจะใช้พฤติกรรมแบบ Linux: core.autocrlf=input, core.eol=lf เทอร์มินัลของคุณและ .gitattributes ของ repo ไม่ได้รับผลกระทบ",
|
|
538
538
|
"bash.label": "เส้นทาง Git Bash",
|
|
539
539
|
"bash.hint": "เส้นทางเต็มของ bash.exe แบบกำหนดเอง; ว่าง = ตรวจจับอัตโนมัติ",
|
|
540
540
|
"bash.save": "บันทึก",
|
|
@@ -558,13 +558,13 @@ window.__ModuleLoader__.load({
|
|
|
558
558
|
"mnts.label": "Sanal yol bağlamaları",
|
|
559
559
|
"mnts.hint": "Bash'e özgü alışkanlıklar — ~ ev, /tmp, /usr — her araçta Git Bash bağlama tablosuyla çözülür; kapalı = yalnızca /c/ sürücü kökleri.",
|
|
560
560
|
"errs.label": "Hata yolu çevirisi",
|
|
561
|
-
"errs.hint": "Dosya aracı hatalarındaki Windows yolları /c/ olarak geri yazılır; kapalı özgün metni korur.",
|
|
561
|
+
"errs.hint": "Dosya aracı ve run_code hatalarındaki Windows yolları /c/ olarak geri yazılır — programın yakaladığı ileti dahil; kapalı özgün metni korur.",
|
|
562
562
|
"split.label": "Glob mutlak örüntü ayrıştırma",
|
|
563
563
|
"split.hint": "Mutlak glob örüntüsü path + göreli örüntüye ayrılır; kapalı olduğu gibi geçirir.",
|
|
564
564
|
"code.label": "run_code program yolları",
|
|
565
565
|
"code.hint": "Bir run_code programında yazılan yol dizeleri çalıştırılmadan önce aynı bağlama tablosuyla çevrilir; yorumlar, enterpolasyonlu şablonlar, $VAR ve yol olmayan dizeler olduğu gibi kalır, herhangi bir belirsizlikte programın tamamı değişmeden bırakılır. Ayrıca programa TEMP/TMP verilir: boş env ile Windows'ta os.tmpdir() undefined\\temp döner ve yanlış yere yazar.",
|
|
566
566
|
"eol.label": "Git satır sonları (Linux gibi)",
|
|
567
|
-
"eol.hint": "Modelin çalıştırdığı git komutları Linux davranışını izler: core.autocrlf=
|
|
567
|
+
"eol.hint": "Modelin çalıştırdığı git komutları Linux davranışını izler: core.autocrlf=input, core.eol=lf. Kendi terminaliniz ve deponun .gitattributes dosyası etkilenmez.",
|
|
568
568
|
"bash.label": "Git Bash yolu",
|
|
569
569
|
"bash.hint": "Özel bash.exe tam yolu; boş = otomatik algılama.",
|
|
570
570
|
"bash.save": "Kaydet",
|
|
@@ -588,13 +588,13 @@ window.__ModuleLoader__.load({
|
|
|
588
588
|
"mnts.label": "Gán đường dẫn ảo",
|
|
589
589
|
"mnts.hint": "Thói quen gốc của bash — ~ home, /tmp, /usr — được giải qua bảng gán của Git Bash trong mọi công cụ; tắt = chỉ gốc ổ /c/.",
|
|
590
590
|
"errs.label": "Dịch đường dẫn lỗi",
|
|
591
|
-
"errs.hint": "Đường dẫn Windows trong lỗi công cụ tệp viết lại thành /c
|
|
591
|
+
"errs.hint": "Đường dẫn Windows trong lỗi công cụ tệp và run_code viết lại thành /c/ — kể cả thông báo mà chương trình bắt được; tắt giữ nguyên văn bản gốc.",
|
|
592
592
|
"split.label": "Tách pattern glob tuyệt đối",
|
|
593
593
|
"split.hint": "Pattern glob tuyệt đối tách thành path + pattern tương đối; tắt truyền nguyên văn.",
|
|
594
594
|
"code.label": "đường dẫn trong chương trình run_code",
|
|
595
595
|
"code.hint": "Chuỗi đường dẫn viết trong chương trình run_code được dịch qua cùng bảng mount trước khi chạy; chú thích, template nội suy, $VAR và chuỗi không phải đường dẫn được giữ nguyên, và mọi điểm không chắc chắn sẽ khiến cả chương trình không bị sửa. Đồng thời nạp TEMP/TMP cho chương trình: với env rỗng, os.tmpdir() trên Windows trả về undefined\\temp và ghi sai chỗ.",
|
|
596
596
|
"eol.label": "kết thúc dòng Git (giống Linux)",
|
|
597
|
-
"eol.hint": "Các lệnh git do mô hình chạy theo hành vi Linux: core.autocrlf=
|
|
597
|
+
"eol.hint": "Các lệnh git do mô hình chạy theo hành vi Linux: core.autocrlf=input, core.eol=lf. Terminal của bạn và .gitattributes của repo không bị ảnh hưởng.",
|
|
598
598
|
"bash.label": "Đường dẫn Git Bash",
|
|
599
599
|
"bash.hint": "Đường dẫn đầy đủ của bash.exe tùy chỉnh; để trống = tự dò tìm.",
|
|
600
600
|
"bash.save": "Lưu",
|
|
@@ -618,13 +618,13 @@ window.__ModuleLoader__.load({
|
|
|
618
618
|
"mnts.label": "虛擬路徑掛載",
|
|
619
619
|
"mnts.hint": "bash 原生習慣——~ 家目錄、/tmp、/usr——按 Git Bash 掛載表喺所有工具解析;關閉就只剩 /c/ 磁碟根。",
|
|
620
620
|
"errs.label": "報錯路徑翻譯",
|
|
621
|
-
"errs.hint": "
|
|
621
|
+
"errs.hint": "檔案工具同 run_code 報錯入面嘅 Windows 路徑翻回 /c/ 形式(包括程式捉到嘅錯誤訊息);關閉就保留原文。",
|
|
622
622
|
"split.label": "glob 絕對路徑拆分",
|
|
623
623
|
"split.hint": "glob 嘅絕對 pattern 自動拆做 path + 相對 pattern;關閉就原樣傳遞。",
|
|
624
624
|
"code.label": "run_code 程式內路徑",
|
|
625
625
|
"code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。 並為程式補上 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 會得到 undefined\\temp,程式會靜默寫錯位置。",
|
|
626
626
|
"eol.label": "Git 行尾(與 Linux 一致)",
|
|
627
|
-
"eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=
|
|
627
|
+
"eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=input、core.eol=lf。你自己終端的 git 與倉庫的 .gitattributes 都不受影響。",
|
|
628
628
|
"bash.label": "Git Bash 路徑",
|
|
629
629
|
"bash.hint": "自訂 bash.exe 完整路徑;留空自動探測。",
|
|
630
630
|
"bash.save": "儲存",
|
|
@@ -648,13 +648,13 @@ window.__ModuleLoader__.load({
|
|
|
648
648
|
"mnts.label": "虛擬路徑掛載",
|
|
649
649
|
"mnts.hint": "bash 原生習慣——~ 家目錄、/tmp、/usr——按 Git Bash 掛載表喺所有工具解析;關閉就只剩 /c/ 磁碟根。",
|
|
650
650
|
"errs.label": "報錯路徑翻譯",
|
|
651
|
-
"errs.hint": "
|
|
651
|
+
"errs.hint": "檔案工具同 run_code 報錯入面嘅 Windows 路徑翻回 /c/ 形式(包括程式捉到嘅錯誤訊息);關閉就保留原文。",
|
|
652
652
|
"split.label": "glob 絕對路徑拆分",
|
|
653
653
|
"split.hint": "glob 嘅絕對 pattern 自動拆做 path + 相對 pattern;關閉就原樣傳遞。",
|
|
654
654
|
"code.label": "run_code 程式內路徑",
|
|
655
655
|
"code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。 並為程式補上 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 會得到 undefined\\temp,程式會靜默寫錯位置。",
|
|
656
656
|
"eol.label": "Git 行尾(與 Linux 一致)",
|
|
657
|
-
"eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=
|
|
657
|
+
"eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=input、core.eol=lf。你自己終端的 git 與倉庫的 .gitattributes 都不受影響。",
|
|
658
658
|
"bash.label": "Git Bash 路徑",
|
|
659
659
|
"bash.hint": "自訂 bash.exe 完整路徑;留空自動探測。",
|
|
660
660
|
"bash.save": "儲存",
|
|
@@ -678,13 +678,13 @@ window.__ModuleLoader__.load({
|
|
|
678
678
|
"mnts.label": "虛擬路徑掛載",
|
|
679
679
|
"mnts.hint": "bash 原生習慣——~ 家目錄、/tmp、/usr——按 Git Bash 掛載表在所有工具解析;關閉則僅 /c/ 磁碟根。",
|
|
680
680
|
"errs.label": "報錯路徑翻譯",
|
|
681
|
-
"errs.hint": "
|
|
681
|
+
"errs.hint": "檔案工具與 run_code 報錯裡的 Windows 路徑翻回 /c/ 形式(含程式捕捉到的錯誤訊息);關閉則保留原文。",
|
|
682
682
|
"split.label": "glob 絕對路徑拆分",
|
|
683
683
|
"split.hint": "glob 的絕對 pattern 自動拆為 path + 相對 pattern;關閉則原樣傳遞。",
|
|
684
684
|
"code.label": "run_code 程式內路徑",
|
|
685
685
|
"code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。 並為程式補上 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 會得到 undefined\\temp,程式會靜默寫錯位置。",
|
|
686
686
|
"eol.label": "Git 行尾(與 Linux 一致)",
|
|
687
|
-
"eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=
|
|
687
|
+
"eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=input、core.eol=lf。你自己終端的 git 與倉庫的 .gitattributes 都不受影響。",
|
|
688
688
|
"bash.label": "Git Bash 路徑",
|
|
689
689
|
"bash.hint": "自訂 bash.exe 完整路徑;留空自動探測。",
|
|
690
690
|
"bash.save": "儲存",
|
package/src/index.js
CHANGED
|
@@ -775,6 +775,53 @@ export function windowsToMsys(text) {
|
|
|
775
775
|
'/' + drive.toLowerCase() + '/' + rest.replace(/[\\/]+/g, '/'))
|
|
776
776
|
}
|
|
777
777
|
|
|
778
|
+
/**
|
|
779
|
+
* The MSYS echo of one text the Windows layer produced (v0.22.0): the
|
|
780
|
+
* drive-root translation plus the /tmp mount, so a path that came back out
|
|
781
|
+
* of the host reads as the very path the model wrote. ONE helper for every
|
|
782
|
+
* echo face — success metadata, failure content, failure message — because
|
|
783
|
+
* those faces must never disagree about the dialect.
|
|
784
|
+
*/
|
|
785
|
+
function msysEcho(value, env) {
|
|
786
|
+
const out = windowsToMsys(value)
|
|
787
|
+
if (typeof out !== 'string' || out.length === 0) return out
|
|
788
|
+
const tempRoot = env && env.tmpDir ? windowsToMsys(env.tmpDir) : ''
|
|
789
|
+
if (!tempRoot) return out
|
|
790
|
+
return mountTempRoot(out, tempRoot)
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Swap every /tmp-mount path inside a text for the short bash spelling;
|
|
795
|
+
* pure. Whole-value path fields hit the first branch; a diagnostic that
|
|
796
|
+
* QUOTES a temp path ("ENOENT ... open /c/Users/u/AppData/.../x.txt") is
|
|
797
|
+
* the reason this is an embedded scan rather than a prefix test — the
|
|
798
|
+
* model must recognise its own /tmp path in an error the way it does in a
|
|
799
|
+
* successful result. Case-insensitive like the Windows filesystem, and
|
|
800
|
+
* anchored on a path boundary so a sibling name (…/Temperature) never
|
|
801
|
+
* matches.
|
|
802
|
+
*/
|
|
803
|
+
function mountTempRoot(text, tempRoot) {
|
|
804
|
+
const haystack = text.toLowerCase()
|
|
805
|
+
const needle = tempRoot.toLowerCase()
|
|
806
|
+
let out = ''
|
|
807
|
+
let cursor = 0
|
|
808
|
+
let hits = 0
|
|
809
|
+
for (;;) {
|
|
810
|
+
const at = haystack.indexOf(needle, cursor)
|
|
811
|
+
if (at < 0) break
|
|
812
|
+
const after = at + needle.length
|
|
813
|
+
const boundary = after === text.length || text.charCodeAt(after) === 47
|
|
814
|
+
if (boundary) {
|
|
815
|
+
out += text.slice(cursor, at) + '/tmp'
|
|
816
|
+
hits++
|
|
817
|
+
} else {
|
|
818
|
+
out += text.slice(cursor, after)
|
|
819
|
+
}
|
|
820
|
+
cursor = after
|
|
821
|
+
}
|
|
822
|
+
return hits === 0 ? text : out + text.slice(cursor)
|
|
823
|
+
}
|
|
824
|
+
|
|
778
825
|
/** Normalize backslash separators in a RELATIVE result path to slashes; pure. */
|
|
779
826
|
function posixSeparators(value) {
|
|
780
827
|
return typeof value === 'string' && value.includes(String.fromCharCode(92))
|
|
@@ -804,10 +851,11 @@ const ERROR_CONTENT_TOOLS = new Set(['read', 'read_image', 'write', 'edit', 'glo
|
|
|
804
851
|
export function rewriteErrorContent(content, options) {
|
|
805
852
|
if (!Array.isArray(content)) return content
|
|
806
853
|
const nulHint = !options || options.nulHint !== false
|
|
854
|
+
const env = options && options.env ? options.env : null
|
|
807
855
|
let changed = false
|
|
808
856
|
const next = content.map((block) => {
|
|
809
857
|
if (!block || typeof block !== 'object' || typeof block.text !== 'string') return block
|
|
810
|
-
const out =
|
|
858
|
+
const out = msysEcho(block.text, env)
|
|
811
859
|
if (out === block.text) return block
|
|
812
860
|
changed = true
|
|
813
861
|
return { ...block, text: out }
|
|
@@ -827,21 +875,50 @@ export function rewriteErrorContent(content, options) {
|
|
|
827
875
|
return changed ? next : content
|
|
828
876
|
}
|
|
829
877
|
|
|
878
|
+
/**
|
|
879
|
+
* The SECOND face of a failure (v0.22.0). The content blocks are what the
|
|
880
|
+
* model reads on a failed call and what the UI card shows; error.message is
|
|
881
|
+
* what the PTC bridge hands a running program as its caught ToolCallError
|
|
882
|
+
* message (the durable record keeps only the structured identity). Rewriting
|
|
883
|
+
* only the content left a program that printed a caught error holding the
|
|
884
|
+
* Windows form while every other face said the MSYS one. Pure; options
|
|
885
|
+
* mirror rewriteErrorContent.
|
|
886
|
+
*/
|
|
887
|
+
export function rewriteErrorMessage(message, options) {
|
|
888
|
+
if (typeof message !== 'string' || message.length === 0) return message
|
|
889
|
+
return msysEcho(message, options && options.env ? options.env : null)
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Apply rewriteErrorMessage to a failure RESULT in place (v0.22.0). The
|
|
894
|
+
* registry keeps result.error by reference through the whole post-execute
|
|
895
|
+
* waterfall and only snapshots the projection afterwards
|
|
896
|
+
* (normalizeDispatchResult -> materializeFinalResult), so this write reaches
|
|
897
|
+
* the PTC bridge, which is where a program meets its caught error.
|
|
898
|
+
* post-execute block decision: a block rebuilds the error as a bare message
|
|
899
|
+
* and would drop the structured identity (FS_NOT_FOUND and friends) that the
|
|
900
|
+
* record and the UI keep. Defensive — a frozen or absent error object leaves
|
|
901
|
+
* the result untouched, and the content face still carries the dialect alone.
|
|
902
|
+
*/
|
|
903
|
+
export function rewriteFailureMessage(result, env) {
|
|
904
|
+
try {
|
|
905
|
+
const error = result && result.error
|
|
906
|
+
if (!error || typeof error !== 'object' || typeof error.message !== 'string') return false
|
|
907
|
+
const rewritten = msysEcho(error.message, env)
|
|
908
|
+
if (rewritten === error.message) return false
|
|
909
|
+
error.message = rewritten
|
|
910
|
+
return error.message === rewritten
|
|
911
|
+
} catch {
|
|
912
|
+
return false
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
830
916
|
export function rewriteResultPaths(name, value, env) {
|
|
831
917
|
if (!value || typeof value !== 'object') return value
|
|
832
918
|
// v0.17.0: paths under the user TEMP directory echo back in the bash
|
|
833
919
|
// /tmp dialect (that IS what /tmp means in Git Bash), so the model sees
|
|
834
920
|
// the same short root bash itself prints for $TMP.
|
|
835
|
-
const
|
|
836
|
-
const toMsys = (p) => {
|
|
837
|
-
const out = windowsToMsys(p)
|
|
838
|
-
if (!tempRoot) return out
|
|
839
|
-
const lower = out.toLowerCase()
|
|
840
|
-
const rootLower = tempRoot.toLowerCase()
|
|
841
|
-
if (lower === rootLower) return '/tmp'
|
|
842
|
-
if (lower.startsWith(rootLower + '/')) return '/tmp' + out.slice(tempRoot.length)
|
|
843
|
-
return out
|
|
844
|
-
}
|
|
921
|
+
const toMsys = (p) => msysEcho(p, env)
|
|
845
922
|
if (name === 'read' || name === 'read_image' || name === 'write' || name === 'edit') {
|
|
846
923
|
if (typeof value.path === 'string' && value.path !== '') {
|
|
847
924
|
const out = toMsys(value.path)
|
|
@@ -1036,6 +1113,19 @@ function expandLeadingVar(value, env) {
|
|
|
1036
1113
|
else return value
|
|
1037
1114
|
return base ? (rest !== '' ? base + rest : base) : value
|
|
1038
1115
|
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Expand a leading tilde the way Git Bash does (v0.22.0): ~ and ~/... mean
|
|
1118
|
+
* the user home — the same fact the mount table already applies to every
|
|
1119
|
+
* other path argument. A named form (~other/...) is left alone: the plugin
|
|
1120
|
+
* has no such fact, and a wrong guess would search the wrong tree.
|
|
1121
|
+
*/
|
|
1122
|
+
function expandLeadingTilde(value, env) {
|
|
1123
|
+
if (!env || !env.home || typeof value !== 'string') return value
|
|
1124
|
+
if (value === '~') return env.home
|
|
1125
|
+
if (value.charCodeAt(0) !== 126 || value.charCodeAt(1) !== 47) return value
|
|
1126
|
+
return env.home + value.slice(1)
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1039
1129
|
export function translateMsysPath(value, env) {
|
|
1040
1130
|
if (typeof value !== 'string') return value
|
|
1041
1131
|
if (env && env.home && (value === '~' || value.startsWith('~/'))) {
|
|
@@ -1401,7 +1491,9 @@ export function translateGlobArguments(args, env) {
|
|
|
1401
1491
|
// Expand a leading variable shorthand first (v0.18.1): a pattern opening
|
|
1402
1492
|
// with $HOME/... must become absolute before the split, or the splitter
|
|
1403
1493
|
// rejects it and glob silently matches nothing.
|
|
1404
|
-
|
|
1494
|
+
// Then the tilde shorthand (v0.22.0): ~/x names the same tree as $HOME/x
|
|
1495
|
+
// in every other tool, so glob must not silently match nothing for it.
|
|
1496
|
+
const expanded = env ? expandLeadingTilde(expandLeadingVar(args.pattern, env), env) : args.pattern
|
|
1405
1497
|
const split = splitGlobPrefix(expanded)
|
|
1406
1498
|
if (!split) return args
|
|
1407
1499
|
const prefix = normalizeAbsolutePrefix(split.prefix, env)
|
|
@@ -1819,16 +1911,20 @@ export async function apply(ctx, config = {}) {
|
|
|
1819
1911
|
const value = rewriteResultPaths(exec && exec.name, result.value, dialect.virtualMounts ? buildTranslateEnv(dialect.bashPath) : null)
|
|
1820
1912
|
if (value !== result.value) patch = value
|
|
1821
1913
|
} else if (result.isError === true && dialect.errorDialect && exec && Array.isArray(result.content)) {
|
|
1822
|
-
|
|
1823
|
-
|
|
1914
|
+
// v0.22.0: BOTH faces of a failure carry the dialect — the
|
|
1915
|
+
// content the model reads on a failed call, and the result's own
|
|
1916
|
+
// error.message, which a PTC program receives as its caught
|
|
1917
|
+
// ToolCallError message and the durable record keeps.
|
|
1918
|
+
const env = dialect.virtualMounts ? buildTranslateEnv(dialect.bashPath) : null
|
|
1919
|
+
if (exec.name === 'run_code') {
|
|
1920
|
+
// paths only — the /dev/null hint is for file tools
|
|
1921
|
+
const content = rewriteErrorContent(result.content, { nulHint: false, env })
|
|
1824
1922
|
if (content !== result.content) contentPatch = content
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
// the dialect the model sees everywhere else broke. Paths only;
|
|
1829
|
-
// the diagnostic stays verbatim and no /dev/null hint is added.
|
|
1830
|
-
const content = rewriteErrorContent(result.content, { nulHint: false })
|
|
1923
|
+
rewriteFailureMessage(result, env)
|
|
1924
|
+
} else if (ERROR_CONTENT_TOOLS.has(exec.name)) {
|
|
1925
|
+
const content = rewriteErrorContent(result.content, { env })
|
|
1831
1926
|
if (content !== result.content) contentPatch = content
|
|
1927
|
+
rewriteFailureMessage(result, env)
|
|
1832
1928
|
}
|
|
1833
1929
|
}
|
|
1834
1930
|
}
|
|
@@ -1972,4 +2068,4 @@ export async function apply(ctx, config = {}) {
|
|
|
1972
2068
|
}
|
|
1973
2069
|
|
|
1974
2070
|
// Test surface: pure helpers, no Cordis context required.
|
|
1975
|
-
export const _internal = { PRESET_IDS, translateMsysPath, translatePathArguments, rewriteCodePaths, scanCodeLiterals, programPrelude, translateGlobArguments, buildTranslateEnv, rewriteErrorContent, ERROR_CONTENT_TOOLS, readPosixPaths, readAdoptSidebar, readDialectSettings, windowsToMsys, rewriteResultPaths, MARKER_FILE, classify, materialize, cleanupOnDispose, firstUserRoot, hashTree, skillsHashes, syncDecision, installRegisterShim, baseForRoster, detectBase, pickComposition, personaEraForText, detectPersonaEra, injectPresentRow, hostHasToolPresent, detectPresentSupport, injectPluginManagerRow, hostHasPluginManagerTools, rowFormOf, rowFormsOf, alignEngineRow, alignRalphRow, ROW_SOURCE }
|
|
2071
|
+
export const _internal = { PRESET_IDS, translateMsysPath, translatePathArguments, rewriteCodePaths, scanCodeLiterals, programPrelude, translateGlobArguments, buildTranslateEnv, rewriteErrorContent, rewriteErrorMessage, rewriteFailureMessage, msysEcho, ERROR_CONTENT_TOOLS, readPosixPaths, readAdoptSidebar, readDialectSettings, windowsToMsys, rewriteResultPaths, MARKER_FILE, classify, materialize, cleanupOnDispose, firstUserRoot, hashTree, skillsHashes, syncDecision, installRegisterShim, baseForRoster, detectBase, pickComposition, personaEraForText, detectPersonaEra, injectPresentRow, hostHasToolPresent, detectPresentSupport, injectPluginManagerRow, hostHasPluginManagerTools, rowFormOf, rowFormsOf, alignEngineRow, alignRalphRow, ROW_SOURCE }
|
package/src/shell.js
CHANGED
|
@@ -135,10 +135,14 @@ export class GitBashSandboxExecutor extends SandboxBashExecutor {
|
|
|
135
135
|
* with it — so non-DSH parity facts are merged into the trusted dshEnv map
|
|
136
136
|
* HERE, right before the spawn. Windows Git defaults to core.autocrlf=true,
|
|
137
137
|
* so an LF file the model writes comes back CRLF after a checkout (scripts
|
|
138
|
-
* break on the stray \r
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
138
|
+
* break on the stray \r); a Linux guest has autocrlf unset. "input"
|
|
139
|
+
* (v0.22.0) is the value that actually matches Linux HERE: it normalizes
|
|
140
|
+
* CRLF to LF on the way into the index without ever writing CRLF, so a
|
|
141
|
+
* worktree a Windows checkout left CRLF reads as CLEAN — with "false" the
|
|
142
|
+
* same repository showed every line of every file as modified and git add
|
|
143
|
+
* staged that churn — while core.eol=lf keeps checkouts on LF.
|
|
144
|
+
* GIT_CONFIG_* are per-invocation settings: only the commands this
|
|
145
|
+
* executor runs see them, and a repository's .gitattributes still wins.
|
|
142
146
|
* @param {object} spec the shell request
|
|
143
147
|
* @returns {object} the request with the parity facts merged in
|
|
144
148
|
*/
|
|
@@ -151,7 +155,7 @@ export class GitBashSandboxExecutor extends SandboxBashExecutor {
|
|
|
151
155
|
...(spec.dshEnv === undefined ? {} : spec.dshEnv),
|
|
152
156
|
GIT_CONFIG_COUNT: '2',
|
|
153
157
|
GIT_CONFIG_KEY_0: 'core.autocrlf',
|
|
154
|
-
GIT_CONFIG_VALUE_0: '
|
|
158
|
+
GIT_CONFIG_VALUE_0: 'input',
|
|
155
159
|
GIT_CONFIG_KEY_1: 'core.eol',
|
|
156
160
|
GIT_CONFIG_VALUE_1: 'lf',
|
|
157
161
|
}
|