The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): name real interrupt controls in busy-guard copy, not /interrupt
Hermes Agent42d9d05f493f
diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsxindex 04f98adcfb5..35b2d841a71 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx@@ -1443,6 +1443,64 @@ describe('usePromptActions slash.exec dispatch payloads', () => {$queuedPromptsBySession.set({})})+ it('tells the user how to stop the reply when the busy kickoff cannot queue (#42093)', async () => {+ // The queue key resolves blank (a stored id that is only whitespace, so+ // `enqueueQueuedPrompt` trims it to null) — the one reachable 'busy'+ // return. The refusal copy used to demand `/interrupt`, a slash command+ // that does not exist on any surface; it must name the controls the user+ // actually has (Stop button / Esc) instead.+ $queuedPromptsBySession.set({})+ publishSessionState(RUNTIME_SESSION_ID, {+ ...createClientSessionState(' '),+ busy: true+ })++ const states: Record<string, unknown>[] = []+ const busyRef = { current: true }++ const requestGateway = vi.fn(async (method: string) => {+ if (method === 'slash.exec') {+ return {+ type: 'send',+ notice: '⊙ Goal set (20-turn budget): keep going',+ message: 'keep going'+ } as never+ }++ return {} as never+ })++ let handle: HarnessHandle | null = null+ await actRender(+ <Harness+ busyRef={busyRef}+ onReady={h => (handle = h)}+ onSeedState={s => states.push(s)}+ refreshSessions={async () => undefined}+ requestGateway={requestGateway}+ />+ )++ await handle!.submitText('/goal keep going')++ const renderedText = states+ .flatMap(state => {+ const messages = Array.isArray(state.messages)+ ? (state.messages as Array<{ parts?: Array<{ text?: string }> }>)+ : []++ return messages.flatMap(message => (message.parts ?? []).map(part => part.text ?? ''))+ })+ .join('\n')++ // Actionable controls, not the non-existent /interrupt dead end.+ expect(renderedText).toContain('Stop button')+ expect(renderedText).not.toContain('/interrupt')++ dropSessionState(RUNTIME_SESSION_ID)+ $queuedPromptsBySession.set({})+ })+it('gates the busy queue on the TARGET session, not the foreground busy flag', async () => {// `busyRef` is the FOREGROUND view's busy flag; a slash command runs against// the session `resolveTargetSessionId` picked, which is frequently not thediff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.tsindex 6cb86bd3a02..21fdbd778fa 100644--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts@@ -364,7 +364,7 @@ export function useSlashCommand(deps: SlashCommandDeps) {renderSlashOutput(queued === 'queued'? 'session busy — message queued to send when the current turn finishes'- : 'session busy — /interrupt the current turn before sending this command'+ : 'session busy — stop the current reply first (Stop button or Esc), then send this command')returndiff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.tsindex 6fbdc155658..2103204b316 100644--- a/apps/desktop/src/i18n/ar.ts+++ b/apps/desktop/src/i18n/ar.ts@@ -2457,7 +2457,7 @@ export const ar = defineLocale({copyFailure: 'فشل نسخ المعيار إلى الحافظة',continuationFailed: 'فشل إرسال متابعة الهدف',continuationQueued: 'تم استئناف الهدف — المتابعة في قائمة الانتظار حتى انتهاء الدور الحالي',- continuationBusy: 'تم استئناف الهدف — الجلسة مشغولة، نفّذ /interrupt للدور الحالي للمتابعة',+ continuationBusy: 'تم استئناف الهدف — الجلسة مشغولة، أوقف الرد الحالي أولاً (زر الإيقاف أو Esc) للمتابعة',controlUnavailable: msg => `عناصر تحكم الجلسة غير متاحة: ${msg}`,dismissError: 'تجاهل الخطأ',add: 'إضافة'diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.tsindex 5861cc16c9a..f189ab00622 100644--- a/apps/desktop/src/i18n/de.ts+++ b/apps/desktop/src/i18n/de.ts@@ -4445,7 +4445,7 @@ export const deOverrides = {copyFailure: 'Kriterium konnte nicht in die Zwischenablage kopiert werden',continuationFailed: 'Ziel-Fortsetzung konnte nicht übermittelt werden',continuationQueued: 'Ziel fortgesetzt — Fortsetzung in der Warteschlange, bis die aktuelle Runde endet',- continuationBusy: 'Ziel fortgesetzt — Session ist beschäftigt, /interrupt zum Fortsetzen der aktuellen Runde',+ continuationBusy: 'Ziel fortgesetzt — Session ist beschäftigt; stoppe zuerst die aktuelle Antwort (Stopp-Button oder Esc), um fortzufahren',controlUnavailable: msg => `Session-Steuerung nicht verfügbar: ${msg}`,dismissError: 'Fehler verwerfen',add: 'Hinzufügen'diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex 6f2e847c0dc..ed93456fa0d 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -3996,7 +3996,7 @@ export const en: Translations = {copyFailure: 'Failed to copy criterion to clipboard',continuationFailed: 'Failed to submit goal continuation',continuationQueued: 'Goal resumed — continuation queued until the current turn finishes',- continuationBusy: 'Goal resumed — session busy, /interrupt the current turn to continue',+ continuationBusy: 'Goal resumed — session busy, stop the current reply first (Stop button or Esc) to continue',controlUnavailable: msg => `Session controls unavailable: ${msg}`,dismissError: 'Dismiss error',add: 'Add'diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.tsindex b567a5dfd12..645891048d8 100644--- a/apps/desktop/src/i18n/es.ts+++ b/apps/desktop/src/i18n/es.ts@@ -4435,7 +4435,7 @@ export const esOverrides = {copyFailure: 'No se pudo copiar el criterio al portapapeles',continuationFailed: 'No se pudo enviar la continuación del objetivo',continuationQueued: 'Objetivo reanudado: la continuación queda en cola hasta que termine el turno actual',- continuationBusy: 'Objetivo reanudado: la sesión está ocupada; usa /interrupt en el turno actual para continuar',+ continuationBusy: 'Objetivo reanudado: la sesión está ocupada; detén primero la respuesta actual (botón Stop o Esc) para continuar',controlUnavailable: (msg: string) => `Controles de sesión no disponibles: ${msg}`,dismissError: 'Descartar error',add: 'Añadir'diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.tsindex bfba4f23fa3..4405c1adc29 100644--- a/apps/desktop/src/i18n/fr.ts+++ b/apps/desktop/src/i18n/fr.ts@@ -4456,7 +4456,7 @@ export const frOverrides = {copyFailure: 'Impossible de copier le critère dans le presse-papiers',continuationFailed: "Impossible de soumettre la poursuite de l'objectif",continuationQueued: 'Objectif repris — poursuite en attente de la fin du tour actuel',- continuationBusy: 'Objectif repris — session occupée, utilisez /interrupt pour poursuivre',+ continuationBusy: "Objectif repris — session occupée, arrêtez d'abord la réponse en cours (bouton Stop ou Échap) pour poursuivre",controlUnavailable: msg => `Commandes de session indisponibles : ${msg}`,dismissError: "Masquer l'erreur",add: 'Ajouter'diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.tsindex 7f9dce32008..a52151f61a6 100644--- a/apps/desktop/src/i18n/ja.ts+++ b/apps/desktop/src/i18n/ja.ts@@ -2874,7 +2874,7 @@ export const ja = defineLocale({copyFailure: '基準のコピーに失敗しました',continuationFailed: 'ゴールの継続送信に失敗しました',continuationQueued: 'ゴールを再開しました — 継続は現在のターン終了後に送信されます',- continuationBusy: 'ゴールを再開しました — セッションが実行中です。続行するには /interrupt してください',+ continuationBusy: 'ゴールを再開しました — セッションが実行中です。続行するには、まず現在の応答を停止してください(Stop ボタンまたは Esc)',controlUnavailable: msg => `セッション制御を利用できません: ${msg}`,dismissError: 'エラーを閉じる',add: '追加'diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.tsindex fb2db0f74aa..288aba7cc18 100644--- a/apps/desktop/src/i18n/ru.ts+++ b/apps/desktop/src/i18n/ru.ts@@ -3112,7 +3112,7 @@ export const ru = defineLocale({copyFailure: 'Не удалось скопировать критерий в буфер обмена',continuationFailed: 'Не удалось отправить продолжение цели',continuationQueued: 'Цель возобновлена — продолжение поставлено в очередь до конца текущего хода',- continuationBusy: 'Цель возобновлена — сессия занята, выполните /interrupt, чтобы продолжить',+ continuationBusy: 'Цель возобновлена — сессия занята; сначала остановите текущий ответ (кнопка Stop или Esc), чтобы продолжить',controlUnavailable: msg => `Управление сессией недоступно: ${msg}`,dismissError: 'Скрыть ошибку',add: 'Добавить'diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.tsindex c56c750b39b..886b6071ced 100644--- a/apps/desktop/src/i18n/zh-hant.ts+++ b/apps/desktop/src/i18n/zh-hant.ts@@ -3090,7 +3090,7 @@ export const zhHant = defineLocale({copyFailure: '複製條件到剪貼板失敗',continuationFailed: '提交目標延續內容失敗',continuationQueued: '目標已恢復 — 延續內容已排隊,將在目前回合結束後送出',- continuationBusy: '目標已恢復 — 會話忙碌中,請 /interrupt 目前回合以繼續',+ continuationBusy: '目標已恢復 — 會話忙碌中,請先停止目前回覆(Stop 按鈕或 Esc)以繼續',controlUnavailable: msg => `會話控制無法使用: ${msg}`,dismissError: '關閉錯誤',add: '新增'diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex da3c5e35d2f..0469310e97d 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -3786,7 +3786,7 @@ export const zh = defineLocale({copyFailure: '复制条件到剪贴板失败',continuationFailed: '提交目标后续内容失败',continuationQueued: '目标已恢复 — 后续内容已排队,将在当前回合结束后发送',- continuationBusy: '目标已恢复 — 会话正忙,请 /interrupt 当前回合以继续',+ continuationBusy: '目标已恢复 — 会话正忙,请先停止当前回复(Stop 按钮或 Esc)以继续',controlUnavailable: msg => `会话控制不可用: ${msg}`,dismissError: '关闭错误',add: '添加'