-
Notifications
You must be signed in to change notification settings - Fork 3.2k
improvement(kb): migrate manual fetches in kb module to use reactquery #2894
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile Summary
Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant CreateBaseModal
participant KnowledgeUpload
participant PresignedAPI
participant S3
participant KnowledgeAPI
participant QueryClient
participant ProcessingService
User->>CreateBaseModal: "Click Create Knowledge Base"
CreateBaseModal->>CreateBaseModal: "Open modal with form"
User->>CreateBaseModal: "Fill form (name, chunking config)"
User->>CreateBaseModal: "Add documents (optional)"
User->>CreateBaseModal: "Click Create"
CreateBaseModal->>KnowledgeAPI: "createKnowledgeBase(params)"
KnowledgeAPI-->>CreateBaseModal: "Return knowledge base"
alt Files selected
CreateBaseModal->>KnowledgeUpload: "uploadFiles(files, kbId, config)"
loop For each file
KnowledgeUpload->>PresignedAPI: "POST /api/files/presigned"
PresignedAPI-->>KnowledgeUpload: "Return presigned URL"
KnowledgeUpload->>S3: "Upload file to S3"
S3-->>KnowledgeUpload: "Upload complete"
end
KnowledgeUpload->>KnowledgeAPI: "POST documents with file URLs"
KnowledgeAPI-->>KnowledgeUpload: "Return document records"
KnowledgeAPI->>ProcessingService: "Queue document processing"
KnowledgeUpload-->>CreateBaseModal: "Upload complete"
ProcessingService->>ProcessingService: "Process documents into chunks"
end
CreateBaseModal->>QueryClient: "invalidateQueries(knowledgeBases)"
CreateBaseModal->>User: "Close modal, navigate to KB"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
11 files reviewed, 2 comments
apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-header/knowledge-header.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Summary
Type of Change
Testing
Tested manually
Checklist
Screenshots/Videos