The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): Desktop slash-command notices go through the translation catalog
Teknium479fc6392402
diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.test.tsx b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.test.tsxindex f47def41f1d..503ec922962 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.test.tsx@@ -1,6 +1,9 @@import { act, cleanup, renderHook } from '@testing-library/react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { en } from '@/i18n/en'+import { fr } from '@/i18n/fr'+import { setRuntimeI18nLocale } from '@/i18n/runtime'import { toChatMessages } from '@/lib/chat-messages'import { resolveDesktopCommand } from '@/lib/desktop-slash-commands'import { $connection } from '@/store/session'@@ -31,6 +34,8 @@ vi.mock('@/store/gateway', async importOriginal => ({requestGatewayForAgent: vi.fn()}))+const copy = en.promptNotices.desktopCommands+type Responder = (method: string, params?: Record<string, unknown>) => unknownfunction gateway(respond: Responder) {@@ -191,7 +196,7 @@ describe('/rollback', () => {expect(text).toContain('KEPT ANSWER')expect(text).not.toContain('REMOVED QUESTION')expect(text).not.toContain('REMOVED ANSWER')- expect(text).toContain('Rewound 2 message(s)')+ expect(text).toContain(copy.rewound('2'))})})@@ -249,7 +254,7 @@ describe('/config', () => {expect(text).toContain('skin: mono')// An empty section (the live projection always carries `voice: {}`) prints no dangling header.expect(text).not.toContain('voice:')- expect(text).toContain('Settings')+ expect(text).toContain(copy.configFooter)})it('renders the canonical projection in full', async () => {@@ -413,7 +418,7 @@ describe('/save writes on the Electron side', () => {expect(saveTextFileAs).toHaveBeenCalledWith(expect.objectContaining({ content: '# transcript', defaultPath: 'notes.md' }))- expect(renderedText(handle)).toContain('/home/u/Documents/notes.md')+ expect(renderedText(handle)).toContain(copy.savedTo('/home/u/Documents/notes.md'))})it('defaults to json and the owner filename, and reports a cancelled dialog', async () => {@@ -431,7 +436,7 @@ describe('/save writes on the Electron side', () => {expect(callsOf(requestGateway, 'session.export')).toEqual([{ session_id: RUNTIME_SESSION_ID, format: 'json' }])expect(saveTextFileAs).toHaveBeenCalledWith(expect.objectContaining({ defaultPath: 'hermes_session_s1.json' }))- expect(renderedText(handle)).toMatch(/not saved/i)+ expect(renderedText(handle)).toContain(copy.saveCancelled)})it('falls back to the legacy host save only for a plain /save, and says where it wrote', async () => {@@ -453,11 +458,11 @@ describe('/save writes on the Electron side', () => {await handle.submitText('/save json mine.json')expect(callsOf(requestGateway, 'session.save')).toEqual([])expect(renderedText(handle)).not.toContain('/gateway/saved/raw.json')- expect(renderedText(handle)).toMatch(/not saved/i)+ expect(renderedText(handle)).toContain(copy.saveLegacyRefused)await handle.submitText('/save')expect(callsOf(requestGateway, 'session.save')).toEqual([{ session_id: RUNTIME_SESSION_ID }])- expect(renderedText(handle)).toContain('Saved on the gateway host: /gateway/saved/raw.json')+ expect(renderedText(handle)).toContain(copy.savedOnHost('/gateway/saved/raw.json'))})it('rejects an unknown format without a gateway call', async () => {@@ -467,7 +472,7 @@ describe('/save writes on the Electron side', () => {await handle.submitText('/save pdf')expect(callsOf(requestGateway, 'session.export')).toEqual([])- expect(renderedText(handle)).toMatch(/usage: \/save/i)+ expect(renderedText(handle)).toContain(copy.saveUsage)})})@@ -485,7 +490,7 @@ describe('/timestamps, /palette, /worktree, /snapshot', () => {await handle.submitText('/timestamps status')expect(requestGateway.mock.calls.filter(([m]) => m === 'slash.exec' || m === 'command.dispatch')).toEqual([])- expect(renderedText(handle)).toMatch(/timestamps: off/i)+ expect(renderedText(handle)).toContain(copy.timestampsOff)})it('/timestamps is a window override that survives an ordinary config refresh', async () => {@@ -534,7 +539,30 @@ describe('/export and /import (profile archives)', () => {await handle.submitText('/import')expect(callsOf(requestGateway, 'slash.exec')).toEqual([])- expect(renderedText(handle)).toMatch(/hermes profile export/)- expect(renderedText(handle)).toMatch(/hermes profile import/)+ expect(renderedText(handle)).toContain(copy.exportRemote)+ expect(renderedText(handle)).toContain(copy.importRemote)+ })+})++describe('desktop command notices follow the app language', () => {+ afterEach(() => setRuntimeI18nLocale('en'))++ it('renders /timestamps, /rollback usage and /history in the active locale', async () => {+ setRuntimeI18nLocale('fr')+ const { $displayTimestamps } = await import('@/store/display-timestamps')+ $displayTimestamps.set(false)+ const handle = await mount(gateway(method => (method === 'session.resume' ? { messages: [] } : undefined)))++ await handle.submitText('/timestamps status')+ await handle.submitText('/rollback diff')+ await handle.submitText('/history')++ const text = renderedText(handle)+ const fr_ = fr.promptNotices.desktopCommands+ expect(fr_.timestampsOff).not.toBe(copy.timestampsOff)+ expect(text).toContain(fr_.timestampsOff)+ expect(text).toContain(fr_.rollbackUsage)+ expect(text).toContain(fr_.historyEmpty)+ expect(text).not.toContain(copy.timestampsOff)})})diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.tsindex 3e72bc228e9..866183fe20f 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.ts+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-desktop-commands.ts@@ -1,3 +1,4 @@+import { runtimeTranslations } from '@/i18n/runtime'import { chatMessageText, toChatMessages } from '@/lib/chat-messages'import { isMissingRpcMethod } from '@/lib/gateway-rpc'import { openCommandPalette } from '@/store/command-palette'@@ -47,9 +48,9 @@ interface RestoreResult {success?: boolean}-const errorText = (err: unknown) => `error: ${err instanceof Error ? err.message : String(err)}`+const copy = () => runtimeTranslations().promptNotices.desktopCommands-const SAVE_USAGE = 'usage: /save [json|md|html] [filename] [redact]'+const errorText = (err: unknown) => copy().error(err instanceof Error ? err.message : String(err))const SAVE_FORMATS: Record<string, 'html' | 'json' | 'md'> = {html: 'html',@@ -87,27 +88,28 @@ const isRemoteGateway = () => {return Boolean(mode && mode !== 'local')}-const ROLLBACK_USAGE = 'usage: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]'const HISTORY_PREVIEW = 400function formatCheckpoints(result: { checkpoints?: CheckpointRow[]; enabled?: boolean } | null): string {+ const t = copy()+if (result?.enabled === false) {- return 'Checkpoints are not enabled for this session (set checkpoints.enabled in config.yaml).'+ return t.checkpointsDisabled}const rows = Array.isArray(result?.checkpoints) ? result.checkpoints : []if (!rows.length) {- return 'No checkpoints yet for this working directory.'+ return t.checkpointsEmpty}return [- 'Checkpoints (newest first):',+ t.checkpointsHeader,...rows.map((row, index) =>`${index + 1}. ${String(row.hash ?? '').slice(0, 8)} ${row.timestamp ?? ''} ${row.message ?? ''}`.trimEnd()),'',- 'Restore with /rollback <n> [file] (add --all to also overwrite your own edits); preview with /rollback diff <n>.'+ t.checkpointsHint].join('\n')}@@ -137,18 +139,20 @@ export function rollbackRequest(}function formatRestore(result: RestoreResult | null): string {+ const t = copy()+if (!result?.success) {- return `Rollback failed: ${result?.error || 'unknown error'}`+ return t.rollbackFailed(result?.error || t.unknownError)}- const lines = [`Restored checkpoint ${result.restored_to ?? ''}.`.replace(' .', '.')]+ const lines = [t.restored(result.restored_to ?? '')]if (result.reason) {lines.push(result.reason)}if (result.history_removed) {- lines.push(`Rewound ${result.history_removed} message(s) from this conversation.`)+ lines.push(t.rewound(String(result.history_removed)))}return lines.join('\n')@@ -170,26 +174,29 @@ interface ProcessRow {}function formatAgents(subagents: SubagentRow[], processes: ProcessRow[]): string {+ const t = copy()const running = processes.filter(row => !row.status || row.status === 'running')if (!subagents.length && !running.length) {- return 'No active subagents or background processes in this chat.'+ return t.agentsEmpty}const lines: string[] = []if (subagents.length) {- lines.push(`Subagents (${subagents.length}):`)+ lines.push(t.subagentsHeader(String(subagents.length)))for (const row of subagents) {const indent = ' '.repeat(Math.max(0, Number(row.depth ?? 1) - 1))- const tools = row.tool_count ? ` · ${row.tool_count} tool calls` : ''- lines.push(`${indent}- [${row.status ?? 'running'}] ${row.goal || row.subagent_id || 'subagent'}${tools}`)+ const tools = row.tool_count ? ` · ${t.toolCalls(String(row.tool_count))}` : ''+ lines.push(+ `${indent}- [${row.status ?? t.statusRunning}] ${row.goal || row.subagent_id || t.subagentFallback}${tools}`+ )}}if (running.length) {- lines.push(`Background processes (${running.length}):`)+ lines.push(t.processesHeader(String(running.length)))for (const row of running) {lines.push(`- ${row.session_id ?? ''} ${row.command ?? ''}`.trimEnd())@@ -270,6 +277,8 @@ function yamlLines(value: unknown, indent = '', path = ''): string[] {/** `/history` text from the same public projection the transcript renders (archived turns shown,* hidden/model-only rows skipped, display_content preferred). */export function formatHistory(rows: SessionMessage[]): string {+ const t = copy()+const turns = toChatMessages(rows).flatMap(message => {const text = chatMessageText(message).trim()@@ -279,10 +288,10 @@ export function formatHistory(rows: SessionMessage[]): string {const clipped = text.length > HISTORY_PREVIEW ? `${text.slice(0, HISTORY_PREVIEW)}…` : text- return [`${message.role === 'user' ? 'You' : 'Hermes'}: ${clipped}`]+ return [`${message.role === 'user' ? t.historyYou : t.historyHermes}: ${clipped}`]})- return turns.length ? [`Conversation history (${turns.length} messages):`, ...turns].join('\n') : 'No messages yet.'+ return turns.length ? [t.historyHeader(String(turns.length)), ...turns].join('\n') : t.historyEmpty}export function desktopReadCommandHandlers<C extends { arg: string }>(env: DesktopReadCommandEnv<C>) {@@ -299,7 +308,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktconst request = rollbackRequest(ctx.arg)if (!request) {- return out.render(ROLLBACK_USAGE)+ return out.render(copy().rollbackUsage)}try {@@ -312,7 +321,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktif (request.method === 'rollback.diff') {const diff = result as { diff?: string; stat?: string } | null- return out.render([diff?.stat, diff?.diff].filter(Boolean).join('\n') || 'No changes since that checkpoint.')+ return out.render([diff?.stat, diff?.diff].filter(Boolean).join('\n') || copy().noDiff)}const restore = result as RestoreResult | null@@ -331,7 +340,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: DesktupdateSessionState(out.sessionId, state => ({ ...state, messages }), out.storedSessionId)}} catch {- text += '\nReopen this chat to see the rewound conversation.'+ text += `\n${copy().reopenForRewind}`}}@@ -382,12 +391,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Deskt: []out.render(- [- 'Configuration (display, approvals, paste and voice settings; everything else is not shown):',- ...(body.length ? body : ['(defaults)']),- '',- 'Change settings in Settings, or edit config.yaml with `hermes config edit` on the gateway host.'- ].join('\n')+ [copy().configHeader, ...(body.length ? body : [copy().configDefaults]), '', copy().configFooter].join('\n'))} catch (err) {out.render(errorText(err))@@ -403,7 +407,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktconst request = saveRequest(ctx.arg)if (!request) {- return out.render(SAVE_USAGE)+ return out.render(copy().saveUsage)}let file: { content?: string; filename?: string; format?: string } | null@@ -422,15 +426,13 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Deskt// An older gateway without session.export: its session.save writes default-named, unredacted// JSON on the gateway host, so only a plain /save may fall back to it.if (request.redact || request.format !== 'json' || request.filename) {- return out.render(- 'Not saved: this gateway cannot export a redacted, named or non-JSON copy. Update the gateway, or run /save with no options to write raw JSON on the gateway host.'- )+ return out.render(copy().saveLegacyRefused)}try {const saved = await requestGateway<{ file?: string }>('session.save', { session_id: out.sessionId })- return out.render(`Saved on the gateway host: ${saved?.file ?? '(unknown path)'}`)+ return out.render(copy().savedOnHost(saved?.file ?? copy().unknownPath))} catch (fallbackErr) {return out.render(errorText(fallbackErr))}@@ -439,7 +441,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktconst save = window.hermesDesktop?.saveTextFileAsif (typeof file?.content !== 'string' || !save) {- return out.render('error: this desktop build cannot save files')+ return out.render(copy().saveUnsupported)}try {@@ -447,10 +449,10 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktcontent: file.content,defaultPath: request.filename || file.filename,filters: [SAVE_FILTERS[request.format]],- title: 'Save conversation'+ title: copy().saveDialogTitle})- out.render(result?.saved && result.path ? `Saved conversation to ${result.path}` : 'Not saved (cancelled).')+ out.render(result?.saved && result.path ? copy().savedTo(result.path) : copy().saveCancelled)} catch (err) {out.render(errorText(err))}@@ -459,9 +461,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktif (isRemoteGateway()) {const out = await env.withSlashOutput(ctx)- return out?.render(- '/export packages a profile from the gateway host, which is not this machine. Run `hermes profile export` on that host.'- )+ return out?.render(copy().exportRemote)}await runExportProfileFlow(ctx.arg.trim().split(/\s+/)[0] || undefined)@@ -470,9 +470,7 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktif (isRemoteGateway()) {const out = await env.withSlashOutput(ctx)- return out?.render(- '/import installs a profile on the gateway host, which is not this machine. Run `hermes profile import <archive>` on that host.'- )+ return out?.render(copy().importRemote)}await runImportProfileFlow()@@ -485,16 +483,14 @@ export function desktopReadCommandHandlers<C extends { arg: string }>(env: Desktif (word && !['on', 'off', 'toggle', 'status'].includes(word)) {const out = await env.withSlashOutput(ctx)- return out?.render('usage: /timestamps [on|off|status]')+ return out?.render(copy().timestampsUsage)}setDisplayTimestampsWindowOverride(next)if (word === 'status') {const out = await env.withSlashOutput(ctx)- out?.render(- `Timestamps: ${next ? 'on' : 'off'} (this window; set display.timestamps in config.yaml to keep it)`- )+ out?.render(next ? copy().timestampsOn : copy().timestampsOff)}},palette: async () => {diff --git a/apps/desktop/src/i18n/ar_boot.ts b/apps/desktop/src/i18n/ar_boot.tsindex edc47f750fb..beb1785ac86 100644--- a/apps/desktop/src/i18n/ar_boot.ts+++ b/apps/desktop/src/i18n/ar_boot.ts@@ -1,3 +1,4 @@+import { arDesktopCommands } from './ar_desktop_commands'import { arSessionCommands } from './ar_session_commands'import type { TranslationOverrides } from './define-locale'@@ -83,7 +84,8 @@ export const arBoot = {mcpReloadUnavailable: servers => `تعذّر الاتصال: ${servers}`,compactedTurnUnavailable: 'تم تلخيص هذه الرسالة عند ضغط المحادثة، لذا لم يعد بالإمكان استعادتها أو تحريرها.',staleTurnUnavailable: 'لم تعد هذه الرسالة موجودة في سجل هذه المحادثة.',- sessionCommands: arSessionCommands+ sessionCommands: arSessionCommands,+ desktopCommands: arDesktopCommands},updates: {discontinuedTitle: 'لم يعد إصدار Hermes هذا مدعومًا',@@ -351,5 +353,12 @@ export const arBoot = {}} satisfies Pick<TranslationOverrides,- 'boot' | 'remoteDisplayBanner' | 'butterbar' | 'promptNotices' | 'keepAwakeOffer' | 'updates' | 'install' | 'onboarding'+ | 'boot'+ | 'remoteDisplayBanner'+ | 'butterbar'+ | 'promptNotices'+ | 'keepAwakeOffer'+ | 'updates'+ | 'install'+ | 'onboarding'>diff --git a/apps/desktop/src/i18n/ar_desktop_commands.ts b/apps/desktop/src/i18n/ar_desktop_commands.tsnew file mode 100644index 00000000000..90f43a11935--- /dev/null+++ b/apps/desktop/src/i18n/ar_desktop_commands.ts@@ -0,0 +1,46 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const arDesktopCommands = {+ error: (message: string) => `خطأ: ${message}`,+ rollbackUsage: 'الاستخدام: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled: 'نقاط الاستعادة غير مفعّلة لهذه الجلسة (اضبط checkpoints.enabled في config.yaml).',+ checkpointsEmpty: 'لا توجد نقاط استعادة بعد لمجلد العمل هذا.',+ checkpointsHeader: 'نقاط الاستعادة (الأحدث أولًا):',+ checkpointsHint:+ 'استعد باستخدام /rollback <n> [file] (أضف --all للكتابة فوق تعديلاتك أيضًا)؛ واعرض المعاينة باستخدام /rollback diff <n>.',+ noDiff: 'لا توجد تغييرات منذ نقطة الاستعادة هذه.',+ rollbackFailed: (error: string) => `فشلت الاستعادة: ${error}`,+ unknownError: 'خطأ غير معروف',+ restored: (hash: string) => (hash ? `تمت استعادة نقطة الاستعادة ${hash}.` : 'تمت استعادة نقطة الاستعادة.'),+ rewound: (count: string) => `تم إرجاع ${count} رسالة من هذه المحادثة.`,+ reopenForRewind: 'أعد فتح هذه المحادثة لرؤية المحادثة بعد الإرجاع.',+ agentsEmpty: 'لا توجد وكلاء فرعيون نشطون أو عمليات في الخلفية في هذه المحادثة.',+ subagentsHeader: (count: string) => `الوكلاء الفرعيون (${count}):`,+ subagentFallback: 'وكيل فرعي',+ statusRunning: 'قيد التشغيل',+ toolCalls: (count: string) => `${count} استدعاءات أدوات`,+ processesHeader: (count: string) => `عمليات في الخلفية (${count}):`,+ configHeader: 'الإعدادات (العرض والموافقات واللصق والصوت فقط؛ لا يُعرض أي شيء آخر):',+ configDefaults: '(القيم الافتراضية)',+ configFooter: 'غيّر الإعدادات من الإعدادات، أو حرّر config.yaml باستخدام `hermes config edit` على مضيف البوابة.',+ historyHeader: (count: string) => `سجل المحادثة (${count} رسالة):`,+ historyEmpty: 'لا توجد رسائل بعد.',+ historyYou: 'أنت',+ historyHermes: 'Hermes',+ saveUsage: 'الاستخدام: /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ 'لم يتم الحفظ: لا تستطيع هذه البوابة تصدير نسخة منقّحة أو باسم محدد أو بغير JSON. حدّث البوابة، أو شغّل /save دون خيارات لكتابة JSON خام على مضيف البوابة.',+ savedOnHost: (path: string) => `تم الحفظ على مضيف البوابة: ${path}`,+ unknownPath: '(مسار غير معروف)',+ saveUnsupported: 'خطأ: لا يستطيع إصدار سطح المكتب هذا حفظ الملفات',+ saveDialogTitle: 'حفظ المحادثة',+ savedTo: (path: string) => `تم حفظ المحادثة في ${path}`,+ saveCancelled: 'لم يتم الحفظ (أُلغي).',+ exportRemote:+ 'يحزم /export ملفًا شخصيًا من مضيف البوابة، وهو ليس هذا الجهاز. شغّل `hermes profile export` على ذلك المضيف.',+ importRemote:+ 'يثبّت /import ملفًا شخصيًا على مضيف البوابة، وهو ليس هذا الجهاز. شغّل `hermes profile import <archive>` على ذلك المضيف.',+ timestampsUsage: 'الاستخدام: /timestamps [on|off|status]',+ timestampsOn: 'الطوابع الزمنية: مفعّلة (هذه النافذة فقط؛ اضبط display.timestamps في config.yaml للاحتفاظ بها)',+ timestampsOff: 'الطوابع الزمنية: معطّلة (هذه النافذة فقط؛ اضبط display.timestamps في config.yaml للاحتفاظ بها)'+}diff --git a/apps/desktop/src/i18n/de_desktop_commands.ts b/apps/desktop/src/i18n/de_desktop_commands.tsnew file mode 100644index 00000000000..da6b30e7b45--- /dev/null+++ b/apps/desktop/src/i18n/de_desktop_commands.ts@@ -0,0 +1,48 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const deDesktopCommands = {+ error: (message: string) => `Fehler: ${message}`,+ rollbackUsage: 'Verwendung: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled:+ 'Checkpoints sind für diese Sitzung nicht aktiviert (checkpoints.enabled in config.yaml setzen).',+ checkpointsEmpty: 'Für dieses Arbeitsverzeichnis gibt es noch keine Checkpoints.',+ checkpointsHeader: 'Checkpoints (neueste zuerst):',+ checkpointsHint:+ 'Wiederherstellen mit /rollback <n> [file] (mit --all werden auch eigene Änderungen überschrieben); Vorschau mit /rollback diff <n>.',+ noDiff: 'Seit diesem Checkpoint gibt es keine Änderungen.',+ rollbackFailed: (error: string) => `Rollback fehlgeschlagen: ${error}`,+ unknownError: 'unbekannter Fehler',+ restored: (hash: string) => (hash ? `Checkpoint ${hash} wiederhergestellt.` : 'Checkpoint wiederhergestellt.'),+ rewound: (count: string) => `${count} Nachricht(en) aus dieser Unterhaltung zurückgenommen.`,+ reopenForRewind: 'Öffne diesen Chat erneut, um die zurückgesetzte Unterhaltung zu sehen.',+ agentsEmpty: 'Keine aktiven Subagents oder Hintergrundprozesse in diesem Chat.',+ subagentsHeader: (count: string) => `Subagents (${count}):`,+ subagentFallback: 'Subagent',+ statusRunning: 'läuft',+ toolCalls: (count: string) => `${count} Tool-Aufrufe`,+ processesHeader: (count: string) => `Hintergrundprozesse (${count}):`,+ configHeader: 'Konfiguration (Anzeige, Freigaben, Einfügen und Sprache; alles andere wird nicht angezeigt):',+ configDefaults: '(Standardwerte)',+ configFooter:+ 'Ändere Einstellungen unter Einstellungen oder bearbeite config.yaml mit `hermes config edit` auf dem Gateway-Host.',+ historyHeader: (count: string) => `Gesprächsverlauf (${count} Nachrichten):`,+ historyEmpty: 'Noch keine Nachrichten.',+ historyYou: 'Du',+ historyHermes: 'Hermes',+ saveUsage: 'Verwendung: /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ 'Nicht gespeichert: Dieses Gateway kann keine geschwärzte, benannte oder Nicht-JSON-Kopie exportieren. Aktualisiere das Gateway oder führe /save ohne Optionen aus, um rohes JSON auf dem Gateway-Host zu schreiben.',+ savedOnHost: (path: string) => `Auf dem Gateway-Host gespeichert: ${path}`,+ unknownPath: '(unbekannter Pfad)',+ saveUnsupported: 'Fehler: Diese Desktop-Version kann keine Dateien speichern',+ saveDialogTitle: 'Unterhaltung speichern',+ savedTo: (path: string) => `Unterhaltung gespeichert unter ${path}`,+ saveCancelled: 'Nicht gespeichert (abgebrochen).',+ exportRemote:+ '/export packt ein Profil auf dem Gateway-Host, und das ist nicht dieser Rechner. Führe `hermes profile export` auf diesem Host aus.',+ importRemote:+ '/import installiert ein Profil auf dem Gateway-Host, und das ist nicht dieser Rechner. Führe `hermes profile import <archive>` auf diesem Host aus.',+ timestampsUsage: 'Verwendung: /timestamps [on|off|status]',+ timestampsOn: 'Zeitstempel: an (dieses Fenster; display.timestamps in config.yaml setzen, um es zu behalten)',+ timestampsOff: 'Zeitstempel: aus (dieses Fenster; display.timestamps in config.yaml setzen, um es zu behalten)'+}diff --git a/apps/desktop/src/i18n/de_notices.ts b/apps/desktop/src/i18n/de_notices.tsindex 15e6e325c1a..046300bfe11 100644--- a/apps/desktop/src/i18n/de_notices.ts+++ b/apps/desktop/src/i18n/de_notices.ts@@ -1,3 +1,4 @@+import { deDesktopCommands } from './de_desktop_commands'import { deSessionCommands } from './de_session_commands'import type { TranslationOverrides } from './define-locale'@@ -27,7 +28,8 @@ export const deNotices = {compactedTurnUnavailable:'Diese Nachricht wurde beim Komprimieren des Chats zusammengefasst und kann nicht mehr wiederhergestellt oder bearbeitet werden.',staleTurnUnavailable: 'Diese Nachricht ist nicht mehr im Verlauf dieses Chats.',- sessionCommands: deSessionCommands+ sessionCommands: deSessionCommands,+ desktopCommands: deDesktopCommands},keepAwakeOffer: {title: 'Ihr Computer ist eingeschlafen, während Hermes gearbeitet hat',diff --git a/apps/desktop/src/i18n/en_desktop_commands.ts b/apps/desktop/src/i18n/en_desktop_commands.tsnew file mode 100644index 00000000000..d009e07873c--- /dev/null+++ b/apps/desktop/src/i18n/en_desktop_commands.ts@@ -0,0 +1,47 @@+import type { DesktopCommandNotices } from './types_desktop_commands'++// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines.+export const enDesktopCommands: DesktopCommandNotices = {+ error: message => `error: ${message}`,+ rollbackUsage: 'usage: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled: 'Checkpoints are not enabled for this session (set checkpoints.enabled in config.yaml).',+ checkpointsEmpty: 'No checkpoints yet for this working directory.',+ checkpointsHeader: 'Checkpoints (newest first):',+ checkpointsHint:+ 'Restore with /rollback <n> [file] (add --all to also overwrite your own edits); preview with /rollback diff <n>.',+ noDiff: 'No changes since that checkpoint.',+ rollbackFailed: error => `Rollback failed: ${error}`,+ unknownError: 'unknown error',+ restored: hash => (hash ? `Restored checkpoint ${hash}.` : 'Restored checkpoint.'),+ rewound: count => `Rewound ${count} message(s) from this conversation.`,+ reopenForRewind: 'Reopen this chat to see the rewound conversation.',+ agentsEmpty: 'No active subagents or background processes in this chat.',+ subagentsHeader: count => `Subagents (${count}):`,+ subagentFallback: 'subagent',+ statusRunning: 'running',+ toolCalls: count => `${count} tool calls`,+ processesHeader: count => `Background processes (${count}):`,+ configHeader: 'Configuration (display, approvals, paste and voice settings; everything else is not shown):',+ configDefaults: '(defaults)',+ configFooter: 'Change settings in Settings, or edit config.yaml with `hermes config edit` on the gateway host.',+ historyHeader: count => `Conversation history (${count} messages):`,+ historyEmpty: 'No messages yet.',+ historyYou: 'You',+ historyHermes: 'Hermes',+ saveUsage: 'usage: /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ 'Not saved: this gateway cannot export a redacted, named or non-JSON copy. Update the gateway, or run /save with no options to write raw JSON on the gateway host.',+ savedOnHost: path => `Saved on the gateway host: ${path}`,+ unknownPath: '(unknown path)',+ saveUnsupported: 'error: this desktop build cannot save files',+ saveDialogTitle: 'Save conversation',+ savedTo: path => `Saved conversation to ${path}`,+ saveCancelled: 'Not saved (cancelled).',+ exportRemote:+ '/export packages a profile from the gateway host, which is not this machine. Run `hermes profile export` on that host.',+ importRemote:+ '/import installs a profile on the gateway host, which is not this machine. Run `hermes profile import <archive>` on that host.',+ timestampsUsage: 'usage: /timestamps [on|off|status]',+ timestampsOn: 'Timestamps: on (this window; set display.timestamps in config.yaml to keep it)',+ timestampsOff: 'Timestamps: off (this window; set display.timestamps in config.yaml to keep it)'+}diff --git a/apps/desktop/src/i18n/en_notices.ts b/apps/desktop/src/i18n/en_notices.tsindex 5dca1ecd381..bdb3e7922c2 100644--- a/apps/desktop/src/i18n/en_notices.ts+++ b/apps/desktop/src/i18n/en_notices.ts@@ -1,3 +1,4 @@+import { enDesktopCommands } from './en_desktop_commands'import { enSessionCommands } from './en_session_commands'import type { Translations } from './types'@@ -27,7 +28,8 @@ export const enNotices = {compactedTurnUnavailable:"That message was summarized when the chat was compressed, so it can't be restored or edited anymore.",staleTurnUnavailable: "That message is no longer in this chat's history.",- sessionCommands: enSessionCommands+ sessionCommands: enSessionCommands,+ desktopCommands: enDesktopCommands},keepAwakeOffer: {title: 'Your computer slept while Hermes was working',diff --git a/apps/desktop/src/i18n/es_desktop_commands.ts b/apps/desktop/src/i18n/es_desktop_commands.tsnew file mode 100644index 00000000000..5bcde564f50--- /dev/null+++ b/apps/desktop/src/i18n/es_desktop_commands.ts@@ -0,0 +1,50 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const esDesktopCommands = {+ error: (message: string) => `error: ${message}`,+ rollbackUsage: 'uso: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled:+ 'Los puntos de control no están activados para esta sesión (configura checkpoints.enabled en config.yaml).',+ checkpointsEmpty: 'Todavía no hay puntos de control para este directorio de trabajo.',+ checkpointsHeader: 'Puntos de control (los más recientes primero):',+ checkpointsHint:+ 'Restaura con /rollback <n> [file] (añade --all para sobrescribir también tus propios cambios); previsualiza con /rollback diff <n>.',+ noDiff: 'No hay cambios desde ese punto de control.',+ rollbackFailed: (error: string) => `Falló la restauración: ${error}`,+ unknownError: 'error desconocido',+ restored: (hash: string) => (hash ? `Punto de control ${hash} restaurado.` : 'Punto de control restaurado.'),+ rewound: (count: string) => `Se retiraron ${count} mensaje(s) de esta conversación.`,+ reopenForRewind: 'Vuelve a abrir este chat para ver la conversación rebobinada.',+ agentsEmpty: 'No hay subagentes activos ni procesos en segundo plano en este chat.',+ subagentsHeader: (count: string) => `Subagentes (${count}):`,+ subagentFallback: 'subagente',+ statusRunning: 'en ejecución',+ toolCalls: (count: string) => `${count} llamadas a herramientas`,+ processesHeader: (count: string) => `Procesos en segundo plano (${count}):`,+ configHeader: 'Configuración (pantalla, aprobaciones, pegado y voz; no se muestra nada más):',+ configDefaults: '(valores predeterminados)',+ configFooter:+ 'Cambia los ajustes en Ajustes, o edita config.yaml con `hermes config edit` en el host de la pasarela.',+ historyHeader: (count: string) => `Historial de la conversación (${count} mensajes):`,+ historyEmpty: 'Todavía no hay mensajes.',+ historyYou: 'Tú',+ historyHermes: 'Hermes',+ saveUsage: 'uso: /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ 'No guardado: esta pasarela no puede exportar una copia censurada, con nombre o que no sea JSON. Actualiza la pasarela o ejecuta /save sin opciones para escribir el JSON sin procesar en el host de la pasarela.',+ savedOnHost: (path: string) => `Guardado en el host de la pasarela: ${path}`,+ unknownPath: '(ruta desconocida)',+ saveUnsupported: 'error: esta versión de escritorio no puede guardar archivos',+ saveDialogTitle: 'Guardar conversación',+ savedTo: (path: string) => `Conversación guardada en ${path}`,+ saveCancelled: 'No guardado (cancelado).',+ exportRemote:+ '/export empaqueta un perfil desde el host de la pasarela, que no es este equipo. Ejecuta `hermes profile export` en ese host.',+ importRemote:+ '/import instala un perfil en el host de la pasarela, que no es este equipo. Ejecuta `hermes profile import <archive>` en ese host.',+ timestampsUsage: 'uso: /timestamps [on|off|status]',+ timestampsOn:+ 'Marcas de tiempo: activadas (esta ventana; configura display.timestamps en config.yaml para conservarlo)',+ timestampsOff:+ 'Marcas de tiempo: desactivadas (esta ventana; configura display.timestamps en config.yaml para conservarlo)'+}diff --git a/apps/desktop/src/i18n/es_notices.ts b/apps/desktop/src/i18n/es_notices.tsindex b388f6f2b22..724cb33d97d 100644--- a/apps/desktop/src/i18n/es_notices.ts+++ b/apps/desktop/src/i18n/es_notices.ts@@ -1,4 +1,5 @@import type { TranslationOverrides } from './define-locale'+import { esDesktopCommands } from './es_desktop_commands'import { esSessionCommands } from './es_session_commands'// Shell notices (remote-display toast, butterbar, keep-awake offer), spread into es.ts.@@ -27,7 +28,8 @@ export const esNotices = {compactedTurnUnavailable:'Ese mensaje se resumió al comprimir el chat, así que ya no se puede restaurar ni editar.',staleTurnUnavailable: 'Ese mensaje ya no está en el historial de este chat.',- sessionCommands: esSessionCommands+ sessionCommands: esSessionCommands,+ desktopCommands: esDesktopCommands},keepAwakeOffer: {title: 'Tu equipo entró en suspensión mientras Hermes trabajaba',diff --git a/apps/desktop/src/i18n/fr_desktop_commands.ts b/apps/desktop/src/i18n/fr_desktop_commands.tsnew file mode 100644index 00000000000..97392042a4a--- /dev/null+++ b/apps/desktop/src/i18n/fr_desktop_commands.ts@@ -0,0 +1,49 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const frDesktopCommands = {+ error: (message: string) => `erreur : ${message}`,+ rollbackUsage: 'utilisation : /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled:+ 'Les points de restauration ne sont pas activés pour cette session (définissez checkpoints.enabled dans config.yaml).',+ checkpointsEmpty: 'Aucun point de restauration pour ce répertoire de travail.',+ checkpointsHeader: 'Points de restauration (du plus récent au plus ancien) :',+ checkpointsHint:+ 'Restaurez avec /rollback <n> [file] (ajoutez --all pour écraser aussi vos propres modifications) ; prévisualisez avec /rollback diff <n>.',+ noDiff: 'Aucun changement depuis ce point de restauration.',+ rollbackFailed: (error: string) => `Échec de la restauration : ${error}`,+ unknownError: 'erreur inconnue',+ restored: (hash: string) => (hash ? `Point de restauration ${hash} restauré.` : 'Point de restauration restauré.'),+ rewound: (count: string) => `${count} message(s) retiré(s) de cette conversation.`,+ reopenForRewind: 'Rouvrez cette discussion pour voir la conversation rembobinée.',+ agentsEmpty: 'Aucun sous-agent actif ni processus en arrière-plan dans cette discussion.',+ subagentsHeader: (count: string) => `Sous-agents (${count}) :`,+ subagentFallback: 'sous-agent',+ statusRunning: 'en cours',+ toolCalls: (count: string) => `${count} appels d’outils`,+ processesHeader: (count: string) => `Processus en arrière-plan (${count}) :`,+ configHeader: 'Configuration (affichage, approbations, collage et voix ; le reste n’est pas affiché) :',+ configDefaults: '(valeurs par défaut)',+ configFooter:+ 'Modifiez les réglages dans Réglages, ou éditez config.yaml avec `hermes config edit` sur l’hôte de la passerelle.',+ historyHeader: (count: string) => `Historique de la conversation (${count} messages) :`,+ historyEmpty: 'Aucun message pour l’instant.',+ historyYou: 'Vous',+ historyHermes: 'Hermes',+ saveUsage: 'utilisation : /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ 'Non enregistré : cette passerelle ne peut pas exporter de copie expurgée, nommée ou autre que JSON. Mettez à jour la passerelle, ou lancez /save sans option pour écrire le JSON brut sur l’hôte de la passerelle.',+ savedOnHost: (path: string) => `Enregistré sur l’hôte de la passerelle : ${path}`,+ unknownPath: '(chemin inconnu)',+ saveUnsupported: 'erreur : cette version de l’application ne peut pas enregistrer de fichiers',+ saveDialogTitle: 'Enregistrer la conversation',+ savedTo: (path: string) => `Conversation enregistrée dans ${path}`,+ saveCancelled: 'Non enregistré (annulé).',+ exportRemote:+ '/export empaquette un profil depuis l’hôte de la passerelle, qui n’est pas cette machine. Lancez `hermes profile export` sur cet hôte.',+ importRemote:+ '/import installe un profil sur l’hôte de la passerelle, qui n’est pas cette machine. Lancez `hermes profile import <archive>` sur cet hôte.',+ timestampsUsage: 'utilisation : /timestamps [on|off|status]',+ timestampsOn: 'Horodatage : activé (cette fenêtre ; définissez display.timestamps dans config.yaml pour le garder)',+ timestampsOff:+ 'Horodatage : désactivé (cette fenêtre ; définissez display.timestamps dans config.yaml pour le garder)'+}diff --git a/apps/desktop/src/i18n/fr_notices.ts b/apps/desktop/src/i18n/fr_notices.tsindex 9870aafbee7..de537f10f1c 100644--- a/apps/desktop/src/i18n/fr_notices.ts+++ b/apps/desktop/src/i18n/fr_notices.ts@@ -1,4 +1,5 @@import type { TranslationOverrides } from './define-locale'+import { frDesktopCommands } from './fr_desktop_commands'import { frSessionCommands } from './fr_session_commands'// Shell notices (remote-display toast, butterbar, keep-awake offer), spread into fr.ts.@@ -27,7 +28,8 @@ export const frNotices = {compactedTurnUnavailable:'Ce message a été résumé lors de la compression de la conversation : il ne peut plus être restauré ni modifié.',staleTurnUnavailable: 'Ce message ne fait plus partie de l’historique de cette discussion.',- sessionCommands: frSessionCommands+ sessionCommands: frSessionCommands,+ desktopCommands: frDesktopCommands},keepAwakeOffer: {title: 'Votre ordinateur s’est mis en veille pendant que Hermes travaillait',diff --git a/apps/desktop/src/i18n/ja_desktop_commands.ts b/apps/desktop/src/i18n/ja_desktop_commands.tsnew file mode 100644index 00000000000..c3b4994c08f--- /dev/null+++ b/apps/desktop/src/i18n/ja_desktop_commands.ts@@ -0,0 +1,48 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const jaDesktopCommands = {+ error: (message: string) => `エラー: ${message}`,+ rollbackUsage: '使い方: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled:+ 'このセッションではチェックポイントが有効になっていません(config.yaml で checkpoints.enabled を設定してください)。',+ checkpointsEmpty: 'この作業ディレクトリにはまだチェックポイントがありません。',+ checkpointsHeader: 'チェックポイント(新しい順):',+ checkpointsHint:+ '/rollback <n> [file] で復元します(--all を付けると自分の編集も上書きします)。/rollback diff <n> でプレビューできます。',+ noDiff: 'そのチェックポイント以降の変更はありません。',+ rollbackFailed: (error: string) => `ロールバックに失敗しました: ${error}`,+ unknownError: '不明なエラー',+ restored: (hash: string) => (hash ? `チェックポイント ${hash} を復元しました。` : 'チェックポイントを復元しました。'),+ rewound: (count: string) => `この会話から ${count} 件のメッセージを巻き戻しました。`,+ reopenForRewind: '巻き戻した会話を表示するには、このチャットを開き直してください。',+ agentsEmpty: 'このチャットに実行中のサブエージェントやバックグラウンドプロセスはありません。',+ subagentsHeader: (count: string) => `サブエージェント(${count}):`,+ subagentFallback: 'サブエージェント',+ statusRunning: '実行中',+ toolCalls: (count: string) => `ツール呼び出し ${count} 回`,+ processesHeader: (count: string) => `バックグラウンドプロセス(${count}):`,+ configHeader: '設定(表示、承認、貼り付け、音声の設定のみ。それ以外は表示されません):',+ configDefaults: '(既定値)',+ configFooter:+ '設定画面で変更するか、ゲートウェイのホストで `hermes config edit` を使って config.yaml を編集してください。',+ historyHeader: (count: string) => `会話履歴(${count} 件のメッセージ):`,+ historyEmpty: 'まだメッセージはありません。',+ historyYou: 'あなた',+ historyHermes: 'Hermes',+ saveUsage: '使い方: /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ '保存されませんでした: このゲートウェイは秘匿化・ファイル名指定・JSON 以外のコピーを書き出せません。ゲートウェイを更新するか、オプションなしで /save を実行してゲートウェイのホストに生の JSON を書き込んでください。',+ savedOnHost: (path: string) => `ゲートウェイのホストに保存しました: ${path}`,+ unknownPath: '(パス不明)',+ saveUnsupported: 'エラー: このデスクトップ版はファイルを保存できません',+ saveDialogTitle: '会話を保存',+ savedTo: (path: string) => `会話を ${path} に保存しました`,+ saveCancelled: '保存されませんでした(キャンセル)。',+ exportRemote:+ '/export はゲートウェイのホストからプロファイルをパッケージ化しますが、そのホストはこのコンピューターではありません。そのホストで `hermes profile export` を実行してください。',+ importRemote:+ '/import はゲートウェイのホストにプロファイルをインストールしますが、そのホストはこのコンピューターではありません。そのホストで `hermes profile import <archive>` を実行してください。',+ timestampsUsage: '使い方: /timestamps [on|off|status]',+ timestampsOn: 'タイムスタンプ: オン(このウィンドウのみ。維持するには config.yaml で display.timestamps を設定)',+ timestampsOff: 'タイムスタンプ: オフ(このウィンドウのみ。維持するには config.yaml で display.timestamps を設定)'+}diff --git a/apps/desktop/src/i18n/ja_notices.ts b/apps/desktop/src/i18n/ja_notices.tsindex e0d709ea1f9..fbc075e72b2 100644--- a/apps/desktop/src/i18n/ja_notices.ts+++ b/apps/desktop/src/i18n/ja_notices.ts@@ -1,4 +1,5 @@import type { TranslationOverrides } from './define-locale'+import { jaDesktopCommands } from './ja_desktop_commands'import { jaSessionCommands } from './ja_session_commands'// Shell notices (remote-display toast, butterbar, keep-awake offer), spread into ja.ts.@@ -26,7 +27,8 @@ export const jaNotices = {mcpReloadUnavailable: servers => `接続できませんでした: ${servers}`,compactedTurnUnavailable: 'このメッセージはチャットの圧縮時に要約されたため、復元や編集はできなくなりました。',staleTurnUnavailable: 'このメッセージはこのチャットの履歴にはもうありません。',- sessionCommands: jaSessionCommands+ sessionCommands: jaSessionCommands,+ desktopCommands: jaDesktopCommands},keepAwakeOffer: {title: 'Hermes の作業中にコンピューターがスリープしました',diff --git a/apps/desktop/src/i18n/ru_desktop_commands.ts b/apps/desktop/src/i18n/ru_desktop_commands.tsnew file mode 100644index 00000000000..cbf72fe95ad--- /dev/null+++ b/apps/desktop/src/i18n/ru_desktop_commands.ts@@ -0,0 +1,47 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const ruDesktopCommands = {+ error: (message: string) => `ошибка: ${message}`,+ rollbackUsage: 'использование: /rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled: 'Контрольные точки для этого сеанса не включены (задайте checkpoints.enabled в config.yaml).',+ checkpointsEmpty: 'Для этого рабочего каталога ещё нет контрольных точек.',+ checkpointsHeader: 'Контрольные точки (сначала новые):',+ checkpointsHint:+ 'Восстановление: /rollback <n> [file] (с --all перезаписываются и ваши правки); предпросмотр: /rollback diff <n>.',+ noDiff: 'С этой контрольной точки изменений нет.',+ rollbackFailed: (error: string) => `Откат не удался: ${error}`,+ unknownError: 'неизвестная ошибка',+ restored: (hash: string) => (hash ? `Контрольная точка ${hash} восстановлена.` : 'Контрольная точка восстановлена.'),+ rewound: (count: string) => `Из этого разговора откачено сообщений: ${count}.`,+ reopenForRewind: 'Откройте этот чат заново, чтобы увидеть откаченный разговор.',+ agentsEmpty: 'В этом чате нет активных субагентов и фоновых процессов.',+ subagentsHeader: (count: string) => `Субагенты (${count}):`,+ subagentFallback: 'субагент',+ statusRunning: 'выполняется',+ toolCalls: (count: string) => `вызовов инструментов: ${count}`,+ processesHeader: (count: string) => `Фоновые процессы (${count}):`,+ configHeader: 'Конфигурация (настройки отображения, подтверждений, вставки и голоса; остальное не показывается):',+ configDefaults: '(по умолчанию)',+ configFooter:+ 'Меняйте настройки в «Настройках» или редактируйте config.yaml командой `hermes config edit` на хосте шлюза.',+ historyHeader: (count: string) => `История разговора (сообщений: ${count}):`,+ historyEmpty: 'Сообщений пока нет.',+ historyYou: 'Вы',+ historyHermes: 'Hermes',+ saveUsage: 'использование: /save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ 'Не сохранено: этот шлюз не умеет экспортировать скрытую, именованную или не-JSON копию. Обновите шлюз или выполните /save без параметров, чтобы записать исходный JSON на хосте шлюза.',+ savedOnHost: (path: string) => `Сохранено на хосте шлюза: ${path}`,+ unknownPath: '(путь неизвестен)',+ saveUnsupported: 'ошибка: эта сборка приложения не умеет сохранять файлы',+ saveDialogTitle: 'Сохранить разговор',+ savedTo: (path: string) => `Разговор сохранён в ${path}`,+ saveCancelled: 'Не сохранено (отменено).',+ exportRemote:+ '/export упаковывает профиль с хоста шлюза, а это не этот компьютер. Выполните `hermes profile export` на том хосте.',+ importRemote:+ '/import устанавливает профиль на хост шлюза, а это не этот компьютер. Выполните `hermes profile import <archive>` на том хосте.',+ timestampsUsage: 'использование: /timestamps [on|off|status]',+ timestampsOn: 'Метки времени: вкл. (только это окно; чтобы сохранить, задайте display.timestamps в config.yaml)',+ timestampsOff: 'Метки времени: выкл. (только это окно; чтобы сохранить, задайте display.timestamps в config.yaml)'+}diff --git a/apps/desktop/src/i18n/ru_notices.ts b/apps/desktop/src/i18n/ru_notices.tsindex 4303773b3d3..5c812b8a1b0 100644--- a/apps/desktop/src/i18n/ru_notices.ts+++ b/apps/desktop/src/i18n/ru_notices.ts@@ -1,4 +1,5 @@import type { TranslationOverrides } from './define-locale'+import { ruDesktopCommands } from './ru_desktop_commands'import { ruSessionCommands } from './ru_session_commands'// Shell notices (remote-display toast, butterbar, keep-awake offer), spread into ru.ts.@@ -27,7 +28,8 @@ export const ruNotices = {compactedTurnUnavailable:'Это сообщение было сжато в краткое изложение при сжатии чата, поэтому его больше нельзя восстановить или изменить.',staleTurnUnavailable: 'Этого сообщения больше нет в истории этого чата.',- sessionCommands: ruSessionCommands+ sessionCommands: ruSessionCommands,+ desktopCommands: ruDesktopCommands},keepAwakeOffer: {title: 'Компьютер ушёл в сон, пока Hermes работал',diff --git a/apps/desktop/src/i18n/types_desktop_commands.ts b/apps/desktop/src/i18n/types_desktop_commands.tsnew file mode 100644index 00000000000..893e2c89470--- /dev/null+++ b/apps/desktop/src/i18n/types_desktop_commands.ts@@ -0,0 +1,42 @@+// Transcript lines for the Desktop-side /rollback /agents /config /history /save /export /import+// /timestamps actions (slash-desktop-commands.ts). Counts arrive as strings, like sessionCommands.+export interface DesktopCommandNotices {+ error: (message: string) => string+ rollbackUsage: string+ checkpointsDisabled: string+ checkpointsEmpty: string+ checkpointsHeader: string+ checkpointsHint: string+ noDiff: string+ rollbackFailed: (error: string) => string+ unknownError: string+ restored: (hash: string) => string+ rewound: (count: string) => string+ reopenForRewind: string+ agentsEmpty: string+ subagentsHeader: (count: string) => string+ subagentFallback: string+ statusRunning: string+ toolCalls: (count: string) => string+ processesHeader: (count: string) => string+ configHeader: string+ configDefaults: string+ configFooter: string+ historyHeader: (count: string) => string+ historyEmpty: string+ historyYou: string+ historyHermes: string+ saveUsage: string+ saveLegacyRefused: string+ savedOnHost: (path: string) => string+ unknownPath: string+ saveUnsupported: string+ saveDialogTitle: string+ savedTo: (path: string) => string+ saveCancelled: string+ exportRemote: string+ importRemote: string+ timestampsUsage: string+ timestampsOn: string+ timestampsOff: string+}diff --git a/apps/desktop/src/i18n/types_notices.ts b/apps/desktop/src/i18n/types_notices.tsindex 9623ffc6f02..223439a47d7 100644--- a/apps/desktop/src/i18n/types_notices.ts+++ b/apps/desktop/src/i18n/types_notices.ts@@ -1,3 +1,5 @@+import type { DesktopCommandNotices } from './types_desktop_commands'+// Shell notice strings: the remote-display toast, the butterbar, send-outcome toasts and the// keep-awake offer; `Translations` spreads this in.export interface NoticeTranslations {@@ -25,6 +27,8 @@ export interface NoticeTranslations {staleTurnUnavailable: string/** Typed /undo /retry /steer /queue lines (the Ink TUI's wording on the same gateway). */sessionCommands: SessionCommandNotices+ /** Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines. */+ desktopCommands: DesktopCommandNotices}/** Once per computer, after a timed sleep interrupted a turn with keep-awake off. */diff --git a/apps/desktop/src/i18n/zh-hant_boot.ts b/apps/desktop/src/i18n/zh-hant_boot.tsindex 578cf3f9c91..3154c828b65 100644--- a/apps/desktop/src/i18n/zh-hant_boot.ts+++ b/apps/desktop/src/i18n/zh-hant_boot.ts@@ -1,4 +1,5 @@import type { TranslationOverrides } from './define-locale'+import { zhHantDesktopCommands } from './zh-hant_desktop_commands'import { zhHantSessionCommands } from './zh-hant_session_commands'export const zhHantBoot = {@@ -84,7 +85,8 @@ export const zhHantBoot = {mcpReloadUnavailable: servers => `未能連線:${servers}`,compactedTurnUnavailable: '這則訊息在壓縮對話時已被摘要,無法再還原或編輯。',staleTurnUnavailable: '這則訊息已不在此對話的歷史記錄中。',- sessionCommands: zhHantSessionCommands+ sessionCommands: zhHantSessionCommands,+ desktopCommands: zhHantDesktopCommands},updates: {@@ -353,5 +355,12 @@ export const zhHantBoot = {}} satisfies Pick<TranslationOverrides,- 'boot' | 'remoteDisplayBanner' | 'butterbar' | 'promptNotices' | 'keepAwakeOffer' | 'updates' | 'install' | 'onboarding'+ | 'boot'+ | 'remoteDisplayBanner'+ | 'butterbar'+ | 'promptNotices'+ | 'keepAwakeOffer'+ | 'updates'+ | 'install'+ | 'onboarding'>diff --git a/apps/desktop/src/i18n/zh-hant_desktop_commands.ts b/apps/desktop/src/i18n/zh-hant_desktop_commands.tsnew file mode 100644index 00000000000..4e97934c89b--- /dev/null+++ b/apps/desktop/src/i18n/zh-hant_desktop_commands.ts@@ -0,0 +1,45 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const zhHantDesktopCommands = {+ error: (message: string) => `錯誤:${message}`,+ rollbackUsage: '用法:/rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled: '此工作階段未啟用檢查點(在 config.yaml 中設定 checkpoints.enabled)。',+ checkpointsEmpty: '此工作目錄還沒有檢查點。',+ checkpointsHeader: '檢查點(最新的在前):',+ checkpointsHint:+ '使用 /rollback <n> [file] 還原(加上 --all 會一併覆寫你自己的修改);使用 /rollback diff <n> 預覽。',+ noDiff: '自該檢查點以來沒有變更。',+ rollbackFailed: (error: string) => `回溯失敗:${error}`,+ unknownError: '未知錯誤',+ restored: (hash: string) => (hash ? `已還原檢查點 ${hash}。` : '已還原檢查點。'),+ rewound: (count: string) => `已從此對話中回退 ${count} 則訊息。`,+ reopenForRewind: '重新開啟此對話以查看回退後的內容。',+ agentsEmpty: '此對話中沒有作用中的子代理或背景程序。',+ subagentsHeader: (count: string) => `子代理(${count}):`,+ subagentFallback: '子代理',+ statusRunning: '執行中',+ toolCalls: (count: string) => `${count} 次工具呼叫`,+ processesHeader: (count: string) => `背景程序(${count}):`,+ configHeader: '設定(顯示、核准、貼上與語音設定;其他內容不顯示):',+ configDefaults: '(預設值)',+ configFooter: '請在「設定」中變更,或在閘道主機上用 `hermes config edit` 編輯 config.yaml。',+ historyHeader: (count: string) => `對話紀錄(${count} 則訊息):`,+ historyEmpty: '還沒有訊息。',+ historyYou: '你',+ historyHermes: 'Hermes',+ saveUsage: '用法:/save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ '未儲存:此閘道無法匯出遮蔽、指定檔名或非 JSON 的副本。請更新閘道,或不帶選項執行 /save,在閘道主機上寫入原始 JSON。',+ savedOnHost: (path: string) => `已儲存到閘道主機:${path}`,+ unknownPath: '(未知路徑)',+ saveUnsupported: '錯誤:此桌面版本無法儲存檔案',+ saveDialogTitle: '儲存對話',+ savedTo: (path: string) => `對話已儲存到 ${path}`,+ saveCancelled: '未儲存(已取消)。',+ exportRemote: '/export 會從閘道主機打包設定檔,而閘道主機不是這台電腦。請在該主機上執行 `hermes profile export`。',+ importRemote:+ '/import 會在閘道主機上安裝設定檔,而閘道主機不是這台電腦。請在該主機上執行 `hermes profile import <archive>`。',+ timestampsUsage: '用法:/timestamps [on|off|status]',+ timestampsOn: '時間戳記:開(僅此視窗;在 config.yaml 中設定 display.timestamps 以保留)',+ timestampsOff: '時間戳記:關(僅此視窗;在 config.yaml 中設定 display.timestamps 以保留)'+}diff --git a/apps/desktop/src/i18n/zh_desktop_commands.ts b/apps/desktop/src/i18n/zh_desktop_commands.tsnew file mode 100644index 00000000000..d0d9a6ddd0f--- /dev/null+++ b/apps/desktop/src/i18n/zh_desktop_commands.ts@@ -0,0 +1,44 @@+// Desktop-side /rollback /agents /config /history /save /export /import /timestamps lines+// (en_desktop_commands.ts is the source).+export const zhDesktopCommands = {+ error: (message: string) => `错误:${message}`,+ rollbackUsage: '用法:/rollback [list] | diff <n|hash> | <n|hash> [file] [--all]',+ checkpointsDisabled: '此会话未启用检查点(在 config.yaml 中设置 checkpoints.enabled)。',+ checkpointsEmpty: '此工作目录还没有检查点。',+ checkpointsHeader: '检查点(最新的在前):',+ checkpointsHint: '使用 /rollback <n> [file] 恢复(加 --all 会同时覆盖你自己的修改);使用 /rollback diff <n> 预览。',+ noDiff: '自该检查点以来没有更改。',+ rollbackFailed: (error: string) => `回滚失败:${error}`,+ unknownError: '未知错误',+ restored: (hash: string) => (hash ? `已恢复检查点 ${hash}。` : '已恢复检查点。'),+ rewound: (count: string) => `已从此对话中回退 ${count} 条消息。`,+ reopenForRewind: '重新打开此对话以查看回退后的内容。',+ agentsEmpty: '此对话中没有活跃的子代理或后台进程。',+ subagentsHeader: (count: string) => `子代理(${count}):`,+ subagentFallback: '子代理',+ statusRunning: '运行中',+ toolCalls: (count: string) => `${count} 次工具调用`,+ processesHeader: (count: string) => `后台进程(${count}):`,+ configHeader: '配置(显示、审批、粘贴和语音设置;其他内容不显示):',+ configDefaults: '(默认值)',+ configFooter: '在“设置”中更改,或在网关主机上用 `hermes config edit` 编辑 config.yaml。',+ historyHeader: (count: string) => `对话历史(${count} 条消息):`,+ historyEmpty: '还没有消息。',+ historyYou: '你',+ historyHermes: 'Hermes',+ saveUsage: '用法:/save [json|md|html] [filename] [redact]',+ saveLegacyRefused:+ '未保存:此网关无法导出脱敏、指定文件名或非 JSON 的副本。请更新网关,或不带选项运行 /save,在网关主机上写入原始 JSON。',+ savedOnHost: (path: string) => `已保存到网关主机:${path}`,+ unknownPath: '(未知路径)',+ saveUnsupported: '错误:此桌面版本无法保存文件',+ saveDialogTitle: '保存对话',+ savedTo: (path: string) => `对话已保存到 ${path}`,+ saveCancelled: '未保存(已取消)。',+ exportRemote: '/export 从网关主机打包配置文件,而网关主机不是这台电脑。请在该主机上运行 `hermes profile export`。',+ importRemote:+ '/import 在网关主机上安装配置文件,而网关主机不是这台电脑。请在该主机上运行 `hermes profile import <archive>`。',+ timestampsUsage: '用法:/timestamps [on|off|status]',+ timestampsOn: '时间戳:开(仅此窗口;在 config.yaml 中设置 display.timestamps 以保留)',+ timestampsOff: '时间戳:关(仅此窗口;在 config.yaml 中设置 display.timestamps 以保留)'+}diff --git a/apps/desktop/src/i18n/zh_notices.ts b/apps/desktop/src/i18n/zh_notices.tsindex 795e4d9f580..a65ad36f5b9 100644--- a/apps/desktop/src/i18n/zh_notices.ts+++ b/apps/desktop/src/i18n/zh_notices.ts@@ -1,4 +1,5 @@import type { TranslationOverrides } from './define-locale'+import { zhDesktopCommands } from './zh_desktop_commands'import { zhSessionCommands } from './zh_session_commands'// Shell notices (remote-display toast, butterbar, keep-awake offer), spread into zh.ts.@@ -23,7 +24,8 @@ export const zhNotices = {mcpReloadUnavailable: servers => `未能连接:${servers}`,compactedTurnUnavailable: '这条消息在压缩对话时已被概括,无法再恢复或编辑。',staleTurnUnavailable: '这条消息已不在此对话的历史记录中。',- sessionCommands: zhSessionCommands+ sessionCommands: zhSessionCommands,+ desktopCommands: zhDesktopCommands},keepAwakeOffer: {title: '电脑在 Hermes 工作时进入了睡眠',diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.jsonindex 7111e2ad21c..169b308837b 100644--- a/locales/_keys.desktop.json+++ b/locales/_keys.desktop.json@@ -2439,6 +2439,44 @@"profiles.title","profiles.unsavedChanges","promptNotices.compactedTurnUnavailable",+ "promptNotices.desktopCommands.agentsEmpty",+ "promptNotices.desktopCommands.checkpointsDisabled",+ "promptNotices.desktopCommands.checkpointsEmpty",+ "promptNotices.desktopCommands.checkpointsHeader",+ "promptNotices.desktopCommands.checkpointsHint",+ "promptNotices.desktopCommands.configDefaults",+ "promptNotices.desktopCommands.configFooter",+ "promptNotices.desktopCommands.configHeader",+ "promptNotices.desktopCommands.error",+ "promptNotices.desktopCommands.exportRemote",+ "promptNotices.desktopCommands.historyEmpty",+ "promptNotices.desktopCommands.historyHeader",+ "promptNotices.desktopCommands.historyHermes",+ "promptNotices.desktopCommands.historyYou",+ "promptNotices.desktopCommands.importRemote",+ "promptNotices.desktopCommands.noDiff",+ "promptNotices.desktopCommands.processesHeader",+ "promptNotices.desktopCommands.reopenForRewind",+ "promptNotices.desktopCommands.restored",+ "promptNotices.desktopCommands.rewound",+ "promptNotices.desktopCommands.rollbackFailed",+ "promptNotices.desktopCommands.rollbackUsage",+ "promptNotices.desktopCommands.saveCancelled",+ "promptNotices.desktopCommands.saveDialogTitle",+ "promptNotices.desktopCommands.saveLegacyRefused",+ "promptNotices.desktopCommands.saveUnsupported",+ "promptNotices.desktopCommands.saveUsage",+ "promptNotices.desktopCommands.savedOnHost",+ "promptNotices.desktopCommands.savedTo",+ "promptNotices.desktopCommands.statusRunning",+ "promptNotices.desktopCommands.subagentFallback",+ "promptNotices.desktopCommands.subagentsHeader",+ "promptNotices.desktopCommands.timestampsOff",+ "promptNotices.desktopCommands.timestampsOn",+ "promptNotices.desktopCommands.timestampsUsage",+ "promptNotices.desktopCommands.toolCalls",+ "promptNotices.desktopCommands.unknownError",+ "promptNotices.desktopCommands.unknownPath","promptNotices.legacySendUnconfirmed","promptNotices.mcpReloadDeferred","promptNotices.mcpReloadNotInChat",