Skip to content

Commit f3bdcf7

Browse files
committed
fix: drop stale tui shim
1 parent 13fa280 commit f3bdcf7

3 files changed

Lines changed: 10 additions & 468 deletions

File tree

tui/routes/summary.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/** @jsxImportSource @opentui/solid */
22
import { createMemo, createSignal, For, Show } from "solid-js"
3+
import { createTextAttributes } from "@opentui/core"
34
import { useKeyboard } from "@opentui/solid"
45
import type { TuiPluginApi } from "@opencode-ai/plugin/tui"
56
import { getPalette, type DcpPalette } from "../shared/theme"
67
import { LABEL, NAMES } from "../shared/names"
78

8-
const SINGLE_BORDER = { type: "single" } as any
9+
const DIM_ATTRIBUTES = createTextAttributes({ dim: true })
910

1011
interface SummaryRouteParams {
1112
topic?: string
@@ -146,7 +147,8 @@ function SummaryScreen(props: { api: TuiPluginApi; params: SummaryRouteParams })
146147
flexGrow={1}
147148
width="100%"
148149
marginTop={1}
149-
border={SINGLE_BORDER}
150+
border
151+
borderStyle="single"
150152
borderColor={palette().border}
151153
padding={1}
152154
flexDirection="column"
@@ -159,7 +161,7 @@ function SummaryScreen(props: { api: TuiPluginApi; params: SummaryRouteParams })
159161
</box>
160162

161163
<box marginTop={1}>
162-
<text {...({ dim: true } as any)} fg={palette().muted}>
164+
<text attributes={DIM_ATTRIBUTES} fg={palette().muted}>
163165
Press Escape to return
164166
</text>
165167
</box>

tui/slots/sidebar-content.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @jsxImportSource @opentui/solid */
22
import { createEffect, createMemo, createSignal, on, onCleanup, untrack } from "solid-js"
3+
import { createTextAttributes } from "@opentui/core"
34
import type { TuiSlotPlugin } from "@opencode-ai/plugin/tui"
45
import { Logger } from "../../lib/logger"
56
import {
@@ -12,8 +13,7 @@ import { getPalette, toneColor, type DcpColor, type DcpPalette } from "../shared
1213
import { LABEL, type DcpRouteNames } from "../shared/names"
1314
import type { DcpActiveBlockInfo, DcpMessageStatus, DcpTuiApi } from "../shared/types"
1415

15-
const SINGLE_BORDER = { type: "single" } as any
16-
const DIM_TEXT = { dim: true } as any
16+
const DIM_ATTRIBUTES = createTextAttributes({ dim: true })
1717

1818
const REFRESH_DEBOUNCE_MS = 100
1919
const MAX_TOPIC_LEN = 30
@@ -314,7 +314,8 @@ const SidebarContext = (props: {
314314
width="100%"
315315
flexDirection="column"
316316
backgroundColor={props.palette.surface}
317-
border={SINGLE_BORDER}
317+
border
318+
borderStyle="single"
318319
borderColor={props.palette.accent}
319320
paddingTop={1}
320321
paddingBottom={1}
@@ -424,7 +425,7 @@ const SidebarContext = (props: {
424425
{topicOverflow() > 0 ? (
425426
<box flexDirection="row" width="100%" height={1}>
426427
<box flexGrow={1} flexShrink={1} height={1}>
427-
<text {...DIM_TEXT} fg={props.palette.muted}>
428+
<text attributes={DIM_ATTRIBUTES} fg={props.palette.muted}>
428429
{topicsExpanded()
429430
? `showing all ${allBlocks().length} topics`
430431
: `... ${topicOverflow()} more topics`}

0 commit comments

Comments
 (0)