dsh-ide-git 0.14.0 → 0.14.2
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 +165 -29
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-ide-git",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "IDE 级 Git 操作面板:分支树 + 提交图谱 + 变更/暂存/提交 + 提交详情。装了 dsh-better-sidebar 时挂成它的原生 tab(右侧栏 + 底部工作台);没装时直接挂 DSH 原生右侧栏,单独安装即可用。JetBrains 风格 Git 工具窗口 for DeepSeek Harness.",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ide-git",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "DSH plugin: an IDE-grade Git tool window as a native dsh-better-sidebar tab — branch tree, commit graph, changes, commit details, JetBrains-style actions, in the right sidebar and the bottom panel. | DSH 插件:IDE 级 Git 工具窗口,以 dsh-better-sidebar 原生 Tab 挂载——分支树 / 提交图谱 / 变更与提交详情 / JetBrains 风格操作,右侧栏与底部面板双布局自适应。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/client.js
CHANGED
|
@@ -40,6 +40,11 @@ window.__ModuleLoader__.load({
|
|
|
40
40
|
of throwing at load time. Every consumer checks for null first. */
|
|
41
41
|
let UIPrimitives = null
|
|
42
42
|
try { UIPrimitives = require('@deepseek-ai/dsh-client-ui-primitives') } catch (error) { void error }
|
|
43
|
+
/* The shared lazy Shiki highlighter, bound once (v0.14.1): FileDiff in
|
|
44
|
+
ui-deliverables rides this same hook for its line highlighting. A stable
|
|
45
|
+
module-level reference keeps the LineDiff hook call unconditional. */
|
|
46
|
+
const useCodeHighlighterSeed = UIPrimitives !== null && typeof UIPrimitives.useCodeHighlighter === 'function' ? UIPrimitives.useCodeHighlighter : null
|
|
47
|
+
const languageForPathSeed = UIPrimitives !== null && typeof UIPrimitives.languageForPath === 'function' ? UIPrimitives.languageForPath : null
|
|
43
48
|
|
|
44
49
|
/* API base is MOUNT-RELATIVE (no leading slash). dsh 0.1.7 serves the
|
|
45
50
|
shell with <base href="./">, so document.baseURI is the mount the page
|
|
@@ -153,7 +158,6 @@ window.__ModuleLoader__.load({
|
|
|
153
158
|
'action.copyHash': '复制修订号',
|
|
154
159
|
'action.details': '提交详情',
|
|
155
160
|
'menu.sendToChat': '发送到对话',
|
|
156
|
-
'menu.sendFilePathToChat': '发送文件路径到对话',
|
|
157
161
|
'send.commitText': 'git 提交 {hash}「{subject}」(仓库 {repo})',
|
|
158
162
|
'send.branchText': 'git 分支 {name}(仓库 {repo})',
|
|
159
163
|
'menu.sendDiffLinesToChat': '发送选中行到对话',
|
|
@@ -197,6 +201,7 @@ window.__ModuleLoader__.load({
|
|
|
197
201
|
'settings.placement.tabHint': '关闭后仍可从右侧栏或底部面板打开。',
|
|
198
202
|
'settings.placement.immersive': '沉浸模式(占满全高,隐藏输入框)',
|
|
199
203
|
'settings.placement.immersiveHint': '开启后 Git 标签页占满整个会话区高度,输入框自动收起;审批与提问仍会正常显示。',
|
|
204
|
+
'preview.openFile': '打开文件预览',
|
|
200
205
|
'preview.title': 'Git 预览',
|
|
201
206
|
'preview.hint': '点击文件或提交的「显示差异」,差异会在侧边栏这里打开。',
|
|
202
207
|
'settings.rail.title': '动作条按钮',
|
|
@@ -368,7 +373,6 @@ window.__ModuleLoader__.load({
|
|
|
368
373
|
'action.copyHash': 'Copy revision number',
|
|
369
374
|
'action.details': 'Commit details',
|
|
370
375
|
'menu.sendToChat': 'Send to chat',
|
|
371
|
-
'menu.sendFilePathToChat': 'Send file path to chat',
|
|
372
376
|
'send.commitText': 'git commit {hash} "{subject}" (repo {repo})',
|
|
373
377
|
'send.branchText': 'git branch {name} (repo {repo})',
|
|
374
378
|
'menu.sendDiffLinesToChat': 'Send selected lines to chat',
|
|
@@ -412,6 +416,7 @@ window.__ModuleLoader__.load({
|
|
|
412
416
|
'settings.placement.tabHint': 'Off, the panel stays reachable from the right sidebar and the bottom panel.',
|
|
413
417
|
'settings.placement.immersive': 'Immersive mode (full height, hidden composer)',
|
|
414
418
|
'settings.placement.immersiveHint': 'On, the Git tab fills the whole conversation area and the composer steps aside; approvals and questions still show.',
|
|
419
|
+
'preview.openFile': 'Open in the file preview',
|
|
415
420
|
'preview.title': 'Git Preview',
|
|
416
421
|
'preview.hint': 'Click “Show diff” on a file or commit — the diff opens here in the sidebar.',
|
|
417
422
|
'settings.rail.title': 'Action rail buttons',
|
|
@@ -591,7 +596,6 @@ window.__ModuleLoader__.load({
|
|
|
591
596
|
'action.copyHash': '複製修訂號',
|
|
592
597
|
'action.details': '提交詳情',
|
|
593
598
|
'menu.sendToChat': '傳送到對話',
|
|
594
|
-
'menu.sendFilePathToChat': '傳送檔案路徑至對話',
|
|
595
599
|
'send.commitText': 'git 提交 {hash}「{subject}」(存放庫 {repo})',
|
|
596
600
|
'send.branchText': 'git 分支 {name}(存放庫 {repo})',
|
|
597
601
|
'menu.sendDiffLinesToChat': '傳送選中行到對話',
|
|
@@ -635,6 +639,7 @@ window.__ModuleLoader__.load({
|
|
|
635
639
|
'settings.placement.tabHint': '關閉之後仍可從右側欄或底部面板開啟。',
|
|
636
640
|
'settings.placement.immersive': '沉浸模式(佔滿全高,隱藏輸入框)',
|
|
637
641
|
'settings.placement.immersiveHint': '開啟之後 Git 分頁會佔滿整個會話區高度,輸入框自動收起;審批與提問仍會正常顯示。',
|
|
642
|
+
'preview.openFile': '開啟檔案預覽',
|
|
638
643
|
'preview.title': 'Git 預覽',
|
|
639
644
|
'preview.hint': '喺檔案或提交撳「顯示差異」,差異就會喺側邊欄度開啟。',
|
|
640
645
|
'settings.rail.title': '動作列按鈕',
|
|
@@ -806,7 +811,6 @@ window.__ModuleLoader__.load({
|
|
|
806
811
|
'action.copyHash': '複製修訂編號',
|
|
807
812
|
'action.details': '提交詳情',
|
|
808
813
|
'menu.sendToChat': '傳送至對話',
|
|
809
|
-
'menu.sendFilePathToChat': '傳送檔案路徑至對話',
|
|
810
814
|
'send.commitText': 'git 提交 {hash}「{subject}」(版本庫 {repo})',
|
|
811
815
|
'send.branchText': 'git 分支 {name}(版本庫 {repo})',
|
|
812
816
|
'menu.sendDiffLinesToChat': '傳送選取行至對話',
|
|
@@ -850,6 +854,7 @@ window.__ModuleLoader__.load({
|
|
|
850
854
|
'settings.placement.tabHint': '關閉之後仍可從右側欄或底部面板開啟。',
|
|
851
855
|
'settings.placement.immersive': '沉浸模式(佔滿全高,隱藏輸入框)',
|
|
852
856
|
'settings.placement.immersiveHint': '開啟之後 Git 分頁會佔滿整個對話區高度,輸入框自動收起;審核與提問仍會正常顯示。',
|
|
857
|
+
'preview.openFile': '開啟檔案預覽',
|
|
853
858
|
'preview.title': 'Git 預覽',
|
|
854
859
|
'preview.hint': '點選檔案或提交的「顯示差異」,差異就會在側邊欄開啟。',
|
|
855
860
|
'settings.rail.title': '動作列按鈕',
|
|
@@ -1021,7 +1026,6 @@ window.__ModuleLoader__.load({
|
|
|
1021
1026
|
'action.copyHash': '複製修訂號',
|
|
1022
1027
|
'action.details': '提交詳情',
|
|
1023
1028
|
'menu.sendToChat': '傳送至對話',
|
|
1024
|
-
'menu.sendFilePathToChat': '傳送檔案路徑至對話',
|
|
1025
1029
|
'send.commitText': 'git 提交 {hash}「{subject}」(存放庫 {repo})',
|
|
1026
1030
|
'send.branchText': 'git 分支 {name}(存放庫 {repo})',
|
|
1027
1031
|
'menu.sendDiffLinesToChat': '傳送選中行至對話',
|
|
@@ -1065,6 +1069,7 @@ window.__ModuleLoader__.load({
|
|
|
1065
1069
|
'settings.placement.tabHint': '關閉之後仍可從右側欄或底部面板開啟。',
|
|
1066
1070
|
'settings.placement.immersive': '沉浸模式(佔滿全高,隱藏輸入框)',
|
|
1067
1071
|
'settings.placement.immersiveHint': '開啟之後 Git 分頁會佔滿整個會話區高度,輸入框自動收起;審批與提問仍會正常顯示。',
|
|
1072
|
+
'preview.openFile': '開啟檔案預覽',
|
|
1068
1073
|
'preview.title': 'Git 預覽',
|
|
1069
1074
|
'preview.hint': '喺檔案或提交撳「顯示差異」,差異就會喺側邊欄度開啟。',
|
|
1070
1075
|
'settings.rail.title': '動作列按鈕',
|
|
@@ -1236,7 +1241,6 @@ window.__ModuleLoader__.load({
|
|
|
1236
1241
|
'action.copyHash': 'リビジョン番号をコピー',
|
|
1237
1242
|
'action.details': 'コミットの詳細',
|
|
1238
1243
|
'menu.sendToChat': 'チャットへ送る',
|
|
1239
|
-
'menu.sendFilePathToChat': 'ファイルパスをチャットへ送る',
|
|
1240
1244
|
'send.commitText': 'git コミット {hash}「{subject}」(リポジトリ {repo})',
|
|
1241
1245
|
'send.branchText': 'git ブランチ {name}(リポジトリ {repo})',
|
|
1242
1246
|
'menu.sendDiffLinesToChat': '選択した行をチャットへ送る',
|
|
@@ -1280,6 +1284,7 @@ window.__ModuleLoader__.load({
|
|
|
1280
1284
|
'settings.placement.tabHint': 'オフにしても右サイドバーと下部パネルから開けます。',
|
|
1281
1285
|
'settings.placement.immersive': '没入モード(全高表示・入力欄を非表示)',
|
|
1282
1286
|
'settings.placement.immersiveHint': 'オンにすると Git タブが会話エリアの高さいっぱいに広がり、入力欄は引っ込みます。承認や質問は通常どおり表示されます。',
|
|
1287
|
+
'preview.openFile': 'ファイルプレビューを開く',
|
|
1283
1288
|
'preview.title': 'Git プレビュー',
|
|
1284
1289
|
'preview.hint': 'ファイルやコミットの「差分を表示」をクリックすると、差分がここに開きます。',
|
|
1285
1290
|
'settings.rail.title': 'アクションレールのボタン',
|
|
@@ -1451,7 +1456,6 @@ window.__ModuleLoader__.load({
|
|
|
1451
1456
|
'action.copyHash': '리비전 번호 복사',
|
|
1452
1457
|
'action.details': '커밋 상세',
|
|
1453
1458
|
'menu.sendToChat': '대화로 보내기',
|
|
1454
|
-
'menu.sendFilePathToChat': '파일 경로를 대화로 보내기',
|
|
1455
1459
|
'send.commitText': 'git 커밋 {hash} "{subject}" (저장소 {repo})',
|
|
1456
1460
|
'send.branchText': 'git 브랜치 {name} (저장소 {repo})',
|
|
1457
1461
|
'menu.sendDiffLinesToChat': '선택한 줄 대화로 보내기',
|
|
@@ -1495,6 +1499,7 @@ window.__ModuleLoader__.load({
|
|
|
1495
1499
|
'settings.placement.tabHint': '꺼도 오른쪽 사이드바와 하단 패널에서 열 수 있습니다.',
|
|
1496
1500
|
'settings.placement.immersive': '몰입 모드(전체 높이, 입력창 숨김)',
|
|
1497
1501
|
'settings.placement.immersiveHint': '켜면 Git 탭이 대화 영역 전체 높이를 차지하고 입력창은 숨겨집니다. 승인과 질문은 정상적으로 표시됩니다.',
|
|
1502
|
+
'preview.openFile': '파일 미리보기로 열기',
|
|
1498
1503
|
'preview.title': 'Git 미리보기',
|
|
1499
1504
|
'preview.hint': '파일이나 커밋의 「차이 보기」를 클릭하면 차이가 사이드바 여기에 열립니다.',
|
|
1500
1505
|
'settings.rail.title': '액션 레일 버튼',
|
|
@@ -1666,7 +1671,6 @@ window.__ModuleLoader__.load({
|
|
|
1666
1671
|
'action.copyHash': 'Revisionsnummer kopieren',
|
|
1667
1672
|
'action.details': 'Commit-Details',
|
|
1668
1673
|
'menu.sendToChat': 'Im Chat senden',
|
|
1669
|
-
'menu.sendFilePathToChat': 'Dateipfad im Chat senden',
|
|
1670
1674
|
'send.commitText': 'git-Commit {hash} "{subject}" (Repository {repo})',
|
|
1671
1675
|
'send.branchText': 'git-Branch {name} (Repository {repo})',
|
|
1672
1676
|
'menu.sendDiffLinesToChat': 'Ausgewählte Zeilen in den Chat senden',
|
|
@@ -1710,6 +1714,7 @@ window.__ModuleLoader__.load({
|
|
|
1710
1714
|
'settings.placement.tabHint': 'Ausgeschaltet bleibt das Panel über rechte Seitenleiste und unteres Panel erreichbar.',
|
|
1711
1715
|
'settings.placement.immersive': 'Immersiver Modus (volle Höhe, ausgeblendetes Eingabefeld)',
|
|
1712
1716
|
'settings.placement.immersiveHint': 'Eingeschaltet füllt der Git-Tab die gesamte Gesprächshöhe und das Eingabefeld weicht zurück; Freigaben und Rückfragen bleiben sichtbar.',
|
|
1717
|
+
'preview.openFile': 'In der Dateivorschau öffnen',
|
|
1713
1718
|
'preview.title': 'Git-Vorschau',
|
|
1714
1719
|
'preview.hint': '„Diff anzeigen“ an einer Datei oder einem Commit öffnet den Diff hier in der Seitenleiste.',
|
|
1715
1720
|
'settings.rail.title': 'Schaltflächen der Aktionsleiste',
|
|
@@ -1881,7 +1886,6 @@ window.__ModuleLoader__.load({
|
|
|
1881
1886
|
'action.copyHash': 'Copier le numéro de révision',
|
|
1882
1887
|
'action.details': 'Détails du commit',
|
|
1883
1888
|
'menu.sendToChat': 'Envoyer dans la conversation',
|
|
1884
|
-
'menu.sendFilePathToChat': 'Envoyer le chemin du fichier dans la conversation',
|
|
1885
1889
|
'send.commitText': 'commit git {hash} « {subject} » (dépôt {repo})',
|
|
1886
1890
|
'send.branchText': 'branche git {name} (dépôt {repo})',
|
|
1887
1891
|
'menu.sendDiffLinesToChat': 'Envoyer les lignes sélectionnées dans la conversation',
|
|
@@ -1925,6 +1929,7 @@ window.__ModuleLoader__.load({
|
|
|
1925
1929
|
'settings.placement.tabHint': 'Désactivé, le panneau reste accessible depuis la barre latérale droite et le panneau inférieur.',
|
|
1926
1930
|
'settings.placement.immersive': 'Mode immersif (pleine hauteur, zone de saisie masquée)',
|
|
1927
1931
|
'settings.placement.immersiveHint': 'Activé, l’onglet Git occupe toute la hauteur de la conversation et la zone de saisie s’efface ; approbations et questions restent visibles.',
|
|
1932
|
+
'preview.openFile': 'Ouvrir dans l’aperçu du fichier',
|
|
1928
1933
|
'preview.title': 'Aperçu Git',
|
|
1929
1934
|
'preview.hint': 'Cliquez sur « Afficher le diff » sur un fichier ou un commit : le diff s’ouvre ici, dans la barre latérale.',
|
|
1930
1935
|
'settings.rail.title': 'Boutons de la barre d’actions',
|
|
@@ -2096,7 +2101,6 @@ window.__ModuleLoader__.load({
|
|
|
2096
2101
|
'action.copyHash': 'Скопировать номер ревизии',
|
|
2097
2102
|
'action.details': 'Сведения о коммите',
|
|
2098
2103
|
'menu.sendToChat': 'Отправить в чат',
|
|
2099
|
-
'menu.sendFilePathToChat': 'Отправить путь к файлу в чат',
|
|
2100
2104
|
'send.commitText': 'git-коммит {hash} «{subject}» (репозиторий {repo})',
|
|
2101
2105
|
'send.branchText': 'git-ветка {name} (репозиторий {repo})',
|
|
2102
2106
|
'menu.sendDiffLinesToChat': 'Отправить выбранные строки в чат',
|
|
@@ -2140,6 +2144,7 @@ window.__ModuleLoader__.load({
|
|
|
2140
2144
|
'settings.placement.tabHint': 'В выключенном виде панель доступна из правой боковой панели и нижней панели.',
|
|
2141
2145
|
'settings.placement.immersive': 'Полноэкранный режим (во всю высоту, без поля ввода)',
|
|
2142
2146
|
'settings.placement.immersiveHint': 'Во включённом виде вкладка Git занимает всю высоту области диалога, поле ввода скрывается; подтверждения и вопросы остаются на виду.',
|
|
2147
|
+
'preview.openFile': 'Открыть в предпросмотре файла',
|
|
2143
2148
|
'preview.title': 'Git-предпросмотр',
|
|
2144
2149
|
'preview.hint': 'Нажмите «Показать различия» у файла или коммита — различия откроются здесь, в боковой панели.',
|
|
2145
2150
|
'settings.rail.title': 'Кнопки панели действий',
|
|
@@ -2311,7 +2316,6 @@ window.__ModuleLoader__.load({
|
|
|
2311
2316
|
'action.copyHash': 'Copiar número da revisão',
|
|
2312
2317
|
'action.details': 'Detalhes do commit',
|
|
2313
2318
|
'menu.sendToChat': 'Enviar para a conversa',
|
|
2314
|
-
'menu.sendFilePathToChat': 'Enviar caminho do arquivo para a conversa',
|
|
2315
2319
|
'send.commitText': 'commit git {hash} "{subject}" (repositório {repo})',
|
|
2316
2320
|
'send.branchText': 'branch git {name} (repositório {repo})',
|
|
2317
2321
|
'menu.sendDiffLinesToChat': 'Enviar linhas selecionadas para a conversa',
|
|
@@ -2355,6 +2359,7 @@ window.__ModuleLoader__.load({
|
|
|
2355
2359
|
'settings.placement.tabHint': 'Desligado, o painel continua disponível na barra lateral direita e no painel inferior.',
|
|
2356
2360
|
'settings.placement.immersive': 'Modo imersivo (altura total, campo de entrada oculto)',
|
|
2357
2361
|
'settings.placement.immersiveHint': 'Ativado, a aba Git ocupa toda a altura da conversa e o campo de entrada fica de lado; aprovações e perguntas continuam visíveis.',
|
|
2362
|
+
'preview.openFile': 'Abrir na pré-visualização do arquivo',
|
|
2358
2363
|
'preview.title': 'Pré-visualização do Git',
|
|
2359
2364
|
'preview.hint': 'Clique em “Mostrar diff” num arquivo ou commit — o diff abre aqui, na barra lateral.',
|
|
2360
2365
|
'settings.rail.title': 'Botões da barra de ações',
|
|
@@ -2526,7 +2531,6 @@ window.__ModuleLoader__.load({
|
|
|
2526
2531
|
'action.copyHash': 'Copia il numero di revisione',
|
|
2527
2532
|
'action.details': 'Dettagli del commit',
|
|
2528
2533
|
'menu.sendToChat': 'Invia alla conversazione',
|
|
2529
|
-
'menu.sendFilePathToChat': 'Invia il percorso del file alla conversazione',
|
|
2530
2534
|
'send.commitText': 'commit git {hash} "{subject}" (repository {repo})',
|
|
2531
2535
|
'send.branchText': 'branch git {name} (repository {repo})',
|
|
2532
2536
|
'menu.sendDiffLinesToChat': 'Invia le righe selezionate alla conversazione',
|
|
@@ -2570,6 +2574,7 @@ window.__ModuleLoader__.load({
|
|
|
2570
2574
|
'settings.placement.tabHint': 'Da spento, il pannello resta raggiungibile dalla barra laterale destra e dal pannello inferiore.',
|
|
2571
2575
|
'settings.placement.immersive': 'Modalità immersiva (altezza piena, input nascosto)',
|
|
2572
2576
|
'settings.placement.immersiveHint': 'Attiva, la scheda Git occupa tutta l’altezza della conversazione e la barra di input resta nascosta; approvazioni e domande restano visibili.',
|
|
2577
|
+
'preview.openFile': 'Apri nell’anteprima del file',
|
|
2573
2578
|
'preview.title': 'Anteprima Git',
|
|
2574
2579
|
'preview.hint': 'Fai clic su «Mostra diff» su un file o un commit: il diff si apre qui, nella barra laterale.',
|
|
2575
2580
|
'settings.rail.title': 'Pulsanti della barra azioni',
|
|
@@ -2741,7 +2746,6 @@ window.__ModuleLoader__.load({
|
|
|
2741
2746
|
'action.copyHash': 'Revisienummer kopiëren',
|
|
2742
2747
|
'action.details': 'Commit-details',
|
|
2743
2748
|
'menu.sendToChat': 'Naar het gesprek verzenden',
|
|
2744
|
-
'menu.sendFilePathToChat': 'Bestandspad naar het gesprek verzenden',
|
|
2745
2749
|
'send.commitText': 'git-commit {hash} "{subject}" (repository {repo})',
|
|
2746
2750
|
'send.branchText': 'git-branch {name} (repository {repo})',
|
|
2747
2751
|
'menu.sendDiffLinesToChat': 'Geselecteerde regels naar het gesprek verzenden',
|
|
@@ -2785,6 +2789,7 @@ window.__ModuleLoader__.load({
|
|
|
2785
2789
|
'settings.placement.tabHint': 'Uitgeschakeld blijft het paneel bereikbaar via de rechterzijbalk en het onderpaneel.',
|
|
2786
2790
|
'settings.placement.immersive': 'Meeslepende modus (volledige hoogte, verborgen invoerveld)',
|
|
2787
2791
|
'settings.placement.immersiveHint': 'Aan: het Git-tabblad vult de hele gespreksruimte en het invoerveld wijkt; goedkeuringen en vragen blijven zichtbaar.',
|
|
2792
|
+
'preview.openFile': 'Openen in de bestandsvoorbeeld',
|
|
2788
2793
|
'preview.title': 'Git-voorbeeld',
|
|
2789
2794
|
'preview.hint': 'Klik op „Diff tonen“ bij een bestand of commit — de diff opent hier in de zijbalk.',
|
|
2790
2795
|
'settings.rail.title': 'Knoppen van de actiebalk',
|
|
@@ -2956,7 +2961,6 @@ window.__ModuleLoader__.load({
|
|
|
2956
2961
|
'action.copyHash': 'Kopiuj numer wersji',
|
|
2957
2962
|
'action.details': 'Szczegóły commita',
|
|
2958
2963
|
'menu.sendToChat': 'Wyślij do rozmowy',
|
|
2959
|
-
'menu.sendFilePathToChat': 'Wyślij ścieżkę pliku do rozmowy',
|
|
2960
2964
|
'send.commitText': 'commit git {hash} „{subject}" (repozytorium {repo})',
|
|
2961
2965
|
'send.branchText': 'gałąź git {name} (repozytorium {repo})',
|
|
2962
2966
|
'menu.sendDiffLinesToChat': 'Wyślij zaznaczone wiersze do rozmowy',
|
|
@@ -3000,6 +3004,7 @@ window.__ModuleLoader__.load({
|
|
|
3000
3004
|
'settings.placement.tabHint': 'Po wyłączeniu panel pozostaje dostępny z prawego paska bocznego i dolnego panelu.',
|
|
3001
3005
|
'settings.placement.immersive': 'Tryb immersyjny (pełna wysokość, ukryte pole wpisywania)',
|
|
3002
3006
|
'settings.placement.immersiveHint': 'Po włączeniu karta Git wypełnia całą wysokość rozmowy, a pole wpisywania się chowa; zatwierdzenia i pytania pozostają widoczne.',
|
|
3007
|
+
'preview.openFile': 'Otwórz w podglądzie pliku',
|
|
3003
3008
|
'preview.title': 'Podgląd Git',
|
|
3004
3009
|
'preview.hint': 'Kliknij „Pokaż różnice” przy pliku lub commicie — różnice otworzą się tutaj, na pasku bocznym.',
|
|
3005
3010
|
'settings.rail.title': 'Przyciski paska akcji',
|
|
@@ -3171,7 +3176,6 @@ window.__ModuleLoader__.load({
|
|
|
3171
3176
|
'action.copyHash': 'Kopiera revisionsnummer',
|
|
3172
3177
|
'action.details': 'Commit-detaljer',
|
|
3173
3178
|
'menu.sendToChat': 'Skicka till samtalet',
|
|
3174
|
-
'menu.sendFilePathToChat': 'Skicka filsökvägen till samtalet',
|
|
3175
3179
|
'send.commitText': 'git-commit {hash} ”{subject}” (arkiv {repo})',
|
|
3176
3180
|
'send.branchText': 'git-gren {name} (arkiv {repo})',
|
|
3177
3181
|
'menu.sendDiffLinesToChat': 'Skicka markerade rader till samtalet',
|
|
@@ -3215,6 +3219,7 @@ window.__ModuleLoader__.load({
|
|
|
3215
3219
|
'settings.placement.tabHint': 'Avstängd finns panelen kvar via höger sidopanel och nedre panelen.',
|
|
3216
3220
|
'settings.placement.immersive': 'Uppslukande läge (full höjd, dolt inmatningsfält)',
|
|
3217
3221
|
'settings.placement.immersiveHint': 'På: Git-fliken fyller hela konversationsytan och inmatningsfältet träder åt sidan; godkännanden och frågor visas fortfarande.',
|
|
3222
|
+
'preview.openFile': 'Öppna i filförhandsvisningen',
|
|
3218
3223
|
'preview.title': 'Git-förhandsvisning',
|
|
3219
3224
|
'preview.hint': 'Klicka på ”Visa diff” på en fil eller en commit — diffen öppnas här i sidopanelen.',
|
|
3220
3225
|
'settings.rail.title': 'Knappar i åtgärdsfältet',
|
|
@@ -3386,7 +3391,6 @@ window.__ModuleLoader__.load({
|
|
|
3386
3391
|
'action.copyHash': 'Revizyon numarasını kopyala',
|
|
3387
3392
|
'action.details': 'Commit ayrıntıları',
|
|
3388
3393
|
'menu.sendToChat': 'Sohbete gönder',
|
|
3389
|
-
'menu.sendFilePathToChat': 'Dosya yolunu sohbete gönder',
|
|
3390
3394
|
'send.commitText': 'git commit {hash} "{subject}" (depo {repo})',
|
|
3391
3395
|
'send.branchText': 'git dalı {name} (depo {repo})',
|
|
3392
3396
|
'menu.sendDiffLinesToChat': 'Seçili satırları sohbete gönder',
|
|
@@ -3430,6 +3434,7 @@ window.__ModuleLoader__.load({
|
|
|
3430
3434
|
'settings.placement.tabHint': 'Kapatıldığında panel sağ kenar çubuğundan ve alt panelden açılabilir.',
|
|
3431
3435
|
'settings.placement.immersive': 'Odaklanma modu (tam yükseklik, gizli giriş alanı)',
|
|
3432
3436
|
'settings.placement.immersiveHint': 'Açıkken Git sekmesi tüm konuşma alanını kaplar ve giriş alanı gizlenir; onaylar ve sorular yine de görünür.',
|
|
3437
|
+
'preview.openFile': 'Dosya önizlemesinde aç',
|
|
3433
3438
|
'preview.title': 'Git Önizlemesi',
|
|
3434
3439
|
'preview.hint': 'Bir dosya veya commit üzerinde „Farkı göster”e tıklayın — fark burada, kenar çubuğunda açılır.',
|
|
3435
3440
|
'settings.rail.title': 'Eylem çubuğu düğmeleri',
|
|
@@ -3601,7 +3606,6 @@ window.__ModuleLoader__.load({
|
|
|
3601
3606
|
'action.copyHash': 'Salin nomor revisi',
|
|
3602
3607
|
'action.details': 'Detail commit',
|
|
3603
3608
|
'menu.sendToChat': 'Kirim ke obrolan',
|
|
3604
|
-
'menu.sendFilePathToChat': 'Kirim jalur berkas ke obrolan',
|
|
3605
3609
|
'send.commitText': 'commit git {hash} "{subject}" (repositori {repo})',
|
|
3606
3610
|
'send.branchText': 'cabang git {name} (repositori {repo})',
|
|
3607
3611
|
'menu.sendDiffLinesToChat': 'Kirim baris terpilih ke obrolan',
|
|
@@ -3645,6 +3649,7 @@ window.__ModuleLoader__.load({
|
|
|
3645
3649
|
'settings.placement.tabHint': 'Dimatikan, panel tetap bisa dibuka dari bilah sisi kanan dan panel bawah.',
|
|
3646
3650
|
'settings.placement.immersive': 'Mode imersif (tinggi penuh, kolom masukan tersembunyi)',
|
|
3647
3651
|
'settings.placement.immersiveHint': 'Aktif: tab Git memenuhi seluruh tinggi area percakapan dan kolom masukan mengalah; persetujuan dan pertanyaan tetap tampil.',
|
|
3652
|
+
'preview.openFile': 'Buka di pratinjau berkas',
|
|
3648
3653
|
'preview.title': 'Pratinjau Git',
|
|
3649
3654
|
'preview.hint': 'Klik “Tampilkan diff” pada file atau commit — diff terbuka di sini, di bilah sisi.',
|
|
3650
3655
|
'settings.rail.title': 'Tombol bilah aksi',
|
|
@@ -3816,7 +3821,6 @@ window.__ModuleLoader__.load({
|
|
|
3816
3821
|
'action.copyHash': 'Sao chép số hiệu bản sửa',
|
|
3817
3822
|
'action.details': 'Chi tiết commit',
|
|
3818
3823
|
'menu.sendToChat': 'Gửi vào hội thoại',
|
|
3819
|
-
'menu.sendFilePathToChat': 'Gửi đường dẫn tệp vào hội thoại',
|
|
3820
3824
|
'send.commitText': 'git commit {hash} "{subject}" (kho {repo})',
|
|
3821
3825
|
'send.branchText': 'nhánh git {name} (kho {repo})',
|
|
3822
3826
|
'menu.sendDiffLinesToChat': 'Gửi các dòng đã chọn vào hội thoại',
|
|
@@ -3860,6 +3864,7 @@ window.__ModuleLoader__.load({
|
|
|
3860
3864
|
'settings.placement.tabHint': 'Tắt rồi, bảng vẫn mở được từ thanh bên phải và bảng dưới.',
|
|
3861
3865
|
'settings.placement.immersive': 'Chế độ đắm chìm (chiều cao đầy đủ, ẩn ô nhập)',
|
|
3862
3866
|
'settings.placement.immersiveHint': 'Bật: thẻ Git chiếm toàn bộ chiều cao vùng hội thoại và ô nhập thu vào; phê duyệt và câu hỏi vẫn hiển thị bình thường.',
|
|
3867
|
+
'preview.openFile': 'Mở trong xem trước tệp',
|
|
3863
3868
|
'preview.title': 'Xem trước Git',
|
|
3864
3869
|
'preview.hint': 'Bấm “Xem diff” trên tệp hoặc commit — diff sẽ mở ở đây, trên thanh bên.',
|
|
3865
3870
|
'settings.rail.title': 'Nút thanh tác vụ',
|
|
@@ -4031,7 +4036,6 @@ window.__ModuleLoader__.load({
|
|
|
4031
4036
|
'action.copyHash': 'نسخ رقم المراجعة',
|
|
4032
4037
|
'action.details': 'تفاصيل الالتزام',
|
|
4033
4038
|
'menu.sendToChat': 'إرسال إلى المحادثة',
|
|
4034
|
-
'menu.sendFilePathToChat': 'إرسال مسار الملف إلى المحادثة',
|
|
4035
4039
|
'send.commitText': 'التزام git {hash} "{subject}" (المستودع {repo})',
|
|
4036
4040
|
'send.branchText': 'فرع git {name} (المستودع {repo})',
|
|
4037
4041
|
'menu.sendDiffLinesToChat': 'إرسال الأسطر المحددة إلى المحادثة',
|
|
@@ -4075,6 +4079,7 @@ window.__ModuleLoader__.load({
|
|
|
4075
4079
|
'settings.placement.tabHint': 'عند الإيقاف تبقى اللوحة متاحة من الشريط الجانبي الأيمن واللوحة السفلية.',
|
|
4076
4080
|
'settings.placement.immersive': 'الوضع الغامر (ارتفاع كامل، إخفاء صندوق الكتابة)',
|
|
4077
4081
|
'settings.placement.immersiveHint': 'عند التشغيل يملأ تبويب Git منطقة المحادثة بكامل ارتفاعها ويتراجع صندوق الكتابة؛ تظل الموافقات والأسئلة ظاهرة كالمعتاد.',
|
|
4082
|
+
'preview.openFile': 'افتح في معاينة الملف',
|
|
4078
4083
|
'preview.title': 'معاينة Git',
|
|
4079
4084
|
'preview.hint': 'انقر «عرض الفروق» على ملف أو commit — تُفتح الفروق هنا في الشريط الجانبي.',
|
|
4080
4085
|
'settings.rail.title': 'أزرار شريط الإجراءات',
|
|
@@ -4246,7 +4251,6 @@ window.__ModuleLoader__.load({
|
|
|
4246
4251
|
'action.copyHash': 'रिवीज़न संख्या कॉपी करें',
|
|
4247
4252
|
'action.details': 'कमिट विवरण',
|
|
4248
4253
|
'menu.sendToChat': 'बातचीत में भेजें',
|
|
4249
|
-
'menu.sendFilePathToChat': 'फ़ाइल पथ बातचीत में भेजें',
|
|
4250
4254
|
'send.commitText': 'git कमिट {hash} "{subject}" (रिपॉज़िटरी {repo})',
|
|
4251
4255
|
'send.branchText': 'git ब्रांच {name} (रिपॉज़िटरी {repo})',
|
|
4252
4256
|
'menu.sendDiffLinesToChat': 'चयनित पंक्तियाँ बातचीत में भेजें',
|
|
@@ -4290,6 +4294,7 @@ window.__ModuleLoader__.load({
|
|
|
4290
4294
|
'settings.placement.tabHint': 'बंद करने पर भी पैनल दाएँ साइडबार और निचले पैनल से खुलता है।',
|
|
4291
4295
|
'settings.placement.immersive': 'इमर्सिव मोड (पूरी ऊँचाई, छिपा इनपुट बॉक्स)',
|
|
4292
4296
|
'settings.placement.immersiveHint': 'चालू होने पर Git टैब पूरे संवाद क्षेत्र की ऊँचाई घेर लेता है और इनपुट बॉक्स हट जाता है; अनुमोदन और प्रश्न फिर भी दिखते हैं।',
|
|
4297
|
+
'preview.openFile': 'फ़ाइल पूर्वावलोकन में खोलें',
|
|
4293
4298
|
'preview.title': 'Git पूर्वावलोकन',
|
|
4294
4299
|
'preview.hint': 'फ़ाइल या कमिट पर “अंतर दिखाएँ” पर क्लिक करें — अंतर यहीं साइडबार में खुलेगा।',
|
|
4295
4300
|
'settings.rail.title': 'एक्शन रेल बटन',
|
|
@@ -4461,7 +4466,6 @@ window.__ModuleLoader__.load({
|
|
|
4461
4466
|
'action.copyHash': 'คัดลอกเลขรีวิชัน',
|
|
4462
4467
|
'action.details': 'รายละเอียดคอมมิต',
|
|
4463
4468
|
'menu.sendToChat': 'ส่งไปยังบทสนทนา',
|
|
4464
|
-
'menu.sendFilePathToChat': 'ส่งพาธไฟล์ไปยังบทสนทนา',
|
|
4465
4469
|
'send.commitText': 'git คอมมิต {hash} "{subject}" (รีโพซิทอรี {repo})',
|
|
4466
4470
|
'send.branchText': 'git บรานช์ {name} (รีโพซิทอรี {repo})',
|
|
4467
4471
|
'menu.sendDiffLinesToChat': 'ส่งบรรทัดที่เลือกไปยังบทสนทนา',
|
|
@@ -4505,6 +4509,7 @@ window.__ModuleLoader__.load({
|
|
|
4505
4509
|
'settings.placement.tabHint': 'ปิดแล้วยังเปิดแผงจากแถบข้างขวาหรือแผงล่างได้',
|
|
4506
4510
|
'settings.placement.immersive': 'โหมดดื่มด่ำ (เต็มความสูง, ซ่อนกล่องพิมพ์)',
|
|
4507
4511
|
'settings.placement.immersiveHint': 'เมื่อเปิด แท็บ Git จะกินพื้นที่สูงทั้งหมดของบทสนทนาและกล่องพิมพ์จะถอยออก; การอนุมัติและคำถามยังแสดงตามปกติ',
|
|
4512
|
+
'preview.openFile': 'เปิดในตัวอย่างไฟล์',
|
|
4508
4513
|
'preview.title': 'ดูตัวอย่าง Git',
|
|
4509
4514
|
'preview.hint': 'คลิก “แสดงความต่าง” ที่ไฟล์หรือคอมมิต — ความต่างจะเปิดที่นี่ในแถบข้าง',
|
|
4510
4515
|
'settings.rail.title': 'ปุ่มแถบการทำงาน',
|
|
@@ -6200,7 +6205,10 @@ window.__ModuleLoader__.load({
|
|
|
6200
6205
|
/* Host-rendered first (v0.14): the ui-primitives diff card brings the
|
|
6201
6206
|
shared toolbar (copy / wrap / language) and the product's diff colors.
|
|
6202
6207
|
A patch we cannot replay into a hunk (binary, mode-only) or a host
|
|
6203
|
-
without the seed module falls back to the hand-drawn rows below.
|
|
6208
|
+
without the seed module falls back to the hand-drawn rows below. This
|
|
6209
|
+
IS the official diff renderer (the platform seed table ships it, the
|
|
6210
|
+
host's own surfaces render diffs through it) — the external preview
|
|
6211
|
+
tab uses the same one, so every diff in the product reads alike. */
|
|
6204
6212
|
if (UIPrimitives !== null && typeof UIPrimitives.DiffBlock === 'function') {
|
|
6205
6213
|
const hunk = patchToHunk(props.patch)
|
|
6206
6214
|
if (hunk !== null) {
|
|
@@ -6220,6 +6228,72 @@ window.__ModuleLoader__.load({
|
|
|
6220
6228
|
)))
|
|
6221
6229
|
}
|
|
6222
6230
|
|
|
6231
|
+
/* The external preview tab's diff (v0.14.1): the FileDiff pattern the
|
|
6232
|
+
host's own workspace-changes review draws — dual old/new line-number
|
|
6233
|
+
gutters, @@ hunk headers, per-side Shiki highlighting — rebuilt on the
|
|
6234
|
+
SAME official seed blocks that component uses (useCodeHighlighter +
|
|
6235
|
+
languageForPath + the file-diff alias tokens). ui-deliverables' FileDiff
|
|
6236
|
+
itself is not requirable across the bundle boundary, but every block it
|
|
6237
|
+
composes is, so this reads like it and themes like it without any
|
|
6238
|
+
hand-rolled colors. */
|
|
6239
|
+
function LineDiff(props) {
|
|
6240
|
+
const rows = useMemo(() => {
|
|
6241
|
+
const parsed = diffLines(props.patch)
|
|
6242
|
+
/* The patch's trailing newline parses as one empty context row with a
|
|
6243
|
+
line number — the base's review drops it, and so does this. */
|
|
6244
|
+
while (parsed.length > 0) {
|
|
6245
|
+
const last = parsed[parsed.length - 1]
|
|
6246
|
+
if (last.kind === 'ctx' && last.text === '') parsed.pop()
|
|
6247
|
+
else break
|
|
6248
|
+
}
|
|
6249
|
+
return parsed
|
|
6250
|
+
}, [props.patch])
|
|
6251
|
+
const language = useMemo(() => {
|
|
6252
|
+
if (languageForPathSeed === null) return undefined
|
|
6253
|
+
for (const row of rows) {
|
|
6254
|
+
if (row.kind === 'meta' && row.text.indexOf('+++ ') === 0) {
|
|
6255
|
+
const filePath = row.text.slice(4).trim().replace(/^b\//, '')
|
|
6256
|
+
return filePath === '' ? undefined : languageForPathSeed(filePath)
|
|
6257
|
+
}
|
|
6258
|
+
}
|
|
6259
|
+
return undefined
|
|
6260
|
+
}, [rows])
|
|
6261
|
+
const highlighter = useCodeHighlighterSeed === null ? undefined : useCodeHighlighterSeed(language)
|
|
6262
|
+
/* Per-side alignment (the FileDiff rule): the NEW side (+ and context)
|
|
6263
|
+
is joined into one fragment, highlighted once, and the per-line spans
|
|
6264
|
+
map back onto their rows; the deleted side keeps its plain removal
|
|
6265
|
+
styling, which is what the unified view needs. */
|
|
6266
|
+
const spansByRow = useMemo(() => {
|
|
6267
|
+
if (highlighter === undefined || rows.length === 0) return null
|
|
6268
|
+
const seq = []
|
|
6269
|
+
for (const row of rows) {
|
|
6270
|
+
if (row.kind === 'add' || row.kind === 'ctx') seq.push([row, row.text === '' ? '' : row.text.slice(1)])
|
|
6271
|
+
}
|
|
6272
|
+
if (seq.length === 0) return null
|
|
6273
|
+
const highlighted = highlighter(seq.map((entry) => entry[1]).join('\n'))
|
|
6274
|
+
if (highlighted === undefined) return null
|
|
6275
|
+
const map = new Map()
|
|
6276
|
+
seq.forEach((entry, index) => map.set(entry[0], highlighted[index] || []))
|
|
6277
|
+
return map
|
|
6278
|
+
}, [rows, highlighter])
|
|
6279
|
+
if (props.loading === true) return E('div', { className: 'dig-empty' }, props.t('diff.loading'))
|
|
6280
|
+
if (rows.length === 0) return E('div', { className: 'dig-empty' }, props.t('diff.empty'))
|
|
6281
|
+
return E('div', { className: 'dig-linediff' }, rows.map((row, index) => {
|
|
6282
|
+
if (row.kind === 'hunk') return E('div', { key: index, className: 'dig-linediff-hunk' }, row.text)
|
|
6283
|
+
if (row.kind === 'meta') return E('div', { key: index, className: 'dig-linediff-meta' }, row.text)
|
|
6284
|
+
const sign = row.kind === 'add' ? '+' : row.kind === 'del' ? '\u2212' : ' '
|
|
6285
|
+
const body = (row.kind === 'ctx' ? row.text : row.text.slice(1)) || ' '
|
|
6286
|
+
const spans = row.kind === 'del' ? null : (spansByRow === null ? undefined : spansByRow.get(row))
|
|
6287
|
+
return E('div', { key: index, className: 'dig-linediff-row dig-linediff-' + row.kind },
|
|
6288
|
+
E('span', { className: 'dig-linediff-no' }, row.oldLine === null ? '' : String(row.oldLine)),
|
|
6289
|
+
E('span', { className: 'dig-linediff-no' }, row.newLine === null ? '' : String(row.newLine)),
|
|
6290
|
+
E('span', { className: 'dig-linediff-sign' }, sign),
|
|
6291
|
+
spans === undefined || spans === null || spans.length === 0
|
|
6292
|
+
? E('span', { className: 'dig-linediff-text' }, body)
|
|
6293
|
+
: E('span', { className: 'dig-linediff-text' }, spans.map((span, sIndex) => E('span', { key: sIndex, style: span.style }, span.text))))
|
|
6294
|
+
}))
|
|
6295
|
+
}
|
|
6296
|
+
|
|
6223
6297
|
/* The leading glyph of a change row (v0.14): the host's FileTypeIcon —
|
|
6224
6298
|
classifyFileType runs inside when given a path. Directories (the
|
|
6225
6299
|
trailing slash an `ls-files --directory` row carries) ask for the
|
|
@@ -6274,6 +6348,7 @@ window.__ModuleLoader__.load({
|
|
|
6274
6348
|
grip: ['M5.6 4.6h4.8', 'M5.6 8h4.8', 'M5.6 11.4h4.8'],
|
|
6275
6349
|
filter: ['M2 3.6h12l-4.6 5.2v4.2l-2.8-1.4V8.8z'],
|
|
6276
6350
|
check: ['M3.2 8.4 6.4 11.6 12.8 4.6'],
|
|
6351
|
+
copy: ['M5.5 5.5h8v8h-8z', 'M10.5 5.5v-3h-8v8h3'],
|
|
6277
6352
|
// dock actions (official right sidebar): lift a panel out, drop it back into
|
|
6278
6353
|
// the dock, split the pane, and the full-screen pair reuses expand/collapse.
|
|
6279
6354
|
float: ['M2.5 6.5v7h7v-3', 'M6 10 13.2 2.8', 'M9.4 2.8h3.8v3.8'],
|
|
@@ -8246,8 +8321,8 @@ window.__ModuleLoader__.load({
|
|
|
8246
8321
|
try {
|
|
8247
8322
|
const scopeObject = scope || {}
|
|
8248
8323
|
previewStore.set(commitHash !== null
|
|
8249
|
-
? { hash: commitHash, subject: seed.subject || '', cwd: scopeObject.cwd, repoRoot: repoRoot }
|
|
8250
|
-
: { path: seed.path, staged: seed.staged === true, cwd: scopeObject.cwd, repoRoot: repoRoot })
|
|
8324
|
+
? { hash: commitHash, subject: seed.subject || '', cwd: scopeObject.cwd, repoRoot: repoRoot, sessionId: scopeObject.sessionId }
|
|
8325
|
+
: { path: seed.path, staged: seed.staged === true, cwd: scopeObject.cwd, repoRoot: repoRoot, sessionId: scopeObject.sessionId })
|
|
8251
8326
|
sidebarRight.openTab(NATIVE_PREVIEW_KIND)
|
|
8252
8327
|
return true
|
|
8253
8328
|
} catch (error) { void error }
|
|
@@ -8483,7 +8558,6 @@ window.__ModuleLoader__.load({
|
|
|
8483
8558
|
const items = [
|
|
8484
8559
|
{ id: 'diff', icon: 'file', tone: 'primary', label: t('action.showDiff'), run: () => { showDiff({ path: item.path, staged: group === 'staged', untracked: group === 'untracked' }) } },
|
|
8485
8560
|
{ id: 'sendRef', icon: 'send', tone: 'accent', label: t('menu.sendToChat'), run: () => sendFileReferenceToChat(item.path) },
|
|
8486
|
-
{ id: 'sendPath', icon: 'file', tone: 'secondary', label: t('menu.sendFilePathToChat'), run: () => sendToComposer({ text: item.path, fallback: item.path }) },
|
|
8487
8561
|
null,
|
|
8488
8562
|
group === 'staged'
|
|
8489
8563
|
? { id: 'unstage', icon: 'minus', tone: 'warn', label: t('action.unstage'), run: () => { void run('unstage', { paths: [item.path] }) } }
|
|
@@ -8509,7 +8583,6 @@ window.__ModuleLoader__.load({
|
|
|
8509
8583
|
} },
|
|
8510
8584
|
null,
|
|
8511
8585
|
{ id: 'sendRef', icon: 'send', tone: 'accent', label: t('menu.sendToChat'), run: () => sendFileReferenceToChat(file.path) },
|
|
8512
|
-
{ id: 'sendPath', icon: 'file', tone: 'secondary', label: t('menu.sendFilePathToChat'), run: () => sendToComposer({ text: file.path, fallback: file.path }) },
|
|
8513
8586
|
null,
|
|
8514
8587
|
{ id: 'copy', icon: 'tag', tone: 'secondary', label: t('action.copyPath'), run: () => { copyText(file.path) } },
|
|
8515
8588
|
])
|
|
@@ -9523,6 +9596,26 @@ window.__ModuleLoader__.load({
|
|
|
9523
9596
|
'.dig-preview-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',
|
|
9524
9597
|
'.dig-preview-body{flex:1;min-height:0;overflow:auto;padding:8px 12px;display:flex;flex-direction:column}',
|
|
9525
9598
|
'.dig-preview-body .dig-diff-host,.dig-preview-body .dig-diff{flex:1;min-height:0}',
|
|
9599
|
+
'.dig-preview-actions{display:flex;align-items:center;gap:4px;flex:none}',
|
|
9600
|
+
'.dig-preview-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--dsw-radius-sm,8px);background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer}',
|
|
9601
|
+
'.dig-preview-btn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}',
|
|
9602
|
+
/* LineDiff: the workspace-changes review's row anatomy on the same alias
|
|
9603
|
+
tokens that view uses (FileDiff.module.css), so themes and reading
|
|
9604
|
+
habits carry over untouched. */
|
|
9605
|
+
'.dig-linediff{display:flex;flex-direction:column;min-height:0;font:var(--dsw-font-markdown-code-block);color:var(--dsw-alias-label-primary)}',
|
|
9606
|
+
'.dig-linediff-hunk{padding:4px 16px;color:var(--dsw-alias-label-tertiary);white-space:pre}',
|
|
9607
|
+
'.dig-linediff-meta{padding:2px 16px;color:var(--dsw-alias-label-secondary);font-weight:600;white-space:pre;overflow:hidden;text-overflow:ellipsis}',
|
|
9608
|
+
'.dig-linediff-row{display:flex;padding-right:16px;white-space:pre}',
|
|
9609
|
+
'.dig-linediff-no{flex:none;min-width:2.5em;padding:0 6px;color:var(--dsw-alias-label-tertiary);text-align:right;user-select:none}',
|
|
9610
|
+
'.dig-linediff-sign{flex:none;width:1.4em;user-select:none}',
|
|
9611
|
+
'.dig-linediff-text{padding-right:16px}',
|
|
9612
|
+
'.dig-linediff-add{background:var(--dsw-alias-file-diff-added-bg)}',
|
|
9613
|
+
'.dig-linediff-add .dig-linediff-no{background:var(--dsw-alias-file-diff-added-gutter);color:var(--dsw-alias-file-diff-added-marker)}',
|
|
9614
|
+
'.dig-linediff-add .dig-linediff-sign{color:var(--dsw-alias-file-diff-added-marker)}',
|
|
9615
|
+
'.dig-linediff-del{background:var(--dsw-alias-file-diff-deleted-bg)}',
|
|
9616
|
+
'.dig-linediff-del .dig-linediff-no{background:var(--dsw-alias-file-diff-deleted-gutter);color:var(--dsw-alias-file-diff-deleted-marker)}',
|
|
9617
|
+
'.dig-linediff-del .dig-linediff-sign{color:var(--dsw-alias-file-diff-deleted-marker)}',
|
|
9618
|
+
'.dig-linediff-ctx .dig-linediff-text{color:var(--dsw-alias-label-secondary)}',
|
|
9526
9619
|
].join('\n')
|
|
9527
9620
|
|
|
9528
9621
|
/* ============================== plugin ============================== */
|
|
@@ -9829,6 +9922,10 @@ window.__ModuleLoader__.load({
|
|
|
9829
9922
|
? ''
|
|
9830
9923
|
: (seed.hash !== undefined && seed.hash !== null ? 'c:' + String(seed.hash) : 'w:' + String(seed.staged === true) + ':' + String(seed.path))
|
|
9831
9924
|
const [state, setState] = useState({ loading: false, patch: '', error: null })
|
|
9925
|
+
const [refreshTick, setRefreshTick] = useState(0)
|
|
9926
|
+
const [copied, setCopied] = useState(false)
|
|
9927
|
+
const copyTimer = useRef(null)
|
|
9928
|
+
useEffect(() => () => { if (copyTimer.current !== null) clearTimeout(copyTimer.current) }, [])
|
|
9832
9929
|
useEffect(() => {
|
|
9833
9930
|
if (seed === null) return undefined
|
|
9834
9931
|
let alive = true
|
|
@@ -9847,20 +9944,59 @@ window.__ModuleLoader__.load({
|
|
|
9847
9944
|
})()
|
|
9848
9945
|
return () => { alive = false }
|
|
9849
9946
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9850
|
-
}, [seedKey])
|
|
9947
|
+
}, [seedKey, refreshTick])
|
|
9851
9948
|
const title = seed === null
|
|
9852
9949
|
? ''
|
|
9853
9950
|
: (seed.hash !== undefined && seed.hash !== null
|
|
9854
9951
|
? String(seed.hash).slice(0, 7) + (seed.subject ? ' ' + seed.subject : '')
|
|
9855
9952
|
: String(seed.path))
|
|
9953
|
+
/* Header controls mirror the base's own diff tab: a refresh button
|
|
9954
|
+
(worktree diffs change under staging/discard), plus a copy button —
|
|
9955
|
+
the official card's toolbar already covers wrap/copy inside the body;
|
|
9956
|
+
these two act on the WHOLE preview. */
|
|
9957
|
+
const copyPatch = () => {
|
|
9958
|
+
try {
|
|
9959
|
+
void navigator.clipboard.writeText(state.patch).then(() => {
|
|
9960
|
+
setCopied(true)
|
|
9961
|
+
if (copyTimer.current !== null) clearTimeout(copyTimer.current)
|
|
9962
|
+
copyTimer.current = setTimeout(() => { setCopied(false); copyTimer.current = null }, 1600)
|
|
9963
|
+
})
|
|
9964
|
+
} catch (error) { void error }
|
|
9965
|
+
}
|
|
9966
|
+
/* Hand the file to the HOST'S own file preview (ReadBlock chrome: path
|
|
9967
|
+
banner, line numbers, syntax colors) — the official openResource
|
|
9968
|
+
channel, the same one every @-mention file click rides. The diff stays
|
|
9969
|
+
the place to read the CHANGE; this jumps to the whole file with the
|
|
9970
|
+
product's line-numbered reader. Address grammar (workspace-path):
|
|
9971
|
+
`dsh-resource://file/session/<sessionId>/<per-segment encoded rel>`. */
|
|
9972
|
+
const openInFilePreview = () => {
|
|
9973
|
+
if (seed === null || seed.path === undefined || seed.path === null || seed.path === '') return
|
|
9974
|
+
let sidebarRight = undefined
|
|
9975
|
+
try { sidebarRight = props.ctx === undefined || props.ctx === null ? undefined : props.ctx.get('sidebarRight') } catch (error) { void error }
|
|
9976
|
+
if (sidebarRight === undefined || sidebarRight === null || typeof sidebarRight.openResource !== 'function') return
|
|
9977
|
+
try {
|
|
9978
|
+
const relative = String(seed.path)
|
|
9979
|
+
const address = 'dsh-resource://file/session/' + encodeURIComponent(String(seed.sessionId || '')) + '/' + relative.split('/').map((segment) => encodeURIComponent(segment)).join('/')
|
|
9980
|
+
sidebarRight.openResource(address)
|
|
9981
|
+
} catch (error) { void error }
|
|
9982
|
+
}
|
|
9856
9983
|
return E('div', { className: 'dig-preview-root' },
|
|
9857
9984
|
E('div', { className: 'dig-preview-head' },
|
|
9858
|
-
E('span', { className: 'dig-preview-title', title: title }, title === '' ? t('preview.title') : title)
|
|
9985
|
+
E('span', { className: 'dig-preview-title', title: title }, title === '' ? t('preview.title') : title),
|
|
9986
|
+
seed === null ? null : E('div', { className: 'dig-preview-actions' },
|
|
9987
|
+
seed.path !== undefined && seed.path !== null && seed.path !== ''
|
|
9988
|
+
? E('button', { type: 'button', className: 'dig-preview-btn', 'aria-label': t('preview.openFile'), title: t('preview.openFile'), onClick: openInFilePreview },
|
|
9989
|
+
E(Icon, { name: 'file', size: 13 }))
|
|
9990
|
+
: null,
|
|
9991
|
+
E('button', { type: 'button', className: 'dig-preview-btn', 'aria-label': t('diff.copy'), title: t('diff.copy'), onClick: copyPatch },
|
|
9992
|
+
E(Icon, { name: copied === true ? 'check' : 'copy', size: 13 })),
|
|
9993
|
+
E('button', { type: 'button', className: 'dig-preview-btn', 'aria-label': t('toolbar.refresh'), title: t('toolbar.refresh'), onClick: () => { setRefreshTick((n) => n + 1) } },
|
|
9994
|
+
E(Icon, { name: 'refresh', size: 13 })))),
|
|
9859
9995
|
seed === null
|
|
9860
9996
|
? E('div', { className: 'dig-preview-body' }, E('div', { className: 'dig-empty' }, t('preview.hint')))
|
|
9861
9997
|
: state.error !== null
|
|
9862
9998
|
? E('div', { className: 'dig-preview-body' }, E('div', { className: 'dig-empty' }, state.error))
|
|
9863
|
-
: E('div', { className: 'dig-preview-body' }, E(
|
|
9999
|
+
: E('div', { className: 'dig-preview-body' }, E(LineDiff, { patch: state.patch, loading: state.loading, t: t })))
|
|
9864
10000
|
}
|
|
9865
10001
|
|
|
9866
10002
|
function apply(ctx) {
|