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)
|
totalLen += len(sm.Content)
|
||||||
}
|
}
|
||||||
*messages = append(*messages, steeringMsgs...)
|
*messages = append(*messages, steeringMsgs...)
|
||||||
al.emitEvent(EventKindSteeringInjected,
|
steeringMeta := EventMeta{
|
||||||
EventMeta{AgentID: agent.ID, TurnID: scope.turnID, SessionKey: opts.SessionKey, Iteration: iteration},
|
AgentID: agent.ID,
|
||||||
SteeringInjectedPayload{Count: len(steeringMsgs), TotalContentLen: totalLen})
|
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
|
// Skip remaining tools if steering was injected
|
||||||
if steered {
|
if steered {
|
||||||
al.emitEvent(EventKindToolExecSkipped,
|
skipMeta := EventMeta{
|
||||||
EventMeta{AgentID: agent.ID, TurnID: scope.turnID, SessionKey: opts.SessionKey, Iteration: iteration},
|
AgentID: agent.ID,
|
||||||
ToolExecSkippedPayload{Tool: tc.Name, Reason: "steering"})
|
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
|
// Still need to add a tool result to messages for protocol correctness
|
||||||
*messages = append(*messages, providers.Message{
|
*messages = append(*messages, providers.Message{
|
||||||
Role: "tool",
|
Role: "tool",
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,3 @@ type MessageSenderWithID interface {
|
||||||
type DraftSender interface {
|
type DraftSender interface {
|
||||||
SendDraft(ctx context.Context, chatID string, draftID int, content string) error
|
SendDraft(ctx context.Context, chatID string, draftID int, content string) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue