refactor: remove unused content filtering logic in AgentClient

This commit is contained in:
Danny Avila 2025-09-03 23:41:23 -04:00
parent 3f1224e23e
commit 8cb7f7dea5
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956

View file

@ -877,21 +877,7 @@ class AgentClient extends BaseClient {
}; };
await runAgents(initialMessages); await runAgents(initialMessages);
let finalContentStart = this.contentParts.length;
/** Note: not implemented */
if (config.configurable.hide_sequential_outputs !== true) {
finalContentStart = 0;
}
this.contentParts = this.contentParts.filter((part, index) => {
// Include parts that are either:
// 1. At or after the finalContentStart index
// 2. Of type tool_call
// 3. Have tool_call_ids property
return (
index >= finalContentStart || part.type === ContentTypes.TOOL_CALL || part.tool_call_ids
);
});
try { try {
const attachments = await this.awaitMemoryWithTimeout(memoryPromise); const attachments = await this.awaitMemoryWithTimeout(memoryPromise);
if (attachments && attachments.length > 0) { if (attachments && attachments.length > 0) {