fix for gui
This commit is contained in:
@@ -10,7 +10,7 @@ system_prompt = "DO NOT EVER make a shell script unless told to. DO NOT EVER mak
|
||||
palette = "10x Dark"
|
||||
font_path = "C:/Users/Ed/AppData/Local/uv/cache/archive-v0/WSthkYsQ82b_ywV6DkiaJ/pygame_gui/data/FiraCode-Regular.ttf"
|
||||
font_size = 18.0
|
||||
scale = 1.1
|
||||
scale = 1.25
|
||||
|
||||
[projects]
|
||||
paths = [
|
||||
|
||||
20
gui.py
20
gui.py
@@ -1,4 +1,4 @@
|
||||
# gui.py
|
||||
# gui.py
|
||||
"""
|
||||
Note(Gemini):
|
||||
The main DearPyGui interface orchestrator.
|
||||
@@ -302,8 +302,8 @@ class ConfirmDialog:
|
||||
dpg.add_text("Script:")
|
||||
dpg.add_button(
|
||||
label="[+ Maximize]",
|
||||
user_data=f"{self._tag}_script",
|
||||
callback=lambda s, a, u: _show_text_viewer("Confirm Script", dpg.get_value(u))
|
||||
user_data=self._script,
|
||||
callback=lambda s, a, u: _show_text_viewer("Confirm Script", u)
|
||||
)
|
||||
dpg.add_input_text(
|
||||
tag=f"{self._tag}_script",
|
||||
@@ -432,6 +432,8 @@ class App:
|
||||
self._pending_dialog_lock = threading.Lock()
|
||||
|
||||
self._tool_log: list[tuple[str, str]] = []
|
||||
self._last_script: str = ""
|
||||
self._last_output: str = ""
|
||||
|
||||
# Comms log entries queued from background thread for main-thread rendering
|
||||
self._pending_comms: list[dict] = []
|
||||
@@ -748,6 +750,8 @@ class App:
|
||||
return output
|
||||
|
||||
def _append_tool_log(self, script: str, result: str):
|
||||
self._last_script = script
|
||||
self._last_output = result
|
||||
self._tool_log.append((script, result))
|
||||
self._rebuild_tool_log()
|
||||
|
||||
@@ -1917,8 +1921,7 @@ class App:
|
||||
dpg.add_text("Script:")
|
||||
dpg.add_button(
|
||||
label="[+ Maximize]",
|
||||
user_data="last_script_text",
|
||||
callback=lambda s, a, u: _show_text_viewer("Last Script", dpg.get_value(u))
|
||||
callback=lambda s, a, u: _show_text_viewer("Last Script", self._last_script),
|
||||
)
|
||||
dpg.add_input_text(
|
||||
tag="last_script_text",
|
||||
@@ -1934,8 +1937,7 @@ class App:
|
||||
dpg.add_text("Output:")
|
||||
dpg.add_button(
|
||||
label="[+ Maximize]",
|
||||
user_data="last_script_output",
|
||||
callback=lambda s, a, u: _show_text_viewer("Last Output", dpg.get_value(u))
|
||||
callback=lambda s, a, u: _show_text_viewer("Last Output", self._last_output),
|
||||
)
|
||||
dpg.add_input_text(
|
||||
tag="last_script_output",
|
||||
@@ -2120,3 +2122,7 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user