tui: fix command autocomplete to show for all sessions and adjust message layout

This commit is contained in:
Dax Raad 2025-09-22 18:52:23 -04:00
parent 7b2fb0d8ef
commit 34464c0db3
2 changed files with 11 additions and 11 deletions

View file

@ -307,17 +307,17 @@ function Autocomplete(props: {
const results: AutocompleteOption[] = []
const s = session()
const dialog = useDialog()
for (const command of sync.data.command) {
results.push({
display: "/" + command.name,
description: command.description,
onSelect: () => {
props.input().value = "/" + command.name + " "
props.input().cursorPosition = props.input().value.length
},
})
}
if (s) {
for (const command of sync.data.command) {
results.push({
display: "/" + command.name,
description: command.description,
onSelect: () => {
props.input().value = "/" + command.name + " "
props.input().cursorPosition = props.input().value.length
},
})
}
results.push(
{
display: "/undo",

View file

@ -192,7 +192,7 @@ function TextPart(props: { part: TextPart; message: AssistantMessage }) {
const local = useLocal()
return (
<box paddingLeft={3} marginTop={1}>
<box paddingLeft={3} marginTop={1} flexShrink={0}>
<text>{props.part.text.trim()}</text>
<text>
<span style={{ fg: local.agent.color(agent().name) }}>{Locale.titlecase(agent().name)}</span>{" "}