mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-12 23:01:21 +00:00
fix: prevent countdown timer from showing in history for answered follow-up questions (#7686)
This commit is contained in:
parent
571d1a4833
commit
de12ec169b
3 changed files with 20 additions and 1 deletions
|
|
@ -214,6 +214,7 @@ export const clineMessageSchema = z.object({
|
|||
contextCondense: contextCondenseSchema.optional(),
|
||||
isProtected: z.boolean().optional(),
|
||||
apiProtocol: z.union([z.literal("openai"), z.literal("anthropic")]).optional(),
|
||||
isAnswered: z.boolean().optional(),
|
||||
metadata: z
|
||||
.object({
|
||||
gpt5: z
|
||||
|
|
|
|||
|
|
@ -887,6 +887,24 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
|
|||
this.askResponse = askResponse
|
||||
this.askResponseText = text
|
||||
this.askResponseImages = images
|
||||
|
||||
// Mark the last follow-up question as answered
|
||||
if (askResponse === "messageResponse" || askResponse === "yesButtonClicked") {
|
||||
// Find the last unanswered follow-up message using findLastIndex
|
||||
const lastFollowUpIndex = findLastIndex(
|
||||
this.clineMessages,
|
||||
(msg) => msg.type === "ask" && msg.ask === "followup" && !msg.isAnswered,
|
||||
)
|
||||
|
||||
if (lastFollowUpIndex !== -1) {
|
||||
// Mark this follow-up as answered
|
||||
this.clineMessages[lastFollowUpIndex].isAnswered = true
|
||||
// Save the updated messages
|
||||
this.saveClineMessages().catch((error) => {
|
||||
console.error("Failed to save answered follow-up state:", error)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public approveAsk({ text, images }: { text?: string; images?: string[] } = {}) {
|
||||
|
|
|
|||
|
|
@ -1499,7 +1499,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
onSuggestionClick={handleSuggestionClickInRow} // This was already stabilized
|
||||
onBatchFileResponse={handleBatchFileResponse}
|
||||
onFollowUpUnmount={handleFollowUpUnmount}
|
||||
isFollowUpAnswered={messageOrGroup.ts === currentFollowUpTs}
|
||||
isFollowUpAnswered={messageOrGroup.isAnswered === true || messageOrGroup.ts === currentFollowUpTs}
|
||||
editable={
|
||||
messageOrGroup.type === "ask" &&
|
||||
messageOrGroup.ask === "tool" &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue