mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
change collaboration mode to struct (#9793)
Shouldn't cause behavioral change
This commit is contained in:
committed by
GitHub
Unverified
parent
1167465bf6
commit
69cfc73dc6
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user