Skip to content

Use api.config?.pythonPath in grok_agent_plugin.ts instead of hardcoded python3#21

Merged
KHAEntertainment merged 2 commits intoclaude/review-open-issues-RBCujfrom
copilot/sub-pr-17-another-one
Mar 21, 2026
Merged

Use api.config?.pythonPath in grok_agent_plugin.ts instead of hardcoded python3#21
KHAEntertainment merged 2 commits intoclaude/review-open-issues-RBCujfrom
copilot/sub-pr-17-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

grok_agent_plugin.ts hardcoded spawn("python3", ...), breaking environments that use a venv or non-standard Python path — unlike grok_swarm in index.ts, which already respects api.config?.pythonPath.

Changes

  • src/plugin/grok_agent_plugin.ts
    • Add DEFAULT_PYTHON constant pointing to skills/grok-refactor/.venv/bin/python3 (same venv default as index.ts)
    • Resolve Python executable via api.config?.pythonPath || DEFAULT_PYTHON before spawning
// Before
const child = spawn("python3", args, { ... });

// After
const DEFAULT_PYTHON = join(PLUGIN_ROOT, "skills", "grok-refactor", ".venv", "bin", "python3");
// ...
const pythonPath = api.config?.pythonPath || DEFAULT_PYTHON;
const child = spawn(pythonPath, args, { ... });

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…rdcoded python3

Co-authored-by: KHAEntertainment <43256680+KHAEntertainment@users.noreply.github.com>
Agent-Logs-Url: https://github.com/KHAEntertainment/grok-multiagent-plugin/sessions/aa43e519-f955-4eac-ab29-27a12839c43c
Copilot AI changed the title [WIP] [WIP] Address feedback from review for issue fixes in #14, #12, #11, #16 Use api.config?.pythonPath in grok_agent_plugin.ts instead of hardcoded python3 Mar 21, 2026
Copilot AI requested a review from KHAEntertainment March 21, 2026 05:38
@KHAEntertainment KHAEntertainment marked this pull request as ready for review March 21, 2026 05:39
@KHAEntertainment KHAEntertainment merged commit 422169d into claude/review-open-issues-RBCuj Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants