refactor(chat): remove unused upgrade state fields
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user