Skip to content

refactor(coderd/x/chatd): extract runGenerationStep from StartGeneration - #28968

Closed
jscottmiller wants to merge 1 commit into
mainfrom
scott/chatd-stages/1-extract-step
Closed

jscottmiller wants to merge 1 commit into
mainfrom
scott/chatd-stages/1-extract-step

Conversation

@jscottmiller

@jscottmiller jscottmiller commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #29769. Closed in favor of the reduced stack #29773.

Moves the body of the for loop in StartGeneration into runGenerationStep, which returns the input for the next step and whether the caller must reload state and run another. Control flow, error wrapping, and cleanup() placement are unchanged; each continue becomes again == true and each return becomes a return from the step.

This is a pure extraction. It gives the next PRs in the stack a function boundary for a per-step deferred span end.

🤖 This PR was generated by Coder Agents on behalf of @jscottmiller.

@linear-code

linear-code Bot commented Sep 22, 2026

Copy link
Copy Markdown

CODAGT-1102

Move the body of the StartGeneration loop into runGenerationStep, which
runs one step of a turn and reports whether the caller must reload
state and run another. The loop keeps only state loading and the
continue/return decision. Every return path maps one to one onto the
previous inline code, so behavior is unchanged.
@jscottmiller
jscottmiller force-pushed the scott/chatd-stages/1-extract-step branch from d135742 to fb24147 Compare September 23, 2026 02:14
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant