fix: align input editor with message content padding

Adds paddingX option to Editor component and hardcodes paddingX: 1 in
coding-agent editors so the cursor/text aligns with chat message content.
This commit is contained in:
ferologics
2026-01-16 22:39:24 +01:00
committed by Mario Zechner
parent 20f5fcc79d
commit 48ea444bc4
7 changed files with 48 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import { Editor, type EditorTheme, type TUI } from "@mariozechner/pi-tui";
import { Editor, type EditorOptions, type EditorTheme, type TUI } from "@mariozechner/pi-tui";
import type { AppAction, KeybindingsManager } from "../../../core/keybindings.js";
/**
@@ -15,8 +15,8 @@ export class CustomEditor extends Editor {
/** Handler for extension-registered shortcuts. Returns true if handled. */
public onExtensionShortcut?: (data: string) => boolean;
constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager) {
super(tui, theme);
constructor(tui: TUI, theme: EditorTheme, keybindings: KeybindingsManager, options?: EditorOptions) {
super(tui, theme, options);
this.keybindings = keybindings;
}