// Shared with the client settings form; keep schema code browser-safe.
import {
CustomModelSetting,
makeBinaryPathSetting,
makeProviderSettingsSchema,
} from "@t3tools/contracts";
import * as Effect from "effect/Effect";
import * as Schema from "effect/Schema";
export const MuseSettings = makeProviderSettingsSchema(
{
enabled: Schema.Boolean.pipe(
Schema.withDecodingDefault(Effect.succeed(false)),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
binaryPath: makeBinaryPathSetting("muse").pipe(
Schema.annotateKey({
title: "Binary path",
description:
"Path to the Muse Code binary on this environment. Sign in with muse login on that host.",
providerSettingsForm: { placeholder: "muse", clearWhenEmpty: "omit" },
}),
),
customModels: Schema.Array(CustomModelSetting).pipe(
Schema.withDecodingDefault(Effect.succeed([])),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
},
{ order: ["binaryPath"] },
);
export type MuseSettings = typeof MuseSettings.Type;