1// Shared with the client settings form; keep schema code browser-safe.
2import {
3 CustomModelSetting,
4 makeBinaryPathSetting,
5 makeProviderSettingsSchema,
6} from "@t3tools/contracts";
7import * as Effect from "effect/Effect";
8import * as Schema from "effect/Schema";
9
10export const MuseSettings = makeProviderSettingsSchema(
11 {
12 enabled: Schema.Boolean.pipe(
13 Schema.withDecodingDefault(Effect.succeed(false)),
14 Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
15 ),
16 binaryPath: makeBinaryPathSetting("muse").pipe(
17 Schema.annotateKey({
18 title: "Binary path",
19 description:
20 "Path to the Muse Code binary on this environment. Sign in with muse login on that host.",
21 providerSettingsForm: { placeholder: "muse", clearWhenEmpty: "omit" },
22 }),
23 ),
24 customModels: Schema.Array(CustomModelSetting).pipe(
25 Schema.withDecodingDefault(Effect.succeed([])),
26 Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
27 ),
28 },
29 { order: ["binaryPath"] },
30);
31export type MuseSettings = typeof MuseSettings.Type;