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

Method processEnvCommand

cli/cli_commands.go:109–117  ·  view source on GitHub ↗

processEnvCommand adiciona as variáveis de ambiente ao contexto

(userInput string)

Source from the content-addressed store, hash-verified

107
108// processEnvCommand adiciona as variáveis de ambiente ao contexto
109func (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
119func (cli *ChatCLI) executeDirectCommand(command string) {
120 fmt.Println(i18n.T("command.executing"), command)

Callers 1

Calls 3

GetEnvVariablesSanitizedFunction · 0.92
TFunction · 0.92

Tested by

no test coverage detected