mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): keep one copy of each rendered user message line
The user message's Markdown pads and colors its own background instead of sitting in a Box that kept a second full-width copy of every line. The output is identical.
This commit is contained in:
parent
54c19a2529
commit
e792ba131e
2 changed files with 8 additions and 6 deletions
|
|
@ -17,6 +17,7 @@
|
|||
- Fixed the sign-in URL printed by `/mcp login` not being clickable when it wraps ([#10186](https://github.com/earendil-works/pi/issues/10186)).
|
||||
- Fixed `--provider` without `--model` being silently ignored and running the default model from another provider; it now fails with an error ([#10236](https://github.com/earendil-works/pi/issues/10236)).
|
||||
- Fixed MCP servers that ask for more scope (`insufficient_scope`) requesting sign-in over and over. The new sign-in requested only the missing scopes, so the new token lost access the previous one had; it now keeps the granted scopes.
|
||||
- Fixed user messages in the transcript keeping two full-width copies of every rendered line; they keep one, with identical output.
|
||||
|
||||
## [0.99.2] - 2026-09-30
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Container, Markdown, type MarkdownTheme } from "@earendil-works/pi-tui";
|
||||
import { Container, Markdown, type MarkdownTheme } from "@earendil-works/pi-tui";
|
||||
import type { MarkdownTransformer } from "../../../core/extensions/types.ts";
|
||||
import { getMarkdownTheme, theme } from "../theme/theme.ts";
|
||||
import { createMarkdownTransform } from "./markdown-transform.ts";
|
||||
|
|
@ -37,15 +37,17 @@ export class UserMessageComponent extends Container {
|
|||
|
||||
private rebuild(): void {
|
||||
this.clear();
|
||||
const contentBox = new Box(this.outputPad, 1, (content: string) => theme.bg("userMessageBg", content));
|
||||
contentBox.addChild(
|
||||
// The Markdown pads and colors its own background: a Box around it would keep a second full-width copy of every
|
||||
// line, with identical output.
|
||||
this.addChild(
|
||||
new Markdown(
|
||||
this.text,
|
||||
0,
|
||||
0,
|
||||
this.outputPad,
|
||||
1,
|
||||
this.markdownTheme,
|
||||
{
|
||||
color: (content: string) => theme.fg("userMessageText", content),
|
||||
bgColor: (content: string) => theme.bg("userMessageBg", content),
|
||||
},
|
||||
{
|
||||
preserveOrderedListMarkers: true,
|
||||
|
|
@ -54,7 +56,6 @@ export class UserMessageComponent extends Container {
|
|||
},
|
||||
),
|
||||
);
|
||||
this.addChild(contentBox);
|
||||
}
|
||||
|
||||
override render(width: number): string[] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue