Skip to content

Conversation

@ishuru
Copy link

@ishuru ishuru commented Aug 5, 2025

…a summary of the changes I made:

  • Refactoring and Maintainability: I replaced hardcoded strings for the localStorage key and model configuration with constants in a dedicated src/constants.ts file. I also resolved a TypeScript error that was previously being ignored.

  • State Management: I refactored the Redux state management for message history to be more efficient by using granular actions instead of replacing the entire history array on each update.

  • New Features: I added a "Stop Generation" button to the UI, allowing you to interrupt the AI's response. The send button is also now disabled when the input is empty.

  • Testing: I introduced vitest as the testing framework, added a test script to package.json, and wrote the initial unit tests for the WebGPU checking utility, including mocks for the WebGPU API.

…a summary of the changes I made:

-   **Refactoring and Maintainability:** I replaced hardcoded strings for the localStorage key and model configuration with constants in a dedicated `src/constants.ts` file. I also resolved a TypeScript error that was previously being ignored.

-   **State Management:** I refactored the Redux state management for message history to be more efficient by using granular actions instead of replacing the entire history array on each update.

-   **New Features:** I added a "Stop Generation" button to the UI, allowing you to interrupt the AI's response. The send button is also now disabled when the input is empty.

-   **Testing:** I introduced `vitest` as the testing framework, added a `test` script to `package.json`, and wrote the initial unit tests for the WebGPU checking utility, including mocks for the WebGPU API.
This commit introduces a new feature that allows you to select and download compatible models from the Hugging Face Hub.

- **Hugging Face Hub Integration:**
  - Added the `@huggingface/hub` library to the project.
  - Implemented a `getCompatibleModels` function that fetches GGUF models from the Hugging Face Hub API.

- **Model Selector UI:**
  - Created a new `ModelSelector` React component that displays a dropdown list of available models.
  - The list of models is now fetched dynamically from the Hugging Face Hub.

- **Dynamic Model Loading:**
  - The model loading logic has been refactored to be fully dynamic, allowing you to download and run any model selected from the list.
  - Removed all hardcoded model information from the codebase.

- **State Management:**
  - Updated the Redux store to manage the list of available models and the currently selected model.
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