(
sessionId: string,
taskId: string,
input?: { withOutput?: boolean; outputBytes?: number },
)
| 654 | } |
| 655 | |
| 656 | async getTask( |
| 657 | sessionId: string, |
| 658 | taskId: string, |
| 659 | input?: { withOutput?: boolean; outputBytes?: number }, |
| 660 | ): Promise<AppTask> { |
| 661 | const query: Record<string, string | number | boolean | undefined> = { |
| 662 | with_output: input?.withOutput, |
| 663 | output_bytes: input?.outputBytes, |
| 664 | }; |
| 665 | const data = await this.http.get<WireBackgroundTask>( |
| 666 | `/sessions/${encodeURIComponent(sessionId)}/tasks/${encodeURIComponent(taskId)}`, |
| 667 | query, |
| 668 | ); |
| 669 | return toAppTask(data); |
| 670 | } |
| 671 | |
| 672 | async cancelTask(sessionId: string, taskId: string): Promise<{ cancelled: true }> { |
| 673 | const data = await this.http.post<WireCancelResult>( |
nothing calls this directly
no test coverage detected