Skip to content

[AT-230]: Add follow_up_refinement agent event type - #487

Open
dmitrycnstrc wants to merge 2 commits into
Constructor-io:masterfrom
dmitrycnstrc:AT-230/follow-up-refinements
Open

[AT-230]: Add follow_up_refinement agent event type#487
dmitrycnstrc wants to merge 2 commits into
Constructor-io:masterfrom
dmitrycnstrc:AT-230/follow-up-refinements

Conversation

@dmitrycnstrc

Copy link
Copy Markdown
Contributor

The agent now emits a follow_up_refinement SSE event (a narrowing question with
selectable options). The Agent module only subscribes to event types listed in
Agent.EventTypes, so the event was silently dropped from the stream.

Copilot AI lite review requested due to automatic review settings September 9, 2026 09:40
@dmitrycnstrc
dmitrycnstrc requested a review from a team as a code owner September 9, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The newly added test introduces inconsistent string quoting that likely violates existing style/lint conventions in the spec file.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds support for a new Agent SSE event type (follow_up_refinement) so it is no longer dropped by the stream listener, and updates typings/tests to match.

Changes:

  • Added FOLLOW_UP_REFINEMENT to Agent.EventTypes so the listener subscribes to it.
  • Extended TypeScript declarations with AgentEventTypes and FollowUpRefinementEventData.
  • Added a unit test asserting follow_up_refinement events are enqueued into the stream.
File summaries
File Description
src/types/agent.d.ts Adds typings for Agent.EventTypes and the new refinement event payload shape.
src/modules/agent.js Registers follow_up_refinement in the static EventTypes map so it’s listened for.
spec/src/modules/agent.js Adds coverage ensuring the new event type is enqueued into the readable stream.
Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread spec/src/modules/agent.js
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is small, consistent across runtime + typings, and includes a focused test verifying the new event type is forwarded.

Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants