mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-23 12:03:48 +00:00
fix(tui): highlight moved session location
This commit is contained in:
parent
f5e6b8c769
commit
c9539979bd
1 changed files with 9 additions and 1 deletions
|
|
@ -1701,6 +1701,15 @@ function AssistantFooter(props: { message: SessionMessageAssistant }) {
|
|||
function SessionSwitchMessageV2(props: { message: SessionMessageInfo }) {
|
||||
const ctx = use()
|
||||
const theme = useTheme()
|
||||
if (props.message.type === "location-switched")
|
||||
return (
|
||||
<box paddingLeft={3}>
|
||||
<text>
|
||||
<span style={{ fg: theme.text.subdued }}>↳ Moved to </span>
|
||||
<span style={{ fg: theme.text.feedback.info.default }}>{props.message.location.directory}</span>
|
||||
</text>
|
||||
</box>
|
||||
)
|
||||
const text = () => {
|
||||
if (props.message.type === "agent-switched") {
|
||||
const agent = Locale.titlecase(props.message.agent)
|
||||
|
|
@ -1710,7 +1719,6 @@ function SessionSwitchMessageV2(props: { message: SessionMessageInfo }) {
|
|||
}
|
||||
if (props.message.type === "model-switched")
|
||||
return switchLabel(props.message.model, ctx.models(), props.message.previous)
|
||||
if (props.message.type === "location-switched") return `Switched location to ${props.message.location.directory}`
|
||||
return ""
|
||||
}
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue