File tree Expand file tree Collapse file tree
packages/tui/src/component/prompt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ import { useTuiConfig } from "../../config"
5656import { usePromptWorkspace } from "./workspace"
5757import { usePromptMove } from "./move"
5858import { readLocalAttachment } from "./local-attachment"
59+ import { useLocation } from "../../context/location"
5960
6061registerOpencodeSpinner ( )
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" >
You can’t perform that action at this time.
0 commit comments