change collaboration mode to struct (#9793)

Shouldn't cause behavioral change
This commit is contained in:
Ahmed Ibrahim
2026-01-23 17:00:23 -08:00
committed by GitHub
parent 1167465bf6
commit 69cfc73dc6
16 changed files with 291 additions and 210 deletions

View File

@@ -263,13 +263,8 @@ impl DeveloperInstructions {
/// Returns developer instructions from a collaboration mode if they exist and are non-empty.
pub fn from_collaboration_mode(collaboration_mode: &CollaborationMode) -> Option<Self> {
let settings = match collaboration_mode {
CollaborationMode::Plan(settings)
| CollaborationMode::PairProgramming(settings)
| CollaborationMode::Execute(settings)
| CollaborationMode::Custom(settings) => settings,
};
settings
collaboration_mode
.settings
.developer_instructions
.as_ref()
.filter(|instructions| !instructions.is_empty())