MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / emitUpdate

Function emitUpdate

src/app/service/agent/core/tools/task_tools.ts:87–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86 // 持久化并推送事件
87 const emitUpdate = async () => {
88 const taskList = Array.from(tasks.values());
89 if (options?.onSave) {
90 await options.onSave(taskList);
91 }
92 if (options?.sendEvent) {
93 options.sendEvent({
94 type: "task_update",
95 tasks: taskList.map((t) => ({
96 id: t.id,
97 subject: t.subject,
98 status: t.status,
99 description: t.description,
100 })),
101 });
102 }
103 };
104
105 const createExecutor: ToolExecutor = {
106 execute: async (args: Record<string, unknown>) => {

Callers 1

createTaskToolsFunction · 0.85

Calls 1

sendEventMethod · 0.45

Tested by

no test coverage detected