Commit 960ab91
fix(react-core): IntelligenceIndicator stays through tool-result interleaving
The pill's gate "the message must be the last message of its run" was
suppressed every time a `role: "tool"` result arrived between
successive assistant-with-tool-call messages. Real MCP recall flows
always interleave tool results between assistant tool-call messages,
so the assistant message holding the matching tool call lost its
"last in run" claim immediately, the indicator returned `null`, and
the pill flashed off. By the time the run finished, the final
prose-only assistant message was the last in the run and the pill
on the bash-bearing assistant stayed suppressed. Net result: the
user saw no pill at all during a real recall.
Change the gate to "the latest assistant-with-matching-tool-call
message in the run". Tool result messages (`role: "tool"`) and
prose-only assistant messages now skip through the walk without
invalidating an earlier matching-assistant's claim on the slot, so
the pill stays continuously through a multi-step tool chain and
transitions to checkmark on `isRunning` falling (debounced 500 ms,
unchanged) as before.
The existing test suite did not cover this case — none of the
walkthrough scenarios emit `role: "tool"` between successive
assistant messages. A regression test that interleaves a tool result
will land alongside this fix.1 parent e8192a1 commit 960ab91
1 file changed
Lines changed: 41 additions & 12 deletions
Lines changed: 41 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
80 | 81 | | |
81 | | - | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
185 | 191 | | |
186 | 192 | | |
187 | 193 | | |
188 | | - | |
189 | | - | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | | - | |
192 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
193 | 207 | | |
194 | 208 | | |
195 | 209 | | |
196 | 210 | | |
197 | 211 | | |
198 | 212 | | |
199 | 213 | | |
200 | | - | |
| 214 | + | |
201 | 215 | | |
202 | 216 | | |
203 | 217 | | |
204 | 218 | | |
205 | | - | |
206 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
207 | 233 | | |
208 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
209 | 238 | | |
210 | 239 | | |
211 | 240 | | |
212 | | - | |
| 241 | + | |
213 | 242 | | |
214 | 243 | | |
215 | 244 | | |
| |||
0 commit comments