mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 17:00:59 +00:00
fix(coding-agent): avoid crash of /settings with small width
This commit is contained in:
parent
6cc1676eae
commit
ed4168bff4
2 changed files with 14 additions and 11 deletions
|
|
@ -118,7 +118,7 @@ export class FooterComponent implements Component {
|
|||
// Truncate path if too long to fit width
|
||||
if (pwd.length > width) {
|
||||
const half = Math.floor(width / 2) - 2;
|
||||
if (half > 0) {
|
||||
if (half > 1) {
|
||||
const start = pwd.slice(0, half);
|
||||
const end = pwd.slice(-(half - 1));
|
||||
pwd = `${start}...${end}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue