diff --git a/backend/agents/orchestrator.go b/backend/agents/orchestrator.go index 3ec656e..ee33b19 100644 --- a/backend/agents/orchestrator.go +++ b/backend/agents/orchestrator.go @@ -139,25 +139,25 @@ func NewOrchestratorAgent(log *log.Logger, noteAgent NoteAgent, contactAgent cli }) agent.ToolHandler.AddTool("noteAgent", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) { - go noteAgent.GetNotes(info.UserId, info.ImageId, imageName, imageData) + noteAgent.GetNotes(info.UserId, info.ImageId, imageName, imageData) return "noteAgent called successfully", nil }) agent.ToolHandler.AddTool("contactAgent", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) { - go contactAgent.RunAgent(info.UserId, info.ImageId, imageName, imageData) + contactAgent.RunAgent(info.UserId, info.ImageId, imageName, imageData) return "contactAgent called successfully", nil }) agent.ToolHandler.AddTool("locationAgent", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) { - go locationAgent.RunAgent(info.UserId, info.ImageId, imageName, imageData) + locationAgent.RunAgent(info.UserId, info.ImageId, imageName, imageData) return "locationAgent called successfully", nil }) agent.ToolHandler.AddTool("eventAgent", func(info client.ToolHandlerInfo, args string, call client.ToolCall) (any, error) { - go eventAgent.RunAgent(info.UserId, info.ImageId, imageName, imageData) + eventAgent.RunAgent(info.UserId, info.ImageId, imageName, imageData) return "eventAgent called successfully", nil }) diff --git a/frontend/src/contexts/SearchImageContext.tsx b/frontend/src/contexts/SearchImageContext.tsx index 6e0c9c2..a4c0427 100644 --- a/frontend/src/contexts/SearchImageContext.tsx +++ b/frontend/src/contexts/SearchImageContext.tsx @@ -44,15 +44,6 @@ const getAllValues = (object: object): Array => { return loop([], object); }; -// On fast connections (or locally), the DB will send the complete update before the image has been fully saved. -// This is because it shouldn't really be an update, and that is hacky but hey. It works. -// The tech debt will be collected eventually. -// -// AND MORE IMPORTANTLY. The fucking AI agents aren't done. -// hhhhhhhhhhhhhhhhhhhhmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm -// wait groups. -const BIG_SHAME_TIMEOUT = 5000; - const SearchImageContext = createContext(); export const SearchImageContextProvider: Component = (props) => { const [images, { refetch }] = createResource(() => @@ -68,7 +59,7 @@ export const SearchImageContextProvider: Component = (props) => { setTimeout(refetch, BIG_SHAME_TIMEOUT), + onRefetchImages: refetch, }} > {props.children}