Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor GetExecutionSteps to include log directory handling and upda…
…te copilot CLI arguments
  • Loading branch information
pelikhan committed Sep 25, 2025
commit d8e13d720e21f1ba115f2611f28e919747ee79e6
7 changes: 5 additions & 2 deletions pkg/workflow/copilot_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import (
"fmt"
"path/filepath"
"sort"
"strings"
)
Expand Down Expand Up @@ -89,15 +90,17 @@
}
}

// TODO: handle logs folder
logDir := filepath.Dir(logFile)
// Build copilot CLI arguments based on configuration
var copilotArgs []string
copilotArgs = append(copilotArgs, "-p", "\"$INSTRUCTION\"")
var copilotArgs []string = []string{"--log-level", "debug", "--log-dir", logDir}

Check failure on line 96 in pkg/workflow/copilot_engine.go

View workflow job for this annotation

GitHub Actions / Lint Code

var-declaration: should omit type []string from declaration of var copilotArgs; it will be inferred from the right-hand side (revive)

Check failure on line 96 in pkg/workflow/copilot_engine.go

View workflow job for this annotation

GitHub Actions / Lint Code

var-declaration: should omit type []string from declaration of var copilotArgs; it will be inferred from the right-hand side (revive)

// Add model if specified (check if Copilot CLI supports this)
if workflowData.EngineConfig != nil && workflowData.EngineConfig.Model != "" {
copilotArgs = append(copilotArgs, "--model", workflowData.EngineConfig.Model)
}

copilotArgs = append(copilotArgs, "--prompt", "\"$INSTRUCTION\"")
command := fmt.Sprintf(`INSTRUCTION=$(cat /tmp/aw-prompts/prompt.txt)

# Run copilot CLI with log capture
Expand Down
Loading