MCPcopy Index your code
hub / github.com/coder/mux / addWorkflowRunCardMessage

Function addWorkflowRunCardMessage

src/browser/utils/workflowRunMessages.ts:193–205  ·  view source on GitHub ↗
(
  workspaceId: string,
  input: WorkflowRunCardInput,
  result: WorkflowRunCardResult,
  options?: { existingMessage?: MuxMessage | null }
)

Source from the content-addressed store, hash-verified

191}
192
193export function addWorkflowRunCardMessage(
194 workspaceId: string,
195 input: WorkflowRunCardInput,
196 result: WorkflowRunCardResult,
197 options?: { existingMessage?: MuxMessage | null }
198): void {
199 assert(workspaceId.length > 0, "addWorkflowRunCardMessage: workspaceId is required");
200 const message = buildWorkflowRunCardMessage(input, result);
201 if (options?.existingMessage?.metadata != null) {
202 message.metadata = getWorkflowRunCardMetadata(options.existingMessage.metadata, result.runId);
203 }
204 addEphemeralMessage(workspaceId, message);
205}
206
207export function addWorkflowRunCardMessageForRun(
208 workspaceId: string,

Callers 1

Calls 4

addEphemeralMessageFunction · 0.90
assertFunction · 0.50

Tested by

no test coverage detected