Stabilize Fusion builds and simplify optional modules.
Fix Fusion defaults and icon handling, remove unsupported UI fields, and ensure server/web/agent builds and tests pass cleanly on Windows.
This commit is contained in:
@@ -22,12 +22,12 @@ import (
|
||||
|
||||
// AIHandler manages AI autonomy endpoints.
|
||||
type AIHandler struct {
|
||||
db *db.Database
|
||||
engines map[string]*ollama.Engine // agentID -> engine (each agent can have its own Ollama config)
|
||||
reports []ollama.Report // recent tool execution reports
|
||||
activity map[string]AIActivityEntry
|
||||
onEvent func(AIActivityEntry)
|
||||
mu sync.RWMutex
|
||||
db *db.Database
|
||||
engines map[string]*ollama.Engine // agentID -> engine (each agent can have its own Ollama config)
|
||||
reports []ollama.Report // recent tool execution reports
|
||||
activity map[string]AIActivityEntry
|
||||
onEvent func(AIActivityEntry)
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
// AIActivityEntry summarizes recent AI cycles per agent.
|
||||
@@ -147,8 +147,8 @@ func (h *AIHandler) handleDecide(w http.ResponseWriter, r *http.Request) {
|
||||
"tool_calls": []ollama.ToolCall{
|
||||
{
|
||||
Tool: "sleep",
|
||||
Args: map[string]string{"seconds": "60"},
|
||||
Reason: "Ollama decision failed, retrying in 60 seconds",
|
||||
Args: map[string]string{"seconds": "120"}, // Should be parsed by agent to include random jitter
|
||||
Reason: "Ollama decision failed, backing off for 120 seconds to prevent thundering herd",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user