fix(ai_client): add patch_callback param to _send_gemini_cli signature
This commit is contained in:
@@ -26,7 +26,7 @@ This file tracks all major tracks for the project. Each track has its own detail
|
|||||||
3. [x] **Track: Visual DAG & Interactive Ticket Editing**
|
3. [x] **Track: Visual DAG & Interactive Ticket Editing**
|
||||||
*Link: [./tracks/visual_dag_ticket_editing_20260306/](./tracks/visual_dag_ticket_editing_20260306/)*
|
*Link: [./tracks/visual_dag_ticket_editing_20260306/](./tracks/visual_dag_ticket_editing_20260306/)*
|
||||||
|
|
||||||
4. [~] **Track: Advanced Tier 4 QA Auto-Patching**
|
4. [x] **Track: Advanced Tier 4 QA Auto-Patching**
|
||||||
*Link: [./tracks/tier4_auto_patching_20260306/](./tracks/tier4_auto_patching_20260306/)*
|
*Link: [./tracks/tier4_auto_patching_20260306/](./tracks/tier4_auto_patching_20260306/)*
|
||||||
|
|
||||||
5. [ ] **Track: Transitioning to Native Orchestrator**
|
5. [ ] **Track: Transitioning to Native Orchestrator**
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Focus: Generate unified diff on test failure
|
|||||||
## Phase 2: Diff Viewer UI
|
## Phase 2: Diff Viewer UI
|
||||||
Focus: Display side-by-side diff
|
Focus: Display side-by-side diff
|
||||||
|
|
||||||
- [ ] Task 2.1: Parse unified diff
|
- [x] Task 2.1: Parse unified diff
|
||||||
- WHERE: `src/gui_2.py` or new `src/diff_viewer.py`
|
- WHERE: `src/gui_2.py` or new `src/diff_viewer.py`
|
||||||
- WHAT: Parse diff into hunks
|
- WHAT: Parse diff into hunks
|
||||||
- HOW:
|
- HOW:
|
||||||
@@ -55,7 +55,7 @@ Focus: Display side-by-side diff
|
|||||||
return hunks
|
return hunks
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] Task 2.2: Render diff viewer
|
- [x] Task 2.2: Render diff viewer
|
||||||
- WHERE: `src/gui_2.py`
|
- WHERE: `src/gui_2.py`
|
||||||
- WHAT: Color-coded diff display
|
- WHAT: Color-coded diff display
|
||||||
- HOW:
|
- HOW:
|
||||||
@@ -73,7 +73,7 @@ Focus: Display side-by-side diff
|
|||||||
## Phase 3: Patch Application
|
## Phase 3: Patch Application
|
||||||
Focus: Apply patch with backup
|
Focus: Apply patch with backup
|
||||||
|
|
||||||
- [ ] Task 3.1: Create backup before apply
|
- [x] Task 3.1: Create backup before apply
|
||||||
- WHERE: `src/gui_2.py` or `src/mcp_client.py`
|
- WHERE: `src/gui_2.py` or `src/mcp_client.py`
|
||||||
- WHAT: Backup file to .backup
|
- WHAT: Backup file to .backup
|
||||||
- HOW:
|
- HOW:
|
||||||
@@ -83,7 +83,7 @@ Focus: Apply patch with backup
|
|||||||
shutil.copy(file_path, backup_path)
|
shutil.copy(file_path, backup_path)
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] Task 3.2: Apply patch
|
- [x] Task 3.2: Apply patch
|
||||||
- WHERE: `src/gui_2.py`
|
- WHERE: `src/gui_2.py`
|
||||||
- WHAT: Use patch command or difflib
|
- WHAT: Use patch command or difflib
|
||||||
- HOW:
|
- HOW:
|
||||||
@@ -92,7 +92,7 @@ Focus: Apply patch with backup
|
|||||||
result = subprocess.run(["patch", "-p1"], input=diff_text, capture_output=True, text=True)
|
result = subprocess.run(["patch", "-p1"], input=diff_text, capture_output=True, text=True)
|
||||||
```
|
```
|
||||||
|
|
||||||
- [ ] Task 3.3: Restore on failure
|
- [x] Task 3.3: Restore on failure
|
||||||
- WHERE: `src/gui_2.py`
|
- WHERE: `src/gui_2.py`
|
||||||
- WHAT: Restore from backup if patch fails
|
- WHAT: Restore from backup if patch fails
|
||||||
- HOW: `shutil.copy(backup_path, file_path)`
|
- HOW: `shutil.copy(backup_path, file_path)`
|
||||||
@@ -100,7 +100,7 @@ Focus: Apply patch with backup
|
|||||||
## Phase 4: Modal UI
|
## Phase 4: Modal UI
|
||||||
Focus: Approval modal for patches
|
Focus: Approval modal for patches
|
||||||
|
|
||||||
- [ ] Task 4.1: Create patch approval modal
|
- [x] Task 4.1: Create patch approval modal
|
||||||
- WHERE: `src/gui_2.py`
|
- WHERE: `src/gui_2.py`
|
||||||
- WHAT: Modal with diff preview and Apply/Reject buttons
|
- WHAT: Modal with diff preview and Apply/Reject buttons
|
||||||
- HOW:
|
- HOW:
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ active = "main"
|
|||||||
|
|
||||||
[discussions.main]
|
[discussions.main]
|
||||||
git_commit = ""
|
git_commit = ""
|
||||||
last_updated = "2026-03-06T23:54:22"
|
last_updated = "2026-03-07T01:19:03"
|
||||||
history = []
|
history = []
|
||||||
|
|||||||
@@ -1019,7 +1019,8 @@ def _send_gemini_cli(md_content: str, user_message: str, base_dir: str,
|
|||||||
discussion_history: str = "",
|
discussion_history: str = "",
|
||||||
pre_tool_callback: Optional[Callable[[str, str, Optional[Callable[[str], str]]], Optional[str]]] = None,
|
pre_tool_callback: Optional[Callable[[str, str, Optional[Callable[[str], str]]], Optional[str]]] = None,
|
||||||
qa_callback: Optional[Callable[[str], str]] = None,
|
qa_callback: Optional[Callable[[str], str]] = None,
|
||||||
stream_callback: Optional[Callable[[str], None]] = None) -> str:
|
stream_callback: Optional[Callable[[str], None]] = None,
|
||||||
|
patch_callback: Optional[Callable[[str, str], Optional[str]]] = None) -> str:
|
||||||
global _gemini_cli_adapter
|
global _gemini_cli_adapter
|
||||||
sys.stderr.write(f"[DEBUG] _send_gemini_cli running in module {__name__}, adapter is {_gemini_cli_adapter}\n")
|
sys.stderr.write(f"[DEBUG] _send_gemini_cli running in module {__name__}, adapter is {_gemini_cli_adapter}\n")
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|||||||
Reference in New Issue
Block a user