-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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(brainSettings): rework knowledge tab #1534
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Risk Level 2 - /home/runner/work/quivr/quivr/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/hooks/useBrainManagementTabs.ts The code changes seem to be safe, but there are some improvements that can be made for readability and error handling:
Risk Level 3 - /home/runner/work/quivr/quivr/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/KnowledgeTab/components/KnowledgeTable/components/KnowledgeItem/hooks/useKnowledgeItem.ts The try {
if (brainId === undefined) {
throw new Error(t(\"noBrain\", { ns: \"explore\" }));
}
await deleteKnowledge({
brainId,
knowledgeId: knowledge.id,
});
invalidateKnowledgeDataKey();
publish({
variant: \"success\",
text: t(\"deleted\", {
fileName: knowledge_name,
brain: brain?.name,
ns: \"explore\",
}),
});
} catch (error) {
publish({
variant: \"warning\",
text: t(\"errorDeleting\", { fileName: knowledge_name, ns: \"explore\" }),
});
console.error(\"Error deleting\", error);
} Consider wrapping the Risk Level 3 - /home/runner/work/quivr/quivr/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/KnowledgeTab/components/AddKnowledge/hooks/useFeedBrain.ts The const currentChatId = (await createChat(\"New Chat\")).chat_id;
try {
dispatchHasPendingRequests?.();
closeFeedInput?.();
setHasPendingRequests(true);
await handleFeedBrain({
brainId,
chatId: currentChatId,
});
setKnowledgeToFeed([]);
} catch (e) {
publish({
variant: \"danger\",
text: JSON.stringify(e),
});
} finally {
setHasPendingRequests(false);
await deleteChat(currentChatId);
} Consider wrapping the 🔨🔧🚨 Powered by Code Review GPT |
Very Nice !!!! |
🤖 I have created a release *beep* *boop* --- ## 0.0.102 (2023-11-01) ## What's Changed * docs: update Quivr doc by @mamadoudicko in #1531 * docs: ✏️ search by @StanGirard in #1535 * feat(brainSettings): rework knowledge tab by @mamadoudicko in #1534 * docs: ✏️ schema by @StanGirard in #1537 * feat: 🎸 max-token by @StanGirard in #1538 **Full Changelog**: v0.0.101...v0.0.102 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## 0.0.102 (2023-11-01) ## What's Changed * docs: update Quivr doc by @mamadoudicko in QuivrHQ/quivr#1531 * docs: ✏️ search by @StanGirard in QuivrHQ/quivr#1535 * feat(brainSettings): rework knowledge tab by @mamadoudicko in QuivrHQ/quivr#1534 * docs: ✏️ schema by @StanGirard in QuivrHQ/quivr#1537 * feat: 🎸 max-token by @StanGirard in QuivrHQ/quivr#1538 **Full Changelog**: QuivrHQ/quivr@v0.0.101...v0.0.102 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## 0.0.102 (2023-11-01) ## What's Changed * docs: update Quivr doc by @mamadoudicko in QuivrHQ/quivr#1531 * docs: ✏️ search by @StanGirard in QuivrHQ/quivr#1535 * feat(brainSettings): rework knowledge tab by @mamadoudicko in QuivrHQ/quivr#1534 * docs: ✏️ schema by @StanGirard in QuivrHQ/quivr#1537 * feat: 🎸 max-token by @StanGirard in QuivrHQ/quivr#1538 **Full Changelog**: QuivrHQ/quivr@v0.0.101...v0.0.102 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Issue: #1435
Fix:
Screen.Recording.2023-10-31.at.18.49.44.mov