How nghialt3670/chat2edit-python works
Project type and purpose
• Chat2Edit is a Python library/package (not a full‐stack web app) that provides an API/CLI for AI-assisted file editing.
• Its purpose is to let end-users or other programs call into Chat2Edit to orchestrate prompts, apply AI-driven diffs, and persist edits.
File structure
• Top‐level: project metadata and config (.github, pyproject.toml, requirements.txt, LICENSE, README.md).
• src/chat2edit – the core package subdivided into:
• base.py, chat2edit.py, constants.py – entry points and shared constants
• context/ – manages file I/O contexts, attachments, resource cleanup
• execution/ – orchestrates running code, diff application, error handling, feedback signals
• prompting/ – constructs LLM prompts, houses strategies, and abstracts LLM providers
– l l m s/ – specific connectors (OpenAI, Google)
– strategies/ – prompt‐construction policies
– stubbing/ – test harness for mocking LLMs
• models.py – data schemas (likely Pydantic)
• utils/ – helper routines (repr, Pydantic integration)
README for additional insights
• Confirms the library focus: AI-powered file editing, collaboration APIs.
Detailed breakdown
• Inside “Prompting”, separate “Strategies” and “Adapters”
• In “Execution”, call out decorators, feedback pipeline, exceptions
• Link “prompting.stubbing” back to “Prompting” to show the mock override path