Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/tui/src/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,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 }) {
Expand Down
19 changes: 19 additions & 0 deletions packages/tui/test/cli/tui/inline-tool-wrap-snapshot.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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([
Expand Down
Loading