Skip to content

Add chat history to Assistant Ai#1550

Merged
ravikiranvm merged 29 commits intomainfrom
ops-2115
Nov 10, 2025
Merged

Add chat history to Assistant Ai#1550
ravikiranvm merged 29 commits intomainfrom
ops-2115

Conversation

@ravikiranvm
Copy link
Copy Markdown
Contributor

@ravikiranvm ravikiranvm commented Oct 31, 2025

Fixes OPS-2115.

Deployed to UX
Approved by Olga

Additional Notes

Screenshot 2025-11-04 at 2 30 34 PM

@linear
Copy link
Copy Markdown

linear Bot commented Oct 31, 2025

@ravikiranvm ravikiranvm marked this pull request as ready for review November 4, 2025 14:47
Copilot AI review requested due to automatic review settings November 4, 2025 14:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/ui-components/src/hooks/use-typing-animation.ts Outdated
Comment thread packages/react-ui/src/app/features/ai/lib/assistant-ui-chat-hook.ts Outdated
Comment thread packages/server/api/src/app/ai/chat/ai-chat.service.ts Outdated
@ravikiranvm ravikiranvm requested review from bigfluffycookie and rmn-snpk and removed request for bigfluffycookie and rmn-snpk November 5, 2025 08:26
@ravikiranvm ravikiranvm requested a review from cezudas November 6, 2025 15:52
defaultText?: string;
};

export function useTypingAnimation({
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a nice typing like animation to display the chat name in the Assistant top bar

@ravikiranvm ravikiranvm requested a review from rmn-snpk November 7, 2025 08:38
@alexandrudanpop
Copy link
Copy Markdown
Contributor

@ravikiranvm did you check if you have to show also the history from Code / CLI chats. Right now also this one is there
image

Comment thread packages/react-ui/src/app/features/ai/lib/assistant-ui-chat-hook.ts Outdated
Comment thread packages/react-ui/src/app/features/ai/lib/use-ai-assistant-chat-history.ts Outdated
Comment thread packages/react-ui/src/app/features/ai/lib/use-ai-assistant-chat-history.ts Outdated
@alexandrudanpop
Copy link
Copy Markdown
Contributor

Not related to this PR, please add a ticket to fix -> /all-chats takes too long considering we fetch the data from redis
image

Comment thread packages/react-ui/src/app/features/ai/assistant/assistant-ui-chat.tsx Outdated
@ravikiranvm
Copy link
Copy Markdown
Contributor Author

@ravikiranvm did you check if you have to show also the history from Code / CLI chats. Right now also this one is there image

Marco and Rita think this is not critical as of now.

@sonarqubecloud
Copy link
Copy Markdown

@ravikiranvm ravikiranvm merged commit 910106c into main Nov 10, 2025
21 checks passed
@ravikiranvm ravikiranvm deleted the ops-2115 branch November 10, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants