(
adapter: RuntimePlatform,
channelId: string,
fileOutputCallbackRef: { current: FileOutputCallback | null },
delegatedToolRunContextRef: DelegatedToolRunContextRef,
)
| 468 | } |
| 469 | |
| 470 | private async createCustomTools( |
| 471 | adapter: RuntimePlatform, |
| 472 | channelId: string, |
| 473 | fileOutputCallbackRef: { current: FileOutputCallback | null }, |
| 474 | delegatedToolRunContextRef: DelegatedToolRunContextRef, |
| 475 | ): Promise<any[]> { |
| 476 | const delegatedDefinitions = |
| 477 | await this.delegatedCustomToolClient.listDefinitions(); |
| 478 | const tools = [ |
| 479 | createSendFileTool(fileOutputCallbackRef) as any, |
| 480 | ...createDelegatedCustomTools( |
| 481 | delegatedDefinitions, |
| 482 | this.delegatedCustomToolClient, |
| 483 | delegatedToolRunContextRef, |
| 484 | ), |
| 485 | ]; |
| 486 | if (adapter !== "scheduler") { |
| 487 | tools.push( |
| 488 | createManageScheduleTool(this.schedulerRef, adapter, channelId) as any, |
| 489 | ); |
| 490 | } |
| 491 | return tools; |
| 492 | } |
| 493 | |
| 494 | /** |
| 495 | * Lazily create (or return existing) session for a channel. |
no test coverage detected