mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 17:01:02 +00:00
style(coding-agent): move border above header, use keyHint for consistency
This commit is contained in:
parent
e32c486c34
commit
298af5c1c2
1 changed files with 13 additions and 6 deletions
|
|
@ -16,6 +16,7 @@ import {
|
|||
import type { SessionInfo, SessionListProgress } from "../../../core/session-manager.js";
|
||||
import { theme } from "../theme/theme.js";
|
||||
import { DynamicBorder } from "./dynamic-border.js";
|
||||
import { keyHint, rawKeyHint } from "./keybinding-hints.js";
|
||||
import { filterAndSortSessions, type SortMode } from "./session-selector-search.js";
|
||||
|
||||
type SessionScope = "current" | "all";
|
||||
|
|
@ -143,10 +144,16 @@ class SessionSelectorHeader implements Component {
|
|||
hintLine2 = "";
|
||||
} else {
|
||||
const pathState = this.showPath ? "(on)" : "(off)";
|
||||
const hint1 = `Tab: scope · re:<pattern> for regex · "phrase" for exact phrase`;
|
||||
const hint2 = `Ctrl+R: sort · Ctrl+D: delete · Ctrl+P: path ${pathState}`;
|
||||
hintLine1 = theme.fg("muted", truncateToWidth(hint1, width, "…"));
|
||||
hintLine2 = theme.fg("muted", truncateToWidth(hint2, width, "…"));
|
||||
const sep = theme.fg("muted", " · ");
|
||||
const hint1 = keyHint("tab", "scope") + sep + theme.fg("muted", 're:<pattern> regex · "phrase" exact');
|
||||
const hint2 =
|
||||
rawKeyHint("ctrl+r", "sort") +
|
||||
sep +
|
||||
rawKeyHint("ctrl+d", "delete") +
|
||||
sep +
|
||||
rawKeyHint("ctrl+p", `path ${pathState}`);
|
||||
hintLine1 = truncateToWidth(hint1, width, "…");
|
||||
hintLine2 = truncateToWidth(hint2, width, "…");
|
||||
}
|
||||
|
||||
return [`${left}${" ".repeat(spacing)}${rightText}`, hintLine1, hintLine2];
|
||||
|
|
@ -518,10 +525,10 @@ export class SessionSelectorComponent extends Container implements Focusable {
|
|||
|
||||
// Add header
|
||||
this.addChild(new Spacer(1));
|
||||
this.addChild(this.header);
|
||||
this.addChild(new Spacer(1));
|
||||
this.addChild(new DynamicBorder());
|
||||
this.addChild(new Spacer(1));
|
||||
this.addChild(this.header);
|
||||
this.addChild(new Spacer(1));
|
||||
|
||||
// Create session list (starts empty, will be populated after load)
|
||||
this.sessionList = new SessionList([], false, this.sortMode, currentSessionFilePath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue