mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 11:55:47 -06:00
fix: preserve chat settings ownership (#120036)
This commit is contained in:
@@ -411,7 +411,13 @@ function makeHost(overrides?: MakeHostOverrides): TestChatHost | TestChatHostWit
|
||||
chatProgrammaticScrollTarget: 0,
|
||||
applySettings: vi.fn((patch: Partial<UiSettings>) => {
|
||||
// Chat pages own display/layout settings; active-session persistence belongs to pane bindings.
|
||||
Object.assign(settings, patch);
|
||||
const next = { ...settings, ...patch };
|
||||
Object.assign(settings, {
|
||||
chatShowThinking: next.chatShowThinking,
|
||||
chatShowToolCalls: next.chatShowToolCalls,
|
||||
chatPersistCommentary: next.chatPersistCommentary,
|
||||
chatSendShortcut: next.chatSendShortcut,
|
||||
});
|
||||
}),
|
||||
...hostOverrides,
|
||||
settings,
|
||||
|
||||
@@ -264,7 +264,13 @@ export function createPageState(
|
||||
state.handleChatDraftChange = (next) => handleChatDraftChange(state, next);
|
||||
state.handleChatInputHistoryKey = (input) => handleChatInputHistoryKey(state, input);
|
||||
state.applySettings = (patch) => {
|
||||
state.settings = patchSettings(patch);
|
||||
const next = { ...state.settings, ...patch };
|
||||
state.settings = patchSettings({
|
||||
chatShowThinking: next.chatShowThinking,
|
||||
chatShowToolCalls: next.chatShowToolCalls,
|
||||
chatPersistCommentary: next.chatPersistCommentary,
|
||||
chatSendShortcut: next.chatSendShortcut,
|
||||
});
|
||||
renderLifecycle.invalidate();
|
||||
};
|
||||
state.setChatViewMenuOpen = (open, options) => {
|
||||
|
||||
Reference in New Issue
Block a user