fix: remaining gci trailing newline and golines >120 char issues
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1e29329b8d
commit
d33c064b54
2 changed files with 28 additions and 7 deletions
|
|
@ -1132,17 +1132,39 @@ func (al *AgentLoop) executeToolCalls(
|
|||
totalLen += len(sm.Content)
|
||||
}
|
||||
*messages = append(*messages, steeringMsgs...)
|
||||
al.emitEvent(EventKindSteeringInjected,
|
||||
EventMeta{AgentID: agent.ID, TurnID: scope.turnID, SessionKey: opts.SessionKey, Iteration: iteration},
|
||||
SteeringInjectedPayload{Count: len(steeringMsgs), TotalContentLen: totalLen})
|
||||
steeringMeta := EventMeta{
|
||||
AgentID: agent.ID,
|
||||
TurnID: scope.turnID,
|
||||
SessionKey: opts.SessionKey,
|
||||
Iteration: iteration,
|
||||
}
|
||||
al.emitEvent(
|
||||
EventKindSteeringInjected,
|
||||
steeringMeta,
|
||||
SteeringInjectedPayload{
|
||||
Count: len(steeringMsgs),
|
||||
TotalContentLen: totalLen,
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Skip remaining tools if steering was injected
|
||||
if steered {
|
||||
al.emitEvent(EventKindToolExecSkipped,
|
||||
EventMeta{AgentID: agent.ID, TurnID: scope.turnID, SessionKey: opts.SessionKey, Iteration: iteration},
|
||||
ToolExecSkippedPayload{Tool: tc.Name, Reason: "steering"})
|
||||
skipMeta := EventMeta{
|
||||
AgentID: agent.ID,
|
||||
TurnID: scope.turnID,
|
||||
SessionKey: opts.SessionKey,
|
||||
Iteration: iteration,
|
||||
}
|
||||
al.emitEvent(
|
||||
EventKindToolExecSkipped,
|
||||
skipMeta,
|
||||
ToolExecSkippedPayload{
|
||||
Tool: tc.Name,
|
||||
Reason: "steering",
|
||||
},
|
||||
)
|
||||
// Still need to add a tool result to messages for protocol correctness
|
||||
*messages = append(*messages, providers.Message{
|
||||
Role: "tool",
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@ type MessageSenderWithID interface {
|
|||
type DraftSender interface {
|
||||
SendDraft(ctx context.Context, chatID string, draftID int, content string) error
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue