# Specification: Context Preservation and Warnings

## 1. Overview
Currently, creating a new discussion drops all currently selected files because the new discussion is initialized without a `context_snapshot`. Additionally, attempting to generate a response without any selected context files provides no user feedback. We need to inherit the current context composition when a new discussion is created and add a warning mechanism for empty contexts.

## 2. Functional Requirements
*   **Context Inheritance:** When a new discussion is created via `_create_discussion` in `src/app_controller.py`, the active discussion's `context_files` (or the current `ui_selected_context_files` state) MUST be saved into the new discussion's `context_snapshot`.
*   **Empty Context Warning:** When `_handle_generate_send` or `_handle_md_only` is triggered in `src/gui_2.py`, it must verify if `ui_selected_context_files` is empty. If empty, it MUST display a warning modal instead of immediately calling the controller.
*   **Modal Actions:** The warning modal should offer "Proceed Anyway" (which continues the generation) and "Cancel" buttons.

## 3. Non-Functional Requirements
*   **Consistency:** The new empty context modal must match the style of existing warnings (like `show_missing_files_modal`).
*   **ImGui Stability:** Ensure the modal rendering does not violate ImGui stack scoping.

## 4. Acceptance Criteria
*   Creating a new discussion with 3 files checked results in the new discussion also having those 3 files checked.
*   Clicking "Generate Response" with 0 files checked opens a warning modal.
*   Clicking "Proceed Anyway" successfully generates the response (with 0 files).