Commit 6fa1d46
fix(reasoning): make "Thought for a few seconds" message reachable (#223)
* fix(reasoning): make "Thought for a few seconds" message reachable
The "Thought for a few seconds" fallback message was unreachable due to
useControllableState defaulting duration to 0 instead of undefined.
- Changed defaultProp from 0 to undefined in useControllableState
- Updated ReasoningContextValue type to allow undefined duration
- Added test coverage for the undefined duration case
Fixes the conditional logic where duration === 0 would trigger the
shimmer animation, preventing the undefined check from ever executing.
* Create odd-grapes-behave.md
---------
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>1 parent 80a384a commit 6fa1d46
File tree
3 files changed
+16
-2
lines changed- .changeset
- packages/elements
- __tests__
- src
3 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments