@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 07:15 UTC

main
ts 28 lines 732 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Neon from "@alchemy.run/neon";
3 import * as Alchemy from "alchemy";
4 import * as Effect from "effect/Effect";
5 import * as Layer from "effect/Layer";
6 import Chat from "./ChatModules.ts";
7
8 // #region show
9 export default Alchemy.Stack(
10 "Chat",
11 {
12 // #region providers
13 providers: Layer.mergeAll(Cloudflare.providers(), Neon.providers()),
14 // #endregion providers
15 // #region state
16 state: Cloudflare.state(),
17 // #endregion state
18 },
19 Effect.gen(function* () {
20 // #region chat
21 const chat = yield* Chat;
22 // #endregion chat
23 // #region ret
24 return { url: chat.url.as<string>() };
25 // #endregion ret
26 }),
27 );
28 // #endregion show