dsh-tg-bridge 1.7.2 → 1.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/control.mjs +5 -2
- package/i18n.mjs +18 -12
- package/package.json +1 -1
package/control.mjs
CHANGED
|
@@ -470,7 +470,7 @@ export async function handleControl(ctx) {
|
|
|
470
470
|
const stats = sessionId ? sessionStats(sessionFile(join(DSH_HOME, 'sessions'), sessionId)) : null;
|
|
471
471
|
const title = sessionId ? state.titles?.[key] : '';
|
|
472
472
|
const lines = [t(lang, 'ctrl.status.head')];
|
|
473
|
-
lines.push(t(lang, 'ctrl.status.session', { id: sessionId
|
|
473
|
+
lines.push(t(lang, 'ctrl.status.session', { id: sessionId || t(lang, 'ctrl.session.none') }));
|
|
474
474
|
if (title) lines.push(t(lang, 'ctrl.status.title', { title }));
|
|
475
475
|
lines.push(t(lang, 'ctrl.status.profile', { name: activeProfile, route: `${head.provider}/${head.model}` }));
|
|
476
476
|
lines.push(t(lang, 'ctrl.status.thread', { name: ctx.threadId || t(lang, 'ctrl.status.threadDefault') }));
|
|
@@ -490,7 +490,10 @@ export async function handleControl(ctx) {
|
|
|
490
490
|
lines.push(t(lang, 'ctrl.status.lifetime', { n: stats.lifetimeTokens.toLocaleString('en-US') }));
|
|
491
491
|
}
|
|
492
492
|
if (stats?.turns) lines.push(t(lang, 'ctrl.status.steps', { n: stats.turns }));
|
|
493
|
-
lines.push(t(lang, 'ctrl.status.turns', {
|
|
493
|
+
lines.push(t(lang, 'ctrl.status.turns', {
|
|
494
|
+
n: active,
|
|
495
|
+
state: active > 0 ? t(lang, 'ctrl.status.running') : t(lang, 'ctrl.status.idle'),
|
|
496
|
+
}));
|
|
494
497
|
lines.push(t(lang, 'ctrl.status.notes', {
|
|
495
498
|
state: reasoningOf(state, config, key) ? t(lang, 'ctrl.status.on') : t(lang, 'ctrl.status.off'),
|
|
496
499
|
}));
|
package/i18n.mjs
CHANGED
|
@@ -81,7 +81,9 @@ const DICT = {
|
|
|
81
81
|
'ctrl.status.contextNoWindow': 'Context: {now} tokens (window unknown: set contextWindow in config.json)',
|
|
82
82
|
'ctrl.status.lifetime': 'Session tokens billed: {n}',
|
|
83
83
|
'ctrl.status.steps': 'Turns in the session: {n}',
|
|
84
|
-
'ctrl.status.turns': '
|
|
84
|
+
'ctrl.status.turns': 'Agent running: {state} ({n} turn(s))',
|
|
85
|
+
'ctrl.status.running': 'yes',
|
|
86
|
+
'ctrl.status.idle': 'no',
|
|
85
87
|
'ctrl.status.notes': 'Working notes (💭 in progress): {state}',
|
|
86
88
|
'ctrl.status.on': 'on',
|
|
87
89
|
'ctrl.status.off': 'off',
|
|
@@ -95,7 +97,7 @@ const DICT = {
|
|
|
95
97
|
'ctrl.model.switched': 'Model {name} → {model}{desktop}. Applies from the next turn.',
|
|
96
98
|
'ctrl.model.withDesktop': ', desktop → {model}',
|
|
97
99
|
'ctrl.sessions.empty': 'No sessions found.',
|
|
98
|
-
'ctrl.sessions.title': 'Recent sessions:',
|
|
100
|
+
'ctrl.sessions.title': '🗂 Recent sessions:',
|
|
99
101
|
'ctrl.sessions.untitled': '(untitled)',
|
|
100
102
|
'ctrl.resume.usage': 'Usage: /resume <id> (/sessions — list)',
|
|
101
103
|
'ctrl.resume.done': 'This topic will continue session {id}.',
|
|
@@ -127,7 +129,7 @@ const DICT = {
|
|
|
127
129
|
'ctrl.soul.title': 'Persona ({path}):\n\n{text}',
|
|
128
130
|
'ctrl.soul.empty': 'Persona is empty. Set it: /soul <text>\nFile: {path}',
|
|
129
131
|
'ctrl.soul.saved': 'Persona updated in ~/.dsh/AGENTS.md. Applies to new sessions.',
|
|
130
|
-
'ctrl.version.title': 'Versions',
|
|
132
|
+
'ctrl.version.title': '📦 Versions',
|
|
131
133
|
'ctrl.version.installed': 'Installed here: {v}',
|
|
132
134
|
'ctrl.version.latest': 'Latest on npm: {v}',
|
|
133
135
|
'ctrl.version.unknown': 'unknown',
|
|
@@ -169,7 +171,7 @@ const DICT = {
|
|
|
169
171
|
'ctrl.seed.failed': 'Could not seed the topic — check the bridge log.',
|
|
170
172
|
'ctrl.lang.state': 'Language: {lang}\nAvailable: {list}\nSwitch: /lang en',
|
|
171
173
|
'ctrl.lang.auto': 'auto',
|
|
172
|
-
'ctrl.doctor.title': 'Diagnostics',
|
|
174
|
+
'ctrl.doctor.title': '🩺 Diagnostics',
|
|
173
175
|
'ctrl.doctor.bridgePid': 'Bridge pid',
|
|
174
176
|
'ctrl.doctor.noPidFile': 'no pid file',
|
|
175
177
|
'ctrl.doctor.bridgeAlive': 'Bridge alive',
|
|
@@ -349,7 +351,9 @@ const DICT = {
|
|
|
349
351
|
'ctrl.status.contextNoWindow': 'Контекст: {now} токенов (окно неизвестно: укажи contextWindow в config.json)',
|
|
350
352
|
'ctrl.status.lifetime': 'Токенов за сессию: {n}',
|
|
351
353
|
'ctrl.status.steps': 'Ходов в сессии: {n}',
|
|
352
|
-
'ctrl.status.turns': '
|
|
354
|
+
'ctrl.status.turns': 'Агент работает: {state} ({n} ход(ов))',
|
|
355
|
+
'ctrl.status.running': 'да',
|
|
356
|
+
'ctrl.status.idle': 'нет',
|
|
353
357
|
'ctrl.status.notes': 'Заметки по ходу (💭 в прогрессе): {state}',
|
|
354
358
|
'ctrl.status.on': 'включены',
|
|
355
359
|
'ctrl.status.off': 'выключены',
|
|
@@ -363,7 +367,7 @@ const DICT = {
|
|
|
363
367
|
'ctrl.model.switched': 'Модель {name} → {model}{desktop}. Действует со следующего хода.',
|
|
364
368
|
'ctrl.model.withDesktop': ', desktop → {model}',
|
|
365
369
|
'ctrl.sessions.empty': 'Сессий не нашёл.',
|
|
366
|
-
'ctrl.sessions.title': 'Последние сессии:',
|
|
370
|
+
'ctrl.sessions.title': '🗂 Последние сессии:',
|
|
367
371
|
'ctrl.sessions.untitled': '(без названия)',
|
|
368
372
|
'ctrl.resume.usage': 'Использование: /resume <id> (/sessions — список)',
|
|
369
373
|
'ctrl.resume.done': 'Эта ветка продолжит сессию {id}.',
|
|
@@ -395,7 +399,7 @@ const DICT = {
|
|
|
395
399
|
'ctrl.soul.title': 'Персона ({path}):\n\n{text}',
|
|
396
400
|
'ctrl.soul.empty': 'Персона пуста. Задать: /soul <text>\nФайл: {path}',
|
|
397
401
|
'ctrl.soul.saved': 'Персона обновлена в ~/.dsh/AGENTS.md. Применяется в новых сессиях.',
|
|
398
|
-
'ctrl.version.title': 'Версии',
|
|
402
|
+
'ctrl.version.title': '📦 Версии',
|
|
399
403
|
'ctrl.version.installed': 'Установлено здесь: {v}',
|
|
400
404
|
'ctrl.version.latest': 'Последняя на npm: {v}',
|
|
401
405
|
'ctrl.version.unknown': 'неизвестно',
|
|
@@ -437,7 +441,7 @@ const DICT = {
|
|
|
437
441
|
'ctrl.seed.failed': 'Не смог засеять тему — смотри лог моста.',
|
|
438
442
|
'ctrl.lang.state': 'Язык: {lang}\nДоступно: {list}\nПереключить: /lang en',
|
|
439
443
|
'ctrl.lang.auto': 'auto',
|
|
440
|
-
'ctrl.doctor.title': 'Диагностика',
|
|
444
|
+
'ctrl.doctor.title': '🩺 Диагностика',
|
|
441
445
|
'ctrl.doctor.bridgePid': 'Мост pid',
|
|
442
446
|
'ctrl.doctor.noPidFile': 'нет файла',
|
|
443
447
|
'ctrl.doctor.bridgeAlive': 'Мост жив',
|
|
@@ -617,7 +621,9 @@ const DICT = {
|
|
|
617
621
|
'ctrl.status.contextNoWindow': '上下文:{now} 个 token(窗口未知:在 config.json 里设置 contextWindow)',
|
|
618
622
|
'ctrl.status.lifetime': '本会话累计 token:{n}',
|
|
619
623
|
'ctrl.status.steps': '会话中的轮次:{n}',
|
|
620
|
-
'ctrl.status.turns': '
|
|
624
|
+
'ctrl.status.turns': '代理运行中:{state}({n} 个任务)',
|
|
625
|
+
'ctrl.status.running': '是',
|
|
626
|
+
'ctrl.status.idle': '否',
|
|
621
627
|
'ctrl.status.notes': '工作记录(进度中的 💭):{state}',
|
|
622
628
|
'ctrl.status.on': '开',
|
|
623
629
|
'ctrl.status.off': '关',
|
|
@@ -631,7 +637,7 @@ const DICT = {
|
|
|
631
637
|
'ctrl.model.switched': '模型 {name} → {model}{desktop}。下一轮生效。',
|
|
632
638
|
'ctrl.model.withDesktop': ',desktop → {model}',
|
|
633
639
|
'ctrl.sessions.empty': '没有找到会话。',
|
|
634
|
-
'ctrl.sessions.title': '最近的会话:',
|
|
640
|
+
'ctrl.sessions.title': '🗂 最近的会话:',
|
|
635
641
|
'ctrl.sessions.untitled': '(无标题)',
|
|
636
642
|
'ctrl.resume.usage': '用法:/resume <id> (/sessions 查看列表)',
|
|
637
643
|
'ctrl.resume.done': '本话题将接着使用会话 {id}。',
|
|
@@ -663,7 +669,7 @@ const DICT = {
|
|
|
663
669
|
'ctrl.soul.title': '人格({path}):\n\n{text}',
|
|
664
670
|
'ctrl.soul.empty': '人格为空。设置:/soul <文本>\n文件:{path}',
|
|
665
671
|
'ctrl.soul.saved': '人格已更新到 ~/.dsh/AGENTS.md。对新会话生效。',
|
|
666
|
-
'ctrl.version.title': '版本',
|
|
672
|
+
'ctrl.version.title': '📦 版本',
|
|
667
673
|
'ctrl.version.installed': '本地版本:{v}',
|
|
668
674
|
'ctrl.version.latest': 'npm 最新:{v}',
|
|
669
675
|
'ctrl.version.unknown': '未知',
|
|
@@ -705,7 +711,7 @@ const DICT = {
|
|
|
705
711
|
'ctrl.seed.failed': '无法初始化话题 —— 请查看桥的日志。',
|
|
706
712
|
'ctrl.lang.state': '语言:{lang}\n可用:{list}\n切换:/lang en',
|
|
707
713
|
'ctrl.lang.auto': 'auto',
|
|
708
|
-
'ctrl.doctor.title': '诊断',
|
|
714
|
+
'ctrl.doctor.title': '🩺 诊断',
|
|
709
715
|
'ctrl.doctor.bridgePid': '桥 pid',
|
|
710
716
|
'ctrl.doctor.noPidFile': '没有文件',
|
|
711
717
|
'ctrl.doctor.bridgeAlive': '桥存活',
|
package/package.json
CHANGED