Keep recent memories in context
This commit is contained in:
@@ -340,7 +340,7 @@ Also relevant but not preloaded (use \`memory_recall\`): ${listed.map(r => r.nam
|
||||
if(typeof resp === 'string' && !resp.trim() && lastDelegateResp !== null) resp = lastDelegateResp;
|
||||
|
||||
// Trim memory injections from history
|
||||
if(mem?.tool) history.splice(0, history.length, ...history.filter(h => h.role !== 'tool' || h.name !== 'recall'));
|
||||
if(mem?.tool) history.splice(0, history.length, ...history.filter(h => h.role !== 'tool' || h.name !== 'memory_recall'));
|
||||
|
||||
// Auto-memorize before compressing
|
||||
if(options.compress && this.estimateTokens(history) >= options.compress.max) {
|
||||
|
||||
Reference in New Issue
Block a user