cohere-toolkit icon indicating copy to clipboard operation
cohere-toolkit copied to clipboard

refactor(toolkit): Update folder structure and cleanup assistants_web

Open abimacarmes opened this issue 1 year ago • 1 comments

Re-organized assistants_web folder for better usability.

  • Folders within /components separated by use

  • UI (previously Shared) folder cleaned up to remove individual folders for each component, collect stories in a single folder, remove some unused components

  • Add index.ts files to /constants/ and /hooks folders for condensed imports

  • Moved Page components to their appropriate location in /app

  • [ ] PR title: "area: description"

    • Where "area" is whichever of interface, frontend, model, tools, backend, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
    • Example: "deployment: add Azure model option"
  • [ ] PR message: Delete this entire checklist and replace with

    • Description: a description of the change
    • Issue: the issue # it fixes, if applicable
    • Dependencies: any dependencies required for this change
  • [ ] Add tests and docs: Please include testing and documentation for your changes

  • [ ] Lint and test: Run make lint and make run-tests

AI Description

This pull request makes changes to the src/interfaces/assistants_web directory, which contains components and utilities for the web interface of the assistant application.

Codebase Changes:

  • Updated import paths for various components and hooks, consolidating them under @/components/UI and @/hooks.
  • Renamed CompleteOauth to OauthCallback in OauthCallback.tsx and CompleteOauthPage to OauthCallbackPage in page.tsx.
  • Modified the import statement for the main.css stylesheet in preview.tsx to use the ~ character instead of the relative path.
  • Replaced WelcomePage imports from @/components/WelcomePage to @/components/Auth in layout.tsx.
  • Updated the import paths for various components, hooks, and utilities in Login.tsx, Logout.tsx, Register.tsx, Chat.tsx, layout.tsx, DiscoverAgentCard.tsx, DiscoverAgents.tsx, UpdateAgent.tsx, CreateAgent.tsx, Settings.tsx, ReadOnlyConversation.tsx, and page.tsx.

abimacarmes avatar Aug 21 '24 22:08 abimacarmes

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.83%. Comparing base (dbe7cf5) to head (1b0d72e). Report is 18 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #729   +/-   ##
=======================================
  Coverage   74.83%   74.83%           
=======================================
  Files         262      262           
  Lines       11531    11531           
=======================================
  Hits         8629     8629           
  Misses       2902     2902           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 21 '24 22:08 codecov-commenter