feat(proxy): add OpenCode IDE config and fix service availability
- Add opencode to SupportedIde with JSON providers.json output - Add defaultModel parameter for IDE config generation - Add model selector dropdown in ToolsTab for IDE configurations - Use getServiceOptional for graceful degradation when proxy is stopped - Add fallback IDE config generation using ConfigManager when NestJS is offline - Update IPC router schema to accept defaultModel parameter
This commit is contained in:
1 parent
641c739b64
commit
713c4497c6
5 files changed
+321
-68
No files matched your search
@@ -155,9 +155,11 @@ const IdeConfigResponseSchema = z.object({
|
||||
.object({
|
||||
name: z.string(),
|
||||
settingsPath: z.string(),
|
||||
proxySetting: z.string(),
|
||||
apiKeySetting: z.string(),
|
||||
instructions: z.string(),
|
||||
proxySetting: z.string().optional(),
|
||||
apiKeySetting: z.string().optional(),
|
||||
instructions: z.string().optional(),
|
||||
format: z.enum(['json', 'shell', 'env', 'instructions']).optional(),
|
||||
content: z.union([z.record(z.string(), z.unknown()), z.string()]).optional(),
|
||||
})
|
||||
.optional(),
|
||||
error: z.string().optional(),
|
||||
@@ -204,10 +206,10 @@ export const proxyAdvancedRouter = os.router({
|
||||
}),
|
||||
|
||||
generateIdeConfig: os
|
||||
.input(z.object({ ide: z.string() }))
|
||||
.input(z.object({ ide: z.string(), defaultModel: z.string().optional() }))
|
||||
.output(IdeConfigResponseSchema)
|
||||
.handler(async ({ input }) => {
|
||||
return generateIdeConfig(input.ide);
|
||||
return generateIdeConfig(input.ide, input.defaultModel);
|
||||
}),
|
||||
|
||||
replayRequest: os
|
||||
|
||||
Reference in new issue
Block a user