conductor(checkpoint): Checkpoint end of Phase 2
This commit is contained in:
60
gui_2.py
60
gui_2.py
@@ -426,10 +426,38 @@ class App:
|
||||
# Mappings for safe hook execution
|
||||
settable_fields = {
|
||||
'ai_input': 'ui_ai_input',
|
||||
'project_git_dir': 'ui_project_git_dir',
|
||||
'auto_add_history': 'ui_auto_add_history',
|
||||
'disc_new_name_input': 'ui_disc_new_name_input',
|
||||
}
|
||||
|
||||
def _cb_new_project_automated(user_data):
|
||||
if user_data:
|
||||
name = Path(user_data).stem
|
||||
proj = project_manager.default_project(name)
|
||||
project_manager.save_project(proj, user_data)
|
||||
if user_data not in self.project_paths:
|
||||
self.project_paths.append(user_data)
|
||||
self._switch_project(user_data)
|
||||
|
||||
def _cb_project_save():
|
||||
self._flush_to_project()
|
||||
self._save_active_project()
|
||||
self._flush_to_config()
|
||||
save_config(self.config)
|
||||
self.ai_status = "config saved"
|
||||
|
||||
def _cb_disc_create():
|
||||
nm = self.ui_disc_new_name_input.strip()
|
||||
if nm:
|
||||
self._create_discussion(nm)
|
||||
self.ui_disc_new_name_input = ""
|
||||
|
||||
clickable_actions = {
|
||||
'btn_reset': self._handle_reset_session,
|
||||
'btn_gen_send': self._handle_generate_send,
|
||||
'btn_project_save': _cb_project_save,
|
||||
'btn_disc_create': _cb_disc_create,
|
||||
}
|
||||
predefined_callbacks = {
|
||||
'_test_callback_func_write_to_file': self._test_callback_func_write_to_file
|
||||
@@ -450,8 +478,17 @@ class App:
|
||||
|
||||
elif action == "click":
|
||||
item = task.get("item")
|
||||
if item in clickable_actions:
|
||||
user_data = task.get("user_data")
|
||||
if item == "btn_project_new_automated":
|
||||
_cb_new_project_automated(user_data)
|
||||
elif item in clickable_actions:
|
||||
clickable_actions[item]()
|
||||
|
||||
elif action == "select_list_item":
|
||||
item = task.get("item")
|
||||
value = task.get("value")
|
||||
if item == "disc_listbox":
|
||||
self._switch_discussion(value)
|
||||
|
||||
elif action == "custom_callback":
|
||||
callback_name = task.get("callback")
|
||||
@@ -547,13 +584,18 @@ class App:
|
||||
|
||||
def _refresh_api_metrics(self, payload: dict):
|
||||
self._recalculate_session_usage()
|
||||
try:
|
||||
stats = ai_client.get_history_bleed_stats()
|
||||
self._token_budget_pct = stats.get("percentage", 0.0) / 100.0
|
||||
self._token_budget_current = stats.get("current", 0)
|
||||
self._token_budget_limit = stats.get("limit", 0)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def fetch_stats():
|
||||
try:
|
||||
stats = ai_client.get_history_bleed_stats()
|
||||
self._token_budget_pct = stats.get("percentage", 0.0) / 100.0
|
||||
self._token_budget_current = stats.get("current", 0)
|
||||
self._token_budget_limit = stats.get("limit", 0)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
threading.Thread(target=fetch_stats, daemon=True).start()
|
||||
|
||||
cache_stats = payload.get("cache_stats")
|
||||
if cache_stats:
|
||||
count = cache_stats.get("cache_count", 0)
|
||||
@@ -1358,7 +1400,7 @@ class App:
|
||||
ts_str = entry.get("ts", "")
|
||||
if ts_str:
|
||||
imgui.same_line()
|
||||
imgui.text_colored(vec4(120, 120, 100), ts_str)
|
||||
imgui.text_colored(vec4(120, 120, 100), str(ts_str))
|
||||
|
||||
if collapsed:
|
||||
imgui.same_line()
|
||||
|
||||
@@ -138,7 +138,7 @@ DockNode ID=0x00000007 Pos=43,95 Size=897,1896 Split=Y
|
||||
DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y
|
||||
DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A
|
||||
DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02
|
||||
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=476,516 Size=1680,1183 Split=Y
|
||||
DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=216,256 Size=1680,1183 Split=Y
|
||||
DockNode ID=0x0000000C Parent=0xAFC85805 SizeRef=1362,1041 Split=X Selected=0x5D11106F
|
||||
DockNode ID=0x00000003 Parent=0x0000000C SizeRef=1188,1183 Split=X
|
||||
DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=X Selected=0xF4139CA2
|
||||
|
||||
@@ -35,5 +35,5 @@ active = "main"
|
||||
|
||||
[discussion.discussions.main]
|
||||
git_commit = ""
|
||||
last_updated = "2026-02-23T22:59:46"
|
||||
last_updated = "2026-02-24T19:59:19"
|
||||
history = []
|
||||
|
||||
@@ -38,12 +38,58 @@ auto_add = true
|
||||
|
||||
[discussion.discussions.main]
|
||||
git_commit = ""
|
||||
last_updated = "2026-02-23T23:25:47"
|
||||
last_updated = "2026-02-24T19:59:10"
|
||||
history = [
|
||||
"@2026-02-23T23:01:07\nUser:\nhey this is a test, plaase read temp-project.toml and do a random web search!",
|
||||
"@2026-02-23T23:01:10\nAI:\nI encountered an error trying to read the file `temp-project.toml`. It seems the file doesn't exist.\n\nFor the web search, I found a few interesting results for \"random search\":\n\n1. **The Useless Web:** A site that takes you to random, useless websites.\n2. **Random Number Generator - Calculator.net:** Information on how random number generators work.\n3. **Random Google Search Generator - Perchance:** A tool to create random Google search queries.\n4. **Random Picker - Vondy:** A tool to randomly select items from a list.\n5. **Wikipedia on Random Search:** An explanation of random search as an optimization method.",
|
||||
"@2026-02-23T23:01:29\nUser:\nmy bad temp_project.toml",
|
||||
"@2026-02-23T23:01:30\nAI:\nI'm sorry, but I still couldn't find the file `temp_project.toml`. Please double-check the filename and try again.",
|
||||
"@2026-02-23T23:01:52\nUser:\n./tests/temp_project.toml?",
|
||||
"@2026-02-23T23:01:53\nAI:\nOkay, I've successfully read the content of `./tests/temp_project.toml`. It appears to be a configuration file for a project, detailing settings for project name, Git directory, output directories, file paths, screenshot paths, agent tools, and discussion history.",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 0 Stress test entry 0 Stress test entry 0 Stress test entry 0 Stress test entry 0",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 1 Stress test entry 1 Stress test entry 1 Stress test entry 1 Stress test entry 1",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 2 Stress test entry 2 Stress test entry 2 Stress test entry 2 Stress test entry 2",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 3 Stress test entry 3 Stress test entry 3 Stress test entry 3 Stress test entry 3",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 4 Stress test entry 4 Stress test entry 4 Stress test entry 4 Stress test entry 4",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 5 Stress test entry 5 Stress test entry 5 Stress test entry 5 Stress test entry 5",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 6 Stress test entry 6 Stress test entry 6 Stress test entry 6 Stress test entry 6",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 7 Stress test entry 7 Stress test entry 7 Stress test entry 7 Stress test entry 7",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 8 Stress test entry 8 Stress test entry 8 Stress test entry 8 Stress test entry 8",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 9 Stress test entry 9 Stress test entry 9 Stress test entry 9 Stress test entry 9",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 10 Stress test entry 10 Stress test entry 10 Stress test entry 10 Stress test entry 10",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 11 Stress test entry 11 Stress test entry 11 Stress test entry 11 Stress test entry 11",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 12 Stress test entry 12 Stress test entry 12 Stress test entry 12 Stress test entry 12",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 13 Stress test entry 13 Stress test entry 13 Stress test entry 13 Stress test entry 13",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 14 Stress test entry 14 Stress test entry 14 Stress test entry 14 Stress test entry 14",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 15 Stress test entry 15 Stress test entry 15 Stress test entry 15 Stress test entry 15",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 16 Stress test entry 16 Stress test entry 16 Stress test entry 16 Stress test entry 16",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 17 Stress test entry 17 Stress test entry 17 Stress test entry 17 Stress test entry 17",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 18 Stress test entry 18 Stress test entry 18 Stress test entry 18 Stress test entry 18",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 19 Stress test entry 19 Stress test entry 19 Stress test entry 19 Stress test entry 19",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20 Stress test entry 20",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21 Stress test entry 21",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22 Stress test entry 22",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23 Stress test entry 23",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24 Stress test entry 24",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25 Stress test entry 25",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26 Stress test entry 26",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27 Stress test entry 27",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28 Stress test entry 28",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29 Stress test entry 29",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30 Stress test entry 30",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31 Stress test entry 31",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32 Stress test entry 32",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33 Stress test entry 33",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34 Stress test entry 34",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35 Stress test entry 35",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36 Stress test entry 36",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37 Stress test entry 37",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38 Stress test entry 38",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39 Stress test entry 39",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40 Stress test entry 40",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41 Stress test entry 41",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42 Stress test entry 42",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43 Stress test entry 43",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44 Stress test entry 44",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45 Stress test entry 45",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46 Stress test entry 46",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47 Stress test entry 47",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48 Stress test entry 48",
|
||||
"@1771981100.9238136\nUser:\nStress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49 Stress test entry 49",
|
||||
"@2026-02-24T19:58:27\nUser:\nHello! This is an automated test. Just say 'Acknowledged'.",
|
||||
"@2026-02-24T19:58:29\nAI:\nAcknowledged",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user