Files
openclaw/ui/src/components/panel-toggle-contract.ts
T
Peter Steinberger 699315e7d7 feat(ui): redesign Ask OpenClaw — mascot, shared surface, dockable panel (#115123)
* 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
2026-07-28 08:05:38 -04:00

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";
}