( agentBlock: AgentContentBlock, )
| 27 | } |
| 28 | |
| 29 | export function getAgentDisplayPrompt( |
| 30 | agentBlock: AgentContentBlock, |
| 31 | ): string | undefined { |
| 32 | const initialPrompt = agentBlock.initialPrompt?.trim() |
| 33 | if (initialPrompt) { |
| 34 | return initialPrompt |
| 35 | } |
| 36 | |
| 37 | if (getAgentBaseName(agentBlock.agentType) !== 'basher') { |
| 38 | return undefined |
| 39 | } |
| 40 | |
| 41 | const whatToSummarize = agentBlock.params?.what_to_summarize |
| 42 | return typeof whatToSummarize === 'string' && whatToSummarize.trim() |
| 43 | ? whatToSummarize.trim() |
| 44 | : undefined |
| 45 | } |
| 46 | |
| 47 | export function getBasherFinishedOutputPreview( |
| 48 | agentBlock: AgentContentBlock, |
no test coverage detected