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

feat: api definition in brain creation modal #1613

Merged
merged 7 commits into from
Nov 14, 2023

Conversation

gozineb
Copy link
Contributor

@gozineb gozineb commented Nov 10, 2023

Description

#1569

Checklist before requesting a review

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented hard-to-understand areas
  • I have ideally added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Screenshots (if appropriate):

@dosubot dosubot bot added the area: frontend Related to frontend functionality or under the /frontend directory label Nov 10, 2023
Copy link

vercel bot commented Nov 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 9:55am
quivr-strapi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 9:55am
quivrapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 9:55am

Copy link
Contributor

Risk Level 2 - /home/runner/work/quivr/quivr/frontend/lib/config/defaultBrainConfig.ts

The change in this file is also low risk. The developer has added a new property knowledgeSource to the defaultBrainConfig object. However, it's important to ensure that all parts of the code that use this object are updated to handle this new property. If not, it could potentially cause issues. For example:

if (defaultBrainConfig.knowledgeSource) {
  // do something with knowledgeSource
}

This would ensure that the code only tries to use knowledgeSource if it is defined.


Risk Level 2 - /home/runner/work/quivr/quivr/frontend/lib/components/AddBrainModal/AddBrainConfig.tsx

  1. The onClick event handler for the Button component is set to () => void 0. This is a no-op and might be a placeholder. If it's not intended to do anything, it's better to remove the onClick prop entirely.
  2. The form is commented out. If it's not needed, it's better to remove it to avoid confusion.
  3. The openAiKey field seems to be a sensitive field. Make sure it's handled securely and not exposed.
  4. The setSelectedTab function is called directly in the component body. This will be called on every render which is not ideal. It should be called inside a useEffect or event handler.

Suggested changes:

  1. Remove the onClick prop from the Button component if it's not needed.
  2. Remove the commented out form if it's not needed.
  3. Ensure the openAiKey field is handled securely.
  4. Move the setSelectedTab function call inside a useEffect or event handler.

Risk Level 2 - /home/runner/work/quivr/quivr/frontend/lib/components/AddBrainModal/hooks/useAddBrainModal.ts

  1. The handleSubmit function is quite large and complex. It might be a good idea to break it down into smaller, more manageable functions.
  2. The catch block in the handleSubmit function stringifies the error object directly. This might not give useful information in the log. It's better to log the message property of the error.

Suggested changes:

  1. Break down the handleSubmit function into smaller functions.
  2. Log the message property of the error in the catch block.

🔍🔐🔄


Powered by Code Review GPT

@gozineb gozineb changed the title Feat/api definition in brain creation modal feat: api definition in brain creation modal Nov 14, 2023
@gozineb gozineb force-pushed the feat/api-definition-in-brain-creation-modal branch from f772d16 to 3fd9497 Compare November 14, 2023 08:44
@gozineb gozineb force-pushed the feat/api-definition-in-brain-creation-modal branch from dcaefa1 to 362872f Compare November 14, 2023 08:54
@mamadoudicko mamadoudicko force-pushed the feat/api-definition-in-brain-creation-modal branch from ff6441c to 7e6ffcd Compare November 14, 2023 09:52
@StanGirard StanGirard merged commit 12903c4 into main Nov 14, 2023
7 checks passed
mamadoudicko pushed a commit that referenced this pull request Nov 14, 2023
🤖 I have created a release *beep* *boop*
---


## 0.0.111 (2023-11-14)

## What's Changed
* ci: 🎡 tests by @StanGirard in
#1615
* fix: update delete brain logic by @mamadoudicko in
#1619
* test(added): misc prompt onboarding by @StanGirard in
#1622
* feat: remove api brain secrets and schemas on delete by @mamadoudicko
in #1621
* test(all): added by @StanGirard in
#1624
* refactor: create "files" package by @gozineb in
#1626
* feat: api definition in brain creation modal by @gozineb in
#1613


**Full Changelog**:
v0.0.110...v0.0.111

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
coolCatalyst added a commit to coolCatalyst/quivr that referenced this pull request Jun 1, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.111 (2023-11-14)

## What's Changed
* ci: 🎡 tests by @StanGirard in
QuivrHQ/quivr#1615
* fix: update delete brain logic by @mamadoudicko in
QuivrHQ/quivr#1619
* test(added): misc prompt onboarding by @StanGirard in
QuivrHQ/quivr#1622
* feat: remove api brain secrets and schemas on delete by @mamadoudicko
in QuivrHQ/quivr#1621
* test(all): added by @StanGirard in
QuivrHQ/quivr#1624
* refactor: create "files" package by @gozineb in
QuivrHQ/quivr#1626
* feat: api definition in brain creation modal by @gozineb in
QuivrHQ/quivr#1613


**Full Changelog**:
QuivrHQ/quivr@v0.0.110...v0.0.111

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Dream528 added a commit to Dream528/quivr that referenced this pull request Jul 28, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.111 (2023-11-14)

## What's Changed
* ci: 🎡 tests by @StanGirard in
QuivrHQ/quivr#1615
* fix: update delete brain logic by @mamadoudicko in
QuivrHQ/quivr#1619
* test(added): misc prompt onboarding by @StanGirard in
QuivrHQ/quivr#1622
* feat: remove api brain secrets and schemas on delete by @mamadoudicko
in QuivrHQ/quivr#1621
* test(all): added by @StanGirard in
QuivrHQ/quivr#1624
* refactor: create "files" package by @gozineb in
QuivrHQ/quivr#1626
* feat: api definition in brain creation modal by @gozineb in
QuivrHQ/quivr#1613


**Full Changelog**:
QuivrHQ/quivr@v0.0.110...v0.0.111

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to frontend functionality or under the /frontend directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants