The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as Effect from "effect/Effect"; |
| 2 | import { Argument, Command } from "effect/cli"; |
| 3 | import { runNativeSpeechWorker } from "../speech/native.ts"; |
| 4 | |
| 5 | export const speechWorkerCommand = Command.make("__speech-worker", { |
| 6 | mode: Argument.Literals("mode", ["discover", "model"]), |
| 7 | moduleUrl: Argument.String("module-url").pipe(Argument.optional), |
| 8 | }).pipe( |
| 9 | Command.unlisted, |
| 10 | Command.withHandler(({ mode, moduleUrl }) => |
| 11 | Effect.promise(() => |
| 12 | runNativeSpeechWorker(mode, moduleUrl._tag === "Some" ? moduleUrl.value : undefined), |
| 13 | ), |
| 14 | ), |
| 15 | ); |