Skip to content

Commit 18eb524

Browse files
authored
Streaming, Docs, JSONC Encoding, ... (#350)
1 parent 118fe0f commit 18eb524

File tree

131 files changed

+2999
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+2999
-651
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
APP_URL=
2+
CLERK_SECRET=
13
OPENAI_API_KEY=
4+
VITE_CLERK_PUBLISHABLE_KEY=
5+
VITE_SERVER_URL=

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- run: bun install
1919
- uses: dprint/check@v2.2
2020
- run: bun run build
21-
- run: bun test
21+
- run: bun run test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
.env
44
dist
55
liminal.land/.vitepress/cache
6+
liminal.land/.vitepress/dist
67
node_modules
78
repomix-output.xml

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"[typescriptreact]": {
2424
"editor.defaultFormatter": "dprint.dprint"
2525
},
26+
"[vue]": {
27+
"editor.defaultFormatter": "dprint.dprint"
28+
},
2629
"[yaml]": {
2730
"editor.defaultFormatter": "dprint.dprint"
2831
},

.vscode/tasks.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,46 @@
44
{
55
"label": "tsc",
66
"type": "shell",
7-
"command": "tsc -b -w",
7+
"command": "bun build:watch",
88
"problemMatcher": []
99
},
1010
{
11-
"label": "vite",
11+
"label": "vitest",
12+
"type": "shell",
13+
"command": "bun test:watch",
14+
"problemMatcher": []
15+
},
16+
{
17+
"label": "docs",
1218
"type": "shell",
1319
"command": "bunx vitepress",
1420
"options": {
1521
"cwd": "liminal.land"
1622
},
1723
"problemMatcher": []
1824
},
25+
{
26+
"label": "client",
27+
"type": "shell",
28+
"command": "bunx vite",
29+
"options": {
30+
"cwd": "liminal.im/client"
31+
},
32+
"problemMatcher": []
33+
},
34+
{
35+
"label": "server",
36+
"type": "shell",
37+
"command": "bun --env-file '../../.env' main",
38+
"options": {
39+
"cwd": "liminal.im/server"
40+
},
41+
"problemMatcher": []
42+
},
1943
{
2044
"label": "dev",
2145
"type": "shell",
22-
"dependsOn": ["tsc", "vite"],
46+
"dependsOn": ["tsc", "vitest", "docs", "server", "client"],
2347
"problemMatcher": []
2448
}
2549
]

alchemy.run.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import alchemy from "alchemy"
2+
import { CloudflareStateStore } from "alchemy/state"
3+
4+
const app = await alchemy("liminal", {
5+
stateStore: (scope) => new CloudflareStateStore(scope),
6+
})
7+
8+
// TODO
9+
10+
await app.finalize()

bun.lock

Lines changed: 1171 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dprint.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
"semiColons": "asi"
1818
},
1919
"plugins": [
20-
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.19.0.wasm",
21-
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm",
22-
"https://plugins.dprint.dev/markdown-0.18.0.wasm",
20+
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.23.1.wasm",
21+
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
22+
"https://plugins.dprint.dev/markdown-0.19.0.wasm",
2323
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf",
24-
"https://plugins.dprint.dev/typescript-0.94.0.wasm",
24+
"https://plugins.dprint.dev/typescript-0.95.9.wasm",
2525
"https://plugins.dprint.dev/json-0.20.0.wasm",
26-
"https://plugins.dprint.dev/g-plane/malva-v0.11.2.wasm"
26+
"https://plugins.dprint.dev/g-plane/malva-v0.14.1.wasm"
2727
],
2828
"excludes": [".changeset/*.md", "CHANGELOG.md"]
2929
}

examples/_layers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { OpenAiClient, OpenAiLanguageModel } from "@effect/ai-openai"
22
import { FetchHttpClient } from "@effect/platform"
33
import { Config, Layer } from "effect"
44

5-
export const client = OpenAiClient.layerConfig({
5+
export const ClientLive = OpenAiClient.layerConfig({
66
apiKey: Config.redacted("OPENAI_API_KEY"),
77
}).pipe(
88
Layer.provide(FetchHttpClient.layer),
99
)
1010

11-
export const model = OpenAiLanguageModel.model("gpt-4o-mini").pipe(
12-
Layer.provide(client),
11+
export const ModelLive = OpenAiLanguageModel.model("gpt-4o-mini").pipe(
12+
Layer.provide(ClientLive),
1313
)

examples/_logger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Console, Effect, flow, Stream } from "effect"
2-
import { L, pretty } from "liminal"
2+
import { L, LPretty } from "liminal"
33

44
export const logger = L.events.pipe(
55
Stream.runForEach(
66
flow(
7-
pretty,
7+
LPretty.event,
88
Console.log,
99
Effect.andThen(Console.log()),
1010
),

0 commit comments

Comments
 (0)