fix: replayActiveTask uses active task question instead of earliest across all tasks (fixes #1367)#1674
Open
carlosjarenom wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()insrc/lib/replay.tswas 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
earliestTimestampsearch logic with a direct lookup in the active task's messages.Testing
Files Changed
src/lib/replay.ts- FixedreplayActiveTask()to use active task's own question