refactor(chat): remove unused upgrade state fields

This commit is contained in:
2026-06-29 16:32:11 +08:00
parent 61796c732f
commit 80d6563ffb
6 changed files with 1 additions and 58 deletions
@@ -38,8 +38,6 @@ function makeChatState(overrides: Partial<ChatState> = {}): ChatState {
pendingReplyCount: 1,
upgradePromptVisible: false,
upgradeReason: null,
upgradeHint: null,
upgradeDetail: null,
isLoadingMore: false,
hasMore: true,
historyOffset: 0,
@@ -169,12 +167,6 @@ describe("applyHttpSendOutput", () => {
expect(nextState.isReplyingAI).toBe(false);
expect(nextState.upgradePromptVisible).toBe(true);
expect(nextState.upgradeReason).toBe("daily_limit");
expect(nextState.upgradeHint).toBeNull();
expect(nextState.upgradeDetail).toEqual({
type: "daily_msg_limit",
usedToday: 3,
limit: 3,
});
});
});
@@ -479,8 +479,6 @@ describe("chatMachine transitions", () => {
expect(actor.getSnapshot().context.upgradePromptVisible).toBe(false);
expect(actor.getSnapshot().context.upgradeReason).toBeNull();
expect(actor.getSnapshot().context.upgradeHint).toBeNull();
expect(actor.getSnapshot().context.upgradeDetail).toBeNull();
actor.stop();
});