Skip to content

Commit ca145b7

Browse files
committed
Add conversation persistence and history drawer
Persist the active conversation across page refreshes using localStorage and the OLS service conversation endpoints. Add a conversation history drawer (ChatbotConversationHistoryNav) that lets users browse, search, switch between, and delete past conversations. Key changes: - New src/conversations.ts: API calls (list/fetch/delete), response types, transformChatHistory mapping, and localStorage helpers - New useConversationRestore hook: restores last conversation on mount - Redux: add conversations list, isConversationsLoading state, and actions - GeneralPage: integrate conversation history drawer inside Chatbot (drawer must be inside Chatbot to preserve position:fixed overlay) - Prompt: save conversation_id to localStorage on stream start event - Popover: gate first-time-user auto-open on conversation restore - Types: add ConversationSummary type - i18n: add conversation UI strings Made-with: Cursor
1 parent 280f7eb commit ca145b7

9 files changed

Lines changed: 499 additions & 54 deletions

File tree

locales/en/plugin__lightspeed-console-plugin.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@
1717
"Configure events attachment": "Configure events attachment",
1818
"Configure log attachment": "Configure log attachment",
1919
"Confirm chat deletion": "Confirm chat deletion",
20+
"Conversation history": "Conversation history",
2021
"Conversation history has been truncated to fit within context window.": "Conversation history has been truncated to fit within context window.",
22+
"Conversation options": "Conversation options",
23+
"Conversations": "Conversations",
2124
"Copied": "Copied",
2225
"Copy conversation": "Copy conversation",
2326
"Copy to clipboard": "Copy to clipboard",
2427
"Currently viewing": "Currently viewing",
28+
"Delete": "Delete",
2529
"Dismiss": "Dismiss",
2630
"Do not include personal information or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or services.": "Do not include personal information or other sensitive information in your feedback. Feedback may be used to improve Red Hat's products or services.",
2731
"Do you want to leave this page?": "Do you want to leave this page?",
@@ -62,29 +66,36 @@
6266
"Minimize": "Minimize",
6367
"Most recent {{lines}} lines": "Most recent {{lines}} lines",
6468
"Most recent {{numEvents}} events": "Most recent {{numEvents}} events",
69+
"New chat": "New chat",
6570
"No events": "No events",
6671
"No logs found": "No logs found",
6772
"No output returned": "No output returned",
6873
"No pods found": "No pods found",
6974
"No pods found for {{kind}} {{name}}": "No pods found for {{kind}} {{name}}",
7075
"Not authenticated": "Not authenticated",
7176
"Not authorized": "Not authorized",
77+
"Older": "Older",
7278
"OpenShift Lightspeed authentication failed. Contact your system administrator for more information.": "OpenShift Lightspeed authentication failed. Contact your system administrator for more information.",
7379
"OpenShift Lightspeed chat history": "OpenShift Lightspeed chat history",
7480
"OpenShift Lightspeed is now available to help you with your OpenShift questions and tasks. Try asking about deployments, troubleshooting, best practices, or any other OpenShift-related topics. This notice will disappear once you minimize the chat.": "OpenShift Lightspeed is now available to help you with your OpenShift questions and tasks. Try asking about deployments, troubleshooting, best practices, or any other OpenShift-related topics. This notice will disappear once you minimize the chat.",
7581
"OpenShift Lightspeed uses AI technology to help answer your questions. Do not include personal information or other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.": "OpenShift Lightspeed uses AI technology to help answer your questions. Do not include personal information or other sensitive information in your input. Interactions may be used to improve Red Hat's products or services.",
7682
"Please retry or contact support if the issue persists.": "Please retry or contact support if the issue persists.",
7783
"Preview attachment": "Preview attachment",
7884
"Preview attachment - modified": "Preview attachment - modified",
85+
"Previous 30 days": "Previous 30 days",
86+
"Previous 7 days": "Previous 7 days",
7987
"Red Hat OpenShift Lightspeed": "Red Hat OpenShift Lightspeed",
8088
"Revert to original": "Revert to original",
8189
"Save": "Save",
90+
"Search conversations": "Search conversations",
91+
"Search conversations...": "Search conversations...",
8292
"Send a message...": "Send a message...",
8393
"Stay": "Stay",
8494
"Submit": "Submit",
8595
"The following output was generated when running <2>{{name}}</2> with arguments <5>{{argsFormatted}}</5>.": "The following output was generated when running <2>{{name}}</2> with arguments <5>{{argsFormatted}}</5>.",
8696
"The following output was generated when running <2>{{name}}</2> with no arguments.": "The following output was generated when running <2>{{name}}</2> with no arguments.",
8797
"The OpenShift Lightspeed service is not yet ready to receive requests. If this message persists, please check the OLSConfig.": "The OpenShift Lightspeed service is not yet ready to receive requests. If this message persists, please check the OLSConfig.",
98+
"Today": "Today",
8899
"Tool output": "Tool output",
89100
"Total size of attachments exceeds {{max}} characters.": "Total size of attachments exceeds {{max}} characters.",
90101
"Upload from computer": "Upload from computer",

0 commit comments

Comments
 (0)