MCPcopy Create free account
hub / github.com/github/gh-aw / resolveCopilotCommand

Method resolveCopilotCommand

pkg/workflow/copilot_engine_execution.go:287–302  ·  view source on GitHub ↗
(workflowData *WorkflowData, sandboxEnabled bool)

Source from the content-addressed store, hash-verified

285}
286
287func (e *CopilotEngine) resolveCopilotCommand(workflowData *WorkflowData, sandboxEnabled bool) (string, string) {
288 if workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" {
289 copilotExecLog.Printf("Using serialized custom command script: %s", customEngineCommandScriptPath)
290 return customEngineCommandScriptPath, buildEngineCommandScriptSetup(workflowData.EngineConfig.Command)
291 }
292 if sandboxEnabled {
293 if isArcDindTopology(workflowData) {
294 return constants.GhAwRootDirShell + "/bin/copilot", ""
295 }
296 // AWF - use the installed binary directly
297 // The binary is mounted into the AWF container from /usr/local/bin/copilot
298 return constants.CopilotBinaryPath, ""
299 }
300 // Non-sandbox mode: use standard copilot command
301 return "copilot", ""
302}
303
304func (e *CopilotEngine) buildCopilotExecPrefix(workflowData *WorkflowData, commandName string) string {
305 // Build the command - model is always passed via COPILOT_MODEL env var (see env block below).

Callers 1

GetExecutionStepsMethod · 0.95

Calls 3

isArcDindTopologyFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected