claude-evolve 1.8.10 → 1.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/claude-evolve-autostatus +34 -22
- package/package.json +1 -1
|
@@ -226,39 +226,42 @@ class AutoStatus:
|
|
|
226
226
|
try:
|
|
227
227
|
data = self.get_status_data()
|
|
228
228
|
except Exception as e:
|
|
229
|
-
self.display.clear_screen()
|
|
230
229
|
self.display.move_cursor(1, 1)
|
|
230
|
+
self.display.clear_line()
|
|
231
231
|
print(f"Error reading status: {e}")
|
|
232
232
|
return
|
|
233
|
-
|
|
234
|
-
#
|
|
235
|
-
self.display.
|
|
233
|
+
|
|
234
|
+
# Move to top and start rendering (no full clear to avoid flicker)
|
|
235
|
+
self.display.move_cursor(1, 1)
|
|
236
236
|
row = 1
|
|
237
237
|
|
|
238
238
|
# Header
|
|
239
239
|
self.display.move_cursor(row, 1)
|
|
240
|
+
self.display.clear_line()
|
|
240
241
|
header = "Claude Evolution Auto-Status"
|
|
241
|
-
print(f"\033[1;36m{header.center(self.display.cols)}\033[0m")
|
|
242
|
+
print(f"\033[1;36m{header.center(self.display.cols)}\033[0m", end="")
|
|
242
243
|
row += 1
|
|
243
|
-
|
|
244
|
+
|
|
244
245
|
# Timestamp and working dir
|
|
245
246
|
self.display.move_cursor(row, 1)
|
|
247
|
+
self.display.clear_line()
|
|
246
248
|
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
247
249
|
working_dir = os.path.basename(data["working_dir"])
|
|
248
|
-
print(f"Last updated: {timestamp} | Working dir: {working_dir} | Press '\''q'\'' to quit")
|
|
250
|
+
print(f"Last updated: {timestamp} | Working dir: {working_dir} | Press '\''q'\'' to quit", end="")
|
|
249
251
|
row += 2
|
|
250
|
-
|
|
252
|
+
|
|
251
253
|
# Leader
|
|
252
254
|
self.display.move_cursor(row, 1)
|
|
255
|
+
self.display.clear_line()
|
|
253
256
|
if data["leader"]:
|
|
254
257
|
leader_id, leader_desc, leader_score = data["leader"]
|
|
255
258
|
# Truncate description for leader
|
|
256
259
|
max_desc_len = self.display.cols - 30
|
|
257
260
|
if len(leader_desc) > max_desc_len:
|
|
258
261
|
leader_desc = leader_desc[:max_desc_len-3] + "..."
|
|
259
|
-
print(f"\033[1;32mLeader:\033[0m {leader_id} | {leader_score:.4f} | {leader_desc}")
|
|
262
|
+
print(f"\033[1;32mLeader:\033[0m {leader_id} | {leader_score:.4f} | {leader_desc}", end="")
|
|
260
263
|
else:
|
|
261
|
-
print("\033[1;32mLeader:\033[0m None (no completed candidates)")
|
|
264
|
+
print("\033[1;32mLeader:\033[0m None (no completed candidates)", end="")
|
|
262
265
|
row += 2
|
|
263
266
|
|
|
264
267
|
# Generation table
|
|
@@ -266,14 +269,16 @@ class AutoStatus:
|
|
|
266
269
|
if generations:
|
|
267
270
|
# Table header
|
|
268
271
|
self.display.move_cursor(row, 1)
|
|
272
|
+
self.display.clear_line()
|
|
269
273
|
header_fmt = "{:<10} | {:^25} | {:>10} | {:>8} | {}".format(
|
|
270
274
|
"Generation", "Stats (p/c/f/r/s)", "Top ID", "Score", "Description"
|
|
271
275
|
)
|
|
272
|
-
print("\033[1m" + header_fmt[:self.display.cols] + "\033[0m")
|
|
276
|
+
print("\033[1m" + header_fmt[:self.display.cols] + "\033[0m", end="")
|
|
273
277
|
row += 1
|
|
274
|
-
|
|
278
|
+
|
|
275
279
|
self.display.move_cursor(row, 1)
|
|
276
|
-
|
|
280
|
+
self.display.clear_line()
|
|
281
|
+
print("-" * min(self.display.cols, len(header_fmt)), end="")
|
|
277
282
|
row += 1
|
|
278
283
|
# Sort generations numerically by extracting the number after "gen"
|
|
279
284
|
# Put baseline first, then sort numerically
|
|
@@ -299,21 +304,22 @@ class AutoStatus:
|
|
|
299
304
|
for gen in sorted_gens[start_idx:]:
|
|
300
305
|
if row >= self.display.rows - 1:
|
|
301
306
|
break
|
|
302
|
-
|
|
307
|
+
|
|
303
308
|
gen_data = generations[gen]
|
|
304
309
|
stats_str = f"{gen_data['\''pending'\'']}/{gen_data['\''complete'\'']}/{gen_data['\''failed'\'']}/{gen_data['\''running'\'']}"
|
|
305
310
|
if gen_data['\''skipped'\''] > 0:
|
|
306
311
|
stats_str += f"/{gen_data['\''skipped'\'']}"
|
|
307
|
-
|
|
312
|
+
|
|
308
313
|
self.display.move_cursor(row, 1)
|
|
309
|
-
|
|
314
|
+
self.display.clear_line()
|
|
315
|
+
|
|
310
316
|
if gen_data["best"]:
|
|
311
317
|
best_id, best_desc, best_score = gen_data["best"]
|
|
312
318
|
# Truncate description
|
|
313
319
|
max_desc_len = self.display.cols - 55
|
|
314
320
|
if len(best_desc) > max_desc_len:
|
|
315
321
|
best_desc = best_desc[:max_desc_len-3] + "..."
|
|
316
|
-
|
|
322
|
+
|
|
317
323
|
# Highlight if this is the overall leader
|
|
318
324
|
if data["leader"] and best_id == data["leader"][0]:
|
|
319
325
|
line = "{:<10} | {:^25} | \033[32m{:>10}\033[0m | {:>8.4f} | {}".format(
|
|
@@ -327,10 +333,16 @@ class AutoStatus:
|
|
|
327
333
|
line = "{:<10} | {:^25} | {:>10} | {:>8} | {}".format(
|
|
328
334
|
gen, stats_str, "-", "-", "No completed candidates"
|
|
329
335
|
)
|
|
330
|
-
|
|
331
|
-
print(line[:self.display.cols])
|
|
336
|
+
|
|
337
|
+
print(line[:self.display.cols], end="")
|
|
332
338
|
row += 1
|
|
333
|
-
|
|
339
|
+
|
|
340
|
+
# Clear any remaining lines from previous render
|
|
341
|
+
while row < self.display.rows:
|
|
342
|
+
self.display.move_cursor(row, 1)
|
|
343
|
+
self.display.clear_line()
|
|
344
|
+
row += 1
|
|
345
|
+
|
|
334
346
|
# Ensure cursor is at bottom
|
|
335
347
|
self.display.move_cursor(self.display.rows, 1)
|
|
336
348
|
sys.stdout.flush()
|
|
@@ -366,8 +378,8 @@ class AutoStatus:
|
|
|
366
378
|
sys.stdout.flush()
|
|
367
379
|
time.sleep(2) # Give time to read error
|
|
368
380
|
|
|
369
|
-
# Check for input and wait
|
|
370
|
-
for _ in range(
|
|
381
|
+
# Check for input and wait (update every 5 seconds)
|
|
382
|
+
for _ in range(50): # Check 50 times over 5 seconds
|
|
371
383
|
if self.check_input():
|
|
372
384
|
break
|
|
373
385
|
time.sleep(0.1)
|