Commit 2e69985
fix(cockpit): stop c-input demo double-submitting the user message (#727)
The chat-input primitive submits to its bound [agent] inside onSubmit()
and emits (submitted) purely as a post-submit notification. The c-input
demo also handled (submitted) by calling agent.submit() again, so every
turn produced two user messages — surfacing as a phantom third
chat-message in the list (the c-input e2e count assertion caught it).
Drop the redundant (submitted) handler and the submitMessage method; the
[agent] binding is the single submit path.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 971d645 commit 2e69985
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 100 | | |
0 commit comments