mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
refactor(inbound): add inbound context compatibility bridge
This commit is contained in:
@@ -1241,6 +1241,7 @@ func (al *AgentLoop) ProcessDirectWithChannel(
|
||||
Content: content,
|
||||
SessionKey: sessionKey,
|
||||
}
|
||||
msg.Context = bus.ContextFromLegacyInbound(msg)
|
||||
|
||||
return al.processMessage(ctx, msg)
|
||||
}
|
||||
@@ -1276,6 +1277,8 @@ func (al *AgentLoop) ProcessHeartbeat(
|
||||
}
|
||||
|
||||
func (al *AgentLoop) processMessage(ctx context.Context, msg bus.InboundMessage) (string, error) {
|
||||
msg = bus.NormalizeInboundMessage(msg)
|
||||
|
||||
// Add message preview to log (show full content for error messages)
|
||||
var logContent string
|
||||
if strings.Contains(msg.Content, "Error:") || strings.Contains(msg.Content, "error") {
|
||||
|
||||
Reference in New Issue
Block a user