GeezerVison is showing github.com — chore: OpenTUI 0.6.5 (#55339) · abn/opencode@c7ddff7
File treeExpand file treeCollapse file tree Open diff view settings services/www/src/docs/content/build/plugins
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: bun.lock +16-22Lines changed: 16 additions & 22 deletions Collapse file Copy file name to clipboardExpand all lines: bunfig.toml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | exact = true | 3 | 3 | # Only install newly resolved package versions published at least 3 days ago. | 4 | 4 | minimumReleaseAge = 259200 | 5 | | -minimumReleaseAgeExcludes = ["@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@brendonovich/vite-plugin-opencode", "@kitlangton/solid-motion", "@opencode/sdk", "@opencode-ai/pty", "@opencode-ai/pty-darwin-arm64", "@opencode-ai/pty-darwin-x64", "@opencode-ai/pty-linux-arm64-gnu", "@opencode-ai/pty-linux-arm64-musl", "@opencode-ai/pty-linux-x64-gnu", "@opencode-ai/pty-linux-x64-musl", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "@opentunnel/client", "@opentunnel/protocol", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron", "electron-builder", "electron-publish", "blume", "mermaid"] | | 5 | +minimumReleaseAgeExcludes = ["@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@brendonovich/vite-plugin-opencode", "@kitlangton/solid-motion", "@opencode/sdk", "@opencode-ai/pty", "@opencode-ai/pty-darwin-arm64", "@opencode-ai/pty-darwin-x64", "@opencode-ai/pty-linux-arm64-gnu", "@opencode-ai/pty-linux-arm64-musl", "@opencode-ai/pty-linux-x64-gnu", "@opencode-ai/pty-linux-x64-musl", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "@opentunnel/client", "@opentunnel/protocol", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron", "electron-builder", "electron-publish", "blume", "mermaid"] | 6 | 6 |
| 7 | 7 | [test] | 8 | 8 | root = "./do-not-run-tests-from-root" |
Collapse file Copy file name to clipboardExpand all lines: package.json +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 54 | 54 | "@octokit/rest": "22.0.0", | 55 | 55 | "@hono/standard-validator": "0.2.0", | 56 | 56 | "@hono/zod-validator": "0.4.2", | 57 | | - "@opentui/core": "0.5.17", | 58 | | - "@opentui/keymap": "0.5.17", | 59 | | - "@opentui/solid": "0.5.17", | | 57 | + "@opentui/core": "0.6.6", | | 58 | + "@opentui/keymap": "0.6.6", | | 59 | + "@opentui/solid": "0.6.6", | 60 | 60 | "@tanstack/solid-virtual": "3.13.37", | 61 | 61 | "@shikijs/stream": "4.4.3", | 62 | 62 | "@standard-schema/spec": "1.1.0", | | 70 | 70 | "@tsconfig/bun": "1.0.9", | 71 | 71 | "@cloudflare/workers-types": "4.20251008.0", | 72 | 72 | "@pierre/diffs": "1.5.1", | 73 | | - "opentui-spinner": "0.0.7", | 74 | 73 | "@solid-primitives/event-listener": "2.4.6", | 75 | 74 | "@solid-primitives/media": "2.3.6", | 76 | 75 | "@solid-primitives/resize-observer": "2.2.0", | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/dev/tui.ts -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -106,7 +106,6 @@ export const run: Run = Effect.fn("Tui.vite")(function* (input: Parameters<Run>[ | 106 | 106 | "solid-refresh", | 107 | 107 | "@opentui/solid", | 108 | 108 | "@opentui/keymap", | 109 | | - "opentui-spinner", | 110 | 109 | /^@solid-primitives\//, | 111 | 110 | "@opencode/plugin", | 112 | 111 | "@opencode/client", | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/src/services/update-preflight.tsx +6-4Lines changed: 6 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | import { createCliRenderer, RGBA, TextAttributes, type CliRenderer } from "@opentui/core" | 5 | 5 | import { render, useTerminalDimensions } from "@opentui/solid" | 6 | 6 | import { OPENCODE_VERSION } from "../version" | 7 | | -import { registerOpencodeSpinner } from "@opencode/tui/component/register-spinner" | | 7 | +import "@opencode/tui/component/spinner-renderable" | 8 | 8 | import { SPINNER_FRAMES } from "@opencode/tui/component/spinner" | 9 | 9 | import { go } from "@opencode/tui/logo" | 10 | 10 | import { setTimeout } from "node:timers/promises" | @@ -72,7 +72,6 @@ type Session = { | 72 | 72 | } | 73 | 73 |
| 74 | 74 | async function open(from?: string): Promise<Session> { | 75 | | - registerOpencodeSpinner() | 76 | 75 | const [active, setActive] = createSignal(0) | 77 | 76 | const [outcome, setOutcome] = createSignal<"running" | "success" | "failure">("running") | 78 | 77 | const [failure, setFailure] = createSignal("") | @@ -107,8 +106,9 @@ async function open(from?: string): Promise<Session> { | 107 | 106 | /> | 108 | 107 | ), | 109 | 108 | renderer, | 110 | | - ).catch((error) => { | | 109 | + ).catch(async (error) => { | 111 | 110 | if (!renderer.isDestroyed) renderer.destroy() | | 111 | + await renderer.closed | 112 | 112 | throw error | 113 | 113 | }) | 114 | 114 | let shownAt = performance.now() | @@ -141,10 +141,12 @@ async function open(from?: string): Promise<Session> { | 141 | 141 | const close = () => | 142 | 142 | (closing ??= (async () => { | 143 | 143 | setAnimating(false) | 144 | | - if (renderer.isDestroyed) return | | 144 | + // closed rejects when the terminal is gone or the final flush times out; nothing is left to restore. | | 145 | + if (renderer.isDestroyed) return renderer.closed.catch(() => {}) | 145 | 146 | renderer.pause() | 146 | 147 | await Promise.race([renderer.idle(), setTimeout(500)]) | 147 | 148 | renderer.destroy() | | 149 | + await renderer.closed.catch(() => {}) | 148 | 150 | })()) | 149 | 151 | let loading: Promise<void> | undefined | 150 | 152 | const load = () => | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/src/ui/timeline.tsx +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | /** @jsxImportSource @opentui/solid */ | 2 | 2 | import { createCliRenderer, RGBA, type CliRenderer, type ColorInput, type ScrollbackWriter } from "@opentui/core" | 3 | 3 | import { createScrollbackWriter, render, useKeyboard } from "@opentui/solid" | 4 | | -import { registerOpencodeSpinner } from "@opencode/tui/component/register-spinner" | | 4 | +import "@opencode/tui/component/spinner-renderable" | 5 | 5 | import { Show, createSignal } from "solid-js" | 6 | 6 |
| 7 | | -registerOpencodeSpinner() | 8 | | - | 9 | 7 | export type TimelineHost = { | 10 | 8 | readonly signal: AbortSignal | 11 | 9 | intro(text: string): Promise<void> | @@ -93,7 +91,9 @@ function bounded(task: Promise<unknown>) { | 93 | 91 | }) | 94 | 92 | } | 95 | 93 |
| | 94 | +// closed rejects when the terminal is gone or the final flush times out; nothing is left to restore. | 96 | 95 | async function shutdown(renderer: CliRenderer): Promise<void> { | | 96 | + if (renderer.isDestroyed) return renderer.closed.catch(() => {}) | 97 | 97 | await bounded(renderer.idle()) | 98 | 98 | try { | 99 | 99 | renderer.externalOutputMode = "passthrough" | @@ -102,6 +102,7 @@ async function shutdown(renderer: CliRenderer): Promise<void> { | 102 | 102 | renderer.screenMode = "main-screen" | 103 | 103 | } finally { | 104 | 104 | if (!renderer.isDestroyed) renderer.destroy() | | 105 | + await renderer.closed.catch(() => {}) | 105 | 106 | } | 106 | 107 | } | 107 | 108 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/latex/src/markdown.test.ts +15-7Lines changed: 15 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -13,21 +13,29 @@ import { createTestRenderer } from "@opentui/core/testing" | 13 | 13 | import { renderLatex } from "./render" | 14 | 14 | import { createLatexCodeBlockRenderer } from "./markdown" | 15 | 15 |
| 16 | | -const renderers: Awaited<ReturnType<typeof createTestRenderer>>["renderer"][] = [] | 17 | | -const syntaxStyle = SyntaxStyle.fromStyles({ default: { fg: "#ffffff" } }) | 18 | | - | 19 | | -afterEach(() => { | 20 | | - renderers.splice(0).forEach((renderer) => renderer.destroy()) | | 16 | +const renderers: { | | 17 | + renderer: Awaited<ReturnType<typeof createTestRenderer>>["renderer"] | | 18 | + syntaxStyle: SyntaxStyle | | 19 | +}[] = [] | | 20 | + | | 21 | +afterEach(async () => { | | 22 | + await Promise.all( | | 23 | + renderers.splice(0).map(async (output) => { | | 24 | + output.renderer.destroy() | | 25 | + await output.renderer.closed | | 26 | + output.syntaxStyle.destroy() | | 27 | + }), | | 28 | + ) | 21 | 29 | }) | 22 | 30 |
| 23 | 31 | async function setup(content: string, width = 80) { | 24 | 32 | const output = await createTestRenderer({ | 25 | 33 | width, | 26 | 34 | height: 24, | 27 | 35 | remote: true, | 28 | | - useThread: false, | 29 | 36 | }) | 30 | | - renderers.push(output.renderer) | | 37 | + const syntaxStyle = SyntaxStyle.fromStyles({ default: { fg: "#ffffff" } }, output.renderer.nativeScene) | | 38 | + renderers.push({ renderer: output.renderer, syntaxStyle }) | 31 | 39 | const palette = { text: "#abcdef", subdued: "#667788" } | 32 | 40 | const render = createLatexCodeBlockRenderer(output.renderer, () => palette) | 33 | 41 | const markdown = new MarkdownRenderable(output.renderer, { | |
|