@deepseek-harness-tui/dsh-tui 0.7.1 → 0.7.3
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/README.md +7 -5
- package/bin/dsh-tui.js +42 -1
- package/cordis.patch.yml +10 -0
- package/lib/types/commands.js +1 -1
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +6 -1
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
- package/lib/types/components/HistorySearchDialog.js +5 -1
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
- package/lib/types/components/LoadedContextPanel.js +1 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +5 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +52 -74
- package/lib/types/components/SearchBox.d.ts +4 -0
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +101 -2
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +4 -1
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -1
- package/lib/types/components/Spinner/SpinnerAnimationRow.js +10 -5
- package/lib/types/components/WorkingSpinner.d.ts +3 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/design-system/ThemedText.d.ts +9 -3
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemedText.js +3 -5
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +52 -8
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +12 -3
- package/lib/types/components/sessions/SessionListRow.d.ts +26 -0
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -0
- package/lib/types/components/sessions/SessionListRow.js +35 -0
- package/lib/types/components/sessions/SessionPreview.d.ts +25 -0
- package/lib/types/components/sessions/SessionPreview.d.ts.map +1 -0
- package/lib/types/components/sessions/SessionPreview.js +60 -0
- package/lib/types/dsh-adapter/channel.d.ts +19 -4
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +76 -82
- package/lib/types/dsh-adapter/compat/index.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +8 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +1 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +10 -1
- package/lib/types/dsh-adapter/packaged-presets.d.ts +22 -0
- package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/packaged-presets.js +93 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +53 -7
- package/lib/types/dsh-adapter/presets.d.ts +16 -0
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +23 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +3 -1
- package/lib/types/dsh-adapter/sessions/digest.d.ts +29 -0
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/digest.js +224 -0
- package/lib/types/dsh-adapter/sessions/frames.d.ts +100 -0
- package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/frames.js +246 -0
- package/lib/types/dsh-adapter/sessions/header.d.ts +50 -0
- package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/header.js +62 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts +17 -0
- package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/index.js +15 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +41 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/list.js +213 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts +48 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/store.js +164 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts +142 -0
- package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/types.js +14 -0
- package/lib/types/i18n.d.ts +150 -22
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +45 -9
- package/lib/types/ink/components/Text.d.ts +9 -1
- package/lib/types/ink/components/Text.d.ts.map +1 -1
- package/lib/types/ink/components/Text.js +7 -6
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +4 -2
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +76 -9
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +4 -1
- package/lib/types/ink/terminal.d.ts +40 -4
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +57 -5
- package/lib/types/ink/termio/tokenize.d.ts +6 -0
- package/lib/types/ink/termio/tokenize.d.ts.map +1 -1
- package/lib/types/ink/termio/tokenize.js +18 -4
- package/lib/types/screens/Chat.d.ts +3 -2
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +104 -160
- package/lib/types/screens/SessionBrowser.d.ts +37 -0
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -0
- package/lib/types/screens/SessionBrowser.js +452 -0
- package/lib/types/sessionHistory.d.ts +0 -8
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessions/format.d.ts +117 -0
- package/lib/types/sessions/format.d.ts.map +1 -0
- package/lib/types/sessions/format.js +244 -0
- package/lib/types/sessions/view.d.ts +125 -0
- package/lib/types/sessions/view.d.ts.map +1 -0
- package/lib/types/sessions/view.js +234 -0
- package/lib/types/update.d.ts +21 -7
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +66 -16
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +4 -1
- package/package.json +37 -9
- package/presets/liangshen/.dsh-tui-managed.json +5 -0
- package/presets/liangshen/agent.cordis.yml +389 -0
- package/presets/liangshen/compaction-epoch.mjs +81 -0
- package/presets/liangshen/custom-bash.mjs +126 -0
- package/presets/liangshen/instruction-hint.mjs +181 -0
- package/presets/liangshen/preset.yml +3 -0
- package/presets/liangshen/skill-search.mjs +142 -0
- package/presets/liangshen/tool-bootstrap.mjs +300 -0
- package/lib/types/components/ResumePicker.d.ts +0 -26
- package/lib/types/components/ResumePicker.d.ts.map +0 -1
- package/lib/types/components/ResumePicker.js +0 -50
package/lib/types/i18n.d.ts
CHANGED
|
@@ -700,13 +700,41 @@ declare const dict: {
|
|
|
700
700
|
readonly en: "Created {{result}}";
|
|
701
701
|
};
|
|
702
702
|
readonly 'login-api-key': {
|
|
703
|
-
readonly zh: "API key: {{
|
|
704
|
-
readonly en: "API key: {{
|
|
703
|
+
readonly zh: "API key: {{status}}";
|
|
704
|
+
readonly en: "API key: {{status}}";
|
|
705
|
+
};
|
|
706
|
+
readonly 'login-key-configured': {
|
|
707
|
+
readonly zh: "已配置({{ref}})";
|
|
708
|
+
readonly en: "configured ({{ref}})";
|
|
705
709
|
};
|
|
706
710
|
readonly 'login-key-missing': {
|
|
707
711
|
readonly zh: "未配置(DEEPSEEK_API_KEY)";
|
|
708
712
|
readonly en: "not configured (DEEPSEEK_API_KEY)";
|
|
709
713
|
};
|
|
714
|
+
readonly 'login-credentials-unavailable': {
|
|
715
|
+
readonly zh: "无法检查(credentials service 不可用)";
|
|
716
|
+
readonly en: "unavailable (credentials service unavailable)";
|
|
717
|
+
};
|
|
718
|
+
readonly 'login-credential-source': {
|
|
719
|
+
readonly zh: "凭据来源: {{source}}";
|
|
720
|
+
readonly en: "Credential source: {{source}}";
|
|
721
|
+
};
|
|
722
|
+
readonly 'login-source-none': {
|
|
723
|
+
readonly zh: "无";
|
|
724
|
+
readonly en: "none";
|
|
725
|
+
};
|
|
726
|
+
readonly 'login-credential-storage': {
|
|
727
|
+
readonly zh: "凭据存储: {{mode}}";
|
|
728
|
+
readonly en: "Credential storage: {{mode}}";
|
|
729
|
+
};
|
|
730
|
+
readonly 'login-storage-writable': {
|
|
731
|
+
readonly zh: "可写";
|
|
732
|
+
readonly en: "writable";
|
|
733
|
+
};
|
|
734
|
+
readonly 'login-storage-read-only': {
|
|
735
|
+
readonly zh: "只读";
|
|
736
|
+
readonly en: "read-only";
|
|
737
|
+
};
|
|
710
738
|
readonly 'login-base-url': {
|
|
711
739
|
readonly zh: "Base URL: {{url}}";
|
|
712
740
|
readonly en: "Base URL: {{url}}";
|
|
@@ -715,13 +743,9 @@ declare const dict: {
|
|
|
715
743
|
readonly zh: "官方端点";
|
|
716
744
|
readonly en: "official endpoint";
|
|
717
745
|
};
|
|
718
|
-
readonly 'login-source-hint': {
|
|
719
|
-
readonly zh: "来源:环境变量 → 工作区 .env(run.ts 兜底读取)";
|
|
720
|
-
readonly en: "Source: env var → workspace .env (run.ts fallback)";
|
|
721
|
-
};
|
|
722
746
|
readonly 'login-logout-hint': {
|
|
723
|
-
readonly zh: "
|
|
724
|
-
readonly en: "DSH credentials
|
|
747
|
+
readonly zh: "使用 /provider 管理 DSH 凭据;若来源为 env,请删除对应环境变量并重启 dsh-tui";
|
|
748
|
+
readonly en: "Manage DSH credentials with /provider; for env sources, remove the corresponding environment variable and restart dsh-tui";
|
|
725
749
|
};
|
|
726
750
|
readonly 'permissions-policy-hint': {
|
|
727
751
|
readonly zh: "DSH 权限策略由 fs-policy / bash-sandbox 配置决定(当前 leaf:workspace 内读写、写入需已读文件)。";
|
|
@@ -1171,14 +1195,6 @@ declare const dict: {
|
|
|
1171
1195
|
readonly zh: "已恢复会话";
|
|
1172
1196
|
readonly en: "Session resumed";
|
|
1173
1197
|
};
|
|
1174
|
-
readonly 'resume-more-above': {
|
|
1175
|
-
readonly zh: "↑ 还有 {{n}} 条";
|
|
1176
|
-
readonly en: "↑ {{n}} more";
|
|
1177
|
-
};
|
|
1178
|
-
readonly 'resume-more-below': {
|
|
1179
|
-
readonly zh: "↓ 还有 {{n}} 条";
|
|
1180
|
-
readonly en: "↓ {{n}} more";
|
|
1181
|
-
};
|
|
1182
1198
|
readonly 'resume-delete-confirm': {
|
|
1183
1199
|
readonly zh: "删除「{{name}}」?会话日志将被永久移除。";
|
|
1184
1200
|
readonly en: "Delete \"{{name}}\"? The session log is removed permanently.";
|
|
@@ -1199,10 +1215,6 @@ declare const dict: {
|
|
|
1199
1215
|
readonly zh: "无法重命名会话「{{name}}」";
|
|
1200
1216
|
readonly en: "Could not rename session {{name}}";
|
|
1201
1217
|
};
|
|
1202
|
-
readonly 'resume-hint-list': {
|
|
1203
|
-
readonly zh: "**Enter** 恢复 · Esc 退出 · {{mod}}d 删除 · {{mod}}r 重命名";
|
|
1204
|
-
readonly en: "**Enter** to confirm · Esc to exit · {{mod}}d to delete · {{mod}}r to rename";
|
|
1205
|
-
};
|
|
1206
1218
|
readonly 'resume-hint-delete': {
|
|
1207
1219
|
readonly zh: "**Enter** 删除 · Esc 取消";
|
|
1208
1220
|
readonly en: "**Enter** to delete · Esc to cancel";
|
|
@@ -1213,7 +1225,123 @@ declare const dict: {
|
|
|
1213
1225
|
};
|
|
1214
1226
|
readonly 'resume-title': {
|
|
1215
1227
|
readonly zh: "恢复会话";
|
|
1216
|
-
readonly en: "Resume";
|
|
1228
|
+
readonly en: "Resume session";
|
|
1229
|
+
};
|
|
1230
|
+
readonly 'session-loading': {
|
|
1231
|
+
readonly zh: "正在读取会话…";
|
|
1232
|
+
readonly en: "Reading sessions…";
|
|
1233
|
+
};
|
|
1234
|
+
readonly 'session-list-failed': {
|
|
1235
|
+
readonly zh: "无法读取会话列表 · {{err}}";
|
|
1236
|
+
readonly en: "Could not read the session list · {{err}}";
|
|
1237
|
+
};
|
|
1238
|
+
readonly 'session-resume-refused': {
|
|
1239
|
+
readonly zh: "无法恢复这个会话——原因已记录在对话里(模型正在工作时无法切换)";
|
|
1240
|
+
readonly en: "That session could not be resumed — the reason is in the conversation (switching is refused while the model is working)";
|
|
1241
|
+
};
|
|
1242
|
+
readonly 'session-resume-failed': {
|
|
1243
|
+
readonly zh: "恢复会话失败 · {{err}}";
|
|
1244
|
+
readonly en: "Resuming the session failed · {{err}}";
|
|
1245
|
+
};
|
|
1246
|
+
readonly 'session-when-now': {
|
|
1247
|
+
readonly zh: "刚刚";
|
|
1248
|
+
readonly en: "just now";
|
|
1249
|
+
};
|
|
1250
|
+
readonly 'session-when-minutes': {
|
|
1251
|
+
readonly zh: "{{n}} 分钟前";
|
|
1252
|
+
readonly en: "{{n}}m ago";
|
|
1253
|
+
};
|
|
1254
|
+
readonly 'session-when-hours': {
|
|
1255
|
+
readonly zh: "{{n}} 小时前";
|
|
1256
|
+
readonly en: "{{n}}h ago";
|
|
1257
|
+
};
|
|
1258
|
+
readonly 'session-when-days': {
|
|
1259
|
+
readonly zh: "{{n}} 天前";
|
|
1260
|
+
readonly en: "{{n}}d ago";
|
|
1261
|
+
};
|
|
1262
|
+
readonly 'session-when-date': {
|
|
1263
|
+
readonly zh: "{{month}} 月 {{day}} 日";
|
|
1264
|
+
readonly en: "{{month}}/{{day}}";
|
|
1265
|
+
};
|
|
1266
|
+
readonly 'session-children': {
|
|
1267
|
+
readonly zh: "{{n}} 个子运行";
|
|
1268
|
+
readonly en: "{{n}} runs";
|
|
1269
|
+
};
|
|
1270
|
+
readonly 'session-kind-root': {
|
|
1271
|
+
readonly zh: "对话";
|
|
1272
|
+
readonly en: "Conversation";
|
|
1273
|
+
};
|
|
1274
|
+
readonly 'session-kind-fork': {
|
|
1275
|
+
readonly zh: "回溯分支";
|
|
1276
|
+
readonly en: "Rewound branch";
|
|
1277
|
+
};
|
|
1278
|
+
readonly 'session-kind-subagent': {
|
|
1279
|
+
readonly zh: "子 agent 运行";
|
|
1280
|
+
readonly en: "Sub-agent run";
|
|
1281
|
+
};
|
|
1282
|
+
readonly 'session-project-unknown': {
|
|
1283
|
+
readonly zh: "(未记录目录)";
|
|
1284
|
+
readonly en: "(no directory recorded)";
|
|
1285
|
+
};
|
|
1286
|
+
readonly 'session-scope-all': {
|
|
1287
|
+
readonly zh: "全部项目";
|
|
1288
|
+
readonly en: "all projects";
|
|
1289
|
+
};
|
|
1290
|
+
readonly 'session-search-placeholder': {
|
|
1291
|
+
readonly zh: "输入以搜索 · {{scope}}";
|
|
1292
|
+
readonly en: "Type to search · {{scope}}";
|
|
1293
|
+
};
|
|
1294
|
+
readonly 'session-count-shown': {
|
|
1295
|
+
readonly zh: "{{n}} 个会话";
|
|
1296
|
+
readonly en: "{{n}} sessions";
|
|
1297
|
+
};
|
|
1298
|
+
readonly 'session-count-subagents': {
|
|
1299
|
+
readonly zh: "{{n}} 个子运行已折叠";
|
|
1300
|
+
readonly en: "{{n}} runs folded";
|
|
1301
|
+
};
|
|
1302
|
+
readonly 'session-count-empty': {
|
|
1303
|
+
readonly zh: "{{n}} 个空会话";
|
|
1304
|
+
readonly en: "{{n}} empty";
|
|
1305
|
+
};
|
|
1306
|
+
readonly 'session-clean-confirm': {
|
|
1307
|
+
readonly zh: "清理 {{n}} 个没有对话内容的会话?日志将被永久移除。";
|
|
1308
|
+
readonly en: "Remove {{n}} sessions that hold no conversation? Their logs are deleted permanently.";
|
|
1309
|
+
};
|
|
1310
|
+
readonly 'session-cleaned': {
|
|
1311
|
+
readonly zh: "已清理 {{n}} 个空会话";
|
|
1312
|
+
readonly en: "Removed {{n}} empty sessions";
|
|
1313
|
+
};
|
|
1314
|
+
readonly 'session-preview-times': {
|
|
1315
|
+
readonly zh: "创建于 {{created}} · 最后活动 {{updated}}";
|
|
1316
|
+
readonly en: "created {{created}} · last active {{updated}}";
|
|
1317
|
+
};
|
|
1318
|
+
readonly 'session-preview-loading': {
|
|
1319
|
+
readonly zh: "正在读取会话结尾…";
|
|
1320
|
+
readonly en: "Reading the end of this session…";
|
|
1321
|
+
};
|
|
1322
|
+
readonly 'session-preview-empty': {
|
|
1323
|
+
readonly zh: "这个会话没有可预览的往来消息";
|
|
1324
|
+
readonly en: "No exchanges to preview in this session";
|
|
1325
|
+
};
|
|
1326
|
+
readonly 'session-toggle-on': {
|
|
1327
|
+
readonly zh: "开";
|
|
1328
|
+
readonly en: "on";
|
|
1329
|
+
};
|
|
1330
|
+
readonly 'session-toggle-off': {
|
|
1331
|
+
readonly zh: "关";
|
|
1332
|
+
readonly en: "off";
|
|
1333
|
+
};
|
|
1334
|
+
readonly 'session-hint-list': {
|
|
1335
|
+
readonly zh: "**Enter** 恢复 · Tab 预览 · {{mod}}a 全部项目({{projects}}) · {{mod}}s 子运行({{runs}}) · {{mod}}b 本分支 · {{mod}}r 重命名 · {{mod}}d 删除 · {{mod}}x 清空壳 · Esc 退出";
|
|
1336
|
+
readonly en: "**Enter** resume · Tab preview · {{mod}}a all projects ({{projects}}) · {{mod}}s runs ({{runs}}) · {{mod}}b this branch · {{mod}}r rename · {{mod}}d delete · {{mod}}x clean · Esc exit";
|
|
1337
|
+
};
|
|
1338
|
+
readonly 'session-hint-list-mid': {
|
|
1339
|
+
readonly zh: "**Enter** 恢复 · Tab 预览 · {{mod}}a 全部项目 · {{mod}}s 子运行 · {{mod}}r 重命名 · {{mod}}d 删除 · Esc 退出";
|
|
1340
|
+
readonly en: "**Enter** resume · Tab preview · {{mod}}a projects · {{mod}}s runs · {{mod}}r rename · {{mod}}d delete · Esc exit";
|
|
1341
|
+
};
|
|
1342
|
+
readonly 'session-hint-list-short': {
|
|
1343
|
+
readonly zh: "**Enter** 恢复 · Tab 预览 · Esc 退出";
|
|
1344
|
+
readonly en: "**Enter** resume · Tab preview · Esc exit";
|
|
1217
1345
|
};
|
|
1218
1346
|
readonly 'hint-confirm-exit': {
|
|
1219
1347
|
readonly zh: "**Enter** 确认 · Esc 退出";
|
|
@@ -1776,7 +1904,7 @@ declare const dict: {
|
|
|
1776
1904
|
readonly zh: "切换工作状态指示器预设";
|
|
1777
1905
|
};
|
|
1778
1906
|
readonly 'cmd-desc-preset': {
|
|
1779
|
-
readonly zh: "切换 Agent
|
|
1907
|
+
readonly zh: "切换 Agent 预设(含梁神模式)";
|
|
1780
1908
|
};
|
|
1781
1909
|
readonly 'cmd-desc-theme': {
|
|
1782
1910
|
readonly zh: "切换配色主题(auto 跟随系统,或内置/自定义)";
|
package/lib/types/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAI9B,+DAA+D;AAC/D,eAAO,MAAM,KAAK,uBAAwB,CAAA;AAE1C,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAI9B,+DAA+D;AAC/D,eAAO,MAAM,KAAK,uBAAwB,CAAA;AAE1C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,GAAG,MAAM,CAAC,CAAA;AAUxD,uEAAuE;AACvE,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAG1B,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAG5D;AAED,qCAAqC;AACrC,wBAAgB,OAAO,IAAI,IAAI,CAE9B;AAED,yDAAyD;AACzD,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAGxC;AAED,iDAAiD;AACjD,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,UAAe,GAAG,MAAM,CAM/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzD;AAID;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAS5D;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAkB,GAAG,IAAI,GAAG,SAAS,CAMtE;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQ1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC"}
|
package/lib/types/i18n.js
CHANGED
|
@@ -197,12 +197,18 @@ const dict = {
|
|
|
197
197
|
'agentsmd-create-failed': { zh: '创建 AGENTS.md 失败', en: 'Failed to create AGENTS.md' },
|
|
198
198
|
'agentsmd-exists': { zh: 'AGENTS.md 已存在,未覆盖', en: 'AGENTS.md already exists, not overwritten' },
|
|
199
199
|
'agentsmd-created': { zh: '已创建 {{result}}', en: 'Created {{result}}' },
|
|
200
|
-
'login-api-key': { zh: 'API key: {{
|
|
200
|
+
'login-api-key': { zh: 'API key: {{status}}', en: 'API key: {{status}}' },
|
|
201
|
+
'login-key-configured': { zh: '已配置({{ref}})', en: 'configured ({{ref}})' },
|
|
201
202
|
'login-key-missing': { zh: '未配置(DEEPSEEK_API_KEY)', en: 'not configured (DEEPSEEK_API_KEY)' },
|
|
203
|
+
'login-credentials-unavailable': { zh: '无法检查(credentials service 不可用)', en: 'unavailable (credentials service unavailable)' },
|
|
204
|
+
'login-credential-source': { zh: '凭据来源: {{source}}', en: 'Credential source: {{source}}' },
|
|
205
|
+
'login-source-none': { zh: '无', en: 'none' },
|
|
206
|
+
'login-credential-storage': { zh: '凭据存储: {{mode}}', en: 'Credential storage: {{mode}}' },
|
|
207
|
+
'login-storage-writable': { zh: '可写', en: 'writable' },
|
|
208
|
+
'login-storage-read-only': { zh: '只读', en: 'read-only' },
|
|
202
209
|
'login-base-url': { zh: 'Base URL: {{url}}', en: 'Base URL: {{url}}' },
|
|
203
210
|
'login-official-endpoint': { zh: '官方端点', en: 'official endpoint' },
|
|
204
|
-
'login-
|
|
205
|
-
'login-logout-hint': { zh: 'DSH 凭证来自环境变量 DEEPSEEK_API_KEY — 删除该环境变量后重启 dsh-tui 即登出', en: 'DSH credentials come from the DEEPSEEK_API_KEY env var — remove it and restart dsh-tui to log out' },
|
|
211
|
+
'login-logout-hint': { zh: '使用 /provider 管理 DSH 凭据;若来源为 env,请删除对应环境变量并重启 dsh-tui', en: 'Manage DSH credentials with /provider; for env sources, remove the corresponding environment variable and restart dsh-tui' },
|
|
206
212
|
'permissions-policy-hint': { zh: 'DSH 权限策略由 fs-policy / bash-sandbox 配置决定(当前 leaf:workspace 内读写、写入需已读文件)。', en: 'DSH permission policy is set by fs-policy / bash-sandbox config (current leaf: read/write in workspace, writes need a prior read).' },
|
|
207
213
|
'permissions-approval-hint': { zh: '审批通道已挂载:命令申请权限提升(sandbox_permissions)时弹出审批条,Yes 放行一次、No / Esc 拒绝。', en: 'The approval channel is mounted: sandbox escalations (sandbox_permissions) raise an approval bar — Yes allows once, No / Esc rejects.' },
|
|
208
214
|
'permissions-preset-hint': { zh: '/permission 可查看与切换权限预设(read-only / workspace-write / danger-full-access)。', en: '/permission shows and switches permission presets (read-only / workspace-write / danger-full-access).' },
|
|
@@ -327,19 +333,49 @@ const dict = {
|
|
|
327
333
|
'load-earlier': { zh: ' ↑ 加载更早消息(会话日志完整,/export 导出全文) ', en: ' ↑ load earlier messages (full session log; /export for full text) ' },
|
|
328
334
|
'show-previous-messages': { zh: ' ctrl+e 显示前 {{n}} 条消息 ', en: ' ctrl+e to show {{n}} previous messages ' },
|
|
329
335
|
'resume-none-in-cwd': { zh: '当前目录没有可恢复的历史会话', en: 'No resumable sessions in the current directory' },
|
|
330
|
-
// ──
|
|
336
|
+
// ── screens/SessionBrowser.tsx + screens/Chat.tsx (/resume) ─────────
|
|
331
337
|
'resume-resumed': { zh: '已恢复会话', en: 'Session resumed' },
|
|
332
|
-
'resume-more-above': { zh: '↑ 还有 {{n}} 条', en: '↑ {{n}} more' },
|
|
333
|
-
'resume-more-below': { zh: '↓ 还有 {{n}} 条', en: '↓ {{n}} more' },
|
|
334
338
|
'resume-delete-confirm': { zh: '删除「{{name}}」?会话日志将被永久移除。', en: 'Delete "{{name}}"? The session log is removed permanently.' },
|
|
335
339
|
'resume-deleted': { zh: '已删除会话「{{name}}」', en: 'Deleted session {{name}}' },
|
|
336
340
|
'resume-delete-failed': { zh: '无法删除会话「{{name}}」', en: 'Could not delete session {{name}}' },
|
|
337
341
|
'resume-rename-placeholder': { zh: '新的会话名称…', en: 'New session name…' },
|
|
338
342
|
'resume-rename-failed': { zh: '无法重命名会话「{{name}}」', en: 'Could not rename session {{name}}' },
|
|
339
|
-
'resume-hint-list': { zh: '**Enter** 恢复 · Esc 退出 · {{mod}}d 删除 · {{mod}}r 重命名', en: '**Enter** to confirm · Esc to exit · {{mod}}d to delete · {{mod}}r to rename' },
|
|
340
343
|
'resume-hint-delete': { zh: '**Enter** 删除 · Esc 取消', en: '**Enter** to delete · Esc to cancel' },
|
|
341
344
|
'resume-hint-rename': { zh: '**Enter** 保存 · Esc 取消', en: '**Enter** to save · Esc to cancel' },
|
|
342
|
-
'resume-title': { zh: '恢复会话', en: 'Resume' },
|
|
345
|
+
'resume-title': { zh: '恢复会话', en: 'Resume session' },
|
|
346
|
+
// ── 会话浏览器:行、计数、筛选、预览 ───────────────────────────────
|
|
347
|
+
'session-loading': { zh: '正在读取会话…', en: 'Reading sessions…' },
|
|
348
|
+
'session-list-failed': { zh: '无法读取会话列表 · {{err}}', en: 'Could not read the session list · {{err}}' },
|
|
349
|
+
'session-resume-refused': { zh: '无法恢复这个会话——原因已记录在对话里(模型正在工作时无法切换)', en: 'That session could not be resumed — the reason is in the conversation (switching is refused while the model is working)' },
|
|
350
|
+
'session-resume-failed': { zh: '恢复会话失败 · {{err}}', en: 'Resuming the session failed · {{err}}' },
|
|
351
|
+
'session-when-now': { zh: '刚刚', en: 'just now' },
|
|
352
|
+
'session-when-minutes': { zh: '{{n}} 分钟前', en: '{{n}}m ago' },
|
|
353
|
+
'session-when-hours': { zh: '{{n}} 小时前', en: '{{n}}h ago' },
|
|
354
|
+
'session-when-days': { zh: '{{n}} 天前', en: '{{n}}d ago' },
|
|
355
|
+
'session-when-date': { zh: '{{month}} 月 {{day}} 日', en: '{{month}}/{{day}}' },
|
|
356
|
+
'session-children': { zh: '{{n}} 个子运行', en: '{{n}} runs' },
|
|
357
|
+
'session-kind-root': { zh: '对话', en: 'Conversation' },
|
|
358
|
+
'session-kind-fork': { zh: '回溯分支', en: 'Rewound branch' },
|
|
359
|
+
'session-kind-subagent': { zh: '子 agent 运行', en: 'Sub-agent run' },
|
|
360
|
+
'session-project-unknown': { zh: '(未记录目录)', en: '(no directory recorded)' },
|
|
361
|
+
'session-scope-all': { zh: '全部项目', en: 'all projects' },
|
|
362
|
+
'session-search-placeholder': { zh: '输入以搜索 · {{scope}}', en: 'Type to search · {{scope}}' },
|
|
363
|
+
'session-count-shown': { zh: '{{n}} 个会话', en: '{{n}} sessions' },
|
|
364
|
+
'session-count-subagents': { zh: '{{n}} 个子运行已折叠', en: '{{n}} runs folded' },
|
|
365
|
+
'session-count-empty': { zh: '{{n}} 个空会话', en: '{{n}} empty' },
|
|
366
|
+
'session-clean-confirm': { zh: '清理 {{n}} 个没有对话内容的会话?日志将被永久移除。', en: 'Remove {{n}} sessions that hold no conversation? Their logs are deleted permanently.' },
|
|
367
|
+
'session-cleaned': { zh: '已清理 {{n}} 个空会话', en: 'Removed {{n}} empty sessions' },
|
|
368
|
+
'session-preview-times': { zh: '创建于 {{created}} · 最后活动 {{updated}}', en: 'created {{created}} · last active {{updated}}' },
|
|
369
|
+
'session-preview-loading': { zh: '正在读取会话结尾…', en: 'Reading the end of this session…' },
|
|
370
|
+
'session-preview-empty': { zh: '这个会话没有可预览的往来消息', en: 'No exchanges to preview in this session' },
|
|
371
|
+
'session-toggle-on': { zh: '开', en: 'on' },
|
|
372
|
+
'session-toggle-off': { zh: '关', en: 'off' },
|
|
373
|
+
// Three widths of the same hint. The browser picks the widest that fits the
|
|
374
|
+
// terminal, because a hint that wraps costs the rows the list needs and can
|
|
375
|
+
// push its own tail off the bottom of the screen.
|
|
376
|
+
'session-hint-list': { zh: '**Enter** 恢复 · Tab 预览 · {{mod}}a 全部项目({{projects}}) · {{mod}}s 子运行({{runs}}) · {{mod}}b 本分支 · {{mod}}r 重命名 · {{mod}}d 删除 · {{mod}}x 清空壳 · Esc 退出', en: '**Enter** resume · Tab preview · {{mod}}a all projects ({{projects}}) · {{mod}}s runs ({{runs}}) · {{mod}}b this branch · {{mod}}r rename · {{mod}}d delete · {{mod}}x clean · Esc exit' },
|
|
377
|
+
'session-hint-list-mid': { zh: '**Enter** 恢复 · Tab 预览 · {{mod}}a 全部项目 · {{mod}}s 子运行 · {{mod}}r 重命名 · {{mod}}d 删除 · Esc 退出', en: '**Enter** resume · Tab preview · {{mod}}a projects · {{mod}}s runs · {{mod}}r rename · {{mod}}d delete · Esc exit' },
|
|
378
|
+
'session-hint-list-short': { zh: '**Enter** 恢复 · Tab 预览 · Esc 退出', en: '**Enter** resume · Tab preview · Esc exit' },
|
|
343
379
|
// ── picker 通用快捷键提示(整句本地化,zh 不用 "to" 结构;**段** 渲染为粗体主快捷键)─
|
|
344
380
|
'hint-confirm-exit': { zh: '**Enter** 确认 · Esc 退出', en: '**Enter** to confirm · Esc to exit' },
|
|
345
381
|
'hint-confirm-cancel': { zh: '**Enter** 确认 · Esc 取消', en: '**Enter** to confirm · Esc to cancel' },
|
|
@@ -505,7 +541,7 @@ const dict = {
|
|
|
505
541
|
'cmd-desc-agents': { zh: '查看本会话的子代理' },
|
|
506
542
|
// Model / display
|
|
507
543
|
'cmd-desc-activity': { zh: '切换工作状态指示器预设' },
|
|
508
|
-
'cmd-desc-preset': { zh: '切换 Agent
|
|
544
|
+
'cmd-desc-preset': { zh: '切换 Agent 预设(含梁神模式)' },
|
|
509
545
|
'cmd-desc-theme': { zh: '切换配色主题(auto 跟随系统,或内置/自定义)' },
|
|
510
546
|
'cmd-desc-lang': { zh: '切换界面语言(en / zh)' },
|
|
511
547
|
'cmd-desc-model': { zh: '查看当前模型' },
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import type { Color, Styles } from '../styles.js';
|
|
3
|
+
import type { DOMElement } from '../dom.js';
|
|
3
4
|
type BaseProps = {
|
|
4
5
|
/**
|
|
5
6
|
* Change text color. Accepts a raw color value (rgb, hex, ansi).
|
|
6
7
|
*/
|
|
7
8
|
readonly color?: Color;
|
|
9
|
+
/**
|
|
10
|
+
* Ref to the underlying ink-text DOMElement. dsh-tui addition: lets
|
|
11
|
+
* useDeclaredCursor park the native cursor on an inline caret cell without
|
|
12
|
+
* wrapping it in a Box (a wrapper Box changes flex shrink behaviour and
|
|
13
|
+
* breaks wrapped-line layouts).
|
|
14
|
+
*/
|
|
15
|
+
readonly ref?: Ref<DOMElement>;
|
|
8
16
|
/**
|
|
9
17
|
* Same as `color`, but for background.
|
|
10
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/ink/components/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/ink/components/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAc,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,GAAG;IACF,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,GAAG;IACF,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAoD5C;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,KAAA,OA6I9B"}
|
|
@@ -54,8 +54,8 @@ const memoizedStylesForWrap = {
|
|
|
54
54
|
* This component can display text, and change its style to make it colorful, bold, underline, italic or strikethrough.
|
|
55
55
|
*/
|
|
56
56
|
export default function Text(t0) {
|
|
57
|
-
const $ = _c(
|
|
58
|
-
const { color, backgroundColor, bold, dim, italic: t1, underline: t2, strikethrough: t3, inverse: t4, wrap: t5, children } = t0;
|
|
57
|
+
const $ = _c(30);
|
|
58
|
+
const { color, backgroundColor, bold, dim, italic: t1, underline: t2, strikethrough: t3, inverse: t4, wrap: t5, children, ref } = t0;
|
|
59
59
|
const italic = t1 === undefined ? false : t1;
|
|
60
60
|
const underline = t2 === undefined ? false : t2;
|
|
61
61
|
const strikethrough = t3 === undefined ? false : t3;
|
|
@@ -180,15 +180,16 @@ export default function Text(t0) {
|
|
|
180
180
|
const textStyles = t14;
|
|
181
181
|
const t15 = memoizedStylesForWrap[wrap];
|
|
182
182
|
let t16;
|
|
183
|
-
if ($[25] !== children || $[26] !== t15 || $[27] !== textStyles) {
|
|
184
|
-
t16 = _jsx("ink-text", { style: t15, textStyles: textStyles, children: children });
|
|
183
|
+
if ($[25] !== children || $[26] !== t15 || $[27] !== textStyles || $[28] !== ref) {
|
|
184
|
+
t16 = _jsx("ink-text", { ref: ref, style: t15, textStyles: textStyles, children: children });
|
|
185
185
|
$[25] = children;
|
|
186
186
|
$[26] = t15;
|
|
187
187
|
$[27] = textStyles;
|
|
188
|
-
$[28] =
|
|
188
|
+
$[28] = ref;
|
|
189
|
+
$[29] = t16;
|
|
189
190
|
}
|
|
190
191
|
else {
|
|
191
|
-
t16 = $[
|
|
192
|
+
t16 = $[29];
|
|
192
193
|
}
|
|
193
194
|
return t16;
|
|
194
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../../../src/ink/ink.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa9C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAQrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAA4B,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAIpG,OAAO,EAAqG,KAAK,SAAS,EAAgE,KAAK,cAAc,EAAqH,MAAM,gBAAgB,CAAC;AAgCzV,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,GAAG;IAwGV,OAAO,CAAC,QAAQ,CAAC,OAAO;IAvGpC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAChC,OAAO,CA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,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC;;;;;;OAMG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI;IAc9D;;;;;OAKG;IACH,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAanD,OAAO,CAAC,cAAc,CAGd;IACR,OAAO,CAAC,UAAU,CAAS;IAC3B,YAAY,IAAI,IAAI;IA8BpB,WAAW,IAAI,IAAI;IAoDnB,OAAO,CAAC,QAAQ;IAGhB,OAAO,CAAC,oBAAoB,CAK1B;IACF,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAa7B,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI;IAiFtC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC,cAAc,IAAI,IAAI;IAYtB;;;;;;;OAOG;IACH,UAAU,IAAI,IAAI;IAUlB,YAAY,IAAI,MAAM,IAAI;IAqB1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;CAoCpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wBAAgB,UAAU,CAAC,KAAK,GAAE,MAAM,CAAC,UAA0B,GAAG,IAAI,CAsDzE"}
|
package/lib/types/ink/ink.js
CHANGED
|
@@ -31,7 +31,7 @@ import createRenderer from './renderer.js';
|
|
|
31
31
|
import { CharPool, cellAt, createScreen, HyperlinkPool, isEmptyCellAt, migrateScreenPools, StylePool } from './screen.js';
|
|
32
32
|
import { applySearchHighlight } from './searchHighlight.js';
|
|
33
33
|
import { applySelectionOverlay, captureScrolledRows, clearSelection, createSelectionState, extendSelection, findPlainTextUrlAt, getSelectedText, hasSelection, moveFocus, selectLineAt, selectWordAt, shiftAnchor, shiftSelection, shiftSelectionForFollow, startSelection, updateSelection } from './selection.js';
|
|
34
|
-
import { SYNC_OUTPUT_SUPPORTED, supportsExtendedKeys, supportsWin32InputMode, writeDiffToTerminal } from './terminal.js';
|
|
34
|
+
import { isDecstbmSafe, SYNC_OUTPUT_SUPPORTED, supportsExtendedKeys, supportsWin32InputMode, writeDiffToTerminal } from './terminal.js';
|
|
35
35
|
import { CURSOR_HOME, cursorMove, cursorPosition, DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE, ENABLE_KITTY_KEYBOARD, ENABLE_MODIFY_OTHER_KEYS, ENABLE_WIN32_INPUT_MODE, ERASE_SCREEN, SGR_RESET } from './termio/csi.js';
|
|
36
36
|
import { DBP, DFE, DISABLE_MOUSE_TRACKING, ENABLE_MOUSE_TRACKING, ENTER_ALT_SCREEN, EXIT_ALT_SCREEN, SHOW_CURSOR } from './termio/dec.js';
|
|
37
37
|
import { CLEAR_ITERM2_PROGRESS, CLEAR_TAB_STATUS, setClipboard, supportsTabStatus, wrapForMultiplexer } from './termio/osc.js';
|
|
@@ -582,7 +582,9 @@ export default class Ink {
|
|
|
582
582
|
// renders the scrolled-but-not-yet-repainted intermediate state.
|
|
583
583
|
// tmux is the main case (re-emits DECSTBM with its own timing and
|
|
584
584
|
// doesn't implement DEC 2026, so SYNC_OUTPUT_SUPPORTED is false).
|
|
585
|
-
|
|
585
|
+
// JediTerm is separately excluded in isDecstbmSafe(): its DECSTBM
|
|
586
|
+
// implementation deviates from xterm and garbles scrolling content.
|
|
587
|
+
isDecstbmSafe());
|
|
586
588
|
const diffMs = performance.now() - tDiff;
|
|
587
589
|
// Swap buffers
|
|
588
590
|
this.backFrame = this.frontFrame;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAGf,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAGf,MAAM,aAAa,CAAA;AAsBpB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAKD;;;GAGG;AACH,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAO;gBAES,OAAO,EAAE,OAAO;IAO7C;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,+BAA+B,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI;IASvD,+HAA+H;IAC/H,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,eAAe;IAiDvB,OAAO,CAAC,mBAAmB;IAS3B;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,KAAK,EACX,SAAS,UAAQ,EACjB,WAAW,UAAO,GACjB,IAAI;CAgbR"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ansiCodesToString, diffAnsiCodes, } from '@alcalzone/ansi-tokenize';
|
|
2
2
|
import { logForDebugging } from '../utils/debug.js';
|
|
3
3
|
import { cellAt, charInCellAt, diffEach, isEmptyCellAt, shiftRows, visibleCellAtIndex, } from './screen.js';
|
|
4
|
-
import { CURSOR_HOME, cursorUp, eraseToEndOfScreen, scrollDown as csiScrollDown, scrollUp as csiScrollUp, RESET_SCROLL_REGION, setScrollRegion, } from './termio/csi.js';
|
|
4
|
+
import { CURSOR_HOME, cursorUp, eraseToEndOfScreen, scrollDown as csiScrollDown, scrollUp as csiScrollUp, RESET_SCROLL_REGION, SGR_RESET, setScrollRegion, } from './termio/csi.js';
|
|
5
|
+
import { isJetBrainsIdeTerminal } from './terminal.js';
|
|
5
6
|
import { LINK_END, link as oscLink } from './termio/osc.js';
|
|
6
7
|
const CARRIAGE_RETURN = { type: 'carriageReturn' };
|
|
7
8
|
const NEWLINE = { type: 'stdout', content: '\n' };
|
|
@@ -425,9 +426,54 @@ export class LogUpdate {
|
|
|
425
426
|
: 'none';
|
|
426
427
|
logForDebugging(`Slow render: ${elapsed.toFixed(1)}ms, screen: ${next.screen.height}x${next.screen.width}, damage: ${damageInfo}, changes: ${screen.diff.length}`);
|
|
427
428
|
}
|
|
428
|
-
|
|
429
|
+
let result = scrollPatch.length > 0
|
|
429
430
|
? [...scrollPatch, ...screen.diff]
|
|
430
431
|
: screen.diff;
|
|
432
|
+
// JetBrains IDE terminals (JediTerm) in main-screen (inline) mode:
|
|
433
|
+
// append a visible-frame rewrite to the incremental diff.
|
|
434
|
+
//
|
|
435
|
+
// JediTerm's reworked block renderer (the default terminal in JetBrains
|
|
436
|
+
// IDEs 2025.2+) repaints a view row only when its model cells change,
|
|
437
|
+
// and it re-renders between writes. The incremental diff above writes
|
|
438
|
+
// only the cells that changed since the previous frame — so a row the
|
|
439
|
+
// block renderer misrendered mid-frame (partial reflow) is never
|
|
440
|
+
// touched again, and the garbage persists and accumulates as the
|
|
441
|
+
// transcript streams and scrolls: the "works in VS Code, slowly garbles
|
|
442
|
+
// in JetBrains" symptom. xterm.js-family terminals (VS Code) repaint
|
|
443
|
+
// the fixed grid on every write, so the same byte stream is clean
|
|
444
|
+
// there; the model-level state is identical on both (verified by
|
|
445
|
+
// replaying captured frame bytes through the IDE's bundled JediTerm
|
|
446
|
+
// emulator against xterm.js) — the divergence is purely the view
|
|
447
|
+
// layer's incremental repaint.
|
|
448
|
+
//
|
|
449
|
+
// The rewrite runs AFTER the incremental writes instead of replacing
|
|
450
|
+
// them: the growth path's CR+LF writes are what scroll scrolled-off
|
|
451
|
+
// rows into the terminal's native scrollback (inline mode's whole
|
|
452
|
+
// point). A pure full-repaint mode would never emit those scrolls and
|
|
453
|
+
// the transcript above the viewport would vanish. Appending a repaint
|
|
454
|
+
// anchored at the visible frame start (CR + CUU(visibleRows) + ED0 +
|
|
455
|
+
// frame tail) overwrites every application cell, forcing the block
|
|
456
|
+
// renderer to a correct full repaint without touching scrollback or
|
|
457
|
+
// shell output above a short frame. The appended slice lands its
|
|
458
|
+
// row-ending CR+LFs inside the viewport so nothing extra scrolls. The
|
|
459
|
+
// anchor prefixes SGR_RESET + link('') so the ED0's BCE fill uses the
|
|
460
|
+
// default background and any hyperlink the incremental writes left open
|
|
461
|
+
// is closed first. Frames that took a full-reset path already repaint
|
|
462
|
+
// everything and are skipped. A one-row viewport has no separate park
|
|
463
|
+
// row, so it keeps the original incremental output. Alt-screen is
|
|
464
|
+
// unaffected: its per-frame CSI H anchor + BSU/ESU atomic frames already
|
|
465
|
+
// keep the block renderer consistent.
|
|
466
|
+
if (!altScreen &&
|
|
467
|
+
isJetBrainsIdeTerminal() &&
|
|
468
|
+
prev.viewport.height > 1 &&
|
|
469
|
+
!result.some(patch => patch.type === 'clearTerminal')) {
|
|
470
|
+
logForDebugging(`JetBrains inline frame: append viewport repaint (height=${next.screen.height}, viewport=${prev.viewport.height})`);
|
|
471
|
+
result = [
|
|
472
|
+
...result,
|
|
473
|
+
...viewportRepaintPatches(prev, next, stylePool, true, 'frame-end'),
|
|
474
|
+
];
|
|
475
|
+
}
|
|
476
|
+
return result;
|
|
431
477
|
}
|
|
432
478
|
}
|
|
433
479
|
function transitionHyperlink(diff, current, target) {
|
|
@@ -507,6 +553,22 @@ function fullResetSequence_CAUSES_FLICKER(frame, reason, stylePool, debug) {
|
|
|
507
553
|
* bottom row, which no known writer produces.)
|
|
508
554
|
*/
|
|
509
555
|
function repaintViewportInPlace(prev, next, stylePool) {
|
|
556
|
+
return viewportRepaintPatches(prev, next, stylePool, false, 'viewport-bottom');
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Patches that rewrite the visible viewport in place, then paint the frame
|
|
560
|
+
* tail top-to-bottom. See repaintViewportInPlace for the layout rationale.
|
|
561
|
+
*
|
|
562
|
+
* When these patches are APPENDED to an incremental diff (rather than being
|
|
563
|
+
* the whole frame), the incremental writes may have left an SGR style and/or
|
|
564
|
+
* an OSC 8 hyperlink open; `resetPrefix` then prepends SGR_RESET + link('')
|
|
565
|
+
* so the ED0 BCE fill and the slice's style/hyperlink transitions start from
|
|
566
|
+
* a clean state. In that path the physical cursor is at the frame end, so a
|
|
567
|
+
* short frame must move up only its visible row count. Moving up V-1 rows
|
|
568
|
+
* would clamp at the terminal top, erase shell history above the application,
|
|
569
|
+
* and relocate the application to the top of the viewport.
|
|
570
|
+
*/
|
|
571
|
+
function viewportRepaintPatches(prev, next, stylePool, resetPrefix, origin) {
|
|
510
572
|
const viewportHeight = prev.viewport.height;
|
|
511
573
|
const height = next.screen.height;
|
|
512
574
|
// The bottom viewport row stays reserved for the cursor park; content
|
|
@@ -514,13 +576,18 @@ function repaintViewportInPlace(prev, next, stylePool) {
|
|
|
514
576
|
// steady state, where the park LF materializes one row below the frame).
|
|
515
577
|
const contentRows = Math.min(height, viewportHeight - 1);
|
|
516
578
|
const startY = height - contentRows;
|
|
517
|
-
//
|
|
518
|
-
//
|
|
519
|
-
//
|
|
520
|
-
//
|
|
521
|
-
//
|
|
522
|
-
//
|
|
523
|
-
|
|
579
|
+
// A standalone recovery starts at the parked physical bottom row and must
|
|
580
|
+
// reach the viewport top. An appended repaint starts at next.cursor (the
|
|
581
|
+
// frame end), so moving up contentRows reaches the actual visible-frame
|
|
582
|
+
// start for both short and overflowing frames without crossing into shell
|
|
583
|
+
// history. Erase down from there (BCE fill — the SGR reset guarantees the
|
|
584
|
+
// default background). The erase also blanks the park row, so no stale
|
|
585
|
+
// prompt/status pixels survive below short content.
|
|
586
|
+
const rowsToStart = origin === 'viewport-bottom' ? viewportHeight - 1 : contentRows;
|
|
587
|
+
const anchor = (resetPrefix ? SGR_RESET + LINK_END : '') +
|
|
588
|
+
'\r' +
|
|
589
|
+
cursorUp(rowsToStart) +
|
|
590
|
+
eraseToEndOfScreen();
|
|
524
591
|
const screen = new VirtualScreen({ x: 0, y: startY }, next.viewport.width);
|
|
525
592
|
renderFrameSlice(screen, next, startY, height, stylePool);
|
|
526
593
|
return [{ type: 'stdout', content: anchor }, ...screen.diff];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-keypress.d.ts","sourceRoot":"","sources":["../../../src/ink/parse-keypress.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAkJtE,gDAAgD;AAChD,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAA;AAEV;;;GAGG;AACH,MAAM,MAAM,gBAAgB;AAC1B,iEAAiE;AAC/D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAClD,oEAAoE;GAClE;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE;AACnC,+DAA+D;GAC7D;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE;AACnC,iEAAiE;GAC/D;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAC1C,sDAAsD;GACpD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AACtD,kFAAkF;GAChF;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAA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,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;2EAC2E;AAC3E,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAA"}
|
|
@@ -542,7 +542,10 @@ export function parseMultipleKeypresses(prevState, input = '') {
|
|
|
542
542
|
const isFlush = input === null;
|
|
543
543
|
const inputString = isFlush ? '' : inputToString(input);
|
|
544
544
|
// Get or create tokenizer
|
|
545
|
-
const tokenizer = prevState._tokenizer ?? createTokenizer({
|
|
545
|
+
const tokenizer = prevState._tokenizer ?? createTokenizer({
|
|
546
|
+
x10Mouse: true,
|
|
547
|
+
splitInputControls: true,
|
|
548
|
+
});
|
|
546
549
|
// Tokenize the input
|
|
547
550
|
const tokens = isFlush ? tokenizer.flush() : tokenizer.feed(inputString);
|
|
548
551
|
// Convert tokens to parsed keys, handling paste mode
|