fix: replace raw string type literals with protocol.Type* constants in mixed-mode chat#3844
Conversation
…n handleMixedModeChat (#3832) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole canceled.
|
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
There was a problem hiding this comment.
Pull request overview
This PR standardizes mixed-mode chat WebSocket message typing by replacing raw string type literals with shared protocol.MessageType constants, reducing the risk of silent protocol drift between layers.
Changes:
- Added
protocol.TypeStreamChunk,protocol.TypeStreamEnd,protocol.TypeMixedModeThinking, andprotocol.TypeMixedModeExecuting. - Updated
handleMixedModeChatto use the newprotocol.Type*constants instead of bare string literals.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/agent/server.go | Replaces mixed-mode WebSocket message Type fields from raw strings to protocol.Type* constants. |
| pkg/agent/protocol/messages.go | Introduces new MessageType constants for mixed-mode phases and stream chunk/end events. |
Closes #3832
Summary
protocol.MessageTypeconstants topkg/agent/protocol/messages.go:TypeStreamChunk,TypeStreamEnd,TypeMixedModeThinking, andTypeMixedModeExecuting"stream_chunk","stream_end","mixed_mode_thinking","mixed_mode_executing") inhandleMixedModeChatwith the correspondingprotocol.Type*constantsTest plan
go build ./...passesGenerated with Claude Code