fix: remaining gci and golines lint issues
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ad24cddd57
commit
1e29329b8d
3 changed files with 20 additions and 11 deletions
|
|
@ -57,9 +57,9 @@ type AgentLoop struct {
|
|||
cmdRegistry *commands.Registry
|
||||
mcp mcpRuntime
|
||||
hookRuntime hookRuntime
|
||||
steering *steeringQueue
|
||||
pendingSkills sync.Map // sessionKey → skillName (armed by /use <skill>)
|
||||
mu sync.RWMutex
|
||||
steering *steeringQueue
|
||||
pendingSkills sync.Map // sessionKey → skillName (armed by /use <skill>)
|
||||
mu sync.RWMutex
|
||||
|
||||
providerCache map[string]providers.LLMProvider
|
||||
|
||||
|
|
@ -1506,9 +1506,13 @@ func (al *AgentLoop) callLLMWithRetry(
|
|||
// Helper to emit events if scope was provided
|
||||
emitRetryEvent := func(kind EventKind, payload any) {
|
||||
if len(scope) > 0 {
|
||||
al.emitEvent(kind,
|
||||
EventMeta{AgentID: agent.ID, TurnID: scope[0].turnID, SessionKey: opts.SessionKey, Iteration: iteration},
|
||||
payload)
|
||||
meta := EventMeta{
|
||||
AgentID: agent.ID,
|
||||
TurnID: scope[0].turnID,
|
||||
SessionKey: opts.SessionKey,
|
||||
Iteration: iteration,
|
||||
}
|
||||
al.emitEvent(kind, meta, payload)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -917,7 +917,12 @@ func (al *AgentLoop) runLLMIteration(
|
|||
})
|
||||
|
||||
// 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 {
|
||||
hookReq := &LLMHookRequest{
|
||||
Meta: hookMeta,
|
||||
|
|
|
|||
|
|
@ -84,10 +84,10 @@ type Manager struct {
|
|||
mediaStore media.MediaStore
|
||||
dispatchTask *asyncTask
|
||||
mu sync.RWMutex
|
||||
placeholders sync.Map // "channel:chatID" → placeholderID (string)
|
||||
typingStops sync.Map // "channel:chatID" → func()
|
||||
reactionUndos sync.Map // "channel:chatID" → reactionEntry
|
||||
streamActive sync.Map // "channel:chatID" → true (set when streamer.Finalize sent the message)
|
||||
placeholders sync.Map // "channel:chatID" → placeholderID (string)
|
||||
typingStops sync.Map // "channel:chatID" → func()
|
||||
reactionUndos sync.Map // "channel:chatID" → reactionEntry
|
||||
streamActive sync.Map // "channel:chatID" → true (set when streamer.Finalize sent the message)
|
||||
}
|
||||
|
||||
type asyncTask struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue