diff --git a/frontend/src/components/features/conversation-panel/confirm-stop-modal.tsx b/frontend/src/components/features/conversation-panel/confirm-stop-modal.tsx index 162d43a9eb..30ebb5759a 100644 --- a/frontend/src/components/features/conversation-panel/confirm-stop-modal.tsx +++ b/frontend/src/components/features/conversation-panel/confirm-stop-modal.tsx @@ -23,9 +23,9 @@ export function ConfirmStopModal({
- +
- + )} diff --git a/frontend/src/components/features/conversation-panel/conversation-state-indicator.tsx b/frontend/src/components/features/conversation-panel/conversation-state-indicator.tsx index 2fdec49473..83bb571f24 100644 --- a/frontend/src/components/features/conversation-panel/conversation-state-indicator.tsx +++ b/frontend/src/components/features/conversation-panel/conversation-state-indicator.tsx @@ -1,4 +1,6 @@ import { ConversationStatus } from "#/types/conversation-status"; +import ArchivedIcon from "./state-indicators/archived.svg?react"; +import ErrorIcon from "./state-indicators/error.svg?react"; import RunningIcon from "./state-indicators/running.svg?react"; import StartingIcon from "./state-indicators/starting.svg?react"; import StoppedIcon from "./state-indicators/stopped.svg?react"; @@ -9,6 +11,8 @@ const CONVERSATION_STATUS_INDICATORS: Record = { STOPPED: StoppedIcon, RUNNING: RunningIcon, STARTING: StartingIcon, + ARCHIVED: ArchivedIcon, + ERROR: ErrorIcon, }; interface ConversationStateIndicatorProps { diff --git a/frontend/src/components/features/conversation-panel/state-indicators/archived.svg b/frontend/src/components/features/conversation-panel/state-indicators/archived.svg new file mode 100644 index 0000000000..9ae37de1fa --- /dev/null +++ b/frontend/src/components/features/conversation-panel/state-indicators/archived.svg @@ -0,0 +1 @@ + diff --git a/frontend/src/components/features/conversation-panel/state-indicators/error.svg b/frontend/src/components/features/conversation-panel/state-indicators/error.svg new file mode 100644 index 0000000000..c956633ba4 --- /dev/null +++ b/frontend/src/components/features/conversation-panel/state-indicators/error.svg @@ -0,0 +1 @@ + diff --git a/frontend/src/i18n/declaration.ts b/frontend/src/i18n/declaration.ts index 2b535e0fc1..a7ee2d725b 100644 --- a/frontend/src/i18n/declaration.ts +++ b/frontend/src/i18n/declaration.ts @@ -328,6 +328,7 @@ export enum I18nKey { USER$ACCOUNT_SETTINGS = "USER$ACCOUNT_SETTINGS", JUPYTER$OUTPUT_LABEL = "JUPYTER$OUTPUT_LABEL", BUTTON$STOP = "BUTTON$STOP", + BUTTON$PAUSE = "BUTTON$PAUSE", BUTTON$EDIT_TITLE = "BUTTON$EDIT_TITLE", BUTTON$DOWNLOAD_VIA_VSCODE = "BUTTON$DOWNLOAD_VIA_VSCODE", BUTTON$DISPLAY_COST = "BUTTON$DISPLAY_COST", @@ -339,6 +340,8 @@ export enum I18nKey { LANDING$RECENT_CONVERSATION = "LANDING$RECENT_CONVERSATION", CONVERSATION$CONFIRM_DELETE = "CONVERSATION$CONFIRM_DELETE", CONVERSATION$CONFIRM_STOP = "CONVERSATION$CONFIRM_STOP", + CONVERSATION$CONFIRM_PAUSE = "CONVERSATION$CONFIRM_PAUSE", + CONVERSATION$PAUSE_WARNING = "CONVERSATION$PAUSE_WARNING", CONVERSATION$STOP_WARNING = "CONVERSATION$STOP_WARNING", CONVERSATION$METRICS_INFO = "CONVERSATION$METRICS_INFO", CONVERSATION$CREATED = "CONVERSATION$CREATED", diff --git a/frontend/src/i18n/translation.json b/frontend/src/i18n/translation.json index bd8727df27..afae10585d 100644 --- a/frontend/src/i18n/translation.json +++ b/frontend/src/i18n/translation.json @@ -5247,6 +5247,22 @@ "tr": "Durdur", "uk": "Стоп" }, + "BUTTON$PAUSE": { + "en": "Pause", + "ja": "一時停止", + "zh-CN": "暂停", + "zh-TW": "暫停", + "ko-KR": "일시정지", + "fr": "Mettre en pause", + "es": "Pausar", + "de": "Pausieren", + "it": "Pausa", + "pt": "Pausar", + "ar": "إيقاف مؤقت", + "no": "Pause", + "tr": "Duraklat", + "uk": "Призупинити" + }, "BUTTON$EDIT_TITLE": { "en": "Edit Title", "ja": "タイトルを編集", @@ -5423,8 +5439,40 @@ "de": "Stopp bestätigen", "uk": "Підтвердити зупинку" }, + "CONVERSATION$CONFIRM_PAUSE": { + "en": "Confirm Pause", + "ja": "一時停止の確認", + "zh-CN": "确认暂停", + "zh-TW": "確認暫停", + "ko-KR": "일시정지 확인", + "no": "Bekreft pause", + "it": "Conferma pausa", + "pt": "Confirmar pausa", + "es": "Confirmar pausa", + "ar": "تأكيد الإيقاف المؤقت", + "fr": "Confirmer la mise en pause", + "tr": "Duraklatmayı Onayla", + "de": "Pause bestätigen", + "uk": "Підтвердити призупинення" + }, + "CONVERSATION$PAUSE_WARNING": { + "en": "Are you sure you want to pause this conversation?", + "ja": "この会話を一時停止してもよろしいですか?", + "zh-CN": "您确定要暂停此对话吗?", + "zh-TW": "您確定要暫停此對話嗎?", + "ko-KR": "이 대화를 일시정지하시겠습니까?", + "no": "Er du sikker på at du vil pause denne samtalen?", + "it": "Sei sicuro di voler mettere in pausa questa conversazione?", + "pt": "Tem certeza de que deseja pausar esta conversa?", + "es": "¿Está seguro de que desea pausar esta conversación?", + "ar": "هل أنت متأكد أنك تريد إيقاف هذه المحادثة مؤقتًا؟", + "fr": "Êtes-vous sûr de vouloir mettre cette conversation en pause ?", + "tr": "Bu konuşmayı duraklatmak istediğinizden emin misiniz?", + "de": "Sind Sie sicher, dass Sie dieses Gespräch pausieren möchten?", + "uk": "Ви впевнені, що хочете призупинити цю розмову?" + }, "CONVERSATION$STOP_WARNING": { - "en": "Are you sure you want to stop this conversation?", + "en": "Are you sure you want to pause this conversation?", "ja": "この会話を停止してもよろしいですか?", "zh-CN": "您确定要停止此对话吗?", "zh-TW": "您確定要停止此對話嗎?", diff --git a/frontend/src/types/conversation-status.ts b/frontend/src/types/conversation-status.ts index 3b4fa99064..a9d77217dd 100644 --- a/frontend/src/types/conversation-status.ts +++ b/frontend/src/types/conversation-status.ts @@ -1 +1,6 @@ -export type ConversationStatus = "STARTING" | "RUNNING" | "STOPPED"; +export type ConversationStatus = + | "STARTING" + | "RUNNING" + | "STOPPED" + | "ARCHIVED" + | "ERROR"; diff --git a/openhands/storage/data_models/conversation_status.py b/openhands/storage/data_models/conversation_status.py index fdbdab5575..9681d4d5ca 100644 --- a/openhands/storage/data_models/conversation_status.py +++ b/openhands/storage/data_models/conversation_status.py @@ -1,7 +1,23 @@ +""" +This class is similar to the RuntimeStatus defined in the runtime api. (When this class was defined +a RuntimeStatus class already existed in OpenHands which serves a completely different purpose) Some of +the status definitions do not match up: + +STOPPED/paused - the runtime is not running but may be restarted +ARCHIVED/stopped - the runtime is not running and will not restart due to deleted files. +""" + from enum import Enum class ConversationStatus(Enum): + # The conversation is starting STARTING = 'STARTING' + # The conversation is running - the agent may be working or idle RUNNING = 'RUNNING' + # The conversation has stopped (This is synonymous with `paused` in the runtime API.) STOPPED = 'STOPPED' + # The conversation has been archived and cannot be restarted. + ARCHIVED = 'ARCHIVED' + # Something has gone wrong with the conversation (The runtime rather than the agent) + ERROR = 'ERROR'