@@ -44,6 +44,8 @@ async function codebuff({
4444 cwd,
4545 trace,
4646} : CliOptions ) {
47+ await recreateShell ( cwd ?? process . cwd ( ) )
48+
4749 const apiKey = JSON . parse (
4850 fs
4951 . readFileSync ( os . homedir ( ) + '/.config/manicode-dev/credentials.json' )
@@ -58,13 +60,13 @@ async function codebuff({
5860 } ,
5961 overrideTools : {
6062 run_terminal_command : async ( args ) => {
61- const { command, mode, timeout , cwd } = args
63+ const { command, mode, process_type , timeout_seconds , cwd } = args
6264 const result = await runTerminalCommand (
6365 'id' ,
6466 command ,
6567 mode ,
66- mode ,
67- timeout ,
68+ process_type ,
69+ timeout_seconds ,
6870 cwd ,
6971 )
7072 return {
@@ -74,6 +76,9 @@ async function codebuff({
7476 } ,
7577 } )
7678
79+ console . log ( 'client created' )
80+ console . log ( 'starting run' )
81+
7782 const run = await client . run ( {
7883 agent : agent ?? 'base' ,
7984 prompt : initialInput ?? 'hi' ,
@@ -82,14 +87,17 @@ async function codebuff({
8287 } ,
8388 } )
8489
85- await client . run ( {
90+ console . log ( 'run1 complete' )
91+
92+ const run2 = await client . run ( {
8693 agent : agent ?? 'base' ,
8794 prompt : 'thank you' ,
8895 previousRun : run ,
8996 handleEvent : ( event ) => {
9097 console . log ( 'event:' , event )
9198 } ,
9299 } )
100+ console . log ( 'run2 complete' )
93101
94102 process . exit ( 0 )
95103}
0 commit comments