]> git.giacomolli.uk - onechat/commit
Share the request chain of a turn
authorAnderson A. Giacomolli <redacted>
Sun, 8 Nov 2026 13:12:00 +0000 (10:12 -0300)
committerAnderson A. Giacomolli <redacted>
Sun, 8 Nov 2026 13:12:00 +0000 (10:12 -0300)
commiteb05edcf5d575e8a3b1040debfb57423312e8320
treebac1d5b2b97f0d3343a218c479a1ee56a6422983
parent7594b9938b7343717e7a57aa7aede5d40d547483
Share the request chain of a turn

The request chain moves out of the turn loop into Chain: it sends a
request, logs the replies, runs the tool calls, and sends their results
back until a response has no tool call. A turn builds a chain with the
prompt, the tools, and the input of the turn, so its requests do not
change. The chain also returns the replies of the final answer, because
a subagent needs that text for its report and runs the same chain with
its own prompt, toolbox, and log.

Issue: b1ac698
chain.go [new file with mode: 0644]
chain_test.go [new file with mode: 0644]
turn.go