diff options
| author | Akshar Patel <[email protected]> | 2026-01-15 23:58:41 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-15 22:58:41 -0600 |
| commit | ac54535486f3345009157a35ff1867196a3b132d (patch) | |
| tree | 8b0bf926014bdd716153be0e3a4fa40182c93916 /packages | |
| parent | 1a43e5fe87e31abe062a006742df6c421f98f777 (diff) | |
| download | opencode-ac54535486f3345009157a35ff1867196a3b132d.tar.gz opencode-ac54535486f3345009157a35ff1867196a3b132d.zip | |
feat: add version to session header and /status dialog (#8802)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx | 2 | ||||
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/routes/session/header.tsx | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx index b85cd5c65..c08fc99b6 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx @@ -2,6 +2,7 @@ import { TextAttributes } from "@opentui/core" import { useTheme } from "../context/theme" import { useSync } from "@tui/context/sync" import { For, Match, Switch, Show, createMemo } from "solid-js" +import { Installation } from "@/installation" export type DialogStatusProps = {} @@ -44,6 +45,7 @@ export function DialogStatus() { </text> <text fg={theme.textMuted}>esc</text> </box> + <text fg={theme.textMuted}>OpenCode v{Installation.VERSION}</text> <Show when={Object.keys(sync.data.mcp).length > 0} fallback={<text fg={theme.text}>No MCP Servers</text>}> <box> <text fg={theme.text}>{Object.keys(sync.data.mcp).length} MCP Servers</text> diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/header.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/header.tsx index 0b690cfac..afcb2c611 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/header.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/header.tsx @@ -7,6 +7,7 @@ import { SplitBorder } from "@tui/component/border" import type { AssistantMessage, Session } from "@opencode-ai/sdk/v2" import { useCommandDialog } from "@tui/component/dialog-command" import { useKeybind } from "../../context/keybind" +import { Installation } from "@/installation" const Title = (props: { session: Accessor<Session> }) => { const { theme } = useTheme() @@ -113,13 +114,19 @@ export function Header() { </text> </box> <box flexGrow={1} flexShrink={1} /> - <ContextInfo context={context} cost={cost} /> + <box flexDirection="row" gap={1} flexShrink={0}> + <ContextInfo context={context} cost={cost} /> + <text fg={theme.textMuted}>v{Installation.VERSION}</text> + </box> </box> </Match> <Match when={true}> <box flexDirection="row" justifyContent="space-between" gap={1}> <Title session={session} /> - <ContextInfo context={context} cost={cost} /> + <box flexDirection="row" gap={1} flexShrink={0}> + <ContextInfo context={context} cost={cost} /> + <text fg={theme.textMuted}>v{Installation.VERSION}</text> + </box> </box> </Match> </Switch> |
