mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-05-07 00:36:18 +08:00
Fix: Sort task JSON files numerically instead of lexicographically
This commit is contained in:
@@ -112,7 +112,11 @@ class TaskManager:
|
||||
|
||||
def list_all(self) -> str:
|
||||
tasks = []
|
||||
for f in sorted(self.dir.glob("task_*.json")):
|
||||
files = sorted(
|
||||
self.dir.glob("task_*.json"),
|
||||
key=lambda f: int(f.stem.split("_")[-1])
|
||||
)
|
||||
for f in files:
|
||||
tasks.append(json.loads(f.read_text()))
|
||||
if not tasks:
|
||||
return "No tasks."
|
||||
|
||||
Reference in New Issue
Block a user