The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): the chat card names the local model server, with no Desktop-only pane
Tekniumdc1531621973
diff --git a/apps/desktop/src/i18n/ar_assistant.ts b/apps/desktop/src/i18n/ar_assistant.tsindex 91282e92b61..9ea554a7139 100644--- a/apps/desktop/src/i18n/ar_assistant.ts+++ b/apps/desktop/src/i18n/ar_assistant.ts@@ -207,6 +207,10 @@ export const arAssistant = {launch_credentials_unavailable: {title: 'تغيّر مفتاح API لهذه المحادثة',body: 'بدأت هذه المحادثة بمفتاح API تم تغييره أو حذفه منذ ذلك الحين، لذا لم تُرسل رسالتك. المحادثة المفتوحة لا تنتقل أبدًا إلى مفتاح مختلف من تلقاء نفسها. استخدم «بدء جلسة جديدة» لاستخدام مفتاحك الحالي.'+ },+ local_runtime_unavailable: {+ title: 'تعذّر الوصول إلى خادم النماذج المحلي',+ body: 'خادم النماذج المحلي لا يعمل: ربما لا يزال قيد التشغيل، أو تم إيقافه. أعد المحاولة بعد لحظة، أو انتقل إلى نموذج آخر.'}},errorAuthKinds: {diff --git a/apps/desktop/src/i18n/de_error_codes.ts b/apps/desktop/src/i18n/de_error_codes.tsindex 0aca4bab5f4..b3c39a71345 100644--- a/apps/desktop/src/i18n/de_error_codes.ts+++ b/apps/desktop/src/i18n/de_error_codes.ts@@ -19,5 +19,9 @@ export const deErrorCodes: Partial<ThreadCopy['errorCodes']> = {launch_credentials_unavailable: {title: 'Der API-Schlüssel dieses Chats hat sich geändert',body: 'Dieser Chat wurde mit einem API-Schlüssel gestartet, der inzwischen geändert oder entfernt wurde, daher wurde Ihre Nachricht nicht gesendet. Ein offener Chat wechselt nie von selbst zu einem anderen Schlüssel. Wählen Sie „Neue Session starten“, um Ihren aktuellen Schlüssel zu verwenden.'+ },+ local_runtime_unavailable: {+ title: 'Lokaler Modellserver nicht erreichbar',+ body: 'Der lokale Modellserver läuft nicht: Er startet möglicherweise noch oder wurde ausgeschaltet. Versuchen Sie es gleich noch einmal oder wechseln Sie zu einem anderen Modell.'}}diff --git a/apps/desktop/src/i18n/en_error_codes.ts b/apps/desktop/src/i18n/en_error_codes.tsindex a6d323b7a0e..5b0e8e775d3 100644--- a/apps/desktop/src/i18n/en_error_codes.ts+++ b/apps/desktop/src/i18n/en_error_codes.ts@@ -121,6 +121,10 @@ export const enErrorCodes: ThreadCopy['errorCodes'] = {title: "This chat's API key changed",body: 'This chat started with an API key that has since changed or been removed, so your message was not sent. An open chat never switches to a different key on its own. Start a new session to use your current key.'},+ local_runtime_unavailable: {+ title: "Can't reach the local model server",+ body: "The local model server isn't running: it may still be starting, or it was turned off. Retry in a moment, or switch to another model."+ },SESSION_OWNER_UNCONFIRMED: {title: 'Your message may already be queued',body: 'The gateway did not confirm your message in time. If it was queued, it runs once the earlier turn finishes or is resolved. Check the chat before sending it again.'diff --git a/apps/desktop/src/i18n/es_error_codes.ts b/apps/desktop/src/i18n/es_error_codes.tsindex a2c3074094d..8e39c484a14 100644--- a/apps/desktop/src/i18n/es_error_codes.ts+++ b/apps/desktop/src/i18n/es_error_codes.ts@@ -19,5 +19,9 @@ export const esErrorCodes: Partial<ThreadCopy['errorCodes']> = {launch_credentials_unavailable: {title: 'La clave de API de este chat cambió',body: 'Este chat se inició con una clave de API que desde entonces cambió o se eliminó, así que tu mensaje no se envió. Un chat abierto nunca cambia por sí solo a otra clave. Usa «Iniciar sesión nueva» para usar tu clave actual.'+ },+ local_runtime_unavailable: {+ title: 'No se puede acceder al servidor de modelos local',+ body: 'El servidor de modelos local no está en ejecución: puede que aún se esté iniciando o que se haya apagado. Reintenta en un momento o cambia a otro modelo.'}}diff --git a/apps/desktop/src/i18n/fr_error_codes.ts b/apps/desktop/src/i18n/fr_error_codes.tsindex ebb09cdcffa..90352a51c85 100644--- a/apps/desktop/src/i18n/fr_error_codes.ts+++ b/apps/desktop/src/i18n/fr_error_codes.ts@@ -19,5 +19,9 @@ export const frErrorCodes: Partial<ThreadCopy['errorCodes']> = {launch_credentials_unavailable: {title: 'La clé API de cette conversation a changé',body: "Cette conversation a démarré avec une clé API qui a depuis été modifiée ou supprimée ; votre message n'a donc pas été envoyé. Une conversation ouverte ne passe jamais d'elle-même à une autre clé. Utilisez « Démarrer une nouvelle session » pour utiliser votre clé actuelle."+ },+ local_runtime_unavailable: {+ title: 'Impossible de joindre le serveur de modèles local',+ body: 'Le serveur de modèles local ne tourne pas : il est peut-être encore en train de démarrer, ou il a été arrêté. Réessayez dans un instant, ou passez à un autre modèle.'}}diff --git a/apps/desktop/src/i18n/ja_error_codes.ts b/apps/desktop/src/i18n/ja_error_codes.tsindex fd24c27d866..0016ded6001 100644--- a/apps/desktop/src/i18n/ja_error_codes.ts+++ b/apps/desktop/src/i18n/ja_error_codes.ts@@ -105,5 +105,9 @@ export const jaErrorCodes: Partial<ThreadCopy['errorCodes']> = {launch_credentials_unavailable: {title: 'このチャットの API キーが変更されました',body: 'このチャットの開始時の API キーがその後変更または削除されたため、メッセージは送信されませんでした。開いているチャットが自動で別のキーに切り替わることはありません。「新しいセッションを開始」で現在のキーを使ってください。'+ },+ local_runtime_unavailable: {+ title: 'ローカルモデルサーバーに接続できません',+ body: 'ローカルモデルサーバーが動作していません。まだ起動中か、オフになっている可能性があります。少し待ってから再試行するか、別のモデルに切り替えてください。'}}diff --git a/apps/desktop/src/i18n/ru_error_codes.ts b/apps/desktop/src/i18n/ru_error_codes.tsindex 536665286e1..f49080fba14 100644--- a/apps/desktop/src/i18n/ru_error_codes.ts+++ b/apps/desktop/src/i18n/ru_error_codes.ts@@ -20,6 +20,10 @@ export const ruErrorCodes: Partial<ThreadCopy['errorCodes']> = {title: 'Ключ API этого чата изменился',body: 'Этот чат был начат с ключом API, который с тех пор изменили или удалили, поэтому ваше сообщение не отправлено. Открытый чат никогда сам не переключается на другой ключ. Нажмите «Start new session», чтобы использовать текущий ключ.'},+ local_runtime_unavailable: {+ title: 'Не удаётся связаться с локальным сервером моделей',+ body: 'Локальный сервер моделей не запущен: возможно, он ещё запускается или был выключен. Повторите попытку через минуту или переключитесь на другую модель.'+ },agent_init_failed: {title: 'Не удалось начать этот чат',body: provider =>diff --git a/apps/desktop/src/i18n/zh-hant_assistant.ts b/apps/desktop/src/i18n/zh-hant_assistant.tsindex ecf5a940b59..466862a354a 100644--- a/apps/desktop/src/i18n/zh-hant_assistant.ts+++ b/apps/desktop/src/i18n/zh-hant_assistant.ts@@ -226,6 +226,10 @@ export const zhHantAssistant = {launch_credentials_unavailable: {title: '此聊天的 API 金鑰已變更',body: '此聊天開始時使用的 API 金鑰後來已被變更或刪除,因此你的訊息未送出。開啟中的聊天不會自行切換到其他金鑰。請使用「開始新工作階段」以使用目前的金鑰。'+ },+ local_runtime_unavailable: {+ title: '無法連線到本機模型伺服器',+ body: '本機模型伺服器未執行:它可能仍在啟動中,或已被關閉。請稍後重試,或切換到其他模型。'}},errorLayers: {diff --git a/apps/desktop/src/i18n/zh_error_codes.ts b/apps/desktop/src/i18n/zh_error_codes.tsindex b5ec4799cd0..716a4ee7079 100644--- a/apps/desktop/src/i18n/zh_error_codes.ts+++ b/apps/desktop/src/i18n/zh_error_codes.ts@@ -100,5 +100,9 @@ export const zhErrorCodes: Partial<ThreadCopy['errorCodes']> = {launch_credentials_unavailable: {title: '此聊天的 API 密钥已更改',body: '此聊天开始时使用的 API 密钥后来已被更改或删除,因此你的消息未发送。打开的聊天不会自行切换到其他密钥。请使用“开始新会话”以使用当前密钥。'+ },+ local_runtime_unavailable: {+ title: '无法连接本地模型服务器',+ body: '本地模型服务器未运行:它可能仍在启动,或已被关闭。请稍后重试,或切换到其他模型。'}}diff --git a/apps/desktop/src/lib/error-surface.test.ts b/apps/desktop/src/lib/error-surface.test.tsindex ff470595e22..5cd4bda5fe0 100644--- a/apps/desktop/src/lib/error-surface.test.ts+++ b/apps/desktop/src/lib/error-surface.test.ts@@ -208,10 +208,13 @@ describe('cron session read-only (#141348)', () => {})describe('managed local model server down', () => {- it('reads as an unreachable model server and offers another model, never a key update', () => {+ it('names the local model server, not a custom one, and offers another model, never a key update', () => {const surface = parseErrorSurface({ layer: 'endpoint', code: 'local_runtime_unavailable', retryable: false })+ const { body, title } = errorCardText(en.assistant.thread, surface)- expect(errorCardText(en.assistant.thread, surface).title).toBe(en.assistant.thread.errorLayers.endpoint)+ expect(`${title} ${body}`).toContain('local model server')+ // The card is the same in Desktop and the Webapp, which has no Local models pane.+ expect(body).not.toMatch(/custom|Settings|Local models/)expect(errorCardActions(surface)).toEqual({ primary: 'switch_provider' })})diff --git a/apps/desktop/src/lib/error-surface.ts b/apps/desktop/src/lib/error-surface.tsindex f100629e82a..894b8cabc7c 100644--- a/apps/desktop/src/lib/error-surface.ts+++ b/apps/desktop/src/lib/error-surface.ts@@ -62,6 +62,9 @@ export const ERROR_CODE_KEYS = [// The API key this chat started with changed or was removed (gateway: a chat never switches keys// on its own): Retry repeats it; a new chat runs on the current key.'launch_credentials_unavailable',+ // The managed local model server is down (starting, or switched off): named as itself, not as+ // the custom-server endpoint copy, and with no Desktop-only pane (the Webapp shares this card).+ 'local_runtime_unavailable',// The owner did not confirm a forwarded send in time; it may already be queued: no Retry.'SESSION_OWNER_UNCONFIRMED','agent_init_failed',diff --git a/apps/desktop/src/store/onboarding-local-runtime.test.ts b/apps/desktop/src/store/onboarding-local-runtime.test.tsindex fb3b6811144..295f10174ac 100644--- a/apps/desktop/src/store/onboarding-local-runtime.test.ts+++ b/apps/desktop/src/store/onboarding-local-runtime.test.ts@@ -9,7 +9,7 @@ import { $desktopOnboarding, type DesktopOnboardingState, type OnboardingContextmarkOnboardingDecided()const SERVER_OFF =- 'The local model server is turned off. Turn it back on in Settings → Providers → Local models, or switch to another model.'+ 'The local model server is turned off. Turn it back on in the Hermes desktop app, or switch to another model with /model.'function coldState(): DesktopOnboardingState {return {@@ -74,7 +74,8 @@ describe('refreshOnboarding with the local model server down', () => {expect.objectContaining({action: expect.objectContaining({ label: 'Open Local models' }),id: 'local-runtime-unavailable',- message: SERVER_OFF+ // Desktop has the pane, so its notice names it beside the button that opens it.+ message: expect.stringContaining('Settings → Providers → Local models')}))})@@ -90,6 +91,7 @@ describe('refreshOnboarding with the local model server down', () => {const shown = notify.mock.calls.at(-1)?.[0]expect(shown?.action?.label).toBe('Choose another model')expect(shown?.message).toContain('Hermes desktop app')+ expect(shown?.message).not.toContain('Local models')})it('still opens onboarding for an uncoded failure (a missing credential)', async () => {diff --git a/apps/desktop/src/store/onboarding.ts b/apps/desktop/src/store/onboarding.tsindex 98d59faaa21..109aa9a125d 100644--- a/apps/desktop/src/store/onboarding.ts+++ b/apps/desktop/src/store/onboarding.ts@@ -336,7 +336,11 @@ export function settleLocalRuntimeNotice(runtime: RuntimeReadinessResult) {// The Webapp has no Local models pane (the flag is Electron-only), so there the way forward it can// offer is another model, and the sentence must not send the user to a pane they cannot open.const WEBAPP_LOCAL_RUNTIME_DOWN =- "The local model server isn't serving. Start it from the Hermes desktop app (Settings → Providers → Local models), or choose another model."+ "The local model server isn't serving. Start it from the Hermes desktop app, or choose another model."++// Desktop has the pane, so its notice names it next to the button that opens it.+const DESKTOP_LOCAL_RUNTIME_DOWN =+ "The local model server isn't serving. It may still be starting, or it was turned off: check Settings → Providers → Local models, or choose another model."function keepConfiguredWithLocalRuntimeDown(reason: string) {const pane = $localModelsEnabled.get()@@ -349,7 +353,7 @@ function keepConfiguredWithLocalRuntimeDown(reason: string) {: { label: 'Choose another model', onClick: () => setModelPickerOpen(true) },id: LOCAL_RUNTIME_NOTICE_ID,kind: 'warning',- message: pane ? reason : WEBAPP_LOCAL_RUNTIME_DOWN,+ message: pane ? DESKTOP_LOCAL_RUNTIME_DOWN : WEBAPP_LOCAL_RUNTIME_DOWN,title: 'Local model unavailable'})}diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.jsonindex 38dc4b7b473..bafd125d847 100644--- a/locales/_keys.desktop.json+++ b/locales/_keys.desktop.json@@ -250,6 +250,8 @@"assistant.thread.errorCodes.invalid_response.title","assistant.thread.errorCodes.launch_credentials_unavailable.body","assistant.thread.errorCodes.launch_credentials_unavailable.title",+ "assistant.thread.errorCodes.local_runtime_unavailable.body",+ "assistant.thread.errorCodes.local_runtime_unavailable.title","assistant.thread.errorCodes.loop_error.body","assistant.thread.errorCodes.loop_error.title","assistant.thread.errorCodes.model_not_found.body",