mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): strip fake cursor markers in OAuth prompt regression test
This commit is contained in:
parent
1cedd32724
commit
21d1dcd4d4
1 changed files with 7 additions and 1 deletions
|
|
@ -19,7 +19,13 @@ function createDialog(): LoginDialogComponent {
|
|||
}
|
||||
|
||||
function renderDialog(dialog: LoginDialogComponent): string[] {
|
||||
return stripAnsi(dialog.render(120).join("\n"))
|
||||
// stripAnsi keeps APC sequences, so drop the TUI's zero-width cursor markers (e.g. \x1b_pi:fc\x07) first
|
||||
return stripAnsi(
|
||||
dialog
|
||||
.render(120)
|
||||
.join("\n")
|
||||
.replace(/\x1b_[^\x07]*\x07/g, ""),
|
||||
)
|
||||
.split("\n")
|
||||
.map((line) => line.trimEnd());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue