|
fn build_instructions(workflow: &Workflow, workspace_dir: &Path) -> Option<String> { |
|
if workflow.git.clone || workflow.git.worktree { |
|
let path = workspace_dir.to_string_lossy(); |
|
Some(format!( |
|
"All work is in: {}. Always run `cd {}` as your first action before any file or terminal operations. Reference all file paths relative to this directory.", |
|
path, path |
|
)) |
|
} else { |
|
None |
|
} |
|
} |
Currently we specify the same instructions field for the agent regardless of trigger type, and only if git.clone/git.workspace are enabled. As shown in #171 this can be problematic, and may not apply for some triggers.
We should refactor this is use trigger-specific values. Further investigation is required to determine what instructions should be used for which triggers.
yoke/src/runner.rs
Lines 55 to 65 in dc47167
Currently we specify the same
instructionsfield for the agent regardless of trigger type, and only if git.clone/git.workspace are enabled. As shown in #171 this can be problematic, and may not apply for some triggers.We should refactor this is use trigger-specific values. Further investigation is required to determine what instructions should be used for which triggers.