Skip to content

Commit 34e5809

Browse files
feat(tui): show idle session directory (#36457)
Co-authored-by: Dax <mail@thdxr.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
1 parent 2db96c9 commit 34e5809

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/tui/src/component/prompt/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import { useTuiConfig } from "../../config"
5656
import { usePromptWorkspace } from "./workspace"
5757
import { usePromptMove } from "./move"
5858
import { readLocalAttachment } from "./local-attachment"
59+
import { useLocation } from "../../context/location"
5960

6061
registerOpencodeSpinner()
6162

@@ -148,6 +149,7 @@ export function Prompt(props: PromptProps) {
148149
const local = useLocal()
149150
const args = useArgs()
150151
const paths = useTuiPaths()
152+
const location = useLocation()
151153
const terminalEnvironment = useTuiTerminalEnvironment()
152154
const clipboard = useClipboard()
153155
const sdk = useSDK()
@@ -1637,7 +1639,15 @@ export function Prompt(props: PromptProps) {
16371639
<text fg={theme.accent}>(new working copy)</text>
16381640
</box>
16391641
</Match>
1640-
<Match when={true}>{props.hint ?? <text />}</Match>
1642+
<Match when={true}>
1643+
{props.hint ?? (
1644+
<Show when={props.sessionID}>
1645+
<box marginLeft={1}>
1646+
<text fg={theme.textMuted}>{location()?.directory ?? paths.cwd}</text>
1647+
</box>
1648+
</Show>
1649+
)}
1650+
</Match>
16411651
</Switch>
16421652
<Show when={status().type !== "retry"}>
16431653
<box gap={2} flexDirection="row">

0 commit comments

Comments
 (0)