(
workspaceId: string,
threadId: string,
text: string,
options?: {
model?: string | null;
effort?: string | null;
serviceTier?: "fast" | "flex" | null | undefined;
accessMode?: "read-only" | "current" | "full-access";
images?: string[];
collaborationMode?: Record<string, unknown> | null;
appMentions?: AppMention[];
},
)
| 446 | } |
| 447 | |
| 448 | export async function sendUserMessage( |
| 449 | workspaceId: string, |
| 450 | threadId: string, |
| 451 | text: string, |
| 452 | options?: { |
| 453 | model?: string | null; |
| 454 | effort?: string | null; |
| 455 | serviceTier?: "fast" | "flex" | null | undefined; |
| 456 | accessMode?: "read-only" | "current" | "full-access"; |
| 457 | images?: string[]; |
| 458 | collaborationMode?: Record<string, unknown> | null; |
| 459 | appMentions?: AppMention[]; |
| 460 | }, |
| 461 | ) { |
| 462 | const images = await normalizeImagesForRpc(options?.images); |
| 463 | const payload: Record<string, unknown> = { |
| 464 | workspaceId, |
| 465 | threadId, |
| 466 | text, |
| 467 | model: options?.model ?? null, |
| 468 | effort: options?.effort ?? null, |
| 469 | accessMode: options?.accessMode ?? null, |
| 470 | images, |
| 471 | }; |
| 472 | if (options?.serviceTier !== undefined) { |
| 473 | payload.serviceTier = options.serviceTier; |
| 474 | } |
| 475 | if (options?.collaborationMode) { |
| 476 | payload.collaborationMode = options.collaborationMode; |
| 477 | } |
| 478 | if (options?.appMentions && options.appMentions.length > 0) { |
| 479 | payload.appMentions = options.appMentions; |
| 480 | } |
| 481 | return invoke("send_user_message", payload); |
| 482 | } |
| 483 | |
| 484 | export async function interruptTurn( |
| 485 | workspaceId: string, |
no test coverage detected