refactor(inbound): add inbound context compatibility bridge

This commit is contained in:
Hoshina
2026-04-01 13:35:18 +08:00
parent 3b3f95c44c
commit 9cfa3c3ba6
6 changed files with 417 additions and 0 deletions
+3
View File
@@ -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") {