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
This commit is contained in:
2026-01-27 23:33:06 -05:00
commit 0062e5d9d9
521 changed files with 66418 additions and 0 deletions

45
src/constants/handlers.ts Normal file
View File

@@ -0,0 +1,45 @@
/**
* Constants for command handlers
*/
import type { ConfigKey, ConfigAction } from "@/types/handlers";
import type { Provider } from "@/types/index";
export const VALID_CONFIG_KEYS: readonly ConfigKey[] = [
"provider",
"model",
"maxIterations",
"timeout",
] as const;
export const VALID_PROVIDERS: readonly Provider[] = [
"copilot",
"ollama",
] as const;
export const VALID_CONFIG_ACTIONS: readonly ConfigAction[] = [
"show",
"path",
"set",
] as const;
export const CONFIG_VALIDATION = {
MIN_TIMEOUT_MS: 1000,
MIN_ITERATIONS: 1,
} as const;
export const INTENT_KEYWORDS = {
fix: ["fix", "bug"],
test: ["test", "spec"],
refactor: ["refactor", "improve"],
code: ["add", "implement"],
document: ["document", "comment"],
} as const;
export const CLASSIFICATION_CONFIDENCE = {
HIGH: 0.9,
MEDIUM: 0.85,
DEFAULT: 0.8,
LOW: 0.75,
THRESHOLD: 0.7,
} as const;