mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-10 01:39:25 +00:00
fix(tui): add top border to queue pane to separate it from todo panel (#801)
This commit is contained in:
parent
299b9fcad4
commit
ff332be6d3
3 changed files with 10 additions and 5 deletions
5
.changeset/queue-pane-border.md
Normal file
5
.changeset/queue-pane-border.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@moonshot-ai/kimi-code": patch
|
||||
---
|
||||
|
||||
Polish queue pane styling
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue