mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: prevent countdown timer from showing in history for answered follow-up questions
- Check if follow-up question has been answered by looking for subsequent messages - For current session, use existing currentFollowUpTs check - For history, check if there are messages after the follow-up question - Fixes #7624
This commit is contained in:
parent
bcb71dbebf
commit
4fc99820e5
1 changed files with 21 additions and 1 deletions
|
|
@ -1485,6 +1485,26 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
}
|
||||
|
||||
// regular message
|
||||
// Check if this follow-up question has been answered
|
||||
// For current session: check if it matches currentFollowUpTs
|
||||
// For history: check if there's a message after this follow-up question
|
||||
const isFollowUpAnswered = (() => {
|
||||
if (messageOrGroup.ask === "followup") {
|
||||
// First check if it's the current follow-up that was just answered
|
||||
if (messageOrGroup.ts === currentFollowUpTs) {
|
||||
return true
|
||||
}
|
||||
// For historical messages, check if there's a message after this follow-up
|
||||
// If there is, it means the follow-up was answered
|
||||
const messageIndex = modifiedMessages.findIndex((msg) => msg.ts === messageOrGroup.ts)
|
||||
if (messageIndex !== -1 && messageIndex < modifiedMessages.length - 1) {
|
||||
// There's at least one message after this follow-up, so it was answered
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
})()
|
||||
|
||||
return (
|
||||
<ChatRow
|
||||
key={messageOrGroup.ts}
|
||||
|
|
@ -1498,7 +1518,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
onSuggestionClick={handleSuggestionClickInRow} // This was already stabilized
|
||||
onBatchFileResponse={handleBatchFileResponse}
|
||||
onFollowUpUnmount={handleFollowUpUnmount}
|
||||
isFollowUpAnswered={messageOrGroup.ts === currentFollowUpTs}
|
||||
isFollowUpAnswered={isFollowUpAnswered}
|
||||
editable={
|
||||
messageOrGroup.type === "ask" &&
|
||||
messageOrGroup.ask === "tool" &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue