Private
Public Access
Track: Complete track ai_client_docs_20260613
This commit is contained in:
+2
-2
@@ -511,10 +511,10 @@ Lightweight chronology; full spec/plan/state per track is in the linked folder.
|
||||
|
||||
*Goal: Document preset managers/editors, persona selectors/editors, provider panel, and command palette in `src/gui_2.py` and `src/command_palette.py` with embedded SSDL and ASCII layouts.*
|
||||
|
||||
#### Track: SQLite-Granularity Inline Docs for ai_client.py `[IN PROGRESS: ai_client_docs_20260613]`
|
||||
#### Track: SQLite-Granularity Inline Docs for ai_client.py `[COMPLETE: ai_client_docs_20260613]`
|
||||
*Link: [./tracks/ai_client_docs_20260613/](./tracks/ai_client_docs_20260613/), Spec: [./tracks/ai_client_docs_20260613/spec.md](./tracks/ai_client_docs_20260613/spec.md), Plan: [./tracks/ai_client_docs_20260613/plan.md](./tracks/ai_client_docs_20260613/plan.md)*
|
||||
|
||||
*Status: 2026-06-13 — READY TO START. Spec and plan initialized.*
|
||||
*Status: 2026-06-13 — COMPLETE. Added SQLite-granularity docstrings with SSDL traces, parameters, functional scopes, and thread boundaries for the primary entry points, providers, and helper functions in src/ai_client.py.*
|
||||
|
||||
*Goal: Add SQLite-granularity docstrings with SSDL traces, parameters, functional scopes, and thread boundaries for the primary entry points, providers, and helper functions in `src/ai_client.py`.*
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
# Phase 2: Primary Provider Senders
|
||||
|
||||
## Task 2.1: Document Primary Provider Senders
|
||||
- [~] **Step 1: Document `_send_anthropic` (ai_client.py:1188-1364)**
|
||||
- [x] **Step 1: Document `_send_anthropic` (ai_client.py:1188-1364)**
|
||||
Add docstring detailing cache control breakpoints, history pruning, and token tracking. SSDL trace: `[I:_ensure_anthropic_client] -> [I:_trim_anthropic_history] -> [I:client.messages.create] -> [T:Result]`.
|
||||
- [ ] **Step 2: Document `_send_gemini` (ai_client.py:1431-1665)**
|
||||
- [x] **Step 2: Document `_send_gemini` (ai_client.py:1431-1665)**
|
||||
Document caching states, explicit server-side cache invalidation, and chat session creation. SSDL trace: `[I:_ensure_gemini_client] -> [B:Cache Changed?] -> [I:client.caches.create] -> [I:client.chats.create] -> [T:Result]`.
|
||||
- [ ] **Step 3: Document `_send_gemini_cli` (ai_client.py:1667-1776)**
|
||||
- [x] **Step 3: Document `_send_gemini_cli` (ai_client.py:1667-1776)**
|
||||
Document the headless adapter, subprocess execution, and callback wrapper. SSDL trace: `[I:run_with_tool_loop] -> [I:GeminiCliAdapter.send] -> [T:Result]`.
|
||||
- [ ] **Step 4: Document `_send_deepseek` (ai_client.py:1812-2067)**
|
||||
- [x] **Step 4: Document `_send_deepseek` (ai_client.py:1812-2067)**
|
||||
Document token limits, custom REST client calls, and history repair loops. SSDL trace: `[I:_ensure_deepseek_client] -> [I:_repair_deepseek_history] -> [I:requests.post] -> [T:Result]`.
|
||||
- [ ] **Step 5: Verify syntax and run tests**
|
||||
- [x] **Step 5: Verify syntax and run tests**
|
||||
Run: `pytest tests/test_deepseek_provider.py tests/test_gemini_cli_integration.py`
|
||||
Expected: Success.
|
||||
|
||||
@@ -55,16 +55,16 @@
|
||||
# Phase 3: Secondary Provider Senders & Helpers
|
||||
|
||||
## Task 3.1: Document Secondary Senders & Context Helpers
|
||||
- [ ] **Step 1: Document `_send_minimax` (ai_client.py:2209-2251)**
|
||||
- [x] **Step 1: Document `_send_minimax` (ai_client.py:2209-2251)**
|
||||
SSDL trace: `[I:_ensure_minimax_client] -> [I:_repair_minimax_history] -> [I:run_with_tool_loop] -> [T:Result]`.
|
||||
- [ ] **Step 2: Document `_send_grok` (ai_client.py:2157-2203)**
|
||||
- [x] **Step 2: Document `_send_grok` (ai_client.py:2157-2203)**
|
||||
SSDL trace: `[I:_ensure_grok_client] -> [I:run_with_tool_loop] -> [T:Result]`.
|
||||
- [ ] **Step 3: Document `_send_qwen` (ai_client.py:2330-2363)**
|
||||
- [x] **Step 3: Document `_send_qwen` (ai_client.py:2330-2363)**
|
||||
SSDL trace: `[I:_ensure_qwen_client] -> [I:dashscope.Generation.call] -> [T:Result]`.
|
||||
- [ ] **Step 4: Document `_send_llama` & `_send_llama_native` (ai_client.py:2381-2478)**
|
||||
- [x] **Step 4: Document `_send_llama` & `_send_llama_native` (ai_client.py:2381-2478)**
|
||||
SSDL trace: `[I:_ensure_llama_client] -> [I:run_with_tool_loop] -> [T:Result]`.
|
||||
- [ ] **Step 5: Document `_reread_file_items` & `_build_file_diff_text` (ai_client.py:869-927)**
|
||||
- [x] **Step 5: Document `_reread_file_items` & `_build_file_diff_text` (ai_client.py:869-927)**
|
||||
SSDL trace: `o-> [I:get_mtime] -> [B:changed?] -> [I:read_file] -> [T:diff_text]`.
|
||||
- [ ] **Step 6: Verify syntax and run all tests**
|
||||
- [x] **Step 6: Verify syntax and run all tests**
|
||||
Run: `pytest tests/` (full batch run check)
|
||||
Expected: All green.
|
||||
|
||||
@@ -4,23 +4,23 @@
|
||||
[meta]
|
||||
track_id = "ai_client_docs_20260613"
|
||||
name = "SQLite-Granularity Inline Docs for ai_client.py"
|
||||
status = "ready"
|
||||
current_phase = 2
|
||||
status = "completed"
|
||||
current_phase = 3
|
||||
last_updated = "2026-06-13"
|
||||
|
||||
[blocked_by]
|
||||
|
||||
[phases]
|
||||
phase_1 = { status = "completed", checkpoint_sha = "", name = "Core Dispatch Loop & Public APIs" }
|
||||
phase_2 = { status = "ready", checkpoint_sha = "", name = "Primary Provider Senders" }
|
||||
phase_3 = { status = "pending", checkpoint_sha = "", name = "Secondary Provider Senders & Helpers" }
|
||||
phase_2 = { status = "completed", checkpoint_sha = "", name = "Primary Provider Senders" }
|
||||
phase_3 = { status = "completed", checkpoint_sha = "", name = "Secondary Provider Senders & Helpers" }
|
||||
|
||||
[tasks]
|
||||
# Phase 1: Core Dispatch Loop & Public APIs
|
||||
t1_1 = { status = "completed", commit_sha = "", description = "Document Public Entry Points & Dispatch Loops (send_result, send, run_with_tool_loop, _execute_tool_calls_concurrently, _execute_single_tool_call_async)" }
|
||||
|
||||
# Phase 2: Primary Provider Senders
|
||||
t2_1 = { status = "in_progress", commit_sha = "", description = "Document Primary Provider Senders (_send_anthropic, _send_gemini, _send_gemini_cli, _send_deepseek)" }
|
||||
t2_1 = { status = "completed", commit_sha = "", description = "Document Primary Provider Senders (_send_anthropic, _send_gemini, _send_gemini_cli, _send_deepseek)" }
|
||||
|
||||
# Phase 3: Secondary Provider Senders & Helpers
|
||||
t3_1 = { status = "pending", commit_sha = "", description = "Document Secondary Senders & Context Helpers (_send_minimax, _send_grok, _send_qwen, _send_llama, _send_llama_native, _reread_file_items, _build_file_diff_text)" }
|
||||
t3_1 = { status = "completed", commit_sha = "", description = "Document Secondary Senders & Context Helpers (_send_minimax, _send_grok, _send_qwen, _send_llama, _send_llama_native, _reread_file_items, _build_file_diff_text)" }
|
||||
|
||||
Reference in New Issue
Block a user