@@ -386,17 +386,16 @@ impl SessionService {
386386 project_labels : Vec < String > ,
387387 repo_ref : RepoRef ,
388388 root_directory : String ,
389+ tools : Vec < ToolType > ,
389390 tool_box : Arc < ToolBox > ,
390391 llm_broker : Arc < LLMBroker > ,
391392 user_context : UserContext ,
392393 aide_rules : Option < String > ,
393394 reasoning : bool ,
394395 running_in_editor : bool ,
395- semantic_search : bool ,
396396 mcts_log_directory : Option < String > ,
397397 repo_name : Option < String > ,
398398 message_properties : SymbolEventMessageProperties ,
399- is_devtools_context : bool ,
400399 context_crunching_llm : Option < LLMProperties > ,
401400 ) -> Result < ( ) , SymbolError > {
402401 println ! ( "session_service::tool_use_agentic::start" ) ;
@@ -420,45 +419,7 @@ impl SessionService {
420419 // always update the tools over here, no matter what the session had before
421420 // this is essential because the same session might be crossing over from
422421 // a chat or edit
423- . set_tools (
424- vec ! [
425- ToolType :: ListFiles ,
426- ToolType :: SearchFileContentWithRegex ,
427- ToolType :: OpenFile ,
428- ToolType :: CodeEditing ,
429- ToolType :: AttemptCompletion ,
430- ToolType :: RepoMapGeneration ,
431- ToolType :: TerminalCommand ,
432- ToolType :: FindFiles ,
433- // remove this later
434- // ToolType::SemanticSearch,
435- ]
436- . into_iter ( )
437- . chain ( tool_box. mcp_tools ( ) . iter ( ) . cloned ( ) )
438- . chain ( if is_devtools_context {
439- vec ! [ ToolType :: RequestScreenshot ]
440- } else {
441- vec ! [ ]
442- } )
443- . into_iter ( )
444- . chain ( if running_in_editor {
445- // these tools are only availabe inside the editor
446- // they are not available on the agent-farm yet
447- vec ! [
448- ToolType :: LSPDiagnostics ,
449- // disable for testing
450- ToolType :: AskFollowupQuestions ,
451- ]
452- } else {
453- vec ! [ ]
454- } )
455- . chain ( if semantic_search {
456- vec ! [ ToolType :: SemanticSearch ]
457- } else {
458- vec ! [ ]
459- } )
460- . collect ( ) ,
461- ) ;
422+ . set_tools ( tools) ;
462423
463424 // truncate hidden messages
464425 session. truncate_hidden_exchanges ( ) ;
@@ -586,7 +547,6 @@ impl SessionService {
586547 shell. to_owned ( ) ,
587548 user_context. clone ( ) ,
588549 running_in_editor,
589- reasoning,
590550 mcts_log_directory. clone ( ) ,
591551 tool_box. clone ( ) ,
592552 tool_agent. clone ( ) ,
@@ -609,7 +569,6 @@ impl SessionService {
609569 shell. to_owned ( ) ,
610570 user_context. clone ( ) ,
611571 running_in_editor,
612- reasoning,
613572 mcts_log_directory,
614573 tool_box,
615574 tool_agent,
@@ -632,9 +591,6 @@ impl SessionService {
632591 shell : String ,
633592 user_context : UserContext ,
634593 running_in_editor : bool ,
635- // reasoning is passed so we can short circuit the loop early on when
636- // the agent has been going over context etc
637- _reasoning : bool ,
638594 mcts_log_directory : Option < String > ,
639595 tool_box : Arc < ToolBox > ,
640596 tool_agent : ToolUseAgent ,
@@ -1214,13 +1170,12 @@ impl SessionService {
12141170 // Trim the content to handle any potential trailing whitespace
12151171 let trimmed_content = content. trim ( ) ;
12161172
1217- let session: Session = serde_json:: from_str ( trimmed_content)
1218- . map_err ( |e| {
1219- SymbolError :: IOError ( std:: io:: Error :: new (
1220- std:: io:: ErrorKind :: InvalidData ,
1221- format ! ( "Error deserializing session: {}: {}" , storage_path, e) ,
1222- ) )
1223- } ) ?;
1173+ let session: Session = serde_json:: from_str ( trimmed_content) . map_err ( |e| {
1174+ SymbolError :: IOError ( std:: io:: Error :: new (
1175+ std:: io:: ErrorKind :: InvalidData ,
1176+ format ! ( "Error deserializing session: {}: {}" , storage_path, e) ,
1177+ ) )
1178+ } ) ?;
12241179
12251180 Ok ( session)
12261181 }
@@ -1424,4 +1379,4 @@ pub enum TestGenerateCompletion {
14241379 LLMChoseToFinish ( String ) ,
14251380 /// Hit the maximum iteration limit (lower confidence)
14261381 HitIterationLimit ( String ) ,
1427- }
1382+ }
0 commit comments