Skip to content

Commit 1812130

Browse files
authored
upgrade opentui to 0.1.94 (#20357)
1 parent d6d4446 commit 1812130

4 files changed

Lines changed: 67 additions & 20 deletions

File tree

bun.lock

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

packages/opencode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
"@opencode-ai/sdk": "workspace:*",
103103
"@opencode-ai/util": "workspace:*",
104104
"@openrouter/ai-sdk-provider": "2.3.3",
105-
"@opentui/core": "0.1.93",
106-
"@opentui/solid": "0.1.93",
105+
"@opentui/core": "0.1.94",
106+
"@opentui/solid": "0.1.94",
107107
"@parcel/watcher": "2.5.1",
108108
"@pierre/diffs": "catalog:",
109109
"@solid-primitives/event-bus": "1.1.2",
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/** @jsxImportSource @opentui/solid */
2+
import { expect, test } from "bun:test"
3+
import { createSlot, createSolidSlotRegistry, testRender, useRenderer } from "@opentui/solid"
4+
import { onMount } from "solid-js"
5+
6+
type Slots = {
7+
prompt: {}
8+
}
9+
10+
test("replace slot mounts plugin content once", async () => {
11+
let mounts = 0
12+
13+
const Probe = () => {
14+
onMount(() => {
15+
mounts += 1
16+
})
17+
18+
return <box />
19+
}
20+
21+
const App = () => {
22+
const renderer = useRenderer()
23+
const reg = createSolidSlotRegistry<Slots>(renderer, {})
24+
const Slot = createSlot(reg)
25+
26+
reg.register({
27+
id: "plugin",
28+
slots: {
29+
prompt() {
30+
return <Probe />
31+
},
32+
},
33+
})
34+
35+
return (
36+
<box>
37+
<Slot name="prompt" mode="replace">
38+
<box />
39+
</Slot>
40+
</box>
41+
)
42+
}
43+
44+
await testRender(() => <App />)
45+
46+
expect(mounts).toBe(1)
47+
})

packages/plugin/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"zod": "catalog:"
2222
},
2323
"peerDependencies": {
24-
"@opentui/core": ">=0.1.93",
25-
"@opentui/solid": ">=0.1.93"
24+
"@opentui/core": ">=0.1.94",
25+
"@opentui/solid": ">=0.1.94"
2626
},
2727
"peerDependenciesMeta": {
2828
"@opentui/core": {
@@ -33,8 +33,8 @@
3333
}
3434
},
3535
"devDependencies": {
36-
"@opentui/core": "0.1.93",
37-
"@opentui/solid": "0.1.93",
36+
"@opentui/core": "0.1.94",
37+
"@opentui/solid": "0.1.94",
3838
"@tsconfig/node22": "catalog:",
3939
"@types/node": "catalog:",
4040
"typescript": "catalog:",

0 commit comments

Comments
 (0)