MCPcopy Create free account
hub / github.com/diillson/chatcli / displayResponseWithoutCommands

Method displayResponseWithoutCommands

cli/agent_command_blocks.go:280–293  ·  view source on GitHub ↗

displayResponseWithoutCommands exibe resposta sem os blocos de comando

(response string, blocks []CommandBlock)

Source from the content-addressed store, hash-verified

278
279// displayResponseWithoutCommands exibe resposta sem os blocos de comando
280func (a *AgentMode) displayResponseWithoutCommands(response string, blocks []CommandBlock) {
281 displayResponse := response
282 for i, block := range blocks {
283 originalBlock := fmt.Sprintf("```execute:%s\n%s```",
284 block.Language,
285 strings.Join(block.Commands, "\n"))
286
287 replacement := fmt.Sprintf("\n[Comando #%d: %s]\n", i+1, block.Description)
288 displayResponse = strings.Replace(displayResponse, originalBlock, replacement, 1)
289 }
290
291 renderedResponse := a.cli.renderMarkdown(displayResponse)
292 a.cli.typewriterEffect(fmt.Sprintf("\n%s:\n%s\n", a.cli.Client.GetModelName(), renderedResponse), 2*time.Millisecond)
293}
294
295// getMultilineInput obtém entrada de múltiplas linhas.
296// Uses the centralized stdin reader when active.

Callers 1

RunOnceMethod · 0.95

Calls 3

renderMarkdownMethod · 0.80
typewriterEffectMethod · 0.80
GetModelNameMethod · 0.65

Tested by

no test coverage detected