Skip to content

Commit 1021407

Browse files
committed
fix(chat): type fixes and protocol regen for branch switcher CI
1 parent a77908e commit 1021407

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayProtocol.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ enum class GatewayMethod(
303303
SessionsCompactionGet("sessions.compaction.get"),
304304
SessionsCompactionBranch("sessions.compaction.branch"),
305305
SessionsCompactionRestore("sessions.compaction.restore"),
306+
SessionsBranchesList("sessions.branches.list"),
307+
SessionsBranchesSwitch("sessions.branches.switch"),
306308
SessionsRewind("sessions.rewind"),
307309
SessionsFork("sessions.fork"),
308310
SessionsCreate("sessions.create"),

ui/src/pages/chat/chat-history.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ describe("switchChatHistoryBranch", () => {
193193
},
194194
]),
195195
switchBranch: vi.fn().mockResolvedValue({}),
196+
setModelOverride: vi.fn(),
196197
};
197198
cacheChatSessionSnapshot(
198199
state.chatMessagesBySession,
@@ -227,7 +228,7 @@ describe("switchChatHistoryBranch", () => {
227228
};
228229
state.chatBranchesSessionKey = state.sessionKey;
229230
state.chatBranchesConnectionEpoch = state.connectionEpoch - 1;
230-
state.sessions = { listBranches: vi.fn().mockResolvedValue([]) };
231+
state.sessions = { listBranches: vi.fn().mockResolvedValue([]), setModelOverride: vi.fn() };
231232

232233
await loadChatHistory(state);
233234

ui/src/pages/chat/chat-pane.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2671,7 +2671,7 @@ class ChatPane extends OpenClawLightDomElement {
26712671
workspaceLabel: workspace.label,
26722672
branch,
26732673
branches:
2674-
this.state?.chatBranchesSessionKey === this.state?.sessionKey
2674+
this.state && this.state.chatBranchesSessionKey === this.state.sessionKey
26752675
? (this.state.chatBranches ?? [])
26762676
: [],
26772677
branchSwitchDisabledReason,

ui/src/pages/chat/components/chat-pane-header.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export function renderChatPaneHeader(props: ChatPaneHeaderProps) {
279279
branch.messageCount === 1
280280
? "chat.sessionHeader.oneMessage"
281281
: "chat.sessionHeader.messages",
282-
{ count: branch.messageCount },
282+
{ count: String(branch.messageCount) },
283283
)}${relativeTime ? ` · ${relativeTime}` : ""}</span
284284
>
285285
</span>

0 commit comments

Comments
 (0)