🙌 OpenHands: AI-Driven Development
fix(frontend): pause agent button (chat interface) (#11172)
Hiep Le1e23017bb16d
diff --git a/frontend/src/components/features/chat/chat-stop-button.tsx b/frontend/src/components/features/chat/chat-stop-button.tsxindex 1d90147e56..fbb081969c 100644--- a/frontend/src/components/features/chat/chat-stop-button.tsx+++ b/frontend/src/components/features/chat/chat-stop-button.tsx@@ -6,7 +6,12 @@ export interface ChatStopButtonProps {export function ChatStopButton({ handleStop }: ChatStopButtonProps) {return (- <button type="button" onClick={handleStop} data-testid="stop-button">+ <button+ type="button"+ onClick={handleStop}+ data-testid="stop-button"+ className="cursor-pointer"+ ><PauseIcon className="block max-w-none w-4 h-4" /></button>);diff --git a/frontend/src/components/features/controls/server-status.tsx b/frontend/src/components/features/controls/server-status.tsxindex 26fb2a1a7c..96e28277e9 100644--- a/frontend/src/components/features/controls/server-status.tsx+++ b/frontend/src/components/features/controls/server-status.tsx@@ -34,8 +34,7 @@ export function ServerStatus({const isStartingStatus =curAgentState === AgentState.LOADING || curAgentState === AgentState.INIT;- const isStopStatus =- curAgentState === AgentState.STOPPED || conversationStatus === "STOPPED";+ const isStopStatus = conversationStatus === "STOPPED";// Get the appropriate color based on agent statusconst getStatusColor = (): string => {diff --git a/frontend/src/i18n/translation.json b/frontend/src/i18n/translation.jsonindex ec7ee747c6..d11dbf4ae4 100644--- a/frontend/src/i18n/translation.json+++ b/frontend/src/i18n/translation.json@@ -9728,20 +9728,20 @@"uk": "або перегляньте"},"AGENT_ERROR$ERROR_ACTION_NOT_EXECUTED_STOPPED": {- "en": "Stop button pressed. The action has not been executed.",- "ja": "停止ボタンが押されました。アクションは実行されていません。",- "zh-CN": "按下了停止按钮。操作尚未执行。",- "zh-TW": "按下了停止按鈕。操作尚未執行。",- "ko-KR": "중지 버튼이 눌렸습니다. 작업이 실행되지 않았습니다.",- "no": "Stoppknappen ble trykket. Handlingen har ikke blitt utført.",- "it": "Pulsante di arresto premuto. L'azione non è stata eseguita.",- "pt": "Botão de parar pressionado. A ação não foi executada.",- "es": "Botón de detener presionado. La acción no se ha ejecutado.",- "ar": "تم الضغط على زر التوقف. لم يتم تنفيذ الإجراء.",- "fr": "Bouton d'arrêt appuyé. L'action n'a pas été exécutée.",- "tr": "Durdurma düğmesine basıldı. Eylem yürütülmedi.",- "de": "Stopp-Taste gedrückt. Die Aktion wurde nicht ausgeführt.",- "uk": "Натиснуто кнопку зупинки. Дію не виконано."+ "en": "Pause button pressed. Agent is stopped. The action has not been executed.",+ "ja": "一時停止ボタンが押されました。エージェントは停止しています。アクションは実行されていません。",+ "zh-CN": "已按下暂停按钮。代理已停止。该操作尚未执行。",+ "zh-TW": "已按下暫停按鈕。代理已停止。該操作尚未執行。",+ "ko-KR": "일시정지 버튼이 눌렸습니다. 에이전트가 중지되었습니다. 작업이 실행되지 않았습니다.",+ "no": "Pauseknappen ble trykket. Agenten er stoppet. Handlingen har ikke blitt utført.",+ "it": "Pulsante di pausa premuto. L'agente è fermo. L'azione non è stata eseguita.",+ "pt": "Botão de pausa pressionado. O agente está parado. A ação não foi executada.",+ "es": "Se presionó el botón de pausa. El agente está detenido. La acción no se ha ejecutado.",+ "ar": "تم الضغط على زر الإيقاف المؤقت. تم إيقاف الوكيل. لم يتم تنفيذ الإجراء.",+ "fr": "Bouton pause enfoncé. L'agent est arrêté. L'action n'a pas été exécutée.",+ "tr": "Duraklat düğmesine basıldı. Ajan durduruldu. Eylem gerçekleştirilmedi.",+ "de": "Pausentaste gedrückt. Agent ist gestoppt. Die Aktion wurde nicht ausgeführt.",+ "uk": "Натиснуто кнопку паузи. Агент зупинений. Дію не виконано."},"AGENT_ERROR$ERROR_ACTION_NOT_EXECUTED_ERROR": {"en": "The action has not been executed due to a runtime error. The runtime system may have crashed and restarted due to resource constraints. Any previously established system state, dependencies, or environment variables may have been lost.",