feat: add tui ui kit

This commit is contained in:
Peter Steinberger
2026-01-03 06:22:20 +01:00
parent aee13507f9
commit 32c91bbb25
8 changed files with 459 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
import { Container, Markdown, Spacer } from "@mariozechner/pi-tui";
import { markdownTheme, theme } from "../theme/theme.js";
export class AssistantMessageComponent extends Container {
private body: Markdown;
constructor(text: string) {
super();
this.body = new Markdown(text, 1, 0, markdownTheme, {
color: (line) => theme.fg(line),
});
this.addChild(new Spacer(1));
this.addChild(this.body);
}
setText(text: string) {
this.body.setText(text);
}
}