processEnvCommand adiciona as variáveis de ambiente ao contexto
(userInput string)
| 107 | |
| 108 | // processEnvCommand adiciona as variáveis de ambiente ao contexto |
| 109 | func (cli *ChatCLI) processEnvCommand(userInput string) (string, string) { |
| 110 | var additionalContext string |
| 111 | if strings.Contains(strings.ToLower(userInput), "@env") { |
| 112 | envData := utils.GetEnvVariablesSanitized() |
| 113 | additionalContext += "\n" + i18n.T("command.context.env_vars") + ":\n" + envData |
| 114 | userInput = removeCommandAndNormalizeSpaces(userInput, "@env") |
| 115 | } |
| 116 | return userInput, additionalContext |
| 117 | } |
| 118 | |
| 119 | func (cli *ChatCLI) executeDirectCommand(command string) { |
| 120 | fmt.Println(i18n.T("command.executing"), command) |
no test coverage detected