Files
luxe/crates/luxe-remote/app/html.js
Evan Whittaker d2129a886f Luxe 0.1.3: your sessions on your phone, joinable sessions, and nested AGENTS.md
- luxe remote puts the sessions on your computer in reach of your own phone or tablet over
  Tailscale: write, steer, answer prompts, send photos, browse files, diffs and GitHub, with a
  paired device and your own Tailscale login.
- luxe join lets another program on the same machine join a running session over the RPC protocol.
- An AGENTS.md in a subfolder reaches the model the first time it works there.
- Long sessions stay fast: no stall before each model call, lighter memory, cheaper drawing.
- A session is open in one Luxe at a time, web_search shares results across its phrasings, and a
  grep glob starting with ! excludes.

The CHANGELOG has the full list.
2026-10-20 02:40:13 -05:00

26 lines
849 B
JavaScript

// @ts-check
// Tagged templates instead of JSX, so the browser runs the files as they are written.
import { h } from "preact";
import htm from "htm";
export const html = htm.bind(h);
/**
* The field an event came from. Templates don't type their handlers' events, so the one cast the
* app's inputs need lives here.
* @param {Event} event @returns {HTMLInputElement}
*/
export function fieldOf(event) {
return /** @type {HTMLInputElement} */ (event.target);
}
/**
* The element matching `selector` that `event` landed in, for a tap on HTML the host rendered,
* which carries no handlers of its own.
* @param {Event} event @param {string} selector @returns {HTMLElement | null}
*/
export function landedIn(event, selector) {
const target = /** @type {Element | null} */ (event.target);
return target?.closest?.(selector) ?? null;
}