Commit Graph

14 Commits

Author SHA1 Message Date
5830b1da42 Fixing the permissions 2026-02-06 11:16:12 -05:00
8adf48abd3 feat: inline permission prompt and improve TUI layout
- Render permission modal inline below log panel instead of floating CenteredModal overlay
- Hide input area when permission prompt is active
- Add dev:debug and dev:debug-brk scripts for Bun inspector debugging
- Add background color to header to prevent content bleeding through
- Add margin spacing between header and log panel
- Change permission modal border to top-only for cleaner inline appearance
2026-02-06 09:09:43 -05:00
db79856b08 fixing imports 2026-02-04 21:32:30 -05:00
74b0a0dbab deleting index.ts files 2026-02-04 21:02:01 -05:00
f0609e423e Restructure src/ modules with consistent internal organization
Reorganize major src/ directories to follow a consistent pattern with
core/, menu/, submenu/, inputs/, logs/, layout/, feedback/ subdirectories.

Changes by module:

- stores/: Move 5 store files to stores/core/
- utils/: Create core/ (terminal, tools, etc.) and menu/ (progress-bar)
- api/: Create copilot/core/, copilot/auth/, ollama/core/
- providers/: Create core/, copilot/core/, copilot/auth/, ollama/core/, login/core/
- ui/: Create core/, banner/core/, banner/menu/, spinner/core/,
       input-editor/core/, components/core/, components/menu/
- tools/: Create core/ for registry.ts and types.ts
- tui-solid/: Reorganize components/ into menu/, submenu/, inputs/,
              logs/, modals/, panels/, layout/, feedback/
- commands/: Create core/ for runner.ts and handlers.ts
- services/: Create core/ for agent.ts, permissions.ts, session.ts,
             executor.ts, config.ts

All imports updated to use new paths. TypeScript compilation verified.
2026-02-04 18:47:52 -05:00
c1b4384890 Remove legacy React/Ink TUI and fix TypeScript errors
- Delete old tui/ React/Ink implementation (App.tsx, components/, hooks/, store.ts)
  - Migrate to tui-solid/ as the sole TUI implementation
  - Update tui/index.ts to re-export from tui-solid and @/types/tui

  TypeScript fixes:
  - Add missing PreCompact to hook event constants
  - Fix path aliases (@src/ -> @/, @constants/)
  - Remove unused imports across service files
  - Add explicit type annotations to callback parameters
  - Replace Bun.file/write with Node.js fs/promises in mcp/registry
  - Fix Map.some() -> Array.from().some() in registry
  - Fix addServer() call signature
  - Add missing description to brain-mcp schema items
  - Fix typo in progress-bar import (@interfactes -> @interfaces)
2026-02-04 01:21:43 -05:00
fbd9afa177 Fix MCP form input and add reactive MCP server state
- Fix space key not working in MCP add form by handling evt.name === "space"
  - Add support for multi-character paste sequences via evt.sequence
  - Add MCPServerDisplay type to types/tui.ts for UI display
  - Add mcpServers reactive state to app store with setMcpServers,
    addMcpServer, and updateMcpServerStatus actions
  - Update session.tsx to use store's mcpServers instead of static props
  - Update execute.tsx to update store when server is added/connected
  - Remove duplicate MCPServer interfaces from app.tsx, session.tsx,
    and mcp-select.tsx in favor of shared MCPServerDisplay type
2026-02-02 14:10:19 -05:00
3b277c3925 fixing the issues on mcp 2026-02-02 13:40:55 -05:00
c839fc4d68 Add BRAIN_DISABLED flag and fix Ollama tool call formatting
Features:
  - Add BRAIN_DISABLED feature flag to hide all Brain functionality
  - When enabled, hides Brain banner, status indicator, menu, and commands
  - Flag location: src/constants/brain.ts

  Fixes:
  - Fix Ollama 400 error by properly formatting tool_calls in messages
  - Update OllamaMessage type to include tool_calls field
  - Fix Brain menu keyboard not working (add missing modes to isMenuOpen)

  UI Changes:
  - Remove "^Tab toggle mode" hint from status bar
  - Remove "ctrl+t to hide todos" hint from status bar

  Files modified:
  - src/constants/brain.ts (add BRAIN_DISABLED flag)
  - src/types/ollama.ts (add tool_calls to OllamaMessage)
  - src/providers/ollama/chat.ts (format tool_calls in messages)
  - src/tui-solid/components/header.tsx (hide Brain UI when disabled)
  - src/tui-solid/components/status-bar.tsx (remove hints)
  - src/tui-solid/components/command-menu.tsx (filter brain command)
  - src/tui-solid/components/input-area.tsx (fix isMenuOpen modes)
  - src/tui-solid/routes/session.tsx (skip brain menu when disabled)
  - src/services/brain.ts (early return when disabled)
  - src/services/chat-tui/initialize.ts (skip brain init when disabled)
2026-02-02 13:25:38 -05:00
73f164de41 Fixing the appstore issue 2026-01-31 23:19:32 -05:00
1491840a60 Adding mcp searcher 2026-01-31 22:35:24 -05:00
a3c407d89a feat: implement hooks, plugins, session forks, and vim motions
Add 4 major features to codetyper-cli:

- Hooks System: Lifecycle hooks (PreToolUse, PostToolUse, SessionStart,
  SessionEnd, UserPromptSubmit, Stop) with exit code control flow
- Plugin System: Custom tools, commands, and hooks via plugin manifest
- Session Forking: Snapshots, rewind, fork, and switch between branches
- Vim Motions: Normal/Insert/Command/Visual modes with keyboard navigation

New files:
- src/types/{hooks,plugin,session-fork,vim}.ts
- src/constants/{hooks,plugin,session-fork,vim}.ts
- src/services/{hooks-service,plugin-loader,plugin-service,session-fork-service}.ts
- src/stores/vim-store.ts (vanilla)
- src/tui/hooks/{useVimMode,useVimStore,useTodoStore,useThemeStore}.ts
- src/tui/components/VimStatusLine.tsx

Modified:
- src/services/agent.ts (hook integration)
- src/tools/index.ts (plugin tool registration)
- src/stores/{todo-store,theme-store}.ts (converted to vanilla)
- TUI components (updated hook imports)
2026-01-31 22:22:04 -05:00
adfebda501 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
2026-01-29 04:53:39 -05:00
0062e5d9d9 Terminal-based AI coding agent with interactive TUI for autonomous code generation.
Features:
  - Interactive TUI with React/Ink
  - Autonomous agent with tool calls (bash, read, write, edit, glob, grep)
  - Permission system with pattern-based rules
  - Session management with auto-compaction
  - Dual providers: GitHub Copilot and Ollama
  - MCP server integration
  - Todo panel and theme system
  - Streaming responses
  - GitHub-compatible project context
2026-01-27 23:33:06 -05:00