Add default chat mode setting (#2244)
- Add `defaultChatMode` field to UserSettings schema
- Create `getEffectiveDefaultChatMode()` helper that returns the
appropriate default based on settings and pro status:
- If defaultChatMode is explicitly set, use it
- If not set but user has Dyad Pro enabled, default to "local-agent"
- Otherwise default to "build"
- Create DefaultChatModeSelector component in Workflow Settings
- When user upgrades to Dyad Pro, automatically set default to
"local-agent"
- Apply default chat mode when navigating to home page
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds a default chat mode setting with sane defaults and a selector in
Workflow Settings. It applies the effective default on the home page and
for new chats, and sets it to Agent when a user upgrades to Dyad Pro.
- **New Features**
- Added defaultChatMode to UserSettings.
- Added getEffectiveDefaultChatMode with rules: explicit > Dyad Pro →
local-agent > build.
- Added DefaultChatModeSelector in Workflow Settings (shows Agent option
when Dyad Pro is enabled).
- Home page and new chats sync selectedChatMode to the effective
default.
- On first Dyad Pro setup, default mode is set to local-agent
automatically.
<sup>Written for commit c265968422be75cc8b44760a684204fec198ccd0.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a user-configurable default chat mode and ensures it’s applied
consistently across the app.
>
> - **Core/Schema**: Add `defaultChatMode` to `UserSettings` and
`getEffectiveDefaultChatMode()` helper (falls back to `local-agent` for
Pro, otherwise `build`)
> - **Settings UI**: New `DefaultChatModeSelector` in Workflow Settings;
shows `Agent` option only when Pro is enabled
> - **Behavior changes**: Apply effective default on home (`home.tsx`)
and set `selectedChatMode` for new chats (`ChatList.tsx`)
> - **Provider setup**: On first Dyad Pro key save, set
`defaultChatMode` to `local-agent` (`ProviderSettingsPage.tsx`)
> - **E2E/tests**: New and updated tests for defaults and mentions;
stabilize dumps by normalizing `item_reference` IDs; updated chat mode
option mapping
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
00d92922ec6cab870c9ff50fdd3912a58d97f0f1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by:
Claude <noreply@anthropic.com>
正在显示
请
注册
或者
登录
后发表评论