mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 01:04:36 +00:00
Add /hotkeys command, Ctrl+D exit, markdown table borders
This commit is contained in:
parent
c1f2541639
commit
b2f29613e8
4 changed files with 71 additions and 2 deletions
|
|
@ -585,6 +585,10 @@ export class Markdown implements Component {
|
|||
}
|
||||
}
|
||||
|
||||
// Render top border
|
||||
const topBorderCells = columnWidths.map((w) => "─".repeat(w));
|
||||
lines.push("┌─" + topBorderCells.join("─┬─") + "─┐");
|
||||
|
||||
// Render header with wrapping
|
||||
const headerCellLines: string[][] = token.header.map((cell, i) => {
|
||||
const text = this.renderInlineTokens(cell.tokens || []);
|
||||
|
|
@ -622,6 +626,10 @@ export class Markdown implements Component {
|
|||
}
|
||||
}
|
||||
|
||||
// Render bottom border
|
||||
const bottomBorderCells = columnWidths.map((w) => "─".repeat(w));
|
||||
lines.push("└─" + bottomBorderCells.join("─┴─") + "─┘");
|
||||
|
||||
lines.push(""); // Add spacing after table
|
||||
return lines;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue