Skip to content

The agent that grows with you

refactor: move constructor param tables and clarify copy into siblings

alt-glitch37f9a0f480e6
diff --git a/agent/agent_init.py b/agent/agent_init.py
index 632232c100b..d929838b720 100644
--- a/agent/agent_init.py
+++ b/agent/agent_init.py
@@ -24,6 +24,7 @@ from urllib.parse import parse_qs, urlparse, urlunparse
from agent.context_compressor import ContextCompressor
from agent.agent_init_fallback import _fallback_entries, _init_fallback_chain, recompute_init_fallback_api_mode
+from agent.agent_init_params import _CALLBACK_PARAMS, _GATEWAY_IDENTITY_PARAMS, _PASSTHROUGH_PARAMS
from agent.agent_runtime_helpers import _ra
from agent.iteration_budget import IterationBudget, normalize_budget_warning_ratio
from agent.memory_manager import StreamingContextScrubber
@@ -2326,37 +2327,6 @@ _USAGE_STATE: dict[str, Any] = {
"_api_output_history": lambda: deque(maxlen=10),
}
-# Constructor params stored verbatim under the same name.
-_PASSTHROUGH_PARAMS = (
- "model", "max_iterations", "save_trajectories", "verbose_logging", "quiet_mode",
- "tool_progress_mode", "ephemeral_system_prompt", "platform", "skip_context_files",
- "load_soul_identity", "pass_session_id", "log_prefix_chars",
- # OpenRouter provider preferences
- "providers_allowed", "providers_ignored", "providers_order", "provider_sort",
- "provider_require_parameters", "provider_data_collection", "openrouter_min_coding_score",
- # Toolset filtering
- "enabled_toolsets", "disabled_toolsets",
- # Model response configuration (None = provider/model default)
- "max_tokens", "reasoning_config", "service_tier",
- "side_agent",
-)
-# Gateway identity params stored as ``agent._<name>``. gateway_session_key is the stable
-# per-chat key (e.g. agent:main:telegram:dm:123).
-_GATEWAY_IDENTITY_PARAMS = (
- "user_id", "user_id_alt", "user_name", "chat_id", "chat_name", "chat_type", "thread_id",
- "gateway_session_key",
-)
-_CALLBACK_PARAMS = (
- "tool_progress_callback", "tool_start_callback", "tool_complete_callback",
- "tool_result_metadata_callback",
- "thinking_callback", "reasoning_callback", "clarify_callback",
- "read_terminal_callback", "read_preview_callback", "drive_preview_callback",
- "read_window_below_callback", "connection_callback", "tour_callback", "theme_callback",
- "setup_choose_callback", "setup_beat_callback", "step_callback", "stream_delta_callback", "interim_assistant_callback",
- "status_callback", "notice_callback", "notice_clear_callback",
- "event_callback", "reaction_callback", "tool_gen_callback",
-)
-
def init_agent(
agent, base_url: str | None = None, api_key: str | None = None, provider: str | None = None, api_mode: str | None = None,
diff --git a/agent/agent_init_params.py b/agent/agent_init_params.py
new file mode 100644
index 00000000000..3345f37921a
--- /dev/null
+++ b/agent/agent_init_params.py
@@ -0,0 +1,33 @@
+"""Names of the ``AIAgent`` constructor params that ``init_agent`` copies onto the agent."""
+
+# Constructor params stored verbatim under the same name.
+_PASSTHROUGH_PARAMS = (
+ "model", "max_iterations", "save_trajectories", "verbose_logging", "quiet_mode",
+ "tool_progress_mode", "ephemeral_system_prompt", "platform", "skip_context_files",
+ "load_soul_identity", "pass_session_id", "log_prefix_chars",
+ # OpenRouter provider preferences
+ "providers_allowed", "providers_ignored", "providers_order", "provider_sort",
+ "provider_require_parameters", "provider_data_collection", "openrouter_min_coding_score",
+ # Toolset filtering
+ "enabled_toolsets", "disabled_toolsets",
+ # Model response configuration (None = provider/model default)
+ "max_tokens", "reasoning_config", "service_tier",
+ "side_agent",
+)
+# Gateway identity params stored as ``agent._<name>``. gateway_session_key is the stable
+# per-chat key (e.g. agent:main:telegram:dm:123).
+_GATEWAY_IDENTITY_PARAMS = (
+ "user_id", "user_id_alt", "user_name", "chat_id", "chat_name", "chat_type", "thread_id",
+ "gateway_session_key",
+)
+_CALLBACK_PARAMS = (
+ "tool_progress_callback", "tool_start_callback", "tool_complete_callback",
+ "tool_result_metadata_callback",
+ "thinking_callback", "reasoning_callback", "clarify_callback",
+ "read_terminal_callback", "read_preview_callback", "drive_preview_callback",
+ "read_window_below_callback", "connection_callback", "tour_callback", "theme_callback",
+ "setup_choose_callback", "setup_beat_callback", "step_callback", "stream_delta_callback",
+ "interim_assistant_callback",
+ "status_callback", "notice_callback", "notice_clear_callback",
+ "event_callback", "reaction_callback", "tool_gen_callback",
+)
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
index 3e7139fa18e..a6f242573cc 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
@@ -193,9 +193,15 @@ export function handleInputRequestEvent(ctx: GatewayEventContext): boolean {
clearVaultSaveLoginRequest(sessionId, id)
} else if ($vaultUnlockRequests.get()[key]?.requestId === id) {
clearVaultUnlockRequest(sessionId, id)
- } else if (sessionId && (clearThemePick(id, sessionId) || clearSetupBeat(id, sessionId))) {
- deps.updateSessionState(sessionId, state => ({ ...state, needsInput: false }))
+ } else {
+ clearParkedCard(ctx, id)
}
return true
}
+
+function clearParkedCard({ deps, sessionId }: GatewayEventContext, requestId: string) {
+ if (sessionId && (clearThemePick(requestId, sessionId) || clearSetupBeat(requestId, sessionId))) {
+ deps.updateSessionState(sessionId, state => ({ ...state, needsInput: false }))
+ }
+}
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index 99ba8fb4bfc..76ea8839ddc 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -2,6 +2,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { deAuxTasks } from './de_aux_tasks'
import { deBoot } from './de_boot'
+import { deClarify } from './de_clarify'
import { deConnectorAccounts } from './de_connector_accounts'
import { deConnectorCard } from './de_connector_card'
import { deFirstRun } from './de_first_run'
@@ -5239,24 +5240,7 @@ export const deOverrides = {
`Dies fügt das Muster „${pattern}“ Ihrer dauerhaften Zulassungsliste hinzu (~/.hermes/config.yaml). Hermes fragt bei solchen Befehlen nicht mehr nach – weder in dieser noch in zukünftigen Sessions.`,
alwaysAllow: 'Immer erlauben'
},
- clarify: {
- notReady: 'Klärungsanfrage ist noch nicht bereit',
- gatewayDisconnected: 'Hermes-Gateway ist nicht verbunden',
- sendFailed: 'Klärungsantwort konnte nicht gesendet werden',
- loadingQuestion: 'Frage wird geladen…',
- other: 'Anderes (Antwort eingeben)',
- placeholder: 'Geben Sie Ihre Antwort ein…',
- skip: 'Überspringen',
- skipped: 'Übersprungen',
- noAnswer: 'Keine Antwort',
- confirmAndContinueLabel: 'Bestätigen und fortfahren',
- singleSelectHint: 'Eines auswählen',
- multiSelectHint: 'Alle Treffer auswählen',
- oneQuestion: '1 Frage',
- questionProgress: (answered, total) => `${answered} von ${total} beantwortet`,
- notDelivered:
- 'Diese Frage hat die App nicht erreicht und kann hier nicht beantwortet werden. Klicken Sie auf Stopp, um den Durchgang zu beenden, und antworten Sie dann im Chat.'
- },
+ clarify: deClarify,
themePicker: deThemePicker,
catalogInstall: {
preparing: 'Installation wird vorbereitet…',
diff --git a/apps/desktop/src/i18n/de_clarify.ts b/apps/desktop/src/i18n/de_clarify.ts
new file mode 100644
index 00000000000..e7690e2c0b6
--- /dev/null
+++ b/apps/desktop/src/i18n/de_clarify.ts
@@ -0,0 +1,20 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const deClarify: Partial<ClarifyCopy> = {
+ notReady: 'Klärungsanfrage ist noch nicht bereit',
+ gatewayDisconnected: 'Hermes-Gateway ist nicht verbunden',
+ sendFailed: 'Klärungsantwort konnte nicht gesendet werden',
+ loadingQuestion: 'Frage wird geladen…',
+ other: 'Anderes (Antwort eingeben)',
+ placeholder: 'Geben Sie Ihre Antwort ein…',
+ skip: 'Überspringen',
+ skipped: 'Übersprungen',
+ noAnswer: 'Keine Antwort',
+ confirmAndContinueLabel: 'Bestätigen und fortfahren',
+ singleSelectHint: 'Eines auswählen',
+ multiSelectHint: 'Alle Treffer auswählen',
+ oneQuestion: '1 Frage',
+ questionProgress: (answered, total) => `${answered} von ${total} beantwortet`,
+ notDelivered:
+ 'Diese Frage hat die App nicht erreicht und kann hier nicht beantwortet werden. Klicken Sie auf Stopp, um den Durchgang zu beenden, und antworten Sie dann im Chat.'
+}
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index ab6f636cd23..126c782d7c3 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -5,6 +5,7 @@ import { enAuxTasks } from './en_aux_tasks'
import { enBilling } from './en_billing'
import { enBoot } from './en_boot'
import { enCatalogInstall } from './en_catalog_install'
+import { enClarify } from './en_clarify'
import { enConnectorAccounts } from './en_connector_accounts'
import { enConnectorCard } from './en_connector_card'
import { enFirstRun } from './en_first_run'
@@ -4810,24 +4811,7 @@ export const en: Translations = {
`This adds the “${pattern}” pattern to your permanent allowlist (~/.hermes/config.yaml). Hermes won’t ask again for commands like this — in this session or any future one.`,
alwaysAllow: 'Always allow'
},
- clarify: {
- notReady: 'Clarify request is not ready yet',
- gatewayDisconnected: 'Hermes is offline right now. Reconnect, then send it again.',
- sendFailed: 'Could not send clarify response',
- loadingQuestion: 'Loading question…',
- other: 'Other (type your answer)',
- placeholder: 'Type your answer…',
- skip: 'Skip',
- skipped: 'Skipped',
- noAnswer: 'No answer',
- confirmAndContinueLabel: 'Confirm and continue',
- singleSelectHint: 'Pick one',
- multiSelectHint: 'Select all that apply',
- oneQuestion: '1 question',
- questionProgress: (answered, total) => `${answered} of ${total} answered`,
- notDelivered:
- "This question didn't reach the app, so it can't be answered here. Press Stop to end the turn, then reply in chat."
- },
+ clarify: enClarify,
themePicker: enThemePicker,
catalogInstall: enCatalogInstall,
mcpSetup: {
diff --git a/apps/desktop/src/i18n/en_clarify.ts b/apps/desktop/src/i18n/en_clarify.ts
new file mode 100644
index 00000000000..3db68306290
--- /dev/null
+++ b/apps/desktop/src/i18n/en_clarify.ts
@@ -0,0 +1,20 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const enClarify: ClarifyCopy = {
+ notReady: 'Clarify request is not ready yet',
+ gatewayDisconnected: 'Hermes is offline right now. Reconnect, then send it again.',
+ sendFailed: 'Could not send clarify response',
+ loadingQuestion: 'Loading question…',
+ other: 'Other (type your answer)',
+ placeholder: 'Type your answer…',
+ skip: 'Skip',
+ skipped: 'Skipped',
+ noAnswer: 'No answer',
+ confirmAndContinueLabel: 'Confirm and continue',
+ singleSelectHint: 'Pick one',
+ multiSelectHint: 'Select all that apply',
+ oneQuestion: '1 question',
+ questionProgress: (answered, total) => `${answered} of ${total} answered`,
+ notDelivered:
+ "This question didn't reach the app, so it can't be answered here. Press Stop to end the turn, then reply in chat."
+}
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index b56da97800c..5a558f82ca5 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -3,6 +3,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { esAuxTasks } from './es_aux_tasks'
import { esBoot } from './es_boot'
+import { esClarify } from './es_clarify'
import { esConnectorAccounts } from './es_connector_accounts'
import { esConnectorCard } from './es_connector_card'
import { esFirstRun } from './es_first_run'
@@ -5235,24 +5236,7 @@ export const esOverrides = {
`Esto añade el patrón “${pattern}” a tu allowlist permanente (~/.hermes/config.yaml). Hermes no volverá a preguntar por comandos como este, ni en esta sesión ni en futuras.`,
alwaysAllow: 'Permitir siempre'
},
- clarify: {
- notReady: 'La solicitud de aclaración aún no está lista',
- gatewayDisconnected: 'Hermes está sin conexión ahora mismo. Reconéctate y vuelve a enviarlo.',
- sendFailed: 'No se pudo enviar la respuesta de aclaración',
- loadingQuestion: 'Cargando pregunta…',
- other: 'Otro (escribe tu respuesta)',
- placeholder: 'Escribe tu respuesta…',
- skip: 'Omitir',
- skipped: 'Omitido',
- noAnswer: 'Sin respuesta',
- confirmAndContinueLabel: 'Confirmar y continuar',
- singleSelectHint: 'Elige una',
- multiSelectHint: 'Elige todas las que correspondan',
- oneQuestion: '1 pregunta',
- questionProgress: (answered, total) => `${answered} de ${total} respondidas`,
- notDelivered:
- 'Esta pregunta no llegó a la app, así que no se puede responder aquí. Pulsa Detener para terminar el turno y luego responde en el chat.'
- },
+ clarify: esClarify,
themePicker: esThemePicker,
catalogInstall: {
preparing: 'Preparando la instalación…',
diff --git a/apps/desktop/src/i18n/es_clarify.ts b/apps/desktop/src/i18n/es_clarify.ts
new file mode 100644
index 00000000000..4b20dfd9795
--- /dev/null
+++ b/apps/desktop/src/i18n/es_clarify.ts
@@ -0,0 +1,20 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const esClarify: Partial<ClarifyCopy> = {
+ notReady: 'La solicitud de aclaración aún no está lista',
+ gatewayDisconnected: 'Hermes está sin conexión ahora mismo. Reconéctate y vuelve a enviarlo.',
+ sendFailed: 'No se pudo enviar la respuesta de aclaración',
+ loadingQuestion: 'Cargando pregunta…',
+ other: 'Otro (escribe tu respuesta)',
+ placeholder: 'Escribe tu respuesta…',
+ skip: 'Omitir',
+ skipped: 'Omitido',
+ noAnswer: 'Sin respuesta',
+ confirmAndContinueLabel: 'Confirmar y continuar',
+ singleSelectHint: 'Elige una',
+ multiSelectHint: 'Elige todas las que correspondan',
+ oneQuestion: '1 pregunta',
+ questionProgress: (answered, total) => `${answered} de ${total} respondidas`,
+ notDelivered:
+ 'Esta pregunta no llegó a la app, así que no se puede responder aquí. Pulsa Detener para terminar el turno y luego responde en el chat.'
+}
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index 1305ee88db0..893c8a65e49 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -3,6 +3,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { frAuxTasks } from './fr_aux_tasks'
import { frBoot } from './fr_boot'
+import { frClarify } from './fr_clarify'
import { frConnectorAccounts } from './fr_connector_accounts'
import { frConnectorCard } from './fr_connector_card'
import { frFirstRun } from './fr_first_run'
@@ -5248,24 +5249,7 @@ export const frOverrides = {
`Cela ajoute le motif « ${pattern} » à votre liste d'autorisation permanente (~/.hermes/config.yaml). Hermes ne redemandera plus pour ce type de commande — que ce soit dans cette session ou dans une session future.`,
alwaysAllow: 'Toujours autoriser'
},
- clarify: {
- notReady: "La demande de clarification n'est pas encore prête",
- gatewayDisconnected: "La Gateway Hermes n'est pas connectée",
- sendFailed: "Impossible d'envoyer la réponse de clarification",
- loadingQuestion: 'Chargement de la question…',
- other: 'Autre (saisissez votre réponse)',
- placeholder: 'Saisissez votre réponse…',
- skip: 'Passer',
- skipped: 'Ignoré',
- noAnswer: 'Pas de réponse',
- confirmAndContinueLabel: 'Confirmer et continuer',
- singleSelectHint: 'Choisir une réponse',
- multiSelectHint: 'Choisir toutes les réponses qui s’appliquent',
- oneQuestion: '1 question',
- questionProgress: (answered, total) => `${answered} réponse${answered === 1 ? '' : 's'} sur ${total}`,
- notDelivered:
- "Cette question n'a pas atteint l'app, elle ne peut donc pas être répondue ici. Appuyez sur Arrêter pour terminer le tour, puis répondez dans le chat."
- },
+ clarify: frClarify,
themePicker: frThemePicker,
catalogInstall: {
preparing: 'Préparation de l’installation…',
diff --git a/apps/desktop/src/i18n/fr_clarify.ts b/apps/desktop/src/i18n/fr_clarify.ts
new file mode 100644
index 00000000000..ac0583b6d05
--- /dev/null
+++ b/apps/desktop/src/i18n/fr_clarify.ts
@@ -0,0 +1,20 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const frClarify: Partial<ClarifyCopy> = {
+ notReady: "La demande de clarification n'est pas encore prête",
+ gatewayDisconnected: "La Gateway Hermes n'est pas connectée",
+ sendFailed: "Impossible d'envoyer la réponse de clarification",
+ loadingQuestion: 'Chargement de la question…',
+ other: 'Autre (saisissez votre réponse)',
+ placeholder: 'Saisissez votre réponse…',
+ skip: 'Passer',
+ skipped: 'Ignoré',
+ noAnswer: 'Pas de réponse',
+ confirmAndContinueLabel: 'Confirmer et continuer',
+ singleSelectHint: 'Choisir une réponse',
+ multiSelectHint: 'Choisir toutes les réponses qui s’appliquent',
+ oneQuestion: '1 question',
+ questionProgress: (answered, total) => `${answered} réponse${answered === 1 ? '' : 's'} sur ${total}`,
+ notDelivered:
+ "Cette question n'a pas atteint l'app, elle ne peut donc pas être répondue ici. Appuyez sur Arrêter pour terminer le tour, puis répondez dans le chat."
+}
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 7a88d8d8676..088a7817a87 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -3,6 +3,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { introJa } from './intro-ja'
import { jaAuxTasks } from './ja_aux_tasks'
+import { jaClarify } from './ja_clarify'
import { jaConnectors } from './ja_connectors'
import { jaFirstRun } from './ja_first_run'
import { jaLocalModels } from './ja_local_models'
@@ -3548,24 +3549,7 @@ export const jaOverrides = {
`これにより "${pattern}" パターンが永続的な許可リスト (~/.hermes/config.yaml) に追加されます。Hermes はこのセッションや将来のセッションで、このようなコマンドについて再度尋ねません。`,
alwaysAllow: '常に許可'
},
- clarify: {
- notReady: '明確化リクエストはまだ準備できていません',
- gatewayDisconnected: 'Hermes ゲートウェイが接続されていません',
- sendFailed: '明確化応答を送信できませんでした',
- loadingQuestion: '質問を読み込み中…',
- other: 'その他(回答を入力)',
- placeholder: '回答を入力…',
- skip: 'スキップ',
- skipped: 'スキップ済み',
- noAnswer: '回答なし',
- confirmAndContinueLabel: '確定して続行',
- singleSelectHint: '1つ選ぶ',
- multiSelectHint: '該当するものをすべて選択',
- oneQuestion: '1問',
- questionProgress: (answered, total) => `${total}問中${answered}問回答済み`,
- notDelivered:
- 'この質問はアプリに届かなかったため、ここでは回答できません。停止を押してターンを終了し、チャットで返信してください。'
- },
+ clarify: jaClarify,
themePicker: jaThemePicker,
tool: {
copyCode: 'コードをコピー',
diff --git a/apps/desktop/src/i18n/ja_clarify.ts b/apps/desktop/src/i18n/ja_clarify.ts
new file mode 100644
index 00000000000..6e2ceda6a53
--- /dev/null
+++ b/apps/desktop/src/i18n/ja_clarify.ts
@@ -0,0 +1,20 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const jaClarify: Partial<ClarifyCopy> = {
+ notReady: '明確化リクエストはまだ準備できていません',
+ gatewayDisconnected: 'Hermes ゲートウェイが接続されていません',
+ sendFailed: '明確化応答を送信できませんでした',
+ loadingQuestion: '質問を読み込み中…',
+ other: 'その他(回答を入力)',
+ placeholder: '回答を入力…',
+ skip: 'スキップ',
+ skipped: 'スキップ済み',
+ noAnswer: '回答なし',
+ confirmAndContinueLabel: '確定して続行',
+ singleSelectHint: '1つ選ぶ',
+ multiSelectHint: '該当するものをすべて選択',
+ oneQuestion: '1問',
+ questionProgress: (answered, total) => `${total}問中${answered}問回答済み`,
+ notDelivered:
+ 'この質問はアプリに届かなかったため、ここでは回答できません。停止を押してターンを終了し、チャットで返信してください。'
+}
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index 66fd66e6859..2a35cd626ca 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -2,6 +2,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { ruAuxTasks } from './ru_aux_tasks'
+import { ruClarify } from './ru_clarify'
import { ruConnectors } from './ru_connectors'
import { ruFirstRun } from './ru_first_run'
import { ruModelMenu } from './ru_model_menu'
@@ -3730,24 +3731,7 @@ export const ruOverrides = {
`Это добавит паттерн «${pattern}» в ваш постоянный список разрешений (~/.hermes/config.yaml). Hermes больше не будет спрашивать о подобных командах — ни в этом сеансе, ни в будущем.`,
alwaysAllow: 'Всегда разрешать'
},
- clarify: {
- notReady: 'Запрос уточнения ещё не готов',
- gatewayDisconnected: 'Шлюз Hermes не подключён',
- sendFailed: 'Не удалось отправить ответ на уточнение',
- loadingQuestion: 'Загрузка вопроса…',
- other: 'Другое (введите ответ)',
- placeholder: 'Введите ваш ответ…',
- skip: 'Пропустить',
- skipped: 'Пропущено',
- noAnswer: 'Нет ответа',
- confirmAndContinueLabel: 'Подтвердить и продолжить',
- singleSelectHint: 'Выберите один',
- multiSelectHint: 'Выберите все подходящие',
- oneQuestion: '1 вопрос',
- questionProgress: (answered, total) => `Ответ дан на ${answered} из ${total}`,
- notDelivered:
- 'Этот вопрос не дошёл до приложения, поэтому ответить здесь нельзя. Нажмите «Стоп», чтобы завершить ход, и ответьте в чате.'
- },
+ clarify: ruClarify,
themePicker: ruThemePicker,
catalogInstall: {
preparing: 'Готовим установку…',
diff --git a/apps/desktop/src/i18n/ru_clarify.ts b/apps/desktop/src/i18n/ru_clarify.ts
new file mode 100644
index 00000000000..f8aff1e17da
--- /dev/null
+++ b/apps/desktop/src/i18n/ru_clarify.ts
@@ -0,0 +1,20 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const ruClarify: Partial<ClarifyCopy> = {
+ notReady: 'Запрос уточнения ещё не готов',
+ gatewayDisconnected: 'Шлюз Hermes не подключён',
+ sendFailed: 'Не удалось отправить ответ на уточнение',
+ loadingQuestion: 'Загрузка вопроса…',
+ other: 'Другое (введите ответ)',
+ placeholder: 'Введите ваш ответ…',
+ skip: 'Пропустить',
+ skipped: 'Пропущено',
+ noAnswer: 'Нет ответа',
+ confirmAndContinueLabel: 'Подтвердить и продолжить',
+ singleSelectHint: 'Выберите один',
+ multiSelectHint: 'Выберите все подходящие',
+ oneQuestion: '1 вопрос',
+ questionProgress: (answered, total) => `Ответ дан на ${answered} из ${total}`,
+ notDelivered:
+ 'Этот вопрос не дошёл до приложения, поэтому ответить здесь нельзя. Нажмите «Стоп», чтобы завершить ход, и ответьте в чате.'
+}
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index b10c773451e..8d9474bc188 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -13,6 +13,7 @@ import type { AuxTaskCopyMap } from './types_aux_tasks'
import type { BillingTranslations } from './types_billing'
import type { BootTranslations } from './types_boot'
import type { CatalogInstallTranslations } from './types_catalog_install'
+import type { ClarifyCopy } from './types_clarify'
import type { ConnectorAccountsTranslations, ConnectorCardTranslations } from './types_connectors'
import type { FirstRunCopy } from './types_first_run'
import type { ModelMenuTranslations } from './types_model_menu'
@@ -4101,23 +4102,7 @@ export interface Translations extends NoticeTranslations {
alwaysDescription: (pattern: string) => string
alwaysAllow: string
}
- clarify: {
- notReady: string
- gatewayDisconnected: string
- sendFailed: string
- loadingQuestion: string
- other: string
- placeholder: string
- skip: string
- skipped: string
- noAnswer: string
- confirmAndContinueLabel: string
- singleSelectHint: string
- multiSelectHint: string
- oneQuestion: string
- questionProgress: (answered: number, total: number) => string
- notDelivered: string
- }
+ clarify: ClarifyCopy
themePicker: ThemePickerCopy
catalogInstall: CatalogInstallTranslations
mcpSetup: {
diff --git a/apps/desktop/src/i18n/types_clarify.ts b/apps/desktop/src/i18n/types_clarify.ts
new file mode 100644
index 00000000000..c786c19a1c9
--- /dev/null
+++ b/apps/desktop/src/i18n/types_clarify.ts
@@ -0,0 +1,18 @@
+/** The clarify question card. */
+export interface ClarifyCopy {
+ notReady: string
+ gatewayDisconnected: string
+ sendFailed: string
+ loadingQuestion: string
+ other: string
+ placeholder: string
+ skip: string
+ skipped: string
+ noAnswer: string
+ confirmAndContinueLabel: string
+ singleSelectHint: string
+ multiSelectHint: string
+ oneQuestion: string
+ questionProgress: (answered: number, total: number) => string
+ notDelivered: string
+}
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 3ea6e25ff32..a887e7e034e 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -3,6 +3,7 @@ import { defineFieldCopy } from '@/app/settings/field-copy'
import { defineLocale, type TranslationOverrides } from './define-locale'
import { introZh } from './intro-zh'
import { zhAuxTasks } from './zh_aux_tasks'
+import { zhClarify } from './zh_clarify'
import { zhConnectorCard } from './zh_connector_card'
import { zhFirstRun } from './zh_first_run'
import { zhLocalModels } from './zh_local_models'
@@ -4524,23 +4525,7 @@ export const zhOverrides = {
`这会将“${pattern}”模式加入永久允许列表 (~/.hermes/config.yaml)。Hermes 对类似命令将不再询问,包括当前会话和未来会话。`,
alwaysAllow: '始终允许'
},
- clarify: {
- notReady: '澄清请求尚未就绪',
- gatewayDisconnected: 'Hermes 网关未连接',
- sendFailed: '无法发送澄清响应',
- loadingQuestion: '正在加载问题…',
- other: '其他 (输入你的答案)',
- placeholder: '输入你的答案…',
- skip: '跳过',
- skipped: '已跳过',
- noAnswer: '未回答',
- confirmAndContinueLabel: '确认并继续',
- singleSelectHint: '选一个',
- multiSelectHint: '可多选',
- oneQuestion: '1 个问题',
- questionProgress: (answered, total) => `已回答 ${answered}/${total}`,
- notDelivered: '此问题未送达应用,无法在此回答。请按停止结束本轮,然后在聊天中回复。'
- },
+ clarify: zhClarify,
themePicker: zhThemePicker,
catalogInstall: {
preparing: '正在准备安装…',
diff --git a/apps/desktop/src/i18n/zh_clarify.ts b/apps/desktop/src/i18n/zh_clarify.ts
new file mode 100644
index 00000000000..6c28434aa9a
--- /dev/null
+++ b/apps/desktop/src/i18n/zh_clarify.ts
@@ -0,0 +1,19 @@
+import type { ClarifyCopy } from './types_clarify'
+
+export const zhClarify: Partial<ClarifyCopy> = {
+ notReady: '澄清请求尚未就绪',
+ gatewayDisconnected: 'Hermes 网关未连接',
+ sendFailed: '无法发送澄清响应',
+ loadingQuestion: '正在加载问题…',
+ other: '其他 (输入你的答案)',
+ placeholder: '输入你的答案…',
+ skip: '跳过',
+ skipped: '已跳过',
+ noAnswer: '未回答',
+ confirmAndContinueLabel: '确认并继续',
+ singleSelectHint: '选一个',
+ multiSelectHint: '可多选',
+ oneQuestion: '1 个问题',
+ questionProgress: (answered, total) => `已回答 ${answered}/${total}`,
+ notDelivered: '此问题未送达应用,无法在此回答。请按停止结束本轮,然后在聊天中回复。'
+}