diff --git a/packages/opencode/src/kilocode/components/model-info-panel-utils.ts b/packages/opencode/src/kilocode/components/model-info-panel-utils.ts index ee7c596e747..152c23a50e6 100644 --- a/packages/opencode/src/kilocode/components/model-info-panel-utils.ts +++ b/packages/opencode/src/kilocode/components/model-info-panel-utils.ts @@ -34,5 +34,6 @@ export function fmtContext(n: number): string { export function fmtDate(s: string): string { const d = new Date(s) + if (isNaN(d.getTime())) return s return d.toLocaleDateString(undefined, { year: "numeric", month: "short" }) } diff --git a/packages/opencode/src/kilocode/components/model-info-panel.tsx b/packages/opencode/src/kilocode/components/model-info-panel.tsx index c3d49b1ebcb..b726d606433 100644 --- a/packages/opencode/src/kilocode/components/model-info-panel.tsx +++ b/packages/opencode/src/kilocode/components/model-info-panel.tsx @@ -1,10 +1,9 @@ import { TextAttributes } from "@opentui/core" import { useTerminalDimensions } from "@opentui/solid" -import { createMemo } from "solid-js" +import { createMemo, Show } from "solid-js" import { useTheme } from "@tui/context/theme" import type { Model } from "@kilocode/sdk/v2" import { avgPrice, fmtCachedPrice, fmtContext, fmtDate, fmtPrice } from "./model-info-panel-utils" -import { Show } from "solid-js" interface Props { model: Model @@ -121,10 +120,10 @@ export function ModelInfoPanel(props: Props) { [Reasoning] - {inputLine()} + {(line) => {line()}} - {outputLine()} + {(line) => {line()}} @@ -137,4 +136,4 @@ export function ModelInfoPanel(props: Props) { ) -} \ No newline at end of file +}