fix: use robust matchShortcut from TUI library

- Add matchShortcut() function to @mariozechner/pi-tui
- Handles Kitty protocol, legacy terminal sequences, and lock keys
- Supports special keys (enter, tab, space, backspace, escape)
- Replace custom implementation in interactive-mode.ts
- Remove unused imports
This commit is contained in:
Helmut Januschka 2026-01-03 22:46:49 +01:00 committed by Mario Zechner
parent 277d7bd83b
commit c1d7f8d962
3 changed files with 16 additions and 11 deletions

View file

@ -12,7 +12,14 @@ import { getAgentDir } from "../../config.js";
import type { HookMessage } from "../messages.js";
import type { SessionManager } from "../session-manager.js";
import { execCommand } from "./runner.js";
import type { ExecOptions, HookAPI, HookContext, HookFactory, HookMessageRenderer, RegisteredCommand } from "./types.js";
import type {
ExecOptions,
HookAPI,
HookContext,
HookFactory,
HookMessageRenderer,
RegisteredCommand,
} from "./types.js";
// Create require function to resolve module paths at runtime
const require = createRequire(import.meta.url);

View file

@ -6,7 +6,7 @@
*/
import type { AgentMessage } from "@mariozechner/pi-agent-core";
import type { ImageContent, Message, Model, TextContent, ToolResultMessage } from "@mariozechner/pi-ai";
import type { ImageContent, Model, TextContent, ToolResultMessage } from "@mariozechner/pi-ai";
import type { Component, TUI } from "@mariozechner/pi-tui";
import type { Theme } from "../../modes/interactive/theme/theme.js";
import type { CompactionPreparation, CompactionResult } from "../compaction/index.js";