feat(Lightspeed): Add stop button to interrupt a streaming conversation#2587
feat(Lightspeed): Add stop button to interrupt a streaming conversation#2587karthikjeeyar wants to merge 3 commits intoredhat-developer:mainfrom
Conversation
Changed Packages
|
Review Summary by QodoAdd stop button to interrupt streaming conversations
WalkthroughsDescription• Add interrupt endpoint to stop streaming conversations • Implement stop button UI with request tracking • Add auto-refetch for conversations with pending topic summaries • Prevent sending empty messages on Enter key press Diagramflowchart LR
UI["Stop Button in UI"]
Hook["useStopConversation Hook"]
Client["LightspeedApiClient.stopMessage"]
Backend["Backend /v1/query/interrupt"]
Core["Lightspeed-Core Server"]
UI -- "triggers" --> Hook
Hook -- "calls" --> Client
Client -- "POST request" --> Backend
Backend -- "forwards" --> Core
Core -- "interrupts stream" --> Backend
Backend -- "returns success" --> Client
File Changes1. workspaces/lightspeed/plugins/lightspeed-backend/__fixtures__/lcsHandlers.ts
|
Code Review by Qodo
1.
|
workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx
Show resolved
Hide resolved
baef089 to
2b7da0d
Compare
|
|
@aprilma419 I am now retaining the last used query if the conversation is interrupted. For the partial response, we will have a followup PR in LCORE to support it. |
Jdubrick
left a comment
There was a problem hiding this comment.
small nit, generally lgtm though
| '/v1/feedback', | ||
| '/v1/query/interrupt', |
There was a problem hiding this comment.
| '/v1/feedback', | |
| '/v1/query/interrupt', | |
| '/v1/query/interrupt', | |
| '/v1/feedback', |
nit: can we keep them ordered?
There was a problem hiding this comment.
Screen.Recording.2026-03-26.at.2.36.51.PM.mov
Works as expected, But One small observation —when a conversation gets interrupted, the side panel shows a loading icon. It feels a bit odd; I would like more clarity or feedback there.
Even after you continue the conversation in the same chat, it remains the same in the side panel

|
To @HusneShabbir 's point, instead of the loader icon, if feasible, we can show a skeleton loading state. |
yangcao77
left a comment
There was a problem hiding this comment.
generally lgtm from backend perspective. I will hold off the lgtm label and wait for frontend side approval as well.





Hey, I just made a Pull Request!
Fixes:
https://redhat.atlassian.net/browse/RHIDP-12490
https://redhat.atlassian.net/browse/RHDHBUGS-2745
This PR contains the following changes:
Enterwith a emtpy stringLightspeed_stop_button.mov
How to test:
✔️ Checklist