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>
This commit is contained in:
opencode-agent[bot] 2026-07-11 20:31:57 +00:00 committed by GitHub
commit 34e5809059
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,7 @@ import { useTuiConfig } from "../../config"
import { usePromptWorkspace } from "./workspace"
import { usePromptMove } from "./move"
import { readLocalAttachment } from "./local-attachment"
import { useLocation } from "../../context/location"
registerOpencodeSpinner()
@ -148,6 +149,7 @@ export function Prompt(props: PromptProps) {
const local = useLocal()
const args = useArgs()
const paths = useTuiPaths()
const location = useLocation()
const terminalEnvironment = useTuiTerminalEnvironment()
const clipboard = useClipboard()
const sdk = useSDK()
@ -1637,7 +1639,15 @@ export function Prompt(props: PromptProps) {
<text fg={theme.accent}>(new working copy)</text>
</box>
</Match>
<Match when={true}>{props.hint ?? <text />}</Match>
<Match when={true}>
{props.hint ?? (
<Show when={props.sessionID}>
<box marginLeft={1}>
<text fg={theme.textMuted}>{location()?.directory ?? paths.cwd}</text>
</box>
</Show>
)}
</Match>
</Switch>
<Show when={status().type !== "retry"}>
<box gap={2} flexDirection="row">