Fix DyadThink react hook usage (#1467)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Reorders the collapse useEffect to run before the token-savings early
return so hooks are always called unconditionally.
>
> - **Frontend**
> - **`src/components/chat/DyadThink.tsx`**:
> - Move collapse `useEffect` above the token-savings early return to
ensure hooks are called unconditionally.
> - Maintains collapse behavior when `inProgress` transitions to false.
> - `DyadTokenSavings` rendering path remains unchanged.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a6c7d20ab037043bff26deec1364f2d9008fbf33. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
正在显示
请
注册
或者
登录
后发表评论