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

Method askUserIfInteractive

cli/agent_command_blocks.go:936–944  ·  view source on GitHub ↗

askUserIfInteractive pergunta se comando deve ser interativo

(cmd string, contextInfo agent.CommandContextInfo)

Source from the content-addressed store, hash-verified

934
935// askUserIfInteractive pergunta se comando deve ser interativo
936func (a *AgentMode) askUserIfInteractive(cmd string, contextInfo agent.CommandContextInfo) bool {
937 if contextInfo.SourceType == agent.SourceTypeFile && hasCodeStructures(cmd) {
938 return false
939 }
940
941 prompt := fmt.Sprintf(i18n.T("agent.status.interactive_confirm", cmd), cmd)
942 response := a.getCriticalInput(prompt)
943 return strings.HasPrefix(strings.ToLower(response), "s") || strings.HasPrefix(strings.ToLower(response), "y")
944}
945
946// simulateCommandBlock simula execução (dry-run)
947func (a *AgentMode) simulateCommandBlock(ctx context.Context, block agent.CommandBlock) {

Callers 1

runSingleCommandMethod · 0.95

Calls 3

getCriticalInputMethod · 0.95
TFunction · 0.92
hasCodeStructuresFunction · 0.85

Tested by

no test coverage detected