mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix: read config from file for reload and improve provider validation
- Change reloadConfig to read from opencode.json file instead of HTTP API - Add logging for OpenCode PATCH responses to aid debugging - Make providerId optional in schema with custom validation when needed - Update test to mock fs.readFile instead of fetch
This commit is contained in:
1 parent
1f55bcdfc2
commit
8cfc6c0a17
5 files changed
+24
-35
No files matched your search
@@ -237,9 +237,9 @@ export function OpenCodeModelsEditor({ providers, onChange }: OpenCodeModelsEdit
|
||||
<OpenCodeModelDialog
|
||||
open={!!editingModel}
|
||||
onOpenChange={() => setEditingModel(null)}
|
||||
onSubmit={(providerId: string, modelId: string, model: ConfigModel) => {
|
||||
onSubmit={(providerId: string, modelId: string, model: ConfigModel, newProvider?: NewProviderConfig) => {
|
||||
if (editingModel) {
|
||||
handleModelSubmit(providerId, modelId, model, undefined, editingModel.providerId, editingModel.modelId)
|
||||
handleModelSubmit(providerId, modelId, model, newProvider, editingModel.providerId, editingModel.modelId)
|
||||
}
|
||||
}}
|
||||
availableProviders={availableProviderIds}
|
||||
|
||||
Reference in new issue
Block a user