mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-08 17:59:09 +00:00
only display last 100 messages in TUI
This commit is contained in:
@@ -25,7 +25,7 @@ export namespace SessionRevert {
|
||||
sessionID: input.sessionID,
|
||||
})
|
||||
|
||||
const all = await Session.messages(input.sessionID)
|
||||
const all = await Session.messages({ sessionID: input.sessionID })
|
||||
let lastUser: MessageV2.User | undefined
|
||||
const session = await Session.get(input.sessionID)
|
||||
|
||||
@@ -88,7 +88,7 @@ export namespace SessionRevert {
|
||||
export async function cleanup(session: Session.Info) {
|
||||
if (!session.revert) return
|
||||
const sessionID = session.id
|
||||
let msgs = await Session.messages(sessionID)
|
||||
let msgs = await Session.messages({ sessionID })
|
||||
const messageID = session.revert.messageID
|
||||
const [preserve, remove] = splitWhen(msgs, (x) => x.info.id === messageID)
|
||||
msgs = preserve
|
||||
|
||||
Reference in New Issue
Block a user