Add tokens and faceclaw-input script, which allows using a CLI utility as an input device for the glasses

This commit is contained in:
James Babcock committed 2026-09-20 00:34:58 -07:00
1 parent 313ba85708
commit ccb320c66f
32 files changed
+1785 -12

No files matched your search

+3 -3
View File
@@ -20,7 +20,7 @@ export type WorkerAppMessage =
| { type: "resize-window"; windowId: string; viewport: { width: number; height: number } }
| { type: "close-window"; windowId: string }
| { type: "input"; windowId: string; event: unknown; frameId: number; focused: boolean }
| { type: "text-input"; windowId: string; text: string }
| { type: "text-input"; windowId: string; text: string; submit?: boolean }
| { type: "render"; windowId: string; focused: boolean }
| { type: "foreground"; windowId: string; foreground: boolean; focused: boolean }
/**
@@ -441,8 +441,8 @@ export class WorkerAppHost {
requestRender: () => {
this.post({ type: "render", windowId: spec.windowId, focused: shell.isWindowFocused(spec.windowId) });
},
receiveTextInput: (text) => {
this.post({ type: "text-input", windowId: spec.windowId, text });
receiveTextInput: (text, options) => {
this.post({ type: "text-input", windowId: spec.windowId, text, ...(options?.submit === undefined ? {} : { submit: options.submit }) });
},
setForeground: (foreground) => {
this.options.setSurfaceVisible(surfaceId, foreground);