@@ -92,6 +92,7 @@ pub struct SessionBuilderConfig {
9292 pub streamable_http_extensions : Vec < StreamableHttpOptions > ,
9393 /// List of builtin extension commands to add
9494 pub builtins : Vec < String > ,
95+ pub no_profile : bool ,
9596 /// Recipe for the session
9697 pub recipe : Option < Recipe > ,
9798 /// Any additional system prompt to append to the default
@@ -130,6 +131,7 @@ impl Default for SessionBuilderConfig {
130131 extensions : Vec :: new ( ) ,
131132 streamable_http_extensions : Vec :: new ( ) ,
132133 builtins : Vec :: new ( ) ,
134+ no_profile : false ,
133135 recipe : None ,
134136 additional_system_prompt : None ,
135137 provider : None ,
@@ -529,6 +531,8 @@ pub async fn build_session(session_config: SessionBuilderConfig) -> CliSession {
529531 . and_then ( |s| EnabledExtensionsState :: from_extension_data ( & s. extension_data ) )
530532 . map ( |state| state. extensions )
531533 . unwrap_or_else ( get_enabled_extensions)
534+ } else if session_config. no_profile {
535+ Vec :: new ( )
532536 } else {
533537 resolve_extensions_for_new_session ( recipe. and_then ( |r| r. extensions . as_deref ( ) ) , None )
534538 } ;
@@ -636,6 +640,7 @@ mod tests {
636640 timeout: goose:: config:: DEFAULT_EXTENSION_TIMEOUT ,
637641 } ] ,
638642 builtins : vec ! [ "developer" . to_string( ) ] ,
643+ no_profile : false ,
639644 recipe : None ,
640645 additional_system_prompt : Some ( "Test prompt" . to_string ( ) ) ,
641646 provider : None ,
@@ -671,6 +676,7 @@ mod tests {
671676 assert ! ( config. extensions. is_empty( ) ) ;
672677 assert ! ( config. streamable_http_extensions. is_empty( ) ) ;
673678 assert ! ( config. builtins. is_empty( ) ) ;
679+ assert ! ( !config. no_profile) ;
674680 assert ! ( config. recipe. is_none( ) ) ;
675681 assert ! ( config. additional_system_prompt. is_none( ) ) ;
676682 assert ! ( !config. debug) ;
0 commit comments