fix(coding-agent): avoid redundant faint sequence in status cap
This commit is contained in:
@@ -1786,7 +1786,7 @@ export class StatusLineComponent implements Component {
|
||||
: "";
|
||||
const capPrefix = separatorDef.endCaps?.useBgAsFg ? bgAnsi.replace("\x1b[48;", "\x1b[38;") : bgAnsi + sepAnsi;
|
||||
const capText = cap
|
||||
? `${capPrefix}${this.#focusedAgentId ? "\x1b[22m" : ""}${cap}${this.#focusedAgentId ? "\x1b[2m" : ""}\x1b[0m`
|
||||
? `${capPrefix}${this.#focusedAgentId ? "\x1b[22m" : ""}${cap}\x1b[0m`
|
||||
: "";
|
||||
|
||||
let content = bgAnsi + fgAnsi;
|
||||
|
||||
@@ -177,8 +177,8 @@ describe("status line focused-agent dimming", () => {
|
||||
const border = component.getTopBorder(80).content;
|
||||
|
||||
expect(border).toStartWith("\x1b[2m");
|
||||
expect(border).toContain(`\x1b[22m${theme.sep.powerlineLeft}\x1b[2m`);
|
||||
expect(border).toContain(`\x1b[22m${theme.sep.powerlineRight}\x1b[2m`);
|
||||
expect(border).toContain(`\x1b[22m${theme.sep.powerlineLeft}\x1b[0m\x1b[2m`);
|
||||
expect(border).toContain(`\x1b[22m${theme.sep.powerlineRight}\x1b[0m\x1b[2m`);
|
||||
expect(border).toContain("\x1b[0m\x1b[2m");
|
||||
expect(border).toEndWith("\x1b[22m");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user