Add debug log panel, centered modals, and fix multiple UX issues

Features:
  - Add /logs command to toggle debug log panel (20% width on right)
  - Debug panel shows API calls, streaming events, tool calls, state changes
  - Add /help submenus with detailed command explanations
  - Center all modal dialogs in the terminal window

  Bug Fixes:
  - Fix streaming content not displaying (add fallback when streaming fails)
  - Fix permission modal shortcut key mismatch ('a' → 'l' for local scope)
  - Fix agent prompt accumulation when switching agents multiple times
  - Fix permission modal using brittle index for "No" option

  Improvements:
  - Restrict git commands (add, commit, push, etc.) unless user explicitly requests
  - Unify permission options across all UI components
  - Add Ollama model selection when switching to Ollama provider
  - Store base system prompt to prevent agent prompt stacking

  New files:
  - src/tui-solid/components/debug-log-panel.tsx
  - src/tui-solid/components/centered-modal.tsx
  - src/tui-solid/components/help-menu.tsx
  - src/tui-solid/components/help-detail.tsx
  - src/constants/help-content.ts
This commit is contained in:
2026-01-29 04:53:39 -05:00
parent dfbbab2ecb
commit adfebda501
27 changed files with 1031 additions and 167 deletions

View File

@@ -1,11 +1,9 @@
#!/usr/bin/env node
import { fileURLToPath } from "url";
import { dirname, join } from "path";
import { Command } from "commander";
import { handleCommand } from "@commands/handlers";
import { readFile } from "fs/promises";
import { execute } from "@commands/chat-tui";
import versionData from "@/version.json";
import {
initializeProviders,
loginProvider,
@@ -37,14 +35,8 @@ import { createPlan, displayPlan, approvePlan } from "@services/planner";
import { ensureXdgDirectories } from "@utils/ensure-directories";
import chalk from "chalk";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Read version from package.json
const packageJson = JSON.parse(
await readFile(join(__dirname, "../package.json"), "utf-8"),
);
const { version } = packageJson;
// Read version from version.json
const { version } = versionData;
// Ensure XDG directories exist
await ensureXdgDirectories();