File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- import { AgentConfig } from './types/agent-config'
1+ import type { AgentConfig } from './types/agent-config'
22
33const config : AgentConfig = {
44 id : 'brainstormer' ,
Original file line number Diff line number Diff line change @@ -37,13 +37,14 @@ export async function loadLocalAgents({
3737 let agentConfig : any
3838 let agentModule : any
3939 try {
40- agentModule = await import ( fullPath )
40+ agentModule = await require ( fullPath )
4141 } catch ( error : any ) {
4242 if ( verbose ) {
4343 console . error ( 'Error importing agent:' , error )
4444 }
4545 continue
4646 }
47+ delete require . cache [ fullPath ]
4748
4849 try {
4950 agentConfig = agentModule . default
Original file line number Diff line number Diff line change @@ -552,8 +552,7 @@ export class CLI {
552552
553553 // If a user prompt is provided, send it immediately
554554 if ( userPrompt ) {
555- const { responsePromise } = await client . sendUserInput ( userPrompt )
556- await responsePromise
555+ await this . forwardUserInput ( userPrompt )
557556 }
558557 }
559558
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ import {
5050import { match , P } from 'ts-pattern'
5151import { z } from 'zod'
5252
53- import { getLoadedAgentNames } from './agents/load-agents'
53+ import { getLoadedAgentNames , loadLocalAgents } from './agents/load-agents'
5454import { getBackgroundProcessUpdates } from './background-process-manager'
5555import { activeBrowserRunner } from './browser-runner'
5656import { setMessages } from './chat-storage'
@@ -976,6 +976,7 @@ export class Client {
976976 loadCodebuffConfig ( ) . maxAgentSteps
977977
978978 this . sessionState . fileContext . cwd = getWorkingDirectory ( )
979+ this . sessionState . fileContext . agentTemplates = await loadLocalAgents ( { } )
979980
980981 const userInputId =
981982 `mc-input-` + Math . random ( ) . toString ( 36 ) . substring ( 2 , 15 )
You can’t perform that action at this time.
0 commit comments