mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 01:48:40 +00:00
Apply PR #30815: opentui with native yoga layout
Some checks are pending
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Waiting to run
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Waiting to run
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Waiting to run
nix-hashes / update-hashes (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / version (push) Waiting to run
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
Some checks are pending
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Waiting to run
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Waiting to run
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Waiting to run
nix-hashes / update-hashes (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / version (push) Waiting to run
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
This commit is contained in:
commit
c277f18339
4 changed files with 401 additions and 500 deletions
12
package.json
12
package.json
|
|
@ -39,9 +39,9 @@
|
|||
"@octokit/rest": "22.0.0",
|
||||
"@hono/standard-validator": "0.2.0",
|
||||
"@hono/zod-validator": "0.4.2",
|
||||
"@opentui/core": "0.3.4",
|
||||
"@opentui/keymap": "0.3.4",
|
||||
"@opentui/solid": "0.3.4",
|
||||
"@opentui/core": "0.0.0-20260604-5b641b77",
|
||||
"@opentui/keymap": "0.0.0-20260604-5b641b77",
|
||||
"@opentui/solid": "0.0.0-20260604-5b641b77",
|
||||
"@tanstack/solid-virtual": "3.13.28",
|
||||
"@shikijs/stream": "4.2.0",
|
||||
"ulid": "3.0.1",
|
||||
|
|
@ -134,9 +134,9 @@
|
|||
"electron"
|
||||
],
|
||||
"overrides": {
|
||||
"@opentui/core": "catalog:",
|
||||
"@opentui/keymap": "catalog:",
|
||||
"@opentui/solid": "catalog:",
|
||||
"@opentui/core": "0.0.0-20260604-5b641b77",
|
||||
"@opentui/keymap": "0.0.0-20260604-5b641b77",
|
||||
"@opentui/solid": "0.0.0-20260604-5b641b77",
|
||||
"@types/bun": "catalog:",
|
||||
"@types/node": "catalog:"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
"zod": "catalog:"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentui/core": ">=0.3.4",
|
||||
"@opentui/keymap": ">=0.3.4",
|
||||
"@opentui/solid": ">=0.3.4"
|
||||
"@opentui/core": "0.0.0-20260604-5b641b77",
|
||||
"@opentui/keymap": "0.0.0-20260604-5b641b77",
|
||||
"@opentui/solid": "0.0.0-20260604-5b641b77"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@opentui/core": {
|
||||
|
|
|
|||
|
|
@ -427,41 +427,48 @@ export function Session() {
|
|||
const maxTop = Math.max(0, scroll.scrollHeight - scroll.viewport.height)
|
||||
const filename = `session-${route.sessionID.slice(0, 8)}-render-state-${timestamp}.json`
|
||||
renderer.dumpBuffers(timestamp)
|
||||
await Filesystem.writeJson(path.join(process.cwd(), filename), {
|
||||
capturedAt: timestamp,
|
||||
channel: InstallationChannel,
|
||||
version: InstallationVersion,
|
||||
sessionID: route.sessionID,
|
||||
scroll: {
|
||||
top: scroll.scrollTop,
|
||||
height: scroll.scrollHeight,
|
||||
viewportHeight: scroll.viewport.height,
|
||||
maxTop,
|
||||
atBottom: scroll.scrollTop >= maxTop,
|
||||
},
|
||||
messages: messages().map((message) => ({
|
||||
id: message.id,
|
||||
role: message.role,
|
||||
parts: (sync.data.part[message.id] ?? []).map((part) => {
|
||||
const renderable = scroll.findDescendantById(`text-${part.id}`)
|
||||
return {
|
||||
id: part.id,
|
||||
type: part.type,
|
||||
...((part.type === "text" || part.type === "reasoning") && { textLength: part.text.length }),
|
||||
...(renderable && {
|
||||
renderable: {
|
||||
id: renderable.id,
|
||||
x: renderable.x,
|
||||
y: renderable.y,
|
||||
width: renderable.width,
|
||||
height: renderable.height,
|
||||
visible: renderable.visible,
|
||||
},
|
||||
await writeFile(
|
||||
path.join(process.cwd(), filename),
|
||||
`${JSON.stringify(
|
||||
{
|
||||
capturedAt: timestamp,
|
||||
channel: InstallationChannel,
|
||||
version: InstallationVersion,
|
||||
sessionID: route.sessionID,
|
||||
scroll: {
|
||||
top: scroll.scrollTop,
|
||||
height: scroll.scrollHeight,
|
||||
viewportHeight: scroll.viewport.height,
|
||||
maxTop,
|
||||
atBottom: scroll.scrollTop >= maxTop,
|
||||
},
|
||||
messages: messages().map((message) => ({
|
||||
id: message.id,
|
||||
role: message.role,
|
||||
parts: (sync.data.part[message.id] ?? []).map((part) => {
|
||||
const renderable = scroll.findDescendantById(`text-${part.id}`)
|
||||
return {
|
||||
id: part.id,
|
||||
type: part.type,
|
||||
...((part.type === "text" || part.type === "reasoning") && { textLength: part.text.length }),
|
||||
...(renderable && {
|
||||
renderable: {
|
||||
id: renderable.id,
|
||||
x: renderable.x,
|
||||
y: renderable.y,
|
||||
width: renderable.width,
|
||||
height: renderable.height,
|
||||
visible: renderable.visible,
|
||||
},
|
||||
}),
|
||||
}
|
||||
}),
|
||||
}
|
||||
}),
|
||||
})),
|
||||
})
|
||||
})),
|
||||
},
|
||||
null,
|
||||
2,
|
||||
)}\n`,
|
||||
)
|
||||
toast.show({ message: `Session render state written to ${filename}`, variant: "success" })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue