finished a track
This commit is contained in:
@@ -8,22 +8,22 @@
|
|||||||
- [x] Task: Conductor - User Manual Verification 'Phase 1: State & Interface Update' (Protocol in workflow.md) e28af48
|
- [x] Task: Conductor - User Manual Verification 'Phase 1: State & Interface Update' (Protocol in workflow.md) e28af48
|
||||||
|
|
||||||
## Phase 2: Core Rendering Logic (Code & MD)
|
## Phase 2: Core Rendering Logic (Code & MD)
|
||||||
- [ ] Task: Write Tests: Create a simulation test in `tests/test_gui_text_viewer.py` to verify the viewer opens and switches rendering paths based on `text_type`.
|
- [x] Task: Write Tests: Create a simulation test in `tests/test_gui_text_viewer.py` to verify the viewer opens and switches rendering paths based on `text_type`. a91b8dc
|
||||||
- [ ] Task: Implement: In `src/gui_2.py`, refactor the text viewer window loop to:
|
- [x] Task: Implement: In `src/gui_2.py`, refactor the text viewer window loop to: a91b8dc
|
||||||
- Use `MarkdownRenderer.render` if `text_type == "markdown"`.
|
- Use `MarkdownRenderer.render` if `text_type == "markdown"`. a91b8dc
|
||||||
- Use a cached `ImGuiColorTextEdit.TextEditor` if `text_type` matches a code language.
|
- Use a cached `ImGuiColorTextEdit.TextEditor` if `text_type` matches a code language. a91b8dc
|
||||||
- Fallback to `imgui.input_text_multiline` for plain text.
|
- Fallback to `imgui.input_text_multiline` for plain text. a91b8dc
|
||||||
- [ ] Task: Implement: Ensure the `TextEditor` instance is properly cached using a unique key for the text viewer to maintain state.
|
- [x] Task: Implement: Ensure the `TextEditor` instance is properly cached using a unique key for the text viewer to maintain state. a91b8dc
|
||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Core Rendering Logic' (Protocol in workflow.md)
|
- [x] Task: Conductor - User Manual Verification 'Phase 2: Core Rendering Logic' (Protocol in workflow.md) a91b8dc
|
||||||
|
|
||||||
## Phase 3: UI Features (Copy, Line Numbers, Wrap)
|
## Phase 3: UI Features (Copy, Line Numbers, Wrap)
|
||||||
- [ ] Task: Write Tests: Update `tests/test_gui_text_viewer.py` to verify the copy-to-clipboard functionality and word wrap toggle.
|
- [x] Task: Write Tests: Update `tests/test_gui_text_viewer.py` to verify the copy-to-clipboard functionality and word wrap toggle. a91b8dc
|
||||||
- [ ] Task: Implement: Add a "Copy" button to the text viewer title bar or a small toolbar at the top of the window.
|
- [x] Task: Implement: Add a "Copy" button to the text viewer title bar or a small toolbar at the top of the window. a91b8dc
|
||||||
- [ ] Task: Implement: Add a "Word Wrap" checkbox inside the text viewer window.
|
- [x] Task: Implement: Add a "Word Wrap" checkbox inside the text viewer window. a91b8dc
|
||||||
- [ ] Task: Implement: Configure the `TextEditor` instance to show line numbers and be read-only.
|
- [x] Task: Implement: Configure the `TextEditor` instance to show line numbers and be read-only. a91b8dc
|
||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: UI Features' (Protocol in workflow.md)
|
- [x] Task: Conductor - User Manual Verification 'Phase 3: UI Features' (Protocol in workflow.md) a91b8dc
|
||||||
|
|
||||||
## Phase 4: Integration & Rollout
|
## Phase 4: Integration & Rollout
|
||||||
- [ ] Task: Implement: Update all existing calls to `_render_text_viewer` in `src/gui_2.py` (e.g., in `_render_files_panel`, `_render_tool_calls_panel`) to pass the correct `text_type` based on file extension or content.
|
- [x] Task: Implement: Update all existing calls to `_render_text_viewer` in `src/gui_2.py` (e.g., in `_render_files_panel`, `_render_tool_calls_panel`) to pass the correct `text_type` based on file extension or content. 2826ad5
|
||||||
- [ ] Task: Implement: Add "Markdown Preview" support for system prompt presets using the new text viewer logic.
|
- [x] Task: Implement: Add "Markdown Preview" support for system prompt presets using the new text viewer logic. 2826ad5
|
||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 4: Integration & Rollout' (Protocol in workflow.md)
|
- [x] Task: Conductor - User Manual Verification 'Phase 4: Integration & Rollout' (Protocol in workflow.md) 2826ad5
|
||||||
|
|||||||
@@ -225,6 +225,9 @@ class HookHandler(BaseHTTPRequestHandler):
|
|||||||
for key, attr in gettable.items():
|
for key, attr in gettable.items():
|
||||||
val = _get_app_attr(app, attr, None)
|
val = _get_app_attr(app, attr, None)
|
||||||
result[key] = _serialize_for_api(val)
|
result[key] = _serialize_for_api(val)
|
||||||
|
result['show_text_viewer'] = _get_app_attr(app, 'show_text_viewer', False)
|
||||||
|
result['text_viewer_title'] = _get_app_attr(app, 'text_viewer_title', '')
|
||||||
|
result['text_viewer_type'] = _get_app_attr(app, 'text_viewer_type', 'markdown')
|
||||||
finally: event.set()
|
finally: event.set()
|
||||||
lock = _get_app_attr(app, "_pending_gui_tasks_lock")
|
lock = _get_app_attr(app, "_pending_gui_tasks_lock")
|
||||||
tasks = _get_app_attr(app, "_pending_gui_tasks")
|
tasks = _get_app_attr(app, "_pending_gui_tasks")
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ class AppController:
|
|||||||
self.show_text_viewer: bool = False
|
self.show_text_viewer: bool = False
|
||||||
self.text_viewer_title: str = ''
|
self.text_viewer_title: str = ''
|
||||||
self.text_viewer_content: str = ''
|
self.text_viewer_content: str = ''
|
||||||
|
self.text_viewer_type: str = 'text'
|
||||||
self._pending_comms: List[Dict[str, Any]] = []
|
self._pending_comms: List[Dict[str, Any]] = []
|
||||||
self._pending_tool_calls: List[Dict[str, Any]] = []
|
self._pending_tool_calls: List[Dict[str, Any]] = []
|
||||||
self._pending_history_adds: List[Dict[str, Any]] = []
|
self._pending_history_adds: List[Dict[str, Any]] = []
|
||||||
@@ -375,7 +376,10 @@ class AppController:
|
|||||||
'ui_separate_tier1': 'ui_separate_tier1',
|
'ui_separate_tier1': 'ui_separate_tier1',
|
||||||
'ui_separate_tier2': 'ui_separate_tier2',
|
'ui_separate_tier2': 'ui_separate_tier2',
|
||||||
'ui_separate_tier3': 'ui_separate_tier3',
|
'ui_separate_tier3': 'ui_separate_tier3',
|
||||||
'ui_separate_tier4': 'ui_separate_tier4'
|
'ui_separate_tier4': 'ui_separate_tier4',
|
||||||
|
'show_text_viewer': 'show_text_viewer',
|
||||||
|
'text_viewer_title': 'text_viewer_title',
|
||||||
|
'text_viewer_type': 'text_viewer_type'
|
||||||
}
|
}
|
||||||
self._gettable_fields = dict(self._settable_fields)
|
self._gettable_fields = dict(self._settable_fields)
|
||||||
self._gettable_fields.update({
|
self._gettable_fields.update({
|
||||||
@@ -422,7 +426,10 @@ class AppController:
|
|||||||
'ui_separate_tier1': 'ui_separate_tier1',
|
'ui_separate_tier1': 'ui_separate_tier1',
|
||||||
'ui_separate_tier2': 'ui_separate_tier2',
|
'ui_separate_tier2': 'ui_separate_tier2',
|
||||||
'ui_separate_tier3': 'ui_separate_tier3',
|
'ui_separate_tier3': 'ui_separate_tier3',
|
||||||
'ui_separate_tier4': 'ui_separate_tier4'
|
'ui_separate_tier4': 'ui_separate_tier4',
|
||||||
|
'show_text_viewer': 'show_text_viewer',
|
||||||
|
'text_viewer_title': 'text_viewer_title',
|
||||||
|
'text_viewer_type': 'text_viewer_type'
|
||||||
})
|
})
|
||||||
self.perf_monitor = performance_monitor.get_monitor()
|
self.perf_monitor = performance_monitor.get_monitor()
|
||||||
self._perf_profiling_enabled = False
|
self._perf_profiling_enabled = False
|
||||||
|
|||||||
Reference in New Issue
Block a user