The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): /undo and /retry mid-reply say to stop the reply first
yoniebans31adb71e68e6
diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-session-commands.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-session-commands.tsindex bf6509372a1..73966aec076 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-session-commands.ts+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash-session-commands.ts@@ -9,7 +9,7 @@ import { $sessions, resolveComposerSessionKey } from '@/store/session'import { $sessionStates } from '@/store/session-states'import type { SubmissionDestination } from './submission-destination'-import { type GatewayRequest, isTargetSessionBusy, type SubmitTextOptions } from './utils'+import { type GatewayRequest, isSessionBusyError, isTargetSessionBusy, type SubmitTextOptions } from './utils'// Typed /undo, /retry, /steer and /queue: one behaviour per command on every surface, mirroring the// Ink TUI on the same shared gateway (ui-tui/src/app/slash/commands/core.ts +@@ -227,7 +227,7 @@ export function sessionCommandHandlers<C extends { arg: string }>(env: SessionCoout.render(rewound.count === 1 ? copy().undidOne('1') : copy().undidOther(String(rewound.count)))} catch (err) {- out.render(errorText(err))+ out.render(isSessionBusyError(err) ? copy().busy('undo') : errorText(err))}},retry: async (ctx: C) => {@@ -257,7 +257,7 @@ export function sessionCommandHandlers<C extends { arg: string }>(env: SessionCoawait submitPromptText(text, { destination, sessionId: out.sessionId, storedSessionId: out.storedSessionId })} catch (err) {- out.render(errorText(err))+ out.render(isSessionBusyError(err) ? copy().busy('retry') : errorText(err))}},steer: async (ctx: C) => {diff --git a/apps/desktop/src/i18n/ar_session_commands.ts b/apps/desktop/src/i18n/ar_session_commands.tsindex abd05f272b1..41f53352e1a 100644--- a/apps/desktop/src/i18n/ar_session_commands.ts+++ b/apps/desktop/src/i18n/ar_session_commands.ts@@ -6,6 +6,8 @@ export const arSessionCommands = {undidOther: (count: string) => `تم التراجع عن ${count} رسائل — الرسالة المحذوفة موجودة في مربع الكتابة`,retryNothing: 'لا يوجد ما يمكن إعادة محاولته',retryUnsupported: '/retry: لا يمكن إعادة محاولة الوسائط أو أجزاء المحتوى غير المعروفة',+ busy: (command: string) =>+ `الجلسة مشغولة — ما زال Hermes يرد. أوقف الرد الحالي أولاً (زر الإيقاف، أو Ctrl+C في الطرفية)، ثم شغّل /${command}.`,steerUsage: 'الاستخدام: /steer <الطلب>',steerQueued: (preview: string) => `أُضيف التوجيه إلى قائمة الانتظار — يصل بعد استدعاء الأداة التالي: "${preview}"`,steerNoActiveTurn: (preview: string) => `لا يوجد دور نشط — أُضيف إلى قائمة الانتظار للدور التالي: "${preview}"`,diff --git a/apps/desktop/src/i18n/de_session_commands.ts b/apps/desktop/src/i18n/de_session_commands.tsindex 55f339fab1a..dc2fbd04d32 100644--- a/apps/desktop/src/i18n/de_session_commands.ts+++ b/apps/desktop/src/i18n/de_session_commands.ts@@ -7,6 +7,8 @@ export const deSessionCommands = {`${count} Nachrichten rückgängig gemacht — die entfernte Nachricht steht im Eingabefeld`,retryNothing: 'nichts zum Wiederholen',retryUnsupported: '/retry: Medien oder unbekannte Inhaltsteile können nicht wiederholt werden',+ busy: (command: string) =>+ `Sitzung beschäftigt — Hermes antwortet noch. Beende zuerst die aktuelle Antwort (Stopp-Taste oder Strg+C im Terminal), dann führe /${command} aus.`,steerUsage: 'Verwendung: /steer <Prompt>',steerQueued: (preview: string) => `Steuerung eingereiht — kommt nach dem nächsten Tool-Aufruf an: „${preview}“`,steerNoActiveTurn: (preview: string) => `kein aktiver Turn — für den nächsten eingereiht: „${preview}“`,diff --git a/apps/desktop/src/i18n/en_session_commands.ts b/apps/desktop/src/i18n/en_session_commands.tsindex 3f5483c579e..75519a116fa 100644--- a/apps/desktop/src/i18n/en_session_commands.ts+++ b/apps/desktop/src/i18n/en_session_commands.ts@@ -8,6 +8,8 @@ export const enSessionCommands: SessionCommandNotices = {undidOther: (count: string) => `undid ${count} messages — the removed message is in the composer`,retryNothing: 'nothing to retry',retryUnsupported: '/retry: retry does not support media or unknown content parts',+ busy: (command: string) =>+ `session busy — Hermes is still replying. Stop the current reply first (Stop button, or Ctrl+C in a terminal), then run /${command}.`,steerUsage: 'usage: /steer <prompt>',steerQueued: (preview: string) => `steer queued — arrives after next tool call: "${preview}"`,steerNoActiveTurn: (preview: string) => `no active turn — queued for next: "${preview}"`,diff --git a/apps/desktop/src/i18n/es_session_commands.ts b/apps/desktop/src/i18n/es_session_commands.tsindex 37206f01f68..f5b562d75fc 100644--- a/apps/desktop/src/i18n/es_session_commands.ts+++ b/apps/desktop/src/i18n/es_session_commands.ts@@ -6,6 +6,8 @@ export const esSessionCommands = {undidOther: (count: string) => `se deshicieron ${count} mensajes — el mensaje eliminado está en el compositor`,retryNothing: 'nada que reintentar',retryUnsupported: '/retry: no se pueden reintentar contenidos multimedia o partes desconocidas',+ busy: (command: string) =>+ `sesión ocupada — Hermes sigue respondiendo. Detén primero la respuesta actual (botón Detener o Ctrl+C en una terminal) y luego ejecuta /${command}.`,steerUsage: 'uso: /steer <prompt>',steerQueued: (preview: string) => `indicación en cola — llega tras la próxima llamada a herramienta: "${preview}"`,steerNoActiveTurn: (preview: string) => `no hay turno activo — en cola para el siguiente: "${preview}"`,diff --git a/apps/desktop/src/i18n/fr_session_commands.ts b/apps/desktop/src/i18n/fr_session_commands.tsindex bc7ecb038e2..1b33c2050f8 100644--- a/apps/desktop/src/i18n/fr_session_commands.ts+++ b/apps/desktop/src/i18n/fr_session_commands.ts@@ -6,6 +6,8 @@ export const frSessionCommands = {undidOther: (count: string) => `${count} messages annulés — le message retiré est dans la zone de saisie`,retryNothing: 'rien à réessayer',retryUnsupported: '/retry : impossible de réessayer un contenu multimédia ou des parties inconnues',+ busy: (command: string) =>+ `session occupée — Hermes est encore en train de répondre. Arrêtez d’abord la réponse en cours (bouton Arrêter ou Ctrl+C dans un terminal), puis lancez /${command}.`,steerUsage: 'utilisation : /steer <prompt>',steerQueued: (preview: string) => `orientation en file — arrive après le prochain appel d’outil : « ${preview} »`,steerNoActiveTurn: (preview: string) => `aucun tour actif — mis en file pour le suivant : « ${preview} »`,diff --git a/apps/desktop/src/i18n/ja_session_commands.ts b/apps/desktop/src/i18n/ja_session_commands.tsindex df60b1c7cc1..63f055c56c4 100644--- a/apps/desktop/src/i18n/ja_session_commands.ts+++ b/apps/desktop/src/i18n/ja_session_commands.ts@@ -6,6 +6,8 @@ export const jaSessionCommands = {undidOther: (count: string) => `${count} 件のメッセージを元に戻しました — 削除したメッセージは入力欄にあります`,retryNothing: '再試行するものはありません',retryUnsupported: '/retry: メディアや不明なコンテンツを含むターンは再試行できません',+ busy: (command: string) =>+ `セッションが使用中です — Hermes はまだ応答中です。先に現在の応答を停止してから(停止ボタン、またはターミナルでは Ctrl+C)/${command} を実行してください。`,steerUsage: '使い方: /steer <プロンプト>',steerQueued: (preview: string) => `誘導を予約しました — 次のツール呼び出しの後に届きます: 「${preview}」`,steerNoActiveTurn: (preview: string) => `実行中のターンがありません — 次のターンに追加しました: 「${preview}」`,diff --git a/apps/desktop/src/i18n/ru_session_commands.ts b/apps/desktop/src/i18n/ru_session_commands.tsindex 8904968b02a..3bad032e9f8 100644--- a/apps/desktop/src/i18n/ru_session_commands.ts+++ b/apps/desktop/src/i18n/ru_session_commands.ts@@ -6,6 +6,8 @@ export const ruSessionCommands = {undidOther: (count: string) => `отменено сообщений: ${count} — удалённое сообщение в поле ввода`,retryNothing: 'нечего повторять',retryUnsupported: '/retry: нельзя повторить медиа или неизвестные части содержимого',+ busy: (command: string) =>+ `сеанс занят — Hermes ещё отвечает. Сначала остановите текущий ответ (кнопка «Стоп» или Ctrl+C в терминале), затем выполните /${command}.`,steerUsage: 'использование: /steer <запрос>',steerQueued: (preview: string) => `уточнение в очереди — придёт после следующего вызова инструмента: «${preview}»`,steerNoActiveTurn: (preview: string) => `нет активного хода — поставлено в очередь на следующий: «${preview}»`,diff --git a/apps/desktop/src/i18n/types_notices.ts b/apps/desktop/src/i18n/types_notices.tsindex 223439a47d7..f7a8d00395b 100644--- a/apps/desktop/src/i18n/types_notices.ts+++ b/apps/desktop/src/i18n/types_notices.ts@@ -42,6 +42,8 @@ export interface SessionCommandNotices {undidOther: (count: string) => stringretryNothing: stringretryUnsupported: string+ /** A rewind refused while a reply is running: main's stop-first guidance (tui_gateway busy_message). */+ busy: (command: string) => stringsteerUsage: stringsteerQueued: (preview: string) => stringsteerNoActiveTurn: (preview: string) => stringdiff --git a/apps/desktop/src/i18n/zh-hant_session_commands.ts b/apps/desktop/src/i18n/zh-hant_session_commands.tsindex ea0494314d7..08d2c1b21b1 100644--- a/apps/desktop/src/i18n/zh-hant_session_commands.ts+++ b/apps/desktop/src/i18n/zh-hant_session_commands.ts@@ -6,6 +6,8 @@ export const zhHantSessionCommands = {undidOther: (count: string) => `已復原 ${count} 則訊息 — 被移除的訊息已放回輸入框`,retryNothing: '沒有可重試的內容',retryUnsupported: '/retry:無法重試包含媒體或未知內容的訊息',+ busy: (command: string) =>+ `會話忙碌中 — Hermes 仍在回覆。請先停止目前回覆(Stop 按鈕,或在終端機中按 Ctrl+C),然後再執行 /${command}。`,steerUsage: '用法:/steer <提示>',steerQueued: (preview: string) => `引導已排入佇列 — 將在下一次工具呼叫後送達:「${preview}」`,steerNoActiveTurn: (preview: string) => `目前沒有進行中的回合 — 已排入下一回合:「${preview}」`,diff --git a/apps/desktop/src/i18n/zh_session_commands.ts b/apps/desktop/src/i18n/zh_session_commands.tsindex 27c60539613..e163444c3cf 100644--- a/apps/desktop/src/i18n/zh_session_commands.ts+++ b/apps/desktop/src/i18n/zh_session_commands.ts@@ -6,6 +6,8 @@ export const zhSessionCommands = {undidOther: (count: string) => `已撤销 ${count} 条消息 — 被移除的消息已放回输入框`,retryNothing: '没有可重试的内容',retryUnsupported: '/retry:无法重试包含媒体或未知内容的消息',+ busy: (command: string) =>+ `会话忙碌中 — Hermes 仍在回复。请先停止当前回复(Stop 按钮,或在终端中按 Ctrl+C),然后再运行 /${command}。`,steerUsage: '用法:/steer <提示>',steerQueued: (preview: string) => `引导已排队 — 将在下一次工具调用后送达:“${preview}”`,steerNoActiveTurn: (preview: string) => `当前没有进行中的回合 — 已排队到下一回合:“${preview}”`,diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.jsonindex 169b308837b..f2bac2b4b92 100644--- a/locales/_keys.desktop.json+++ b/locales/_keys.desktop.json@@ -2481,6 +2481,7 @@"promptNotices.mcpReloadDeferred","promptNotices.mcpReloadNotInChat","promptNotices.mcpReloadUnavailable",+ "promptNotices.sessionCommands.busy","promptNotices.sessionCommands.countOne","promptNotices.sessionCommands.countOther","promptNotices.sessionCommands.queueEditKept",