askUserIfInteractive pergunta se comando deve ser interativo
(cmd string, contextInfo agent.CommandContextInfo)
| 934 | |
| 935 | // askUserIfInteractive pergunta se comando deve ser interativo |
| 936 | func (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) |
| 947 | func (a *AgentMode) simulateCommandBlock(ctx context.Context, block agent.CommandBlock) { |
no test coverage detected