(params: unknown)
| 353 | } |
| 354 | |
| 355 | function createActionEventParams(params: unknown): OpenADEActionEventCreateRequest { |
| 356 | const record = asRecord(params) |
| 357 | const userInput = stringParam(record, "userInput") |
| 358 | if (userInput.length > 200_000) throw new Error("userInput is too long") |
| 359 | return { |
| 360 | taskId: stringParam(record, "taskId"), |
| 361 | userInput, |
| 362 | executionId: stringParam(record, "executionId"), |
| 363 | harnessId: stringParam(record, "harnessId"), |
| 364 | source: actionSourceParam(record.source), |
| 365 | eventId: optionalStringParam(record, "eventId"), |
| 366 | createdAt: optionalStringParam(record, "createdAt"), |
| 367 | images: Array.isArray(record.images) ? record.images : undefined, |
| 368 | includesCommentIds: stringArrayParam(record, "includesCommentIds"), |
| 369 | modelId: optionalStringParam(record, "modelId"), |
| 370 | fastMode: booleanParam(record, "fastMode"), |
| 371 | gitRefsBefore: gitRefsParam(record.gitRefsBefore), |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | function appendActionStreamEventParams(params: unknown): OpenADEActionStreamAppendRequest { |
| 376 | const record = asRecord(params) |
no test coverage detected