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

13
src/ui/banner/lines.ts Normal file
View File

@@ -0,0 +1,13 @@
/**
* Banner lines utilities
*/
import { BANNER_STYLE_MAP, BANNER_LINES } from "@constants/banner";
import type { BannerStyle } from "@/types/banner";
/**
* Get the banner lines for a given style
*/
export const getBannerLines = (
style: BannerStyle = "default",
): readonly string[] => BANNER_STYLE_MAP[style] ?? BANNER_LINES;

11
src/ui/banner/logo.ts Normal file
View File

@@ -0,0 +1,11 @@
/**
* Banner logo utilities
*/
import { Style } from "@ui/styles";
/**
* Simple logo for inline display
*/
export const getInlineLogo = (): string =>
Style.CYAN + Style.BOLD + "codetyper" + Style.RESET;

39
src/ui/banner/print.ts Normal file
View File

@@ -0,0 +1,39 @@
/**
* Banner printing utilities
*/
import { Style } from "@ui/styles";
import type { BannerStyle } from "@/types/banner";
import { renderBanner } from "@ui/banner/render";
/**
* Print the banner to console
*/
export const printBanner = (style: BannerStyle = "default"): void => {
console.log("\n" + renderBanner(style));
};
/**
* Print banner with version and info
*/
export const printWelcome = (
version: string,
provider?: string,
model?: string,
): void => {
console.log("\n" + renderBanner("blocks"));
console.log("");
console.log(Style.DIM + " AI Coding Assistant" + Style.RESET);
console.log("");
const info: string[] = [];
if (version) info.push(`v${version}`);
if (provider) info.push(provider);
if (model) info.push(model);
if (info.length > 0) {
console.log(Style.DIM + " " + info.join(" | ") + Style.RESET);
}
console.log("");
};

35
src/ui/banner/render.ts Normal file
View File

@@ -0,0 +1,35 @@
/**
* Banner rendering utilities
*/
import { GRADIENT_COLORS } from "@constants/banner";
import { Style } from "@ui/styles";
import type { BannerStyle } from "@/types/banner";
import { getBannerLines } from "@ui/banner/lines";
/**
* Render the banner with gradient colors
*/
export const renderBanner = (style: BannerStyle = "default"): string => {
const lines = getBannerLines(style);
return lines
.map((line, index) => {
const colorIndex = Math.min(index, GRADIENT_COLORS.length - 1);
const color = GRADIENT_COLORS[colorIndex];
return color + line + Style.RESET;
})
.join("\n");
};
/**
* Render banner with subtitle
*/
export const renderBannerWithSubtitle = (
subtitle: string,
style: BannerStyle = "default",
): string => {
const banner = renderBanner(style);
const subtitleLine = Style.DIM + " " + subtitle + Style.RESET;
return banner + "\n" + subtitleLine;
};