mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 21:30:17 +08:00
fix: hide ClaudeQuickToggles when creating a new provider
The quick toggles (hide AI attribution, extended thinking, teammates mode) patch the live config of the currently active provider, which is incorrect during provider creation. Only show them in edit mode.
This commit is contained in:
@@ -1496,6 +1496,7 @@ export function ProviderForm({
|
|||||||
<Label htmlFor="settingsConfig">
|
<Label htmlFor="settingsConfig">
|
||||||
{t("claudeConfig.configLabel")}
|
{t("claudeConfig.configLabel")}
|
||||||
</Label>
|
</Label>
|
||||||
|
{isEditMode && (
|
||||||
<ClaudeQuickToggles
|
<ClaudeQuickToggles
|
||||||
onPatchApplied={(patch) => {
|
onPatchApplied={(patch) => {
|
||||||
try {
|
try {
|
||||||
@@ -1512,6 +1513,7 @@ export function ProviderForm({
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<JsonEditor
|
<JsonEditor
|
||||||
value={form.watch("settingsConfig")}
|
value={form.watch("settingsConfig")}
|
||||||
onChange={(value) => form.setValue("settingsConfig", value)}
|
onChange={(value) => form.setValue("settingsConfig", value)}
|
||||||
|
|||||||
Reference in New Issue
Block a user