feat: history added search and action menus#322
Merged
RainyNight9 merged 11 commits intoinfinilabs:mainfrom Apr 2, 2025
ayangweb:main
Merged
feat: history added search and action menus#322RainyNight9 merged 11 commits intoinfinilabs:mainfrom ayangweb:main
RainyNight9 merged 11 commits intoinfinilabs:mainfrom
ayangweb:main
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements searchable chat history and action menus for renaming and deleting chat sessions. It updates the chat page to use a new HistoryList component, adjusts API commands to support the new query, delete, and update functionalities, and integrates corresponding backend endpoints.
- Added search functionality for chat history and action menus for renaming and deleting chats.
- Updated API commands and backend handlers to support chat session deletion and updating.
- Introduced a new HistoryList UI component to display and manage chat history.
Reviewed Changes
Copilot reviewed 7 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/chat/index.tsx | Updated to use HistoryList and handle search, rename, and delete actions instead of the old Sidebar component. |
| src/components/Common/HistoryList/index.tsx | New HistoryList component with search, refresh, rename, and delete UI functionality. |
| src/commands/servers.ts | Adjusted function signatures to include query parameters and added commands for deleting and updating sessions. |
| src-tauri/src/lib.rs | Added Tauri commands for deleting and updating sessions, and updated advanced_post formatting. |
| src-tauri/src/assistant/mod.rs | Updated chat history retrieval to support an optional query parameter and implemented new commands for session deletion and update. |
Files not reviewed (4)
- package.json: Language not supported
- pnpm-lock.yaml: Language not supported
- src/locales/en/translation.json: Language not supported
- src/locales/zh/translation.json: Language not supported
Comments suppressed due to low confidence (2)
src-tauri/src/lib.rs:195
- The error message 'Error cancel session' in the send_message function appears misleading; consider updating it to 'Error sending message' for clarity.
.map_err(|e| format("Error cancel session: {}", e))?
src/pages/chat/index.tsx:18
- [nitpick] The alias 'typeChat' may be unclear; consider using a more descriptive name or reverting to the original 'Chat' type if no conflicts exist.
import type { Chat as typeChat } from "@/components/Assistant/types";
RainyNight9
approved these changes
Apr 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do
Rationale for this change
Standards checklist