Add chat history to Assistant Ai#1550
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds chat history functionality to the AI Assistant, including the ability to view, rename, and delete previous chat sessions. The changes introduce a chat history popover UI component, automatic chat naming based on conversation content, and the necessary backend API endpoints to support these features.
Key Changes:
- Added a new chat history UI component with popover display, supporting chat selection, renaming, and deletion
- Implemented automatic chat name generation after the first message exchange
- Created new API endpoints for renaming and deleting chats with comprehensive test coverage
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/hooks/use-typing-animation.ts | New hook for typing animation effect on chat titles |
| packages/ui-components/src/components/assistant-ui/history/* | New chat history UI components with item management |
| packages/ui-components/src/components/assistant-ui/assistant-top-bar.tsx | Added history popover button and animated title display |
| packages/ui-components/src/components/assistant-ui/assistant-ui-chat-container.tsx | Integrated history content into chat container layout |
| packages/ui-components/src/components/tooltip-wrapper.tsx | Enhanced with alignment props for better tooltip positioning |
| packages/shared/src/lib/ai/chat/index.ts | Added RenameChatRequest type definition |
| packages/server/api/src/app/ai/chat/ai-mcp-chat.controller.ts | Added PATCH endpoint for renaming chats and renamed delete function |
| packages/server/api/src/app/ai/chat/ai-chat.service.ts | Added deleteChat function to remove both history and context |
| packages/server/api/test/unit/ai/ai-mcp-chat.controller.test.ts | Comprehensive test coverage for rename chat endpoint |
| packages/react-ui/src/app/features/ai/lib/* | Added hooks and API functions for chat history management |
| packages/react-ui/src/app/features/ai/assistant/assistant-ui-chat.tsx | Integrated chat history UI into assistant component |
| packages/react-ui/src/app/features/ai/assistant/ai-chat-resizable-panel.tsx | Increased minimum width to accommodate history popover |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| defaultText?: string; | ||
| }; | ||
|
|
||
| export function useTypingAnimation({ |
There was a problem hiding this comment.
Adds a nice typing like animation to display the chat name in the Assistant top bar
|
@ravikiranvm did you check if you have to show also the history from Code / CLI chats. Right now also this one is there |
Marco and Rita think this is not critical as of now. |
|






Fixes OPS-2115.
Deployed to UX
Approved by Olga
Additional Notes