File tree Expand file tree Collapse file tree 5 files changed +15
-5
lines changed
src/infra/engines/providers Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ export async function runAgent(
9797 const memoryDir = path . resolve ( cwd , '.codemachine' , 'memory' ) ;
9898 const adapter = new MemoryAdapter ( memoryDir ) ;
9999 const store = new MemoryStore ( adapter ) ;
100- await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
100+ if ( stdout . trim ( ) ) {
101+ await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
102+ }
101103 } catch {
102104 // best-effort memory persistence
103105 }
Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ export async function runAgent(
9797 const memoryDir = path . resolve ( cwd , '.codemachine' , 'memory' ) ;
9898 const adapter = new MemoryAdapter ( memoryDir ) ;
9999 const store = new MemoryStore ( adapter ) ;
100- await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
100+ if ( stdout . trim ( ) ) {
101+ await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
102+ }
101103 } catch {
102104 // best-effort memory persistence
103105 }
Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ export async function runAgent(
9393 const memoryDir = path . resolve ( cwd , '.codemachine' , 'memory' ) ;
9494 const adapter = new MemoryAdapter ( memoryDir ) ;
9595 const store = new MemoryStore ( adapter ) ;
96- await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
96+ if ( stdout . trim ( ) ) {
97+ await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
98+ }
9799 } catch {
98100 // best-effort memory persistence
99101 }
Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ export async function runAgent(
9797 const memoryDir = path . resolve ( cwd , '.codemachine' , 'memory' ) ;
9898 const adapter = new MemoryAdapter ( memoryDir ) ;
9999 const store = new MemoryStore ( adapter ) ;
100- await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
100+ if ( stdout . trim ( ) ) {
101+ await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
102+ }
101103 } catch {
102104 // best-effort memory persistence
103105 }
Original file line number Diff line number Diff line change @@ -101,7 +101,9 @@ export async function runAgent(
101101 const memoryDir = path . resolve ( cwd , '.codemachine' , 'memory' ) ;
102102 const adapter = new MemoryAdapter ( memoryDir ) ;
103103 const store = new MemoryStore ( adapter ) ;
104- await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
104+ if ( stdout . trim ( ) ) {
105+ await store . append ( { agentId, content : stdout , timestamp : new Date ( ) . toISOString ( ) } ) ;
106+ }
105107 } catch {
106108 // best-effort memory persistence
107109 }
You can’t perform that action at this time.
0 commit comments