mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 07:03:25 +00:00
fix(coding-agent): move active path marker to right before entry text
This commit is contained in:
parent
96c071b4c4
commit
3493e47b4d
1 changed files with 3 additions and 3 deletions
|
|
@ -363,15 +363,15 @@ class TreeList implements Component {
|
||||||
const extraIndent = " ".repeat(Math.max(0, displayIndent - prefixLevels));
|
const extraIndent = " ".repeat(Math.max(0, displayIndent - prefixLevels));
|
||||||
const prefix = gutterStr + connector + extraIndent;
|
const prefix = gutterStr + connector + extraIndent;
|
||||||
|
|
||||||
// Active path marker
|
// Active path marker - shown right before the entry text
|
||||||
const isOnActivePath = this.activePathIds.has(entry.id);
|
const isOnActivePath = this.activePathIds.has(entry.id);
|
||||||
const pathMarker = isOnActivePath ? theme.fg("accent", "● ") : " ";
|
const pathMarker = isOnActivePath ? theme.fg("accent", "●") : "";
|
||||||
|
|
||||||
const label = flatNode.node.label ? theme.fg("warning", `[${flatNode.node.label}] `) : "";
|
const label = flatNode.node.label ? theme.fg("warning", `[${flatNode.node.label}] `) : "";
|
||||||
const content = this.getEntryDisplayText(flatNode.node, isSelected);
|
const content = this.getEntryDisplayText(flatNode.node, isSelected);
|
||||||
const suffix = isCurrentLeaf ? theme.fg("accent", " *") : "";
|
const suffix = isCurrentLeaf ? theme.fg("accent", " *") : "";
|
||||||
|
|
||||||
const line = cursor + pathMarker + theme.fg("dim", prefix) + label + content + suffix;
|
const line = cursor + theme.fg("dim", prefix) + pathMarker + label + content + suffix;
|
||||||
lines.push(truncateToWidth(line, width));
|
lines.push(truncateToWidth(line, width));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue