mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-15 15:13:48 -06:00
699315e7d7
* refactor(ui): share custodian chat surface * feat(ui): add dockable custodian panel * refactor(ui): drop write-only panel-close latch from custodian store * feat(ui): demo custodian in mock gateway * chore(ui): update raw-copy baseline for custodian strings * fix(ui): clean custodian surface/page/mock lint debris
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import type { UiCommandParams } from "@openclaw/gateway-protocol";
|
|
|
|
export const TERMINAL_PANEL_TOGGLE_EVENT = "openclaw:terminal-toggle";
|
|
export const BROWSER_PANEL_TOGGLE_EVENT = "openclaw:browser-toggle";
|
|
export const CUSTODIAN_PANEL_TOGGLE_EVENT = "openclaw:custodian-toggle";
|
|
export const UI_COMMAND_EVENT = "openclaw:ui-command";
|
|
|
|
export type UiCommandDetail = UiCommandParams;
|
|
|
|
export type TerminalPanelToggleDetail = {
|
|
dock?: "bottom" | "right";
|
|
open?: boolean;
|
|
terminalSessionId?: string;
|
|
catalog?: {
|
|
catalogId: string;
|
|
hostId: string;
|
|
threadId: string;
|
|
};
|
|
};
|
|
|
|
export type BrowserPanelToggleDetail = {
|
|
dock?: "bottom" | "right";
|
|
open?: boolean;
|
|
url?: string;
|
|
};
|
|
|
|
export type CustodianPanelToggleDetail = {
|
|
dock?: "bottom" | "right";
|
|
open?: boolean;
|
|
};
|
|
|
|
export type PanelToggleElement = HTMLElement & {
|
|
handleToggleRequest: (event: Event) => void;
|
|
};
|
|
|
|
export function isTerminalPanelShortcut(event: KeyboardEvent): boolean {
|
|
return event.ctrlKey && !event.metaKey && !event.altKey && event.code === "Backquote";
|
|
}
|