Feature/contract history #6
Open
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.
📝 Contract History Feature
Overview
This feature introduces a Contract History system that allows users to view, manage, and re-generate their previously created contracts.
It enhances the user experience by adding persistence and organization tools within the chatbot interface.
✨ Features
🧩 Technical Details
Files Added
src/pages/NotFoundPage— UI component displayed when a user visits a non-existent route.src/hooks/useHistory.ts— Custom React hook for handling contract storage, state, read, and delete.src/hooks/useFavorites.ts— Holds all the favoriting state and functions.src/hooks/useMessages.ts— Moved all the messaging logic from the chatbot page to this hook.src/components/Sidebar.tsx— UI Sidebar Component and all its logic.src/components/ChatItem.tsx— UI Component that's displayed as a chat item on the sidebar.src/assets/compass.png— Compass Image for the NotFoundPage.Files Modified
src/services/Chatbot.tsx— Integrated contract history functionality.src/components/ui/chatbot.css— Modified templates and chat page styles.src/services/deepseekService.ts— Used the variable in env file instead of hardcoded onesscr/components/TemplateSelector.tsx— Moved the templates into a modal and the Button into the sidebarTechnologies Used