Skip to content

Commit c6553b4

Browse files
authored
Merge pull request #1233 from refly-ai/fix/agent-cache
fix(api): incorrect usage of userAgentComponentsCache
2 parents 3b6d0f9 + 866b16d commit c6553b4

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

apps/api/src/modules/skill/skill-invoker.service.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,6 @@ export class SkillInvokerService {
671671
`🌐 Starting AI model network request (model timeout: ${aiModelNetworkTimeout}ms) for action: ${resultId}`,
672672
);
673673

674-
let eventCount = 0;
675-
676674
// Create dedicated timeout for AI model network requests
677675
const createNetworkTimeout = () => {
678676
if (abortController.signal.aborted) {
@@ -708,22 +706,10 @@ export class SkillInvokerService {
708706
})) {
709707
// Reset network timeout on receiving data from AI model
710708
resetNetworkTimeout();
711-
// Track network activity for monitoring
712-
eventCount++;
713-
714-
if (eventCount === 1) {
715-
this.logger.log(`🌐 First event received for action: ${resultId}`);
716-
} else if (eventCount % 10 === 0) {
717-
this.logger.log(
718-
`🌐 Network activity: ${eventCount} events processed for action: ${resultId}`,
719-
);
720-
}
721709

722710
if (abortController.signal.aborted) {
723711
const abortReason = abortController.signal.reason?.toString() ?? 'Request aborted';
724-
this.logger.warn(
725-
`🚨 Request aborted after ${eventCount} events for action: ${resultId}, reason: ${abortReason}`,
726-
);
712+
this.logger.warn(`🚨 Request aborted for action: ${resultId}, reason: ${abortReason}`);
727713
if (runMeta) {
728714
result.errors.push(abortReason);
729715
}

packages/skill-template/src/skills/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export class Agent extends BaseSkill {
440440
mcpServerList: mcpServerList,
441441
};
442442

443-
this.userAgentComponentsCache.set(userId, components);
443+
// this.userAgentComponentsCache.set(userId, components);
444444

445445
this.engine.logger.log(`Agent components initialized and cached for user ${userId}`);
446446
return components;

0 commit comments

Comments
 (0)