Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat History Tree Implementation #223

Open
wants to merge 9 commits into
base: feat/implement-sveltekit
Choose a base branch
from

Conversation

zilaei
Copy link
Member

@zilaei zilaei commented Mar 3, 2025

Implemented a flexible configuration system for defining custom date ranges and dynamic categorization of history items. The components can be demoed in Storybook under Menu -> Chat -> History -> Tree.

Description

This pull request introduces a History Tree component for rendering user history in the side bar. Main features:

  • History Tree component: Hierarchical organization of chat history items into time-based categories (Today, Yesterday, Previous 7 days, etc.)
  • Date utilities: Utilities for working with dates.
  • Tests: Unit tests for all date utilities and history categorization functions

File Structure

  • Core components in /src/lib/components/Menu/Chat/HistoryTree/
  • Date utilities in /src/lib/utils/dates.ts
  • Test coverage for all utility functions

Dependencies

  • Added testing dependencies: vitest and @vitest/coverage-v8
  • Added npm scripts for testing: tests, test:watch, and test:coverage

Future improvements

No on click handler for loading conversation implemented. This PR only implements the categorization of history items by date.

@zilaei zilaei requested review from MasterKenth and nRamstedt March 3, 2025 12:46
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.

1 participant