|
|
@@ -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">
|