Merge pull request #7676 from continuedev/dallin/con-3853-next-edit-union
fix: HOTFIX string fallback for config yaml model capability
This commit is contained in:
commit
fc75117e10
2 changed files with 6 additions and 2 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -43,7 +43,8 @@
|
|||
"extensions/vscode/e2e/storage": true,
|
||||
"extensions/vscode/e2e/vsix": true,
|
||||
"extensions/.continue-debug": true,
|
||||
"extensions/cli/dist/**": true
|
||||
"extensions/cli/dist/**": true,
|
||||
"packages/config-yaml/dist/**": true
|
||||
// "sync/**": true
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
|
|
|
|||
|
|
@ -37,8 +37,11 @@ export const modelCapabilitySchema = z.union([
|
|||
z.literal("tool_use"),
|
||||
z.literal("image_input"),
|
||||
z.literal("next_edit"),
|
||||
z.string(), // Needed for forwards compatibility, see https://github.com/continuedev/continue/pull/7676
|
||||
]);
|
||||
export type ModelCapability = z.infer<typeof modelCapabilitySchema>;
|
||||
|
||||
// not ideal but lose type suggestions if use z.infer because of the string fallback
|
||||
export type ModelCapability = "tool_use" | "image_input" | "next_edit";
|
||||
|
||||
export const completionOptionsSchema = z.object({
|
||||
contextLength: z.number().optional(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue