import {
CustomModelSetting,
makeBinaryPathSetting,
makeProviderSettingsSchema,
} from "@t3tools/contracts";
import * as Effect from "effect/Effect";
import * as Schema from "effect/Schema";
export const GrokSettings = makeProviderSettingsSchema(
{
enabled: Schema.Boolean.pipe(
Schema.withDecodingDefault(Effect.succeed(false)),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
binaryPath: makeBinaryPathSetting("grok").pipe(
Schema.annotateKey({
title: "Binary path",
description: "Path to the Grok CLI binary.",
providerSettingsForm: { placeholder: "grok", clearWhenEmpty: "omit" },
}),
),
customModels: Schema.Array(CustomModelSetting).pipe(
Schema.withDecodingDefault(Effect.succeed([])),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
},
{
order: ["binaryPath"],
},
);
export type GrokSettings = typeof GrokSettings.Type;