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

Method getMultilineInput

cli/agent_command_blocks.go:297–317  ·  view source on GitHub ↗

getMultilineInput obtém entrada de múltiplas linhas. Uses the centralized stdin reader when active.

(promptStr string)

Source from the content-addressed store, hash-verified

295// getMultilineInput obtém entrada de múltiplas linhas.
296// Uses the centralized stdin reader when active.
297func (a *AgentMode) getMultilineInput(promptStr string) string {
298 fmt.Print(promptStr)
299 fmt.Println(i18n.T("agent.multiline_input_tip"))
300
301 // Enable bracketed paste mode for paste detection
302 if runtime.GOOS != "windows" || os.Getenv("WT_SESSION") != "" {
303 _, _ = os.Stdout.WriteString("\x1b[?2004h")
304 defer func() { _, _ = os.Stdout.WriteString("\x1b[?2004l") }()
305 }
306
307 var lines []string
308 for {
309 line := a.readLine()
310 if line == "." {
311 break
312 }
313 lines = append(lines, line)
314 }
315
316 return strings.Join(lines, "\n")
317}
318
319// handleCommandBlocks processa blocos de comandos com UI refinada
320func (a *AgentMode) handleCommandBlocks(ctx context.Context, blocks []CommandBlock) {

Callers 2

cmdAddContextContinueMethod · 0.95
cmdPreContextMethod · 0.95

Calls 2

readLineMethod · 0.95
TFunction · 0.92

Tested by

no test coverage detected