diff --git a/src/gui_2.py b/src/gui_2.py index 2ddbe5c7..5d815f5c 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -4150,6 +4150,22 @@ def render_discussion_entry(app: App, entry: dict, index: int) -> None: imgui.separator() def render_discussion_entry_read_mode(app: App, entry: dict, index: int) -> None: + """ + Renders a discussion entry in read-only mode. + Parses the markdown content, isolates retrieved context sections (RAG chunks), + handles custom definition/AST links, and invokes the markdown syntax highlighter. + + State Mutations: + app.text_viewer_title, app.text_viewer_content, app.text_viewer_type (populated on [Source] click) + app.show_windows["Text Viewer"] (set to True on [Source] click) + + DAG Render Context: + Called by: render_discussion_entry() + Calls: markdown_helper.render(), mcp_client.read_file() + + Threading & Safety: + Must run synchronously on the Main Thread. + """ with imscope.id(f"read_{index}"): content = entry["content"] if not content.strip(): return