The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { |
| 2 | CustomModelSetting, |
| 3 | makeBinaryPathSetting, |
| 4 | makeProviderSettingsSchema, |
| 5 | } from "@t3tools/contracts"; |
| 6 | import * as Effect from "effect/Effect"; |
| 7 | import * as Schema from "effect/Schema"; |
| 8 | |
| 9 | export const GrokSettings = makeProviderSettingsSchema( |
| 10 | { |
| 11 | enabled: Schema.Boolean.pipe( |
| 12 | Schema.withDecodingDefault(Effect.succeed(false)), |
| 13 | Schema.annotateKey({ providerSettingsForm: { hidden: true } }), |
| 14 | ), |
| 15 | binaryPath: makeBinaryPathSetting("grok").pipe( |
| 16 | Schema.annotateKey({ |
| 17 | title: "Binary path", |
| 18 | description: "Path to the Grok CLI binary.", |
| 19 | providerSettingsForm: { placeholder: "grok", clearWhenEmpty: "omit" }, |
| 20 | }), |
| 21 | ), |
| 22 | customModels: Schema.Array(CustomModelSetting).pipe( |
| 23 | Schema.withDecodingDefault(Effect.succeed([])), |
| 24 | Schema.annotateKey({ providerSettingsForm: { hidden: true } }), |
| 25 | ), |
| 26 | }, |
| 27 | { |
| 28 | order: ["binaryPath"], |
| 29 | }, |
| 30 | ); |
| 31 | export type GrokSettings = typeof GrokSettings.Type; |