fix(tui): add top border to queue pane to separate it from todo panel (#801)

This commit is contained in:
liruifengv 2026-06-16 12:19:52 +08:00 committed by GitHub
parent 299b9fcad4
commit ff332be6d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---
Polish queue pane styling

View file

@ -34,7 +34,7 @@ export class QueuePaneComponent extends Container {
override render(width: number): string[] {
const accent = (text: string) => currentTheme.fg('accent', text);
const dim = (text: string) => currentTheme.fg('textDim', text);
const lines: string[] = [];
const lines: string[] = [currentTheme.fg('border', '─'.repeat(width))];
for (const item of this.messages) {
const singleLine = item.text.replaceAll(/\s+/g, ' ').trim();

View file

@ -62,8 +62,8 @@ describe('QueuePaneComponent', () => {
});
const lines = component.render(30);
expect(lines).toHaveLength(2); // message + hint
const messageLine = stripAnsi(lines[0] as string);
expect(lines).toHaveLength(3); // border + message + hint
const messageLine = stripAnsi(lines[1] as string);
expect(messageLine).not.toContain('a'.repeat(30));
expect(messageLine.endsWith('…')).toBe(true);
});
@ -77,8 +77,8 @@ describe('QueuePaneComponent', () => {
});
const lines = component.render(120);
expect(lines).toHaveLength(2); // message + hint
const messageLine = stripAnsi(lines[0] as string);
expect(lines).toHaveLength(3); // border + message + hint
const messageLine = stripAnsi(lines[1] as string);
expect(messageLine).toContain('line one line two line three');
expect(messageLine).not.toContain('\n');
});