fix(hub): render Feishu checklist from TaskCreate/TaskUpdate

Headless Claud agents expose TaskCreate/TaskUpdate rather than TodoWrite.
Fold those tool events into the live card checklist, pass real tool names
and inputs through tool-result, and hide Task* noise once the panel is up.
This commit is contained in:
2026-07-23 23:21:34 +08:00
parent 326224b778
commit 74f5c4a02e
6 changed files with 282 additions and 27 deletions
+10 -4
View File
@@ -59,11 +59,17 @@ function toolIcon(toolName: string): string {
function isTodoToolName(toolName: string): boolean {
const lower = toolName.toLowerCase();
const bare = lower.includes("__") ? (lower.split("__").pop() ?? lower) : lower;
const stripped = bare.replace(/_\d+$/, "");
return (
lower === "todowrite" ||
lower === "todo_write" ||
lower.endsWith("__todo_write") ||
lower.endsWith("__todowrite")
stripped === "todowrite" ||
stripped === "todo_write" ||
stripped === "taskcreate" ||
stripped === "taskupdate" ||
stripped === "tasklist" ||
stripped === "taskget" ||
stripped === "taskstop" ||
stripped === "taskoutput"
);
}