mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 19:02:10 +00:00
Fix image aspect ratio by querying terminal cell size
- Add getCellDimensions/setCellDimensions to terminal-image.ts - TUI queries cell size on startup via CSI 16 t - Parse response and filter it from user input - Invalidate and re-render when cell dimensions received - Pass rows parameter to Kitty protocol for correct aspect ratio
This commit is contained in:
parent
fcad447f32
commit
215c10664a
3 changed files with 93 additions and 9 deletions
|
|
@ -27,6 +27,7 @@ export {
|
|||
encodeITerm2,
|
||||
encodeKitty,
|
||||
getCapabilities,
|
||||
getCellDimensions,
|
||||
getGifDimensions,
|
||||
getImageDimensions,
|
||||
getJpegDimensions,
|
||||
|
|
@ -38,6 +39,7 @@ export {
|
|||
imageFallback,
|
||||
renderImage,
|
||||
resetCapabilitiesCache,
|
||||
setCellDimensions,
|
||||
type TerminalCapabilities,
|
||||
} from "./terminal-image.js";
|
||||
export { type Component, Container, TUI } from "./tui.js";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue