Add "AI Chat" app.

This commit is contained in:
James Babcock committed 2026-09-09 01:15:19 -07:00
1 parent 78c56ffc4e
commit 0765e943fb
13 files changed
+616 -87

No files matched your search

+5 -3
View File
@@ -1,6 +1,6 @@
import { GrayImage } from "../graphics/image";
import { singlePlane, type Plane } from "../graphics/plane";
import { GESTURE_LONG_PRESS, gestureHints, type InputEvent } from "./gestures";
import { GESTURE_LONG_PRESS, GESTURE_SHORT_THEN_LONG_PRESS, gestureHints, type InputEvent } from "./gestures";
import { type Layer, LayerStack, noopLayerActions } from "./layers";
import { CONTEXT_MENU_DIM, MenuLayer, type MenuItem, type MenuLayout } from "./menu";
import type { WorkerAppReply } from "./shell/worker-window";
@@ -27,8 +27,10 @@ export const WINDOW_MENU_LAYOUT: MenuLayout = {
};
export class WindowMenuLayer extends MenuLayer {
constructor(title: string | null, items: MenuItem[]) {
super(title, items, WINDOW_MENU_LAYOUT);
constructor(title: string | null, items: MenuItem[], holdToTalk = false) {
super(title, items, holdToTalk
? { ...WINDOW_MENU_LAYOUT, footer: gestureHints([[GESTURE_SHORT_THEN_LONG_PRESS, "system menu"]]) }
: WINDOW_MENU_LAYOUT);
}
}