UNPKG

@stackmemoryai/stackmemory

Version:

Project-scoped memory for AI coding tools. Durable context across sessions with MCP integration, frames, smart retrieval, Claude Code skills, and automatic hooks.

66 lines (55 loc) โ€ข 2.36 kB
#!/usr/bin/env npx tsx /** * Test script for TUI keyboard shortcuts * Tests all interactive features and key bindings */ import 'dotenv/config'; import { SwarmTUI } from '../src/features/tui/swarm-monitor.js'; import { logger } from '../src/core/monitoring/logger.js'; console.log('๐Ÿงช TUI Shortcuts Test Guide'); console.log('============================'); console.log(''); console.log('This will launch the TUI. Test these keyboard shortcuts:'); console.log(''); console.log('๐Ÿ“‹ Test Checklist:'); console.log(' [ ] q - Quit TUI (should exit cleanly)'); console.log(' [ ] Esc - Alternative quit (should exit cleanly)'); console.log(' [ ] Ctrl+C - Force quit (should exit cleanly)'); console.log(' [ ] r - Refresh data (should show "Manual refresh triggered")'); console.log(' [ ] h - Show help (should display full help in logs)'); console.log(' [ ] c - Clear logs (should clear log area and show confirmation)'); console.log(' [ ] d - Detect swarms (should show registry status and process info)'); console.log(' [ ] s - Start swarm help (should show example commands)'); console.log(' [ ] t - Stop swarm (should show appropriate message)'); console.log(''); console.log('๐ŸŽฏ Expected Behavior:'); console.log(' - All shortcuts should work without errors'); console.log(' - Log messages should appear in the bottom panel'); console.log(' - Help text should be comprehensive'); console.log(' - Detection should show registry and external processes'); console.log(' - Interface should remain responsive'); console.log(''); console.log('Press Enter to launch TUI...'); // Wait for user input await new Promise(resolve => { process.stdin.once('data', resolve); }); async function testTUIShortcuts() { try { console.log('๐Ÿš€ Launching TUI for shortcut testing...'); const tui = new SwarmTUI(); // Initialize TUI await tui.initialize(); // Start the TUI tui.start(); console.log('โœ… TUI launched successfully'); console.log('๐Ÿ“ Test each keyboard shortcut systematically'); console.log('๐Ÿ Use "q" to quit when testing is complete'); } catch (error: unknown) { logger.error('TUI shortcuts test failed', error as Error); console.error('โŒ TUI shortcuts test failed:', (error as Error).message); process.exit(1); } } // Run the test testTUIShortcuts();