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