mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-15 03:55:09 +08:00
docs(agent): update head-guard call-site comment to match the order-sensitive forward scan
This commit is contained in:
parent
1ea90c25cb
commit
aed559d1cf
@ -344,8 +344,12 @@ public abstract class BaseAgent {
|
|||||||
//
|
//
|
||||||
// The boundary prepend earlier inserts a SystemMessage at the head;
|
// The boundary prepend earlier inserts a SystemMessage at the head;
|
||||||
// the orphan, if present, sits at index 1 in that case. Skip leading
|
// the orphan, if present, sits at index 1 in that case. Skip leading
|
||||||
// SystemMessages and drop any ToolResponseMessage whose response ids
|
// SystemMessages and drop any leading ToolResponseMessage whose
|
||||||
// are all unmatched by the AssistantMessages still in scope.
|
// response ids are not all issued by a *preceding* AssistantMessage
|
||||||
|
// — i.e. one we have already walked past in this scan. Provider
|
||||||
|
// validity is order-sensitive; a later same-id assistant deeper in
|
||||||
|
// the window does NOT redeem an earlier orphan. See
|
||||||
|
// stripHeadOrphanToolResponses below for the forward-scan details.
|
||||||
//
|
//
|
||||||
// Dropping is correct rather than expanding backward to fetch the
|
// Dropping is correct rather than expanding backward to fetch the
|
||||||
// missing assistant: if the AssistantMessage is outside the window,
|
// missing assistant: if the AssistantMessage is outside the window,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user