From 4849369edee87470e5fdeb8ecbda5a975b806d19 Mon Sep 17 00:00:00 2001 From: Rohit Malhotra Date: Tue, 26 Aug 2025 23:32:18 -0400 Subject: [PATCH] frontend(chat): render conversation_instructions from RecallObservation (#10639) Co-authored-by: openhands --- .../chat/event-content-helpers/get-observation-content.ts | 3 +++ frontend/src/i18n/declaration.ts | 5 ----- frontend/src/types/core/observations.ts | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/features/chat/event-content-helpers/get-observation-content.ts b/frontend/src/components/features/chat/event-content-helpers/get-observation-content.ts index 9016ec282b..56bf582263 100644 --- a/frontend/src/components/features/chat/event-content-helpers/get-observation-content.ts +++ b/frontend/src/components/features/chat/event-content-helpers/get-observation-content.ts @@ -72,6 +72,9 @@ const getRecallObservationContent = (event: RecallObservation): string => { if (event.extras.repo_instructions) { content += `\n\n**Repository Instructions:**\n\n${event.extras.repo_instructions}`; } + if (event.extras.conversation_instructions) { + content += `\n\n**Conversation Instructions:**\n\n${event.extras.conversation_instructions}`; + } if (event.extras.additional_agent_instructions) { content += `\n\n**Additional Instructions:**\n\n${event.extras.additional_agent_instructions}`; } diff --git a/frontend/src/i18n/declaration.ts b/frontend/src/i18n/declaration.ts index a7ee2d725b..14f06e142c 100644 --- a/frontend/src/i18n/declaration.ts +++ b/frontend/src/i18n/declaration.ts @@ -131,7 +131,6 @@ export enum I18nKey { CONVERSATION$REPOSITORY = "CONVERSATION$REPOSITORY", CONVERSATION$BRANCH = "CONVERSATION$BRANCH", CONVERSATION$GIT_PROVIDER = "CONVERSATION$GIT_PROVIDER", - ACCOUNT_SETTINGS$TITLE = "ACCOUNT_SETTINGS$TITLE", WORKSPACE$TERMINAL_TAB_LABEL = "WORKSPACE$TERMINAL_TAB_LABEL", WORKSPACE$BROWSER_TAB_LABEL = "WORKSPACE$BROWSER_TAB_LABEL", WORKSPACE$JUPYTER_TAB_LABEL = "WORKSPACE$JUPYTER_TAB_LABEL", @@ -479,7 +478,6 @@ export enum I18nKey { PROJECT_MENU_CARD_CONTEXT_MENU$DOWNLOAD_FILES_LABEL = "PROJECT_MENU_CARD_CONTEXT_MENU$DOWNLOAD_FILES_LABEL", PROJECT_MENU_CARD$OPEN = "PROJECT_MENU_CARD$OPEN", ACTION_BUTTON$RESUME = "ACTION_BUTTON$RESUME", - ACTION_BUTTON$PAUSE = "ACTION_BUTTON$PAUSE", BROWSER$SCREENSHOT_ALT = "BROWSER$SCREENSHOT_ALT", ERROR_TOAST$CLOSE_BUTTON_LABEL = "ERROR_TOAST$CLOSE_BUTTON_LABEL", FILE_EXPLORER$UPLOAD = "FILE_EXPLORER$UPLOAD", @@ -518,7 +516,6 @@ export enum I18nKey { STATUS$CONNECTED = "STATUS$CONNECTED", BROWSER$NO_PAGE_LOADED = "BROWSER$NO_PAGE_LOADED", USER$AVATAR_PLACEHOLDER = "USER$AVATAR_PLACEHOLDER", - ACCOUNT_SETTINGS$SETTINGS = "ACCOUNT_SETTINGS$SETTINGS", ACCOUNT_SETTINGS$LOGOUT = "ACCOUNT_SETTINGS$LOGOUT", SETTINGS_FORM$ADVANCED_OPTIONS_LABEL = "SETTINGS_FORM$ADVANCED_OPTIONS_LABEL", CONVERSATION$NO_CONVERSATIONS = "CONVERSATION$NO_CONVERSATIONS", @@ -578,8 +575,6 @@ export enum I18nKey { ENTERPRISE_SSO$CONNECT_TO_ENTERPRISE_SSO = "ENTERPRISE_SSO$CONNECT_TO_ENTERPRISE_SSO", AUTH$SIGN_IN_WITH_IDENTITY_PROVIDER = "AUTH$SIGN_IN_WITH_IDENTITY_PROVIDER", WAITLIST$JOIN_WAITLIST = "WAITLIST$JOIN_WAITLIST", - ACCOUNT_SETTINGS$ADDITIONAL_SETTINGS = "ACCOUNT_SETTINGS$ADDITIONAL_SETTINGS", - ACCOUNT_SETTINGS$DISCONNECT_FROM_GITHUB = "ACCOUNT_SETTINGS$DISCONNECT_FROM_GITHUB", CONVERSATION$DELETE_WARNING = "CONVERSATION$DELETE_WARNING", FEEDBACK$TITLE = "FEEDBACK$TITLE", FEEDBACK$DESCRIPTION = "FEEDBACK$DESCRIPTION", diff --git a/frontend/src/types/core/observations.ts b/frontend/src/types/core/observations.ts index fb0134a134..01a73ec81b 100644 --- a/frontend/src/types/core/observations.ts +++ b/frontend/src/types/core/observations.ts @@ -127,6 +127,7 @@ export interface RecallObservation extends OpenHandsObservationEvent<"recall"> { runtime_hosts?: Record; custom_secrets_descriptions?: Record; additional_agent_instructions?: string; + conversation_instructions?: string; date?: string; microagent_knowledge?: MicroagentKnowledge[]; };