mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
Merge branch 'refactor/agent' into feat/subturn-poc
This commit is contained in:
+7
-6
@@ -42,9 +42,8 @@ type AgentLoop struct {
|
||||
state *state.Manager
|
||||
|
||||
// Event system (from Incoming)
|
||||
eventBus *EventBus
|
||||
hooks *HookManager
|
||||
hookRuntime hookRuntime
|
||||
eventBus *EventBus
|
||||
hooks *HookManager
|
||||
|
||||
// Runtime state
|
||||
running atomic.Bool
|
||||
@@ -55,6 +54,7 @@ type AgentLoop struct {
|
||||
transcriber voice.Transcriber
|
||||
cmdRegistry *commands.Registry
|
||||
mcp mcpRuntime
|
||||
hookRuntime hookRuntime
|
||||
steering *steeringQueue
|
||||
mu sync.RWMutex
|
||||
|
||||
@@ -534,7 +534,7 @@ func (al *AgentLoop) drainBusToSteering(ctx context.Context, activeScope, active
|
||||
"sender_id": msg.SenderID,
|
||||
})
|
||||
}
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
// Transcribe audio if needed before steering, so the agent sees text.
|
||||
@@ -717,11 +717,12 @@ func (al *AgentLoop) emitEvent(kind EventKind, meta EventMeta, payload any) {
|
||||
Payload: payload,
|
||||
}
|
||||
|
||||
al.logEvent(evt)
|
||||
|
||||
if al == nil || al.eventBus == nil {
|
||||
return
|
||||
}
|
||||
|
||||
al.logEvent(evt)
|
||||
|
||||
al.eventBus.Emit(evt)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user