| 1 | import { z } from "zod"; |
| 2 | import { completionOptionsSchema } from "../../models.js"; |
| 3 | import { baseDevDataAllSchema } from "../base.js"; |
| 4 | |
| 5 | export const autocompleteEventAllSchema = baseDevDataAllSchema.extend({ |
| 6 | // Tab autocomplete options - TODO - old json version? |
| 7 | disable: z.boolean(), |
| 8 | useFileSuffix: z.boolean(), |
| 9 | maxPromptTokens: z.number(), |
| 10 | debounceDelay: z.number(), |
| 11 | maxSuffixPercentage: z.number(), |
| 12 | prefixPercentage: z.number(), |
| 13 | transform: z.boolean().optional(), |
| 14 | template: z.string().optional(), |
| 15 | multilineCompletions: z.enum(["always", "never", "auto"]), |
| 16 | slidingWindowPrefixPercentage: z.number(), |
| 17 | slidingWindowSize: z.number(), |
| 18 | useCache: z.boolean(), |
| 19 | onlyMyCode: z.boolean(), |
| 20 | useRecentlyEdited: z.boolean(), |
| 21 | useImports: z.boolean().optional(), |
| 22 | |
| 23 | // Other |
| 24 | accepted: z.boolean().optional(), |
| 25 | time: z.number(), |
| 26 | prefix: z.string(), |
| 27 | suffix: z.string(), |
| 28 | prompt: z.string(), |
| 29 | completion: z.string(), |
| 30 | modelProvider: z.string(), |
| 31 | modelName: z.string(), |
| 32 | cacheHit: z.boolean(), |
| 33 | filepath: z.string(), |
| 34 | gitRepo: z.string().optional(), |
| 35 | completionId: z.string(), |
| 36 | uniqueId: z.string(), |
| 37 | timestamp: z.string(), |
| 38 | |
| 39 | // For static contextualization. |
| 40 | enabledStaticContextualization: z.boolean().optional(), |
| 41 | |
| 42 | // DEPRECATED - no more nested objects after v0.1.0, all flat values |
| 43 | completionOptions: completionOptionsSchema.optional(), |
| 44 | disableInFiles: z.array(z.string()).optional(), |
| 45 | }); |