(preset: ProviderPreset)
| 92 | } |
| 93 | |
| 94 | function applyPreset(preset: ProviderPreset) { |
| 95 | setConfig(current => ({ |
| 96 | ...current, |
| 97 | upstreamBaseUrl: preset.upstreamBaseUrl, |
| 98 | upstreamModel: preset.upstreamModel, |
| 99 | clawModel: preset.clawModel, |
| 100 | textMode: preset.textMode, |
| 101 | })); |
| 102 | } |
| 103 | |
| 104 | async function pickDirectory(target: 'workspaceDir' | 'clawProjectDir') { |
| 105 | const nextPath = await window.clawDesktop?.pickDirectory?.(); |