fix(app_controller): restore context_to_send definition in _api_generate (CRITICAL regression from ai_loop_regressions_20260614)
This commit is contained in:
@@ -275,6 +275,10 @@ def _api_generate(controller: 'AppController', req: GenerateRequest) -> dict[str
|
||||
"ts": project_manager.now_ts()
|
||||
})
|
||||
|
||||
with controller._disc_entries_lock:
|
||||
has_ai_response = any(e.get("role") == "AI" for e in controller.disc_entries)
|
||||
context_to_send = stable_md if not has_ai_response else ""
|
||||
|
||||
result = ai_client.send_result(context_to_send, user_msg, base_dir, controller.last_file_items, disc_text, rag_engine=None)
|
||||
if not result.ok:
|
||||
err = result.errors[0]
|
||||
|
||||
Reference in New Issue
Block a user