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:
parent
2db96c9b7e
commit
34e5809059
1 changed files with 11 additions and 1 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue