Git Product home page Git Product logo

atai's Introduction

Enhance Search Functionality Tasks

  1. Filters:

    • Created a state in HomePage.tsx and pass as a props to the ContectPanel.tsx to save user click and update FilterType state by using SetFilterType function.
    • Create new array to map the result with out filterType state in SearchResults.tsx
      const filteredFilesGroup = useMemo(
      () => filesGroup.filter((item) => !filterType || filterType === item.type || `.${filterType}`  === item.extension),
        [filesGroup, filterType]
      ); 

Enhance Chat Functionality

  1. Edit Messages
    • using editMessage and setEditMessage state in HomePage.tsx and pass setEditMessage as props to ChatMessage.tsx to select the message that user want to edit
    {
          role !== 'assistant' &&
          <button className={'bg-blue-500 h-full text-white p-2 rounded'} onClick={() => handleEdit(content)}>
            Edit
          </button>
        }
    const handleEdit = (text: string) => {
    setEditMessage(text)
     }
  • then editMessage will update and propmt state will be update by using useEffect in HomePage.tsx
    useEffect(() => {
    setPrompt(editMessage)
    }, [editMessage])

atai's People

Contributors

masihbalali avatar

Stargazers

Armin  Fatemi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.