feat(gitea): critical refactor - automatic branch management (v1.1.0)

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
- Added delete_file() for complete file removal
- Added rename_file() for file renaming

Complete file operations:
- 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

All functions now:
- Use __chat_id__ parameter for branch detection
- Get working branch from session cache (system-managed)
- Never accept branch names from LLM input

Refactored workflow:
- create_feature_branch() generates branch name from issue_number + scope
- All file operations use cached working branch from chat_id
- LLM focuses on code/content, not infrastructure

Refs: #11
This commit is contained in:
2026-01-17 16:20:53 +00:00
parent 95b90e3ac7
commit abf6186976

File diff suppressed because it is too large Load Diff