-
Notifications
You must be signed in to change notification settings - Fork 20
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
Chore: use SSE to deliver change event for knowledgefiles #1106
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import ( | |
func Router(services *services.Services) (http.Handler, error) { | ||
mux := services.APIServer | ||
|
||
agents := handlers.NewAgentHandler(services.GPTClient, services.Invoker, services.ServerURL) | ||
agents := handlers.NewAgentHandler(services.GPTClient, services.Invoker, services.ServerURL, services.StorageClient) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call! addressed |
||
assistants := handlers.NewAssistantHandler(services.Invoker, services.Events, services.GPTClient) | ||
tools := handlers.NewToolHandler(services.GPTClient) | ||
tasks := handlers.NewTaskHandler(services.Invoker, services.Events) | ||
|
@@ -141,6 +141,7 @@ func Router(services *services.Services) (http.Handler, error) { | |
mux.HandleFunc("DELETE /api/agents/{agent_id}/knowledge-sources/{id}", agents.DeleteKnowledgeSource) | ||
mux.HandleFunc("GET /api/agents/{agent_id}/knowledge-sources/{knowledge_source_id}/knowledge-files", agents.ListKnowledgeFiles) | ||
mux.HandleFunc("POST /api/agents/{agent_id}/knowledge-sources/{knowledge_source_id}/knowledge-files/{file_id}/ingest", agents.ReIngestKnowledgeFile) | ||
mux.HandleFunc("GET /api/agents/{agent_id}/knowledge-sources/{knowledge_source_id}/knowledge-files/watch", agents.WatchKnowledgeFile) | ||
|
||
// Workflows | ||
mux.HandleFunc("GET /api/workflows", workflows.List) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,9 +141,6 @@ export default function FileTreeNode({ | |
filePathPrefixInclude, | ||
filePathPrefixExclude, | ||
}); | ||
|
||
// We should manually approve/unapprove all files in the folder at once so that we don't rely on backend reconciliation logic as it will cause delay in updating the UI. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems not ideal to approve files in frontend just for fast feedback from UI. I think it is ok to just rely on backend to reconcile all the files to be approved. |
||
onApproveFile(!included, node); | ||
}; | ||
|
||
return ( | ||
|
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.
nit: