MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getAgentDisplayPrompt

Function getAgentDisplayPrompt

cli/src/utils/agent-display.ts:29–45  ·  view source on GitHub ↗
(
  agentBlock: AgentContentBlock,
)

Source from the content-addressed store, hash-verified

27}
28
29export 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
47export function getBasherFinishedOutputPreview(
48 agentBlock: AgentContentBlock,

Callers 3

getCollapsedPreviewFunction · 0.90

Calls 1

getAgentBaseNameFunction · 0.90

Tested by

no test coverage detected