mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-11-14 08:17:36 +01:00
Delete the Eino model adapters, callbacks, middleware, orchestration, summarization and single-agent runner together with their dependencies. Chat, batch tasks, workflow Agent nodes and sub-agents now share the Pi runtime, and dispatch is a single code path instead of an engine switch. Configuration migrates eino_middleware/eino_skills to runtime/skills and drops the retired callback settings while old files still load. Settings, i18n and docs describe Pi only. Also carry the Pi follow-up fixes: empty required lists are omitted from tool schemas, historical tool results stay with their call batch, model proxies work over HTTP/1.1, single-query retrieval skips query expansion, and finalization docs match Pi lifecycle events.
28 lines
763 B
Go
28 lines
763 B
Go
package handler
|
|
|
|
import (
|
|
"context"
|
|
|
|
"cyberstrike-ai/internal/agent"
|
|
"cyberstrike-ai/internal/multiagent"
|
|
)
|
|
|
|
// applyAgentTraceResumeSegment 中断并继续:persist last_react_* → loadHistory,可选替换下一段 user 文案。
|
|
func (h *AgentHandler) applyAgentTraceResumeSegment(
|
|
conversationID string,
|
|
result *multiagent.RunResult,
|
|
curHistory *[]agent.ChatMessage,
|
|
curFinalMessage *string,
|
|
segmentUserMessage string,
|
|
) {
|
|
if shouldPersistAgentAgentTraceAfterRunError(context.Background()) {
|
|
h.persistAgentAgentTraceForResume(conversationID, result)
|
|
}
|
|
if hist, err := h.loadHistoryFromAgentTrace(conversationID); err == nil && len(hist) > 0 {
|
|
*curHistory = hist
|
|
}
|
|
if segmentUserMessage != "" {
|
|
*curFinalMessage = segmentUserMessage
|
|
}
|
|
}
|