MCPcopy Create free account
hub / github.com/altic-dev/Pilot / update

Method update

src/lib/progress-store.ts:44–67  ·  view source on GitHub ↗
(id: string, message: string, type: "info" | "success" | "error" = "info")

Source from the content-addressed store, hash-verified

42 }
43
44 update(id: string, message: string, type: "info" | "success" | "error" = "info"): void {
45 const execution = this.executions.get(id);
46 if (!execution) {
47 console.warn(`No execution found for id: ${id}`);
48 return;
49 }
50
51 const lastMessage = execution.messages[execution.messages.length - 1];
52
53 if (lastMessage && lastMessage.message === message && lastMessage.type === type) {
54 return;
55 }
56
57 const progressMessage: ProgressMessage = {
58 timestamp: new Date().toISOString(),
59 message,
60 type,
61 };
62
63 execution.messages.push(progressMessage);
64
65 // Notify all subscribers
66 execution.subscribers.forEach((callback) => callback(progressMessage));
67 }
68
69 complete(id: string, success: boolean = true): void {
70 const execution = this.executions.get(id);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected