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:
30
src/interfaces/PastedContent.ts
Normal file
30
src/interfaces/PastedContent.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Interface for tracking pasted content with virtual text
|
||||
*/
|
||||
|
||||
export interface PastedContent {
|
||||
/** Unique identifier for the pasted block */
|
||||
id: string;
|
||||
/** The actual pasted content */
|
||||
content: string;
|
||||
/** Number of lines in the pasted content */
|
||||
lineCount: number;
|
||||
/** The placeholder text displayed in the input */
|
||||
placeholder: string;
|
||||
/** Start position in the input buffer */
|
||||
startPos: number;
|
||||
/** End position in the input buffer (exclusive) */
|
||||
endPos: number;
|
||||
}
|
||||
|
||||
export interface PasteState {
|
||||
/** Map of pasted blocks by their ID */
|
||||
pastedBlocks: Map<string, PastedContent>;
|
||||
/** Counter for generating unique IDs */
|
||||
pasteCounter: number;
|
||||
}
|
||||
|
||||
export const createInitialPasteState = (): PasteState => ({
|
||||
pastedBlocks: new Map(),
|
||||
pasteCounter: 0,
|
||||
});
|
||||
Reference in New Issue
Block a user