fix(tui): align switch reminders (#35637)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
fcb1d4b418
commit
93b7ca9b4d
2 changed files with 24 additions and 1 deletions
|
|
@ -1269,7 +1269,11 @@ function SessionSwitchMessageV2(props: { message: SessionMessage }) {
|
|||
return switchLabel(props.message.model, ctx.models(), props.message.previous)
|
||||
return ""
|
||||
}
|
||||
return <text fg={theme.textMuted}>{text()}</text>
|
||||
return (
|
||||
<box paddingLeft={3}>
|
||||
<text fg={theme.textMuted}>{text()}</text>
|
||||
</box>
|
||||
)
|
||||
}
|
||||
|
||||
function SessionNoticeMessageV2(props: { message: SessionMessage }) {
|
||||
|
|
|
|||
|
|
@ -89,6 +89,19 @@ function FailedCompleteToolFixture() {
|
|||
)
|
||||
}
|
||||
|
||||
function ReminderAlignmentFixture() {
|
||||
return (
|
||||
<box flexDirection="column">
|
||||
<box paddingLeft={3}>
|
||||
<text>Switched variant to medium</text>
|
||||
</box>
|
||||
<InlineToolRow icon="◈" complete={true} pending="Notice">
|
||||
Instructions updated
|
||||
</InlineToolRow>
|
||||
</box>
|
||||
)
|
||||
}
|
||||
|
||||
async function renderFrame(component: () => JSX.Element, options: { width: number; height: number }) {
|
||||
testSetup = await testRender(component, options)
|
||||
await testSetup.renderOnce()
|
||||
|
|
@ -124,6 +137,12 @@ describe("TUI inline tool wrapping", () => {
|
|||
expect(frame).not.toContain("Read failed")
|
||||
})
|
||||
|
||||
test("aligns switch reminders with instruction reminders", async () => {
|
||||
expect(await renderFrame(() => <ReminderAlignmentFixture />, { width: 35, height: 2 })).toBe(
|
||||
" Switched variant to medium\n ◈ Instructions updated",
|
||||
)
|
||||
})
|
||||
|
||||
test("filters malformed nested tool wire data", () => {
|
||||
expect(
|
||||
parseApplyPatchFiles([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue