Fix small bugs across AI tools, fleet API, and run.bat.

Correct AI uptime/reinstall/sleep, broaden live stats over WebSocket, fix blueprint delete JSON, gate hollowing behind build tag, and stop stale server binds on restart.
This commit is contained in:
drjones
2026-05-28 08:00:01 -07:00
parent a9aeaefb1b
commit edffb03e00
9 changed files with 61 additions and 31 deletions

View File

@@ -114,14 +114,10 @@ func (h *AIHandler) RemoveEngine(agentID string) {
// GetEngine returns the engine for an agent.
func (h *AIHandler) GetEngine(agentID string) *ollama.Engine {
h.mu.RLock()
defer h.mu.RUnlock()
h.mu.Lock()
defer h.mu.Unlock()
if entry, ok := h.engines[agentID]; ok {
h.mu.RUnlock() // Briefly unlock to update timestamp
h.mu.Lock()
entry.lastUsed = time.Now()
h.mu.Unlock()
h.mu.RLock()
return entry.engine
}
return nil