Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit ae1bf92

Browse files
Add dismiss button to Getting Started box (anomalyco#5543)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
1 parent b021b26 commit ae1bf92

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

  • packages/opencode/src/cli/cmd/tui/routes/session

packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Global } from "@/global"
99
import { Installation } from "@/installation"
1010
import { useKeybind } from "../../context/keybind"
1111
import { useDirectory } from "../../context/directory"
12+
import { useKV } from "../../context/kv"
1213

1314
export function Sidebar(props: { sessionID: string }) {
1415
const sync = useSync()
@@ -48,12 +49,13 @@ export function Sidebar(props: { sessionID: string }) {
4849
}
4950
})
5051

51-
const keybind = useKeybind()
5252
const directory = useDirectory()
53+
const kv = useKV()
5354

5455
const hasProviders = createMemo(() =>
5556
sync.data.provider.some((x) => x.id !== "opencode" || Object.values(x.models).some((y) => y.cost?.input !== 0)),
5657
)
58+
const gettingStartedDismissed = createMemo(() => kv.get("dismissed_getting_started", false))
5759

5860
return (
5961
<Show when={session()}>
@@ -249,7 +251,7 @@ export function Sidebar(props: { sessionID: string }) {
249251
</scrollbox>
250252

251253
<box flexShrink={0} gap={1} paddingTop={1}>
252-
<Show when={!hasProviders()}>
254+
<Show when={!false && !gettingStartedDismissed()}>
253255
<box
254256
backgroundColor={theme.backgroundElement}
255257
paddingTop={1}
@@ -263,9 +265,14 @@ export function Sidebar(props: { sessionID: string }) {
263265
264266
</text>
265267
<box flexGrow={1} gap={1}>
266-
<text fg={theme.text}>
267-
<b>Getting started</b>
268-
</text>
268+
<box flexDirection="row" justifyContent="space-between">
269+
<text fg={theme.text}>
270+
<b>Getting started</b>
271+
</text>
272+
<text fg={theme.textMuted} onMouseDown={() => kv.set("dismissed_getting_started", true)}>
273+
274+
</text>
275+
</box>
269276
<text fg={theme.textMuted}>OpenCode includes free models so you can start immediately.</text>
270277
<text fg={theme.textMuted}>
271278
Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc

0 commit comments

Comments
 (0)