mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
refactor(tui): drop unused pending-user chat-log helpers
This commit is contained in:
@@ -174,17 +174,6 @@ describe("ChatLog", () => {
|
||||
expect(chatLog.render(120).join("\n")).toContain("queued hello");
|
||||
});
|
||||
|
||||
it("stops counting a pending user message once the run is committed", () => {
|
||||
const chatLog = new ChatLog(40);
|
||||
|
||||
chatLog.addPendingUser("run-1", "hello");
|
||||
expect(chatLog.countPendingUsers()).toBe(1);
|
||||
|
||||
expect(chatLog.commitPendingUser("run-1")).toBe(true);
|
||||
expect(chatLog.countPendingUsers()).toBe(0);
|
||||
expect(chatLog.render(120).join("\n")).toContain("hello");
|
||||
});
|
||||
|
||||
it("reconciles pending users against rebuilt history using timestamps", () => {
|
||||
const chatLog = new ChatLog(40);
|
||||
|
||||
|
||||
@@ -198,10 +198,6 @@ export class ChatLog extends Container {
|
||||
return component;
|
||||
}
|
||||
|
||||
commitPendingUser(runId: string) {
|
||||
return this.pendingUsers.delete(runId);
|
||||
}
|
||||
|
||||
dropPendingUser(runId: string) {
|
||||
const existing = this.pendingUsers.get(runId);
|
||||
if (!existing) {
|
||||
@@ -212,10 +208,6 @@ export class ChatLog extends Container {
|
||||
return true;
|
||||
}
|
||||
|
||||
hasPendingUser(runId: string) {
|
||||
return this.pendingUsers.has(runId);
|
||||
}
|
||||
|
||||
reconcilePendingUsers(
|
||||
historyUsers: Array<{
|
||||
text: string;
|
||||
|
||||
Reference in New Issue
Block a user