Files
Elydora-Go-SDK/cmd/elydora/plugins/grok_command.go
T
雷电芽衣 34ff4c1ea8 chore(go): audit providers kimi grok qwen letta
Move Kimi, Grok, and Qwen onto managed_runtime.go and shell_command.go;
share the encoded and shell command builders and the quoted Windows
legacy parser with Droid; split managed_changes.go; dedupe Letta's hook
entry filtering and stop swallowing settings read errors.

Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
2026-09-03 02:16:58 -04:00

22 lines
583 B
Go

package plugins
import "path/filepath"
func parseGrokCommand(command string) (string, string, bool) {
if runtimePath, scriptPath, ok := parseEncodedCommand(command); ok {
return runtimePath, scriptPath, true
}
return parseQuotedWindowsCommand(command)
}
func grokRuntimeReferenceForCommand(
command string,
scriptName string,
) (*managedScriptReference, error) {
runtimePath, scriptPath, ok := parseGrokCommand(command)
if !ok || !filepath.IsAbs(runtimePath) || !isNodeExecutable(runtimePath) {
return nil, nil
}
return resolveManagedScript(scriptPath, scriptName)
}