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

Method buildCopilotBaseArgs

pkg/workflow/copilot_engine_execution.go:208–220  ·  view source on GitHub ↗
(sandboxEnabled bool)

Source from the content-addressed store, hash-verified

206}
207
208func (e *CopilotEngine) buildCopilotBaseArgs(sandboxEnabled bool) []string {
209 if sandboxEnabled {
210 // Simplified args for sandbox mode (AWF)
211 copilotExecLog.Print("Added workspace directory to --add-dir")
212 copilotExecLog.Print("Using firewall mode with simplified arguments")
213 // Note: --add-dir "${GITHUB_WORKSPACE}" is appended raw after shellJoinArgs below
214 // to allow shell variable expansion (cannot go through shellEscapeArg).
215 return []string{"--add-dir", constants.TmpGhAwDirSlash, "--log-level", "all", "--log-dir", logsFolder}
216 }
217 // Original args for non-sandbox mode
218 copilotExecLog.Print("Using standard mode with full arguments")
219 return []string{"--add-dir", "/tmp/", "--add-dir", constants.TmpGhAwDirSlash, "--add-dir", constants.TmpGhAwAgentDir, "--log-level", "all", "--log-dir", logsFolder}
220}
221
222func (e *CopilotEngine) buildCopilotFeatureArgs(workflowData *WorkflowData, copilotArgs []string) []string {
223 // Add tool permission arguments based on configuration

Callers 1

buildCopilotArgsMethod · 0.95

Calls 1

PrintMethod · 0.80

Tested by

no test coverage detected