docs(agentexec): drop history and refactoring narration from comments
This commit is contained in:
2 files changed
+7
-11
No files matched your search
@@ -16,8 +16,7 @@ import (
|
||||
|
||||
// toolCallDetailBytes caps the summary ToolCallReport.Detail carries. This
|
||||
// rides on every task's observability event stream, so one large file read
|
||||
// must not dominate it the way baselineMissionBytes-sized content is allowed
|
||||
// to dominate a builder's own context.
|
||||
// must not dominate it.
|
||||
const toolCallDetailBytes = 300
|
||||
|
||||
func ClipToolCallDetail(s string) string {
|
||||
|
||||
@@ -36,24 +36,22 @@ func (l ToolLimits) EnsureSpillDir() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Options builds the tool-set options for a single turn or stage.
|
||||
// There is no aggregate turn output budget; only per-result caps apply.
|
||||
// Options builds the tool-set options for a single turn or stage. Only
|
||||
// per-result caps apply; there is no aggregate turn output budget.
|
||||
func (l ToolLimits) Options(excludeToolsets ...string) ToolSetOptions {
|
||||
opts := ToolSetOptions{
|
||||
return ToolSetOptions{
|
||||
MaxResultChars: l.MaxResultChars,
|
||||
ExcludeToolsets: excludeToolsets,
|
||||
SpillDir: l.SpillDir,
|
||||
}
|
||||
return opts
|
||||
}
|
||||
|
||||
// ToolSetOptions bounds what a built tool set may do and return.
|
||||
//
|
||||
// The zero value builds every available tool with no result limits, which is
|
||||
// the behaviour this package had before the options existed.
|
||||
// The zero value builds every available tool with no result limits.
|
||||
type ToolSetOptions struct {
|
||||
// SpillDir receives complete results displaced by the per-tool cap. Empty
|
||||
// selects inline truncation. There is deliberately no aggregate turn cap.
|
||||
// selects inline truncation.
|
||||
SpillDir string
|
||||
|
||||
// MaxResultChars caps a single tool result. Entries setting
|
||||
@@ -78,8 +76,7 @@ type ToolSetOptions struct {
|
||||
}
|
||||
|
||||
// reportToolCallCompletion notifies opts.OnToolCall, if set, of one
|
||||
// completed call. Factored out of toolExecute's closure so the branching
|
||||
// here doesn't add to that function's own cognitive-complexity budget.
|
||||
// completed call.
|
||||
func reportToolCallCompletion(opts ToolSetOptions, entry tools.ToolEntry, result string, err error) {
|
||||
if opts.OnToolCall == nil {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user