MCPcopy Create free account
hub / github.com/cortexkit/magic-context / scheduleOptions

Function scheduleOptions

packages/cli/src/lib/dreamer-setup.ts:73–88  ·  view source on GitHub ↗
(defaultCron: string)

Source from the content-addressed store, hash-verified

71}
72
73function scheduleOptions(defaultCron: string): SelectOption[] {
74 const recommended = presetValueForCron(defaultCron);
75 const opts: SelectOption[] = SCHEDULE_PRESETS.map((p) => ({
76 label: p.label,
77 // Encode the cron in the value; "Disabled" is the empty string, which
78 // would collide with a falsy check, so prefix-tag all preset values.
79 value: `cron:${p.cron}`,
80 recommended: p.cron === recommended,
81 }));
82 opts.push({
83 label: "Custom cron…",
84 value: PRESET_CUSTOM,
85 recommended: recommended === PRESET_CUSTOM,
86 });
87 return opts;
88}
89
90export interface DreamerSetupResult {
91 model: string;

Callers 1

runDreamerSetupFunction · 0.85

Calls 1

presetValueForCronFunction · 0.85

Tested by

no test coverage detected