MCPcopy
hub / github.com/coder/mux / emitWorkspaceActivity

Method emitWorkspaceActivity

src/node/services/workspaceService.ts:2353–2364  ·  view source on GitHub ↗

* Public so AgentStatusService can broadcast a snapshot it produced after * a direct setX call. (Most callers use emitWorkspaceActivityUpdate, which * couples persist + emit but swallows persist errors.)

(
    workspaceId: string,
    snapshot: WorkspaceActivitySnapshot | null
  )

Source from the content-addressed store, hash-verified

2351 * couples persist + emit but swallows persist errors.)
2352 */
2353 public emitWorkspaceActivity(
2354 workspaceId: string,
2355 snapshot: WorkspaceActivitySnapshot | null
2356 ): void {
2357 this.emit("activity", {
2358 workspaceId,
2359 activity: this.mergeCachedActiveWorkflowRunCount(
2360 workspaceId,
2361 this.overlayPendingGoal(workspaceId, snapshot)
2362 ),
2363 });
2364 }
2365
2366 /**
2367 * Overlay the optimistic mid-stream goal onto an activity snapshot.

Callers 6

updateStreamingStatusMethod · 0.95
createCoreServicesFunction · 0.95
runForWorkspaceMethod · 0.80

Calls 3

emitMethod · 0.95
overlayPendingGoalMethod · 0.95

Tested by

no test coverage detected