Refactor: Organize files by app

This commit is contained in:
James Babcock committed 2026-08-03 00:08:52 -07:00
1 parent 1ec6b3ff83
commit 9b3832d7a7
40 files changed
+175 -175

No files matched your search

@@ -8,19 +8,19 @@
* focus, long-press opens the window menu. * focus, long-press opens the window menu.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont"; import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects"; import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import { import {
GESTURE_CLICK, GESTURE_CLICK,
GESTURE_DOUBLE_CLICK, GESTURE_DOUBLE_CLICK,
GESTURE_LONG_PRESS, GESTURE_LONG_PRESS,
GESTURE_SCROLL, GESTURE_SCROLL,
} from "../ui/gestures"; } from "../../ui/gestures";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
@@ -1,12 +1,12 @@
import { ensureCalendarPermission, hasCalendarPermission } from "../../g2/android-permissions"; import { ensureCalendarPermission, hasCalendarPermission } from "../../g2/android-permissions";
import { invalidateCalendarCache } from "../../native/calendar"; import { invalidateCalendarCache } from "../../native/calendar";
import { CalendarLayer } from "../apps/calendar"; import { CalendarLayer } from "./calendar";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
export const CALENDAR_WINDOW_ID = "calendar"; export const CALENDAR_WINDOW_ID = "calendar";
export const CALENDAR_SURFACE_ID = "window:calendar"; export const CALENDAR_SURFACE_ID = "window:calendar";
@@ -3,10 +3,10 @@ import { GrayImage } from "../../graphics/image";
import { wrapText, truncateText } from "../../graphics/textwrap"; import { wrapText, truncateText } from "../../graphics/textwrap";
import { clamp } from "../../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { readUpcomingEvents, type CalendarEvent } from "../../native/calendar"; import { readUpcomingEvents, type CalendarEvent } from "../../native/calendar";
import { timeFormatSetting } from "../dashboard-settings"; import { timeFormatSetting } from "../../ui/dashboard-settings";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { hasCalendarPermission } from "../../g2/android-permissions"; import { hasCalendarPermission } from "../../g2/android-permissions";
import { type DashboardInputEvent, type Layer, type LayerContext } from "../layers"; import { type DashboardInputEvent, type Layer, type LayerContext } from "../../ui/layers";
const PAGE_X = 12; const PAGE_X = 12;
const PAGE_Y = 12; const PAGE_Y = 12;
@@ -2,9 +2,9 @@ import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/bdffon
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { clamp } from "../../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { addImuListener, imuSourceLabel, setImuReportEnabled, type ImuReading } from "../../native/imu"; import { addImuListener, imuSourceLabel, setImuReportEnabled, type ImuReading } from "../../native/imu";
import { GESTURE_DOUBLE_CLICK } from "../gestures"; import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
import { shell } from "../shell/shell"; import { shell } from "../../ui/shell/shell";
// IMU report pace. This is NOT a literal Hz — the firmware only accepts the // IMU report pace. This is NOT a literal Hz — the firmware only accepts the
// ImuReportPace codes 100..1000 (step 100); the real delivery rate is // ImuReportPace codes 100..1000 (step 100); the real delivery rate is
@@ -1,9 +1,9 @@
import { getDefaultSmallFont } from "../../graphics/bdffont"; import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { clamp } from "../../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../../ui/layers";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../menu"; import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../../ui/menu";
import { import {
buildSoundSequencePayload, buildSoundSequencePayload,
CFW_SEQ_MAX, CFW_SEQ_MAX,
@@ -11,7 +11,7 @@ import {
phraseDurationMs, phraseDurationMs,
SOUND_EFFECTS, SOUND_EFFECTS,
type SoundEffect, type SoundEffect,
} from "./sound-effects"; } from "../../ui/sound-effects";
const HEADER_HEIGHT = 30; const HEADER_HEIGHT = 30;
const ROW_HEIGHT = 16; const ROW_HEIGHT = 16;
@@ -1,14 +1,14 @@
import { MenuLayer } from "../menu"; import { MenuLayer } from "../../ui/menu";
import { ScreenTestLayer } from "../apps/screen-test"; import { ScreenTestLayer } from "./screen-test";
import { BuzzerDemoLayer } from "../apps/buzzer-demo"; import { BuzzerDemoLayer } from "./buzzer-demo";
import { AccelerometerDemoLayer } from "../apps/accelerometer-demo"; import { AccelerometerDemoLayer } from "./accelerometer-demo";
import { appViewportSize } from "./geometry"; import { appViewportSize } from "../../ui/shell/geometry";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
export const DEBUG_TESTS_WINDOW_ID = "debug-tests"; export const DEBUG_TESTS_WINDOW_ID = "debug-tests";
export const DEBUG_TESTS_SURFACE_ID = "window:debug-tests"; export const DEBUG_TESTS_SURFACE_ID = "window:debug-tests";
@@ -1,6 +1,6 @@
import { getDefaultSmallFont } from "../../graphics/bdffont"; import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const COLOR_VALUE_COUNT = 256; const COLOR_VALUE_COUNT = 256;
const COLOR_VALUE_STEP = 1; const COLOR_VALUE_STEP = 1;
@@ -3,9 +3,9 @@ import { truncateText, truncateLeft } from "../../graphics/textwrap";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { renderIcon, type IconName } from "../../graphics/icons"; import { renderIcon, type IconName } from "../../graphics/icons";
import { clamp } from "../../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { drawListScrollbar, drawSelectionHighlight, scrollToKeepSelectionVisible, type MenuItem } from "../menu"; import { drawListScrollbar, drawSelectionHighlight, scrollToKeepSelectionVisible, type MenuItem } from "../../ui/menu";
import { ConfigSettingEnum } from "../dashboard-settings"; import { ConfigSettingEnum } from "../../ui/dashboard-settings";
import { getStringSetting, setStringSetting } from "../../native/settings-store"; import { getStringSetting, setStringSetting } from "../../native/settings-store";
import { import {
externalStorageRootPath, externalStorageRootPath,
@@ -15,7 +15,7 @@ import {
statPath, statPath,
type DirectoryEntry, type DirectoryEntry,
} from "../../native/file-access"; } from "../../native/file-access";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const HEADER_HEIGHT = 34; const HEADER_HEIGHT = 34;
const ROW_HEIGHT = 16; const ROW_HEIGHT = 16;
@@ -2,9 +2,9 @@ import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { wrapText } from "../../graphics/textwrap"; import { wrapText } from "../../graphics/textwrap";
import type { DirectoryEntry } from "../../native/file-access"; import type { DirectoryEntry } from "../../native/file-access";
import { GESTURE_DOUBLE_CLICK } from "../gestures"; import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../../ui/layers";
import { drawSelectionHighlight } from "../menu"; import { drawSelectionHighlight } from "../../ui/menu";
const DIALOG_X = 8; const DIALOG_X = 8;
const DIALOG_Y = 8; const DIALOG_Y = 8;
@@ -1,16 +1,16 @@
import { readTextFile, type DirectoryEntry } from "../../native/file-access"; import { readTextFile, type DirectoryEntry } from "../../native/file-access";
import { isDecodableImageFile } from "../../native/image-files"; import { isDecodableImageFile } from "../../native/image-files";
import { FileBrowserLayer } from "../apps/file-browser"; import { FileBrowserLayer } from "./file-browser";
import { FileInfoDialogLayer, type FileInfoAction } from "../apps/file-info-dialog"; import { FileInfoDialogLayer, type FileInfoAction } from "./file-info-dialog";
import { ImageViewerLayer } from "../apps/image-viewer"; import { ImageViewerLayer } from "./image-viewer";
import { TextViewerLayer } from "../apps/text-viewer"; import { TextViewerLayer } from "./text-viewer";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
import { shell } from "./shell"; import { shell } from "../../ui/shell/shell";
export const FILES_WINDOW_ID = "files"; export const FILES_WINDOW_ID = "files";
export const FILES_SURFACE_ID = "window:files"; export const FILES_SURFACE_ID = "window:files";
@@ -2,8 +2,8 @@ import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { truncateText } from "../../graphics/textwrap"; import { truncateText } from "../../graphics/textwrap";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { loadImageFileAsGray } from "../../native/image-files"; import { loadImageFileAsGray } from "../../native/image-files";
import { GESTURE_DOUBLE_CLICK } from "../gestures"; import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const MARGIN_X = 18; const MARGIN_X = 18;
const TITLE_Y = 8; const TITLE_Y = 8;
@@ -1,7 +1,7 @@
import { wrapText, truncateText } from "../../graphics/textwrap"; import { wrapText, truncateText } from "../../graphics/textwrap";
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont"; import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const MARGIN_X = 18; const MARGIN_X = 18;
const TITLE_Y = 16; const TITLE_Y = 16;
@@ -12,15 +12,15 @@
* Safe cards auto-play to the foundations after every move. * Safe cards auto-play to the foundations after every move.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont"; import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects"; import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { MenuItem } from "../ui/menu"; import type { MenuItem } from "../../ui/menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_LONG_PRESS } from "../ui/gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_LONG_PRESS } from "../../ui/gestures";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
@@ -7,13 +7,13 @@ import {
GESTURE_CLICK, GESTURE_CLICK,
GESTURE_DOUBLE_CLICK, GESTURE_DOUBLE_CLICK,
GESTURE_SCROLL, GESTURE_SCROLL,
} from "../gestures"; } from "../../ui/gestures";
import { DashboardInputEvent, Layer, LayerActions, LayerContext } from "../layers"; import { DashboardInputEvent, Layer, LayerActions, LayerContext } from "../../ui/layers";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../menu"; import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../../ui/menu";
import { onAnySettingChanged } from "../dashboard-settings"; import { onAnySettingChanged } from "../../ui/dashboard-settings";
import { createInProcessWindow } from "./in-process-window"; import { createInProcessWindow } from "../../ui/shell/in-process-window";
import { getFolderAssignments, getFolders, getFolderStateFingerprint } from "./launcher-folders"; import { getFolderAssignments, getFolders, getFolderStateFingerprint } from "./launcher-folders";
import { shell, type ShellWindow } from "./shell"; import { shell, type ShellWindow } from "../../ui/shell/shell";
export type LauncherAppEntry = { export type LauncherAppEntry = {
appId: string; appId: string;
File renamed without changes.
@@ -12,20 +12,20 @@
* focus, long-press opens the window menu. * focus, long-press opens the window menu.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont"; import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects"; import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import { import {
GESTURE_CLICK, GESTURE_CLICK,
GESTURE_DOUBLE_CLICK, GESTURE_DOUBLE_CLICK,
GESTURE_LONG_PRESS, GESTURE_LONG_PRESS,
GESTURE_SCROLL, GESTURE_SCROLL,
} from "../ui/gestures"; } from "../../ui/gestures";
import { clamp } from "../util/numeric-util"; import { clamp } from "../../util/numeric-util";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
@@ -1,20 +1,20 @@
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont"; import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { clamp } from "../../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { import {
MenuLayer, MenuLayer,
drawListScrollbar, drawListScrollbar,
drawSelectionHighlight, drawSelectionHighlight,
drawSubmenuIndicator, drawSubmenuIndicator,
scrollToKeepSelectionVisible, scrollToKeepSelectionVisible,
} from "../menu"; } from "../../ui/menu";
import { import {
mediaBrowserBridge, mediaBrowserBridge,
type MediaBrowseItem, type MediaBrowseItem,
type MediaBrowserApp, type MediaBrowserApp,
} from "../../native/media-browser"; } from "../../native/media-browser";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const HEADER_HEIGHT = 34; const HEADER_HEIGHT = 34;
const ROW_HEIGHT = 16; const ROW_HEIGHT = 16;
@@ -8,22 +8,22 @@ import {
GESTURE_SCROLL, GESTURE_SCROLL,
GESTURE_SCROLL_DOWN, GESTURE_SCROLL_DOWN,
GESTURE_SCROLL_UP, GESTURE_SCROLL_UP,
} from "../gestures"; } from "../../ui/gestures";
import { MenuLayer, drawSelectionHighlight, drawSubmenuIndicator } from "../menu"; import { MenuLayer, drawSelectionHighlight, drawSubmenuIndicator } from "../../ui/menu";
import { import {
mediaControllerBridge, mediaControllerBridge,
type MediaControllerState, type MediaControllerState,
type MediaQueueItem, type MediaQueueItem,
} from "../../native/media-controller"; } from "../../native/media-controller";
import { mediaBrowserBridge, type MediaBrowserApp } from "../../native/media-browser"; import { mediaBrowserBridge, type MediaBrowserApp } from "../../native/media-browser";
import { MediaBrowseLayer } from "../apps/media-browse"; import { MediaBrowseLayer } from "./media-browse";
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../../ui/layers";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
export const MUSIC_WINDOW_ID = "music"; export const MUSIC_WINDOW_ID = "music";
export const MUSIC_SURFACE_ID = "window:music"; export const MUSIC_SURFACE_ID = "window:music";
@@ -2,7 +2,7 @@
* Maneuver arrow glyphs for turn-by-turn guidance, drawn with GrayImage * Maneuver arrow glyphs for turn-by-turn guidance, drawn with GrayImage
* primitives from the Directions maneuver type + modifier (no image assets). * primitives from the Directions maneuver type + modifier (no image assets).
*/ */
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
/** /**
* Draw the glyph for a maneuver into a size x size box at (x, y). * Draw the glyph for a maneuver into a size x size box at (x, y).
@@ -7,15 +7,15 @@
* guidance text (right pane) updates per GPS fix and ships as small deltas. * guidance text (right pane) updates per GPS fix and ships as small deltas.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont"; import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import type { ToolSpec, ToolResult } from "../assistant/tool-registry"; import type { ToolSpec, ToolResult } from "../../assistant/tool-registry";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../ui/gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { LocationTracker, type TrackedLocation } from "../native/location-tracker"; import { LocationTracker, type TrackedLocation } from "../../native/location-tracker";
import { import {
fetchRoute, fetchRoute,
fetchStaticMapGray, fetchStaticMapGray,
@@ -25,9 +25,9 @@ import {
type Route, type Route,
type RouteProfile, type RouteProfile,
type StaticMapCamera, type StaticMapCamera,
} from "../native/mapbox"; } from "../../native/mapbox";
import { bearingDegrees, haversineMeters, RouteFollower, type RouteProgress } from "../navigate/route-follower"; import { bearingDegrees, haversineMeters, RouteFollower, type RouteProgress } from "./route-follower";
import { drawManeuverGlyph } from "../navigate/maneuver-icons"; import { drawManeuverGlyph } from "./maneuver-icons";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
@@ -3,7 +3,7 @@
* progress toward the next maneuver, and detect off-route/arrival. Pure * progress toward the next maneuver, and detect off-route/arrival. Pure
* geometry over the Directions response — no network, no Android. * geometry over the Directions response — no network, no Android.
*/ */
import type { Route } from "../native/mapbox"; import type { Route } from "../../native/mapbox";
const EARTH_RADIUS_M = 6_371_000; const EARTH_RADIUS_M = 6_371_000;
/** Perpendicular distance that counts as off the route. */ /** Perpendicular distance that counts as off the route. */
@@ -1,14 +1,14 @@
import { getDefaultSmallFont } from "../../graphics/bdffont"; import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { nightscoutBridge, type NightscoutState } from "../../native/nightscout-bridge"; import { nightscoutBridge, type NightscoutState } from "../../native/nightscout-bridge";
import { NightscoutLayer } from "../apps/nightscout"; import { NightscoutLayer } from "./nightscout";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
import { shell } from "./shell"; import { shell } from "../../ui/shell/shell";
export const NIGHTSCOUT_WINDOW_ID = "nightscout"; export const NIGHTSCOUT_WINDOW_ID = "nightscout";
export const NIGHTSCOUT_SURFACE_ID = "window:nightscout"; export const NIGHTSCOUT_SURFACE_ID = "window:nightscout";
@@ -1,18 +1,18 @@
import { BdfFont, getDefaultLargeFont, getDefaultSmallFont } from "../../graphics/bdffont"; import { BdfFont, getDefaultLargeFont, getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage, imageFromAsciiArt } from "../../graphics/image"; import { GrayImage, imageFromAsciiArt } from "../../graphics/image";
import { DashboardInputEvent, Layer, LayerContext } from "../layers"; import { DashboardInputEvent, Layer, LayerContext } from "../../ui/layers";
import { nightscoutBridge, type NightscoutState } from "../../native/nightscout-bridge"; import { nightscoutBridge, type NightscoutState } from "../../native/nightscout-bridge";
import { import {
isNightscoutSettingsConfigured, isNightscoutSettingsConfigured,
nightscoutApiTokenSetting, nightscoutApiTokenSetting,
nightscoutSiteUrlSetting, nightscoutSiteUrlSetting,
textSettingMenuItem, textSettingMenuItem,
} from "../dashboard-settings"; } from "../../ui/dashboard-settings";
import { formatAgeShortFromTimestamp, formatTimestamp } from "~/util/date-util"; import { formatAgeShortFromTimestamp, formatTimestamp } from "~/util/date-util";
import { MenuLayer } from "../menu"; import { MenuLayer } from "../../ui/menu";
import { openSettingsSubMenu } from "../dashboard/settings-panel"; import { openSettingsSubMenu } from "../../ui/dashboard/settings-panel";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
const nightscoutLargeFont = getDefaultLargeFont(); const nightscoutLargeFont = getDefaultLargeFont();
const NIGHTSCOUT_STALE_MS = 15 * 60 * 1000; const NIGHTSCOUT_STALE_MS = 15 * 60 * 1000;
const NIGHTSCOUT_GRAPH_WINDOW_MS = 2 * 60 * 60 * 1000; const NIGHTSCOUT_GRAPH_WINDOW_MS = 2 * 60 * 60 * 1000;
@@ -1,10 +1,10 @@
import { NotificationsListLayer } from "../notifications"; import { NotificationsListLayer } from "../../ui/notifications";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
export const NOTIFICATIONS_WINDOW_ID = "notifications"; export const NOTIFICATIONS_WINDOW_ID = "notifications";
export const NOTIFICATIONS_SURFACE_ID = "window:notifications"; export const NOTIFICATIONS_SURFACE_ID = "window:notifications";
@@ -18,21 +18,21 @@
* focus, long-press opens the window menu. * focus, long-press opens the window menu.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont"; import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import { getStringSetting, setStringSetting } from "../native/settings-store"; import { getStringSetting, setStringSetting } from "../../native/settings-store";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects"; import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import { import {
GESTURE_CLICK, GESTURE_CLICK,
GESTURE_DOUBLE_CLICK, GESTURE_DOUBLE_CLICK,
GESTURE_LONG_PRESS, GESTURE_LONG_PRESS,
GESTURE_SCROLL, GESTURE_SCROLL,
} from "../ui/gestures"; } from "../../ui/gestures";
import { clamp } from "../util/numeric-util"; import { clamp } from "../../util/numeric-util";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
@@ -1,9 +1,9 @@
import { GrayImage } from "../../graphics/image"; import { GrayImage } from "../../graphics/image";
import { LayerActions } from "../layers"; import { LayerActions } from "../../ui/layers";
import { EditTextSettingLayer } from "../dashboard-settings"; import { EditTextSettingLayer } from "../../ui/dashboard-settings";
import { createSettingsPanelLayer } from "../dashboard/settings-menus"; import { createSettingsPanelLayer } from "../../ui/dashboard/settings-menus";
import { createInProcessWindow } from "./in-process-window"; import { createInProcessWindow } from "../../ui/shell/in-process-window";
import { type ShellWindow } from "./shell"; import { type ShellWindow } from "../../ui/shell/shell";
export const SETTINGS_WINDOW_ID = "settings"; export const SETTINGS_WINDOW_ID = "settings";
export const SETTINGS_SURFACE_ID = "window:settings"; export const SETTINGS_SURFACE_ID = "window:settings";
@@ -13,37 +13,37 @@
* this worker's thread. * this worker's thread.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getFont } from "../graphics/bdffont"; import { getFont } from "../../graphics/bdffont";
import { TERMINAL_ICON_GLYPHS } from "../graphics/icons"; import { TERMINAL_ICON_GLYPHS } from "../../graphics/icons";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import { GESTURE_DOUBLE_CLICK } from "../ui/gestures"; import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { import {
G2MirrorClient, G2MirrorClient,
type G2MirrorSession, type G2MirrorSession,
type G2MirrorState, type G2MirrorState,
} from "../native/g2mirror-client"; } from "../../native/g2mirror-client";
import { onSettingsStoreChanged } from "../native/settings-store"; import { onSettingsStoreChanged } from "../../native/settings-store";
import { clamp } from "../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { import {
terminalAuthTokenSetting, terminalAuthTokenSetting,
terminalHostSetting, terminalHostSetting,
terminalLaunchPresetsSetting, terminalLaunchPresetsSetting,
terminalPortSetting, terminalPortSetting,
terminalWakeOnBellSetting, terminalWakeOnBellSetting,
} from "../ui/dashboard-settings"; } from "../../ui/dashboard-settings";
import { TerminalEmulator } from "../ui/apps/terminal-emulator"; import { TerminalEmulator } from "./terminal-emulator";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { import {
drawListScrollbar, drawListScrollbar,
drawSelectionHighlight, drawSelectionHighlight,
scrollToKeepSelectionVisible, scrollToKeepSelectionVisible,
type MenuItem, type MenuItem,
} from "../ui/menu"; } from "../../ui/menu";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import { appViewportSize } from "../ui/shell/geometry"; import { appViewportSize } from "../../ui/shell/geometry";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import type { ToolResult, ToolSpec } from "../assistant/tool-registry"; import type { ToolResult, ToolSpec } from "../../assistant/tool-registry";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
File renamed without changes.
@@ -4,24 +4,24 @@
* durable expiry path; worker timeouts keep the live UI prompt. * durable expiry path; worker timeouts keep the live UI prompt.
*/ */
import "@nativescript/core/globals"; import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image"; import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont"; import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../native/frame-timings"; import * as frameTimings from "../../native/frame-timings";
import { import {
cancelTimerNotification, cancelTimerNotification,
fireTimerNotification, fireTimerNotification,
scheduleTimerNotification, scheduleTimerNotification,
} from "../native/timer-notifications"; } from "../../native/timer-notifications";
import type { DashboardInputEvent } from "../ui/layers"; import type { DashboardInputEvent } from "../../ui/layers";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu"; import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window"; import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import type { ToolResult, ToolSpec } from "../assistant/tool-registry"; import type { ToolResult, ToolSpec } from "../../assistant/tool-registry";
import { import {
GESTURE_CLICK, GESTURE_CLICK,
GESTURE_DOUBLE_CLICK, GESTURE_DOUBLE_CLICK,
GESTURE_SCROLL, GESTURE_SCROLL,
} from "../ui/gestures"; } from "../../ui/gestures";
import { clamp } from "../util/numeric-util"; import { clamp } from "../../util/numeric-util";
declare const global: any; declare const global: any;
declare const com: any; declare const com: any;
@@ -1,12 +1,12 @@
import { imageFromAsciiArt } from "../../graphics/image"; import { imageFromAsciiArt } from "../../graphics/image";
import { TranscribeLayer } from "../apps/transcribe"; import { TranscribeLayer } from "./transcribe";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
import { shell } from "./shell"; import { shell } from "../../ui/shell/shell";
export const TRANSCRIBE_WINDOW_ID = "transcribe"; export const TRANSCRIBE_WINDOW_ID = "transcribe";
export const TRANSCRIBE_SURFACE_ID = "window:transcribe"; export const TRANSCRIBE_SURFACE_ID = "window:transcribe";
@@ -2,14 +2,14 @@ import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont"; import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { writeTextToDownloads } from "../../native/file-access"; import { writeTextToDownloads } from "../../native/file-access";
import { voiceControlBridge, type VoiceTranscriptEvent } from "../../native/voice-control"; import { voiceControlBridge, type VoiceTranscriptEvent } from "../../native/voice-control";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
/** /**
* Live transcription view. Continuous mic capture is owned by the app wrapper * Live transcription view. Continuous mic capture is owned by the app wrapper
* (createTranscribeAppWindow); this layer accumulates the transcript, shows * (createTranscribeAppWindow); this layer accumulates the transcript, shows
* it, and saves it to Downloads on click. * it, and saves it to Downloads on click.
*/ */
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
export class TranscribeLayer implements Layer { export class TranscribeLayer implements Layer {
private status = "Listening..."; private status = "Listening...";
// Finalized utterances, plus the live (replace-semantics) partial appended // Finalized utterances, plus the live (replace-semantics) partial appended
@@ -1,12 +1,12 @@
import { ensureLocationPermission, hasLocationPermission } from "../../g2/android-permissions"; import { ensureLocationPermission, hasLocationPermission } from "../../g2/android-permissions";
import { weatherBridge } from "../../native/weather"; import { weatherBridge } from "../../native/weather";
import { WeatherLayer } from "../apps/weather"; import { WeatherLayer } from "./weather";
import { import {
createInProcessWindow, createInProcessWindow,
YieldAtRootLayer, YieldAtRootLayer,
type InProcessAppOptions, type InProcessAppOptions,
type InProcessWindow, type InProcessWindow,
} from "./in-process-window"; } from "../../ui/shell/in-process-window";
export const WEATHER_WINDOW_ID = "weather"; export const WEATHER_WINDOW_ID = "weather";
export const WEATHER_SURFACE_ID = "window:weather"; export const WEATHER_SURFACE_ID = "window:weather";
@@ -3,9 +3,9 @@ import { GrayImage } from "../../graphics/image";
import { wrapText, truncateText } from "../../graphics/textwrap"; import { wrapText, truncateText } from "../../graphics/textwrap";
import { clamp } from "../../util/numeric-util"; import { clamp } from "../../util/numeric-util";
import { type ForecastPeriod, type WeatherState } from "../../native/weather"; import { type ForecastPeriod, type WeatherState } from "../../native/weather";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { type DashboardInputEvent, type Layer, type LayerContext } from "../layers"; import { type DashboardInputEvent, type Layer, type LayerContext } from "../../ui/layers";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../menu"; import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../../ui/menu";
const PAGE_X = 18; const PAGE_X = 18;
const HEADER_Y = 8; const HEADER_Y = 8;
+2 -2
View File
@@ -5,7 +5,7 @@
* mirrors what the user can do from the launcher grid and the sidebar. * mirrors what the user can do from the launcher grid and the sidebar.
*/ */
import { shell, type ShellWindow } from "../ui/shell/shell"; import { shell, type ShellWindow } from "../ui/shell/shell";
import type { LauncherAppEntry } from "../ui/shell/launcher-app"; import type { LauncherAppEntry } from "../apps/launcher/launcher-app";
import { import {
disbandFolder, disbandFolder,
FOLDER_NAME_MAX_LENGTH, FOLDER_NAME_MAX_LENGTH,
@@ -13,7 +13,7 @@ import {
getFolders, getFolders,
resolveFolderName, resolveFolderName,
setAppFolder, setAppFolder,
} from "../ui/shell/launcher-folders"; } from "../apps/launcher/launcher-folders";
import { toolRegistry, type ToolRegistry, type ToolResult } from "./tool-registry"; import { toolRegistry, type ToolRegistry, type ToolResult } from "./tool-registry";
export type WindowToolsOptions = { export type WindowToolsOptions = {
+18 -18
View File
@@ -19,7 +19,7 @@ import { isNotificationListenerEnabled, requestNotificationListenerAccess } from
import { openEvenAppSettings, readEvenAppNotificationState } from "../native/even-app-conflict"; import { openEvenAppSettings, readEvenAppNotificationState } from "../native/even-app-conflict";
import { grayImageToPreviewSource } from "../native/gray-image-preview"; import { grayImageToPreviewSource } from "../native/gray-image-preview";
import { firmwareIncompatibilityMessage } from "./firmware-compat"; import { firmwareIncompatibilityMessage } from "./firmware-compat";
import { findSoundEffect, playSoundEffect } from "../ui/apps/sound-effects"; import { findSoundEffect, playSoundEffect } from "../ui/sound-effects";
import { isWelcomeSoundPending, setWelcomeSoundPending } from "../phone-ui/onboarding-state"; import { isWelcomeSoundPending, setWelcomeSoundPending } from "../phone-ui/onboarding-state";
import { beginRenderPass, endRenderPass } from "../util/render-freshness"; import { beginRenderPass, endRenderPass } from "../util/render-freshness";
import { voiceControlBridge } from "../native/voice-control"; import { voiceControlBridge } from "../native/voice-control";
@@ -36,51 +36,51 @@ import {
createLauncherWindow, createLauncherWindow,
LAUNCHER_SURFACE_ID, LAUNCHER_SURFACE_ID,
type LauncherAppEntry, type LauncherAppEntry,
} from "../ui/shell/launcher-app"; } from "../apps/launcher/launcher-app";
import { import {
createSettingsAppWindow, createSettingsAppWindow,
SETTINGS_SURFACE_ID, SETTINGS_SURFACE_ID,
SETTINGS_WINDOW_ID, SETTINGS_WINDOW_ID,
type SettingsAppWindow, type SettingsAppWindow,
} from "../ui/shell/settings-app"; } from "../apps/settings/settings-app";
import { import {
createNotificationsAppWindow, createNotificationsAppWindow,
NOTIFICATIONS_SURFACE_ID, NOTIFICATIONS_SURFACE_ID,
NOTIFICATIONS_WINDOW_ID, NOTIFICATIONS_WINDOW_ID,
} from "../ui/shell/notifications-app"; } from "../apps/notifications/notifications-app";
import { import {
createCalendarAppWindow, createCalendarAppWindow,
CALENDAR_SURFACE_ID, CALENDAR_SURFACE_ID,
CALENDAR_WINDOW_ID, CALENDAR_WINDOW_ID,
} from "../ui/shell/calendar-app"; } from "../apps/calendar/calendar-app";
import { import {
createWeatherAppWindow, createWeatherAppWindow,
WEATHER_SURFACE_ID, WEATHER_SURFACE_ID,
WEATHER_WINDOW_ID, WEATHER_WINDOW_ID,
} from "../ui/shell/weather-app"; } from "../apps/weather/weather-app";
import { import {
createDebugTestsAppWindow, createDebugTestsAppWindow,
DEBUG_TESTS_SURFACE_ID, DEBUG_TESTS_SURFACE_ID,
DEBUG_TESTS_WINDOW_ID, DEBUG_TESTS_WINDOW_ID,
} from "../ui/shell/debug-tests-app"; } from "../apps/debug-tests/debug-tests-app";
import { import {
createFilesAppWindow, createFilesAppWindow,
createImageDocumentWindow, createImageDocumentWindow,
createTextDocumentWindow, createTextDocumentWindow,
FILES_SURFACE_ID, FILES_SURFACE_ID,
FILES_WINDOW_ID, FILES_WINDOW_ID,
} from "../ui/shell/files-app"; } from "../apps/files/files-app";
import { import {
createNightscoutAppWindow, createNightscoutAppWindow,
NIGHTSCOUT_SURFACE_ID, NIGHTSCOUT_SURFACE_ID,
NIGHTSCOUT_WINDOW_ID, NIGHTSCOUT_WINDOW_ID,
} from "../ui/shell/nightscout-app"; } from "../apps/nightscout/nightscout-app";
import { createMusicAppWindow, MUSIC_SURFACE_ID, MUSIC_WINDOW_ID } from "../ui/shell/music-app"; import { createMusicAppWindow, MUSIC_SURFACE_ID, MUSIC_WINDOW_ID } from "../apps/music/music-app";
import { import {
createTranscribeAppWindow, createTranscribeAppWindow,
TRANSCRIBE_SURFACE_ID, TRANSCRIBE_SURFACE_ID,
TRANSCRIBE_WINDOW_ID, TRANSCRIBE_WINDOW_ID,
} from "../ui/shell/transcribe-app"; } from "../apps/transcribe/transcribe-app";
import { type InProcessAppOptions, type InProcessWindow } from "../ui/shell/in-process-window"; import { type InProcessAppOptions, type InProcessWindow } from "../ui/shell/in-process-window";
import { loadPersistedOpenApps, savePersistedOpenApps } from "../ui/shell/open-apps-persistence"; import { loadPersistedOpenApps, savePersistedOpenApps } from "../ui/shell/open-apps-persistence";
import { appViewportRect, type WindowHeightMode } from "../ui/shell/geometry"; import { appViewportRect, type WindowHeightMode } from "../ui/shell/geometry";
@@ -1539,19 +1539,19 @@ class DashboardController {
// Worker paths must be string literals for the webpack worker loader. // Worker paths must be string literals for the webpack worker loader.
let worker: Worker; let worker: Worker;
if (appId === "timer") { if (appId === "timer") {
worker = new Worker("../workers/timer-app.worker"); worker = new Worker("../apps/timer/timer-app.worker");
} else if (appId === "terminal") { } else if (appId === "terminal") {
worker = new Worker("../workers/terminal-app.worker"); worker = new Worker("../apps/terminal/terminal-app.worker");
} else if (appId === "navigate") { } else if (appId === "navigate") {
worker = new Worker("../workers/navigate-app.worker"); worker = new Worker("../apps/navigate/navigate-app.worker");
} else if (appId === "blocks") { } else if (appId === "blocks") {
worker = new Worker("../workers/blocks-app.worker"); worker = new Worker("../apps/blocks/blocks-app.worker");
} else if (appId === "minesweeper") { } else if (appId === "minesweeper") {
worker = new Worker("../workers/minesweeper-app.worker"); worker = new Worker("../apps/minesweeper/minesweeper-app.worker");
} else if (appId === "freecell") { } else if (appId === "freecell") {
worker = new Worker("../workers/freecell-app.worker"); worker = new Worker("../apps/freecell/freecell-app.worker");
} else if (appId === "pinball") { } else if (appId === "pinball") {
worker = new Worker("../workers/pinball-app.worker"); worker = new Worker("../apps/pinball/pinball-app.worker");
} else { } else {
return null; return null;
} }
+1 -1
View File
@@ -3,7 +3,7 @@ import { getDefaultSmallFont } from "../../graphics/bdffont";
import type { GrayImage } from "../../graphics/image"; import type { GrayImage } from "../../graphics/image";
import { getDashboardLogo } from "../../graphics/logo"; import { getDashboardLogo } from "../../graphics/logo";
import { wrapText } from "../../graphics/textwrap"; import { wrapText } from "../../graphics/textwrap";
import { TextViewerLayer } from "../apps/text-viewer"; import { TextViewerLayer } from "../../apps/files/text-viewer";
import type { MenuItem } from "../menu"; import type { MenuItem } from "../menu";
import { shell } from "../shell/shell"; import { shell } from "../shell/shell";
import { import {
@@ -4,7 +4,7 @@ import { GESTURE_DOUBLE_CLICK } from "../gestures";
import { drawSelectionHighlight } from "../menu"; import { drawSelectionHighlight } from "../menu";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers";
import { wrapText, truncateText } from "../../graphics/textwrap"; import { wrapText, truncateText } from "../../graphics/textwrap";
import { MIN_WINDOW_HEIGHT, minWindowTop } from "../shell/geometry"; import { MIN_WINDOW_HEIGHT, minWindowTop } from "./geometry";
const DIALOG_X = 40; const DIALOG_X = 40;
const DIALOG_W = G2_LENS_WIDTH - 80; const DIALOG_W = G2_LENS_WIDTH - 80;
+2 -2
View File
@@ -4,8 +4,8 @@ import { EvenAIStatus, EventSourceType, OsEventTypeList } from "../../g2/events"
import type { RawInputEvent } from "../../native/faceclaw-communicator"; import type { RawInputEvent } from "../../native/faceclaw-communicator";
import { DashboardInputEvent, Layer, LayerActions, LayerContext, LayerStack, noopLayerActions } from "../layers"; import { DashboardInputEvent, Layer, LayerActions, LayerContext, LayerStack, noopLayerActions } from "../layers";
import { MenuLayer, type MenuItem } from "../menu"; import { MenuLayer, type MenuItem } from "../menu";
import { VoiceInputLayer, type VoiceSendTarget } from "../apps/voice-input"; import { VoiceInputLayer, type VoiceSendTarget } from "./voice-input";
import { AssistantLayer } from "../apps/assistant"; import { AssistantLayer } from "./assistant";
import { AssistantSession, type AssistantBackendConfig } from "../../assistant/session"; import { AssistantSession, type AssistantBackendConfig } from "../../assistant/session";
import { resolveAssistantModel } from "../../assistant/models"; import { resolveAssistantModel } from "../../assistant/models";
import type { AssistantContext } from "../../assistant/types"; import type { AssistantContext } from "../../assistant/types";
@@ -7,7 +7,7 @@ import { anthropicApiKeySetting } from "../dashboard-settings";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, gestureHints } from "../gestures"; import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, gestureHints } from "../gestures";
import { drawSelectionHighlight } from "../menu"; import { drawSelectionHighlight } from "../menu";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers"; import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers";
import { MIN_WINDOW_HEIGHT, minWindowTop } from "../shell/geometry"; import { MIN_WINDOW_HEIGHT, minWindowTop } from "./geometry";
const DIALOG_X = 40; const DIALOG_X = 40;
const DIALOG_W = G2_LENS_WIDTH - 80; const DIALOG_W = G2_LENS_WIDTH - 80;
File renamed without changes.