Skip to content

feat: history added search and action menus#322

Merged
RainyNight9 merged 11 commits intoinfinilabs:mainfrom
ayangweb:main
Apr 2, 2025
Merged

feat: history added search and action menus#322
RainyNight9 merged 11 commits intoinfinilabs:mainfrom
ayangweb:main

Conversation

@ayangweb
Copy link
Copy Markdown
Member

@ayangweb ayangweb commented Apr 1, 2025

What does this PR do

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

@luohoufu luohoufu requested a review from Copilot April 2, 2025 05:40
Copy link
Copy Markdown

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 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 RainyNight9 merged commit 3aed3a0 into infinilabs:main Apr 2, 2025
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.

3 participants