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:
29
src/constants/read.ts
Normal file
29
src/constants/read.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Read tool constants
|
||||
*/
|
||||
|
||||
export const READ_DEFAULTS = {
|
||||
MAX_LINES: 2000,
|
||||
MAX_LINE_LENGTH: 2000,
|
||||
MAX_BYTES: 100000,
|
||||
LINE_NUMBER_PAD: 6,
|
||||
} as const;
|
||||
|
||||
export const READ_MESSAGES = {
|
||||
PERMISSION_DENIED: "Permission denied by user",
|
||||
} as const;
|
||||
|
||||
export const READ_TITLES = {
|
||||
DENIED: (path: string) => `Read denied: ${path}`,
|
||||
FAILED: (path: string) => `Read failed: ${path}`,
|
||||
READING: (name: string) => `Reading ${name}`,
|
||||
DIRECTORY: (path: string) => `Listed directory: ${path}`,
|
||||
} as const;
|
||||
|
||||
export const READ_DESCRIPTION = `Read the contents of a file. Returns the file content with line numbers.
|
||||
|
||||
Guidelines:
|
||||
- Use absolute paths
|
||||
- By default reads up to 2000 lines
|
||||
- Long lines are truncated at 2000 characters
|
||||
- Use offset and limit for large files`;
|
||||
Reference in New Issue
Block a user