From 16a098143155c63e5da7fe3a3d98653e44089705 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sun, 21 Sep 2025 04:02:10 -0400 Subject: [PATCH] sync --- packages/opencode/src/cli/cmd/opentui/session.tsx | 13 +++++-------- script/publish.ts | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/opencode/src/cli/cmd/opentui/session.tsx b/packages/opencode/src/cli/cmd/opentui/session.tsx index 962393ab9..0226bb0f4 100644 --- a/packages/opencode/src/cli/cmd/opentui/session.tsx +++ b/packages/opencode/src/cli/cmd/opentui/session.tsx @@ -5,14 +5,13 @@ import { useRouteData } from "./context/route" import { useSync } from "./context/sync" import { SplitBorder } from "./component/border" import { Theme } from "./context/theme" -import { BoxRenderable, hastToStyledText, RGBA, ScrollBoxRenderable, SyntaxStyle } from "@opentui/core" +import { BoxRenderable, RGBA, ScrollBoxRenderable, SyntaxStyle } from "@opentui/core" import { Prompt } from "./component/prompt" import type { AssistantMessage, Part, ToolPart, UserMessage } from "@opencode-ai/sdk" import type { TextPart } from "ai" import { useLocal } from "./context/local" import { Locale } from "../../../util/locale" import type { Tool } from "../../../tool/tool" -import { highlightHast, Language } from "tree-sitter-highlight" import type { ReadTool } from "../../../tool/read" import type { WriteTool } from "../../../tool/write" import { BashTool } from "../../../tool/bash" @@ -298,6 +297,7 @@ ToolRegistry.register({ }, }) +/* const syntax = new SyntaxStyle({ keyword: { fg: RGBA.fromHex(Theme.syntaxKeyword), bold: true }, string: { fg: RGBA.fromHex(Theme.syntaxString) }, @@ -311,6 +311,7 @@ const syntax = new SyntaxStyle({ punctuation: { fg: RGBA.fromHex(Theme.syntaxPunctuation) }, default: { fg: RGBA.fromHex(Theme.syntaxVariable) }, }) +*/ ToolRegistry.register({ name: "read", @@ -336,9 +337,7 @@ ToolRegistry.register({ const code = createMemo(() => { if (!props.input.content) return "" const text = props.input.content - const hast = highlightHast(text, Language.TS) - const styled = hastToStyledText(hast as any, syntax) - return styled + return text }) const numbers = createMemo(() => { @@ -463,9 +462,7 @@ ToolRegistry.register({ const code = createMemo(() => { if (!props.metadata.diff) return "" const text = props.metadata.diff.split("\n").slice(5).join("\n") - const hast = highlightHast(text, Language.TS) - const styled = hastToStyledText(hast as any, syntax) - return styled + return text }) return ( <> diff --git a/script/publish.ts b/script/publish.ts index 4aedc9dc5..53ad3583f 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -91,7 +91,7 @@ if (!snapshot) { await $`gh release create v${version} --title "v${version}" --notes ${notes} ./packages/opencode/dist/*.zip` } -if (snapshot) { +if (snapshot && false) { await $`git checkout -b snapshot-${version}` await $`git commit --allow-empty -m "Snapshot release v${version}"` await $`git tag v${version}`