fix(control-ui): send stable websocket instance IDs (#23616)

Co-authored-by: zq58855371-ui <248869919+zq58855371-ui@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-02-22 21:17:52 +01:00
parent dc6afeb4f8
commit d574056761
4 changed files with 6 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ function createHost() {
navGroupsCollapsed: {},
},
password: "",
clientInstanceId: "instance-test",
client: null,
connected: false,
hello: null,

View File

@@ -46,6 +46,7 @@ import type {
type GatewayHost = {
settings: UiSettings;
password: string;
clientInstanceId: string;
client: GatewayBrowserClient | null;
connected: boolean;
hello: GatewayHelloOk | null;
@@ -147,6 +148,7 @@ export function connectGateway(host: GatewayHost) {
password: host.password.trim() ? host.password : undefined,
clientName: "openclaw-control-ui",
mode: "webchat",
instanceId: host.clientInstanceId,
onHello: (hello) => {
if (host.client !== client) {
return;

View File

@@ -81,6 +81,7 @@ import type {
NostrProfile,
} from "./types.ts";
import { type ChatAttachment, type ChatQueueItem, type CronFormState } from "./ui-types.ts";
import { generateUUID } from "./uuid.ts";
import type { NostrProfileFormState } from "./views/channels.nostr-profile-form.ts";
declare global {
@@ -107,6 +108,7 @@ function resolveOnboardingMode(): boolean {
@customElement("openclaw-app")
export class OpenClawApp extends LitElement {
private i18nController = new I18nController(this);
clientInstanceId = generateUUID();
@state() settings: UiSettings = loadSettings();
constructor() {
super();