History

wire embedded web UI back into CLI for compiled binaries

Rhys Sullivan committed 7 months ago

Commit ce52c6d1 parent 756a9042 files · +35 −3Browse files

Showing the changes to apps/cli/src (1 of 2 files). Show all

Unified · Split

apps/cli/src/main.ts+6−1
@@ -30,6 +30,9 @@ import * as Cause from "effect/Cause"; · 29 unmodified lines
3030 import { ExecutorApi } from "@executor/api";
3131 import { startServer, runMcpStdioServer, getExecutor } from "@executor/local";
3232
33+// Embedded web UI — baked into compiled binaries via `with { type: "file" }`
34+import embeddedWebUI from "./embedded-web-ui.gen";
35+
3336 // ---------------------------------------------------------------------------
3437 // Constants
3538 // ---------------------------------------------------------------------------
@@ -115,7 +118,9 @@ const makeApiClient = (baseUrl: string) => · 79 unmodified lines
115118
116119 const runForegroundSession = (input: { port: number }) =>
117120 Effect.gen(function* () {
118− const server = yield* Effect.promise(() => startServer({ port: input.port }));
121+ const server = yield* Effect.promise(() =>
122+ startServer({ port: input.port, embeddedWebUI }),
123+ );
119124
120125 const baseUrl = `http://localhost:${server.port}`;
121126 console.log(`Executor is ready.`);