fix: remaining gci and golines lint issues

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dj-oyu 2026-03-25 22:40:38 +09:00
parent ad24cddd57
commit 1e29329b8d
3 changed files with 20 additions and 11 deletions

View file

@ -1506,9 +1506,13 @@ func (al *AgentLoop) callLLMWithRetry(
// Helper to emit events if scope was provided // Helper to emit events if scope was provided
emitRetryEvent := func(kind EventKind, payload any) { emitRetryEvent := func(kind EventKind, payload any) {
if len(scope) > 0 { if len(scope) > 0 {
al.emitEvent(kind, meta := EventMeta{
EventMeta{AgentID: agent.ID, TurnID: scope[0].turnID, SessionKey: opts.SessionKey, Iteration: iteration}, AgentID: agent.ID,
payload) TurnID: scope[0].turnID,
SessionKey: opts.SessionKey,
Iteration: iteration,
}
al.emitEvent(kind, meta, payload)
} }
} }

View file

@ -917,7 +917,12 @@ func (al *AgentLoop) runLLMIteration(
}) })
// Hook: BeforeLLM — let hooks inspect/modify the request // Hook: BeforeLLM — let hooks inspect/modify the request
hookMeta := EventMeta{AgentID: agent.ID, TurnID: scope.turnID, SessionKey: opts.SessionKey, Iteration: iteration} hookMeta := EventMeta{
AgentID: agent.ID,
TurnID: scope.turnID,
SessionKey: opts.SessionKey,
Iteration: iteration,
}
if al.hooks != nil { if al.hooks != nil {
hookReq := &LLMHookRequest{ hookReq := &LLMHookRequest{
Meta: hookMeta, Meta: hookMeta,