File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const config: AgentConfig = {
1313 outputMode : 'json' ,
1414 includeMessageHistory : false ,
1515 toolNames : [ 'spawn_agents' , 'set_output' ] ,
16- subagents : [ `codebuff/ file-picker@ ${ version } ` ] ,
16+ subagents : [ `file-picker` ] ,
1717 inputSchema : {
1818 prompt : {
1919 description : 'What you need to accomplish by exploring the codebase' ,
Original file line number Diff line number Diff line change @@ -168,10 +168,13 @@ export const mainPrompt = async (
168168 throw new Error ( `Agent template not found for type: ${ agentType } ` )
169169 }
170170
171- // Update the main agent template with subagents from codebuff config or add all dynamic agents
172- const updatedSubagents =
173- fileContext . codebuffConfig ?. subagents ??
174- uniq ( [ ...mainAgentTemplate . subagents , ...availableAgents ] )
171+ let updatedSubagents = mainAgentTemplate . subagents
172+ if ( ! agentId ) {
173+ // If --agent is not specified, use the subagents from the codebuff config or add all local agents
174+ updatedSubagents =
175+ fileContext . codebuffConfig ?. subagents ??
176+ uniq ( [ ...mainAgentTemplate . subagents , ...availableAgents ] )
177+ }
175178 mainAgentTemplate . subagents = updatedSubagents
176179 localAgentTemplates [ agentType ] = mainAgentTemplate
177180
Original file line number Diff line number Diff line change @@ -55,12 +55,10 @@ async function codebuff({
5555
5656 // Only load local agents if no specific agent is requested
5757 const loadLocalAgentsPromise = new Promise < void > ( ( resolve ) => {
58- if ( ! agent ) {
59- loadLocalAgents ( { verbose : true } ) . then ( ( ) => {
60- const codebuffConfig = loadCodebuffConfig ( )
61- displayLoadedAgents ( codebuffConfig )
62- } )
63- }
58+ loadLocalAgents ( { verbose : true } ) . then ( ( ) => {
59+ const codebuffConfig = loadCodebuffConfig ( )
60+ displayLoadedAgents ( codebuffConfig )
61+ } )
6462 resolve ( )
6563 } )
6664
You can’t perform that action at this time.
0 commit comments