(type: string)
| 112 | |
| 113 | /** An agent block whose `tools` tool-input holds a KB tool with a nested `knowledgeBaseId` param. */ |
| 114 | const agentToolConfig = (type: string): BlockConfig => { |
| 115 | if (type === 'agent') return blockWith([{ id: 'tools', title: 'Tools', type: 'tool-input' }]) |
| 116 | if (type === 'kbtool') |
| 117 | return blockWith([{ id: 'knowledgeBaseId', title: 'KB', type: 'knowledge-base-selector' }]) |
| 118 | return undefined as unknown as BlockConfig |
| 119 | } |
| 120 | |
| 121 | /** A deployment-version state whose agent block references `kbId` inside a tool-input tool param. */ |
| 122 | const agentVersionState = (kbId: string) => ({ |
no test coverage detected