Skip to content

fix: use per-task question when loading from history (#1366)#1678

Open
carlosjarenom wants to merge 1 commit into
eigent-ai:mainfrom
carlosjarenom:fix/issue-1366-history-wrong-question-per-task
Open

fix: use per-task question when loading from history (#1366)#1678
carlosjarenom wants to merge 1 commit into
eigent-ai:mainfrom
carlosjarenom:fix/issue-1366-history-wrong-question-per-task

Conversation

@carlosjarenom

Copy link
Copy Markdown

Summary

When loading a project from history, every task was replayed with the same question
(project.last_prompt), regardless of what question each individual task had been
created with. This caused tasks to show incorrect questions when replayed.

Changes

  • src/store/projectStore.ts: Added taskQuestions? parameter to loadProjectFromHistory;
    each task now uses taskQuestions[index] || question instead of always using question
  • src/lib/replay.ts: Pass taskQuestions? through to projectStore.loadProjectFromHistory
  • src/components/HistorySidebar/index.tsx: Extract taskQuestionsList from project.tasks
    (each task has its own question field) and pass it to loadProjectFromHistory

Why

Each HistoryTask already stores its own question field. This fix ensures that field
is actually used during history replay, falling back to the project-level question only
when a task's question is missing.

Closes #1366

Previously, loading a project from history used the same single question string
(project.last_prompt) for every task, regardless of what question each individual
task had been created with.

Now each task is replayed with its own question from task.question, falling back
to the project-level question if a task's question is missing.

Closes eigent-ai#1366
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.

[BUG] task question only the first one loaded if reentered the project

1 participant