Fix toolautocall.New godoc: it returns middleware, not a chat client - #1148
PratikDhanave (PratikDhanave) wants to merge 1 commit into
Conversation
New takes only a Config and returns an agent.Middleware; the doc comment was leftover .NET FunctionInvokingChatClient wording naming a client parameter and chat-client return that do not exist.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The comment now accurately matches the function signature and behavior.
Review effort: Lite
Findings: None
What changed in this PR
Corrects the toolautocall.New documentation to accurately describe its middleware return value and configuration.
Changes:
- Updated the
Newgodoc comment.
| File | Description |
|---|---|
agent/harness/toolautocall/autocall.go |
Corrected documentation for New. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Scope: internal-only (doc comment only) Changed Go contract: None — Upstream evidence reviewed: No equivalent found — not applicable, since no exported API or observable behavior changed. No comparison to Result: out of scope This PR only fixes an inaccurate godoc comment to match the existing implementation; it introduces no new API, no behavior change, and no cross-repo parity concern. No inline findings or label changes needed.
|
The doc comment reads "New creates a new function-invoking chat client that wraps the provided client," but the signature is
New(cfg Config) agent.Middleware— it takes only aConfigand returns middleware; wrapping of the downstreamRunFunchappens later inRun. The wording is leftover from .NET'sFunctionInvokingChatClient. Comment-only fix.