diff --git a/conductor/tracks.md b/conductor/tracks.md index fa182a42..57f6f73d 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -376,3 +376,5 @@ User review surfaced five outstanding UI issues, each previously attempted witho - [x] **Track: Fix markdown_helper.py for imgui-bundle >=1.92.801** `[checkpoint: 7a34edf]` *Link: [./tracks/markdown_helper_language_api_compat_20260603/](./tracks/markdown_helper_language_api_compat_20260603/)* *Goal: First thing the clean install test caught. `ed.TextEditor.LanguageDefinitionId` enum was removed in `imgui-bundle>=1.92.801`. Replaced with version-compat shim helpers `_get_language_id(name)` and `_set_editor_language(editor, lang_obj)` that detect the API at runtime (1.92.5 enum vs 1.92.801+ factory). Also added parallel `_editor_lang_cache` to track current language tag per editor (robust to API name differences like "C++" vs "cpp"). Verified: test passes in opt-in mode (1.92.801), shim still works in local 1.92.5 env, follow-up commit `b306f8f` corrected test URL `/api/mma_status` -> `/api/gui/mma_status` (actual endpoint per `src/api_hooks.py:181`).* + +# TODO(Ed): Support "Virtual" Pasted entries for the context. diff --git a/src/app_controller.py b/src/app_controller.py index 42120a86..245ff4e0 100644 --- a/src/app_controller.py +++ b/src/app_controller.py @@ -335,7 +335,10 @@ def _api_generate(controller: 'AppController', req: GenerateRequest) -> dict[str }) try: - resp = ai_client.send(stable_md, user_msg, base_dir, controller.last_file_items, disc_text, rag_engine=None) + 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 "" + resp = ai_client.send(context_to_send, user_msg, base_dir, controller.last_file_items, disc_text, rag_engine=None) if req.auto_add_history: with controller._pending_history_adds_lock: