forked from bai/curriculum-project-hub
feat(hub): live TodoWrite checklist on Feishu agent cards
Always expose Claude Agent SDK TodoWrite (todoFeatureEnabled) so multi-step runs can plan in the open. Parse TodoWrite payloads into a progress panel on the streaming Feishu card (completed/in_progress/pending) and filter raw TodoWrite noise out of the tool-use list.
This commit is contained in:
@@ -113,8 +113,10 @@ describe("runAgent", () => {
|
||||
permissionMode: "bypassPermissions",
|
||||
allowDangerouslySkipPermissions: true,
|
||||
settingSources: [],
|
||||
settings: { disableBundledSkills: true },
|
||||
settings: { disableBundledSkills: true, todoFeatureEnabled: true },
|
||||
skills: [],
|
||||
tools: expect.arrayContaining(["TodoWrite"]),
|
||||
allowedTools: expect.arrayContaining(["TodoWrite"]),
|
||||
strictMcpConfig: true,
|
||||
sandbox: expect.objectContaining({
|
||||
enabled: true,
|
||||
@@ -183,8 +185,9 @@ describe("runAgent", () => {
|
||||
|
||||
expect(queryMock.mock.calls[0]?.[0]).toMatchObject({
|
||||
options: {
|
||||
tools: ["Read", "Bash"],
|
||||
allowedTools: ["Read", "Bash", "mcp__cph_hub__send_file"],
|
||||
tools: ["Read", "Bash", "TodoWrite"],
|
||||
allowedTools: ["Read", "Bash", "mcp__cph_hub__send_file", "TodoWrite"],
|
||||
settings: expect.objectContaining({ todoFeatureEnabled: true }),
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -205,8 +208,9 @@ describe("runAgent", () => {
|
||||
|
||||
expect(queryMock.mock.calls[0]?.[0]).toMatchObject({
|
||||
options: {
|
||||
tools: [],
|
||||
allowedTools: [],
|
||||
tools: ["TodoWrite"],
|
||||
allowedTools: ["TodoWrite"],
|
||||
settings: expect.objectContaining({ todoFeatureEnabled: true }),
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -234,9 +238,10 @@ describe("runAgent", () => {
|
||||
|
||||
expect(queryMock.mock.calls[0]?.[0]).toMatchObject({
|
||||
options: {
|
||||
tools: ["Skill"],
|
||||
tools: ["TodoWrite", "Skill"],
|
||||
plugins: [expect.objectContaining({ type: "local", skipMcpDiscovery: true })],
|
||||
skills: ["cph-runtime:typst"],
|
||||
settings: expect.objectContaining({ todoFeatureEnabled: true }),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user