CRITICAL ARCHITECTURAL CHANGE:
- LLM no longer manages branch names - system derives from chat_id
- All operations automatically use current working branch from chat_id session
- Branch parameter REMOVED from all operation functions
- Added _get_working_branch() helper for automatic branch detection
- Added _generate_branch_name() for system-managed branch naming
- All functions now use __chat_id__ parameter for branch detection
Complete file operations (NO branch parameter needed!):
- apply_diff() - diff-based updates
- commit_changes() - commit with size delta gating
- create_file() - create new files
- replace_file() - replace entire file
- delete_file() - delete files ⭐ NEW
- rename_file() - rename files ⭐ NEW
- get_file() - read files
- list_files() - list directory contents
Updated workflow:
- create_feature_branch() generates branch name from issue_number + scope
- System caches: chat_id → working_branch
- All file operations use cached working branch from chat_id
- LLM focuses on code/content, not infrastructure
All functions now:
- Use __chat_id__ parameter for branch detection (REQUIRED)
- Get working branch from session cache (system-managed)
- Never accept branch names from LLM input
Documentation updated:
- workflow_summary() shows critical change notice
- All function docs updated to reflect automatic branch management
- Examples updated to show __chat_id__ usage
Version remains 1.0.0 (no release yet)
Refs: #11
The file was corrupted to only 4KB during previous edits. This restores the complete implementation with all methods including:
- workflow_summary()
- read_ticket()
- suggest_branch_name()
- create_feature_branch()
- get_branch_status()
- list_my_branches()
- apply_diff()
- _apply_unified_diff()
- _generate_diff_commit_message()
- commit_changes()
- create_pull_request()
- replace_file()
- create_file()
- get_file()
- list_files()
All with proper difflib import at module level.
Refs: #11
Removed the incorrectly placed `import difflib` line from inside
the _apply_unified_diff() method. The module is now imported at
the top of the file where it belongs.
Refs: #11
The import statement was incorrectly placed inside a function body,
which is invalid Python syntax. Moved to module-level imports.
Also updated requirements to include difflib (part of stdlib, no pip install needed).
Refs: #11
- Added VeniceChat class with get_api_key, truncate, format_error static methods
- Prevents Open WebUI framework method name collision issues
- All tool methods now use VeniceChat.get_api_key() pattern
- Version bump to 1.4.0