Skip to content

fix: replayActiveTask uses active task question instead of earliest across all tasks (fixes #1367)#1674

Open
carlosjarenom wants to merge 1 commit into
eigent-ai:mainfrom
carlosjarenom:fix/issue-1367-replay-wrong-question
Open

fix: replayActiveTask uses active task question instead of earliest across all tasks (fixes #1367)#1674
carlosjarenom wants to merge 1 commit into
eigent-ai:mainfrom
carlosjarenom:fix/issue-1367-replay-wrong-question

Conversation

@carlosjarenom

Copy link
Copy Markdown

Problem

When clicking Replay on any task, eigent always used the question from task 1 (the earliest task across all chat stores), instead of the question from the currently active task.

This was reported by a maintainer in issue #1367.

Root Cause

replayActiveTask() in src/lib/replay.ts was iterating over ALL chat stores and tasks to find the earliest user message by timestamp, rather than using the active task's own messages.

Fix

Replaced the entire earliestTimestamp search logic with a direct lookup in the active task's messages.

Testing

  1. Create a project with multiple tasks
  2. Complete task 1 and task 2 with different questions
  3. Click Replay on task 2
  4. Verify that the replay uses task 2's question, not task 1's

Files Changed

  • src/lib/replay.ts - Fixed replayActiveTask() to use active task's own question

…cross all tasks (fixes eigent-ai#1367)

The replayActiveTask function was incorrectly searching for the earliest
user message across ALL chat stores and tasks in the project, which
caused replay to always use the question from task 1 regardless of
which task was active.

This fix extracts the question directly from the active task's own
messages, matching the expected behavior described in issue eigent-ai#1367.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant