fix(tui): stabilize compaction completion (#36435)
This commit is contained in:
parent
fe09a2e9b7
commit
00ab94c44f
9 changed files with 124 additions and 96 deletions
|
|
@ -669,16 +669,12 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
|
|||
const position = draft.findLastIndex((item) => item.type === "compaction" && item.status === "running")
|
||||
const current = draft[position]
|
||||
if (current?.type === "compaction") {
|
||||
draft[position] = {
|
||||
id: current.id,
|
||||
type: "compaction",
|
||||
Object.assign(current, {
|
||||
status: "completed",
|
||||
reason: event.data.reason,
|
||||
summary: event.data.text,
|
||||
recent: event.data.recent,
|
||||
metadata: current.metadata,
|
||||
time: current.time,
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
message.append(draft, index, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue