mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
change collaboration mode to struct (#9793)
Shouldn't cause behavioral change
This commit is contained in:
1 parent
1167465bf6
commit
69cfc73dc6
16 files changed
+291
-210
No files matched your search
@@ -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