Skip to content

Commit 6e09c11

Browse files
committed
chore: Switch to NodeNext for module/moduleResolution in ui.
1 parent 27677dd commit 6e09c11

93 files changed

Lines changed: 362 additions & 355 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎ui/src/ui/app-channels.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import type { OpenClawApp } from "./app";
2-
import type { NostrProfile } from "./types";
1+
import type { OpenClawApp } from "./app.ts";
2+
import type { NostrProfile } from "./types.ts";
33
import {
44
loadChannels,
55
logoutWhatsApp,
66
startWhatsAppLogin,
77
waitWhatsAppLogin,
8-
} from "./controllers/channels";
9-
import { loadConfig, saveConfig } from "./controllers/config";
10-
import { createNostrProfileFormState } from "./views/channels.nostr-profile-form";
8+
} from "./controllers/channels.ts";
9+
import { loadConfig, saveConfig } from "./controllers/config.ts";
10+
import { createNostrProfileFormState } from "./views/channels.nostr-profile-form.ts";
1111

1212
export async function handleWhatsAppStart(host: OpenClawApp, force: boolean) {
1313
await startWhatsAppLogin(host, force);

‎ui/src/ui/app-chat.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import type { OpenClawApp } from "./app";
2-
import type { GatewayHelloOk } from "./gateway";
3-
import type { ChatAttachment, ChatQueueItem } from "./ui-types";
1+
import type { OpenClawApp } from "./app.ts";
2+
import type { GatewayHelloOk } from "./gateway.ts";
3+
import type { ChatAttachment, ChatQueueItem } from "./ui-types.ts";
44
import { parseAgentSessionKey } from "../../../src/sessions/session-key-utils.js";
5-
import { scheduleChatScroll } from "./app-scroll";
6-
import { setLastActiveSessionKey } from "./app-settings";
7-
import { resetToolStream } from "./app-tool-stream";
8-
import { abortChatRun, loadChatHistory, sendChatMessage } from "./controllers/chat";
9-
import { loadSessions } from "./controllers/sessions";
10-
import { normalizeBasePath } from "./navigation";
11-
import { generateUUID } from "./uuid";
5+
import { scheduleChatScroll } from "./app-scroll.ts";
6+
import { setLastActiveSessionKey } from "./app-settings.ts";
7+
import { resetToolStream } from "./app-tool-stream.ts";
8+
import { abortChatRun, loadChatHistory, sendChatMessage } from "./controllers/chat.ts";
9+
import { loadSessions } from "./controllers/sessions.ts";
10+
import { normalizeBasePath } from "./navigation.ts";
11+
import { generateUUID } from "./uuid.ts";
1212

1313
export type ChatHost = {
1414
connected: boolean;

‎ui/src/ui/app-defaults.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { LogLevel } from "./types";
2-
import type { CronFormState } from "./ui-types";
1+
import type { LogLevel } from "./types.ts";
2+
import type { CronFormState } from "./ui-types.ts";
33

44
export const DEFAULT_LOG_LEVEL_FILTERS: Record<LogLevel, boolean> = {
55
trace: true,

‎ui/src/ui/app-gateway.ts‎

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
1-
import type { OpenClawApp } from "./app";
2-
import type { EventLogEntry } from "./app-events";
3-
import type { ExecApprovalRequest } from "./controllers/exec-approval";
4-
import type { GatewayEventFrame, GatewayHelloOk } from "./gateway";
5-
import type { Tab } from "./navigation";
6-
import type { UiSettings } from "./storage";
7-
import type { AgentsListResult, PresenceEntry, HealthSnapshot, StatusSummary } from "./types";
8-
import { CHAT_SESSIONS_ACTIVE_MINUTES, flushChatQueueForEvent } from "./app-chat";
9-
import { applySettings, loadCron, refreshActiveTab, setLastActiveSessionKey } from "./app-settings";
10-
import { handleAgentEvent, resetToolStream, type AgentEventPayload } from "./app-tool-stream";
11-
import { loadAgents } from "./controllers/agents";
12-
import { loadAssistantIdentity } from "./controllers/assistant-identity";
13-
import { loadChatHistory } from "./controllers/chat";
14-
import { handleChatEvent, type ChatEventPayload } from "./controllers/chat";
15-
import { loadDevices } from "./controllers/devices";
1+
import type { EventLogEntry } from "./app-events.ts";
2+
import type { OpenClawApp } from "./app.ts";
3+
import type { ExecApprovalRequest } from "./controllers/exec-approval.ts";
4+
import type { GatewayEventFrame, GatewayHelloOk } from "./gateway.ts";
5+
import type { Tab } from "./navigation.ts";
6+
import type { UiSettings } from "./storage.ts";
7+
import type { AgentsListResult, PresenceEntry, HealthSnapshot, StatusSummary } from "./types.ts";
8+
import { CHAT_SESSIONS_ACTIVE_MINUTES, flushChatQueueForEvent } from "./app-chat.ts";
9+
import {
10+
applySettings,
11+
loadCron,
12+
refreshActiveTab,
13+
setLastActiveSessionKey,
14+
} from "./app-settings.ts";
15+
import { handleAgentEvent, resetToolStream, type AgentEventPayload } from "./app-tool-stream.ts";
16+
import { loadAgents } from "./controllers/agents.ts";
17+
import { loadAssistantIdentity } from "./controllers/assistant-identity.ts";
18+
import { loadChatHistory } from "./controllers/chat.ts";
19+
import { handleChatEvent, type ChatEventPayload } from "./controllers/chat.ts";
20+
import { loadDevices } from "./controllers/devices.ts";
1621
import {
1722
addExecApproval,
1823
parseExecApprovalRequested,
1924
parseExecApprovalResolved,
2025
removeExecApproval,
21-
} from "./controllers/exec-approval";
22-
import { loadNodes } from "./controllers/nodes";
23-
import { loadSessions } from "./controllers/sessions";
24-
import { GatewayBrowserClient } from "./gateway";
26+
} from "./controllers/exec-approval.ts";
27+
import { loadNodes } from "./controllers/nodes.ts";
28+
import { loadSessions } from "./controllers/sessions.ts";
29+
import { GatewayBrowserClient } from "./gateway.ts";
2530

2631
type GatewayHost = {
2732
settings: UiSettings;

‎ui/src/ui/app-lifecycle.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import type { Tab } from "./navigation";
2-
import { connectGateway } from "./app-gateway";
1+
import type { Tab } from "./navigation.ts";
2+
import { connectGateway } from "./app-gateway.ts";
33
import {
44
startLogsPolling,
55
startNodesPolling,
66
stopLogsPolling,
77
stopNodesPolling,
88
startDebugPolling,
99
stopDebugPolling,
10-
} from "./app-polling";
11-
import { observeTopbar, scheduleChatScroll, scheduleLogsScroll } from "./app-scroll";
10+
} from "./app-polling.ts";
11+
import { observeTopbar, scheduleChatScroll, scheduleLogsScroll } from "./app-scroll.ts";
1212
import {
1313
applySettingsFromUrl,
1414
attachThemeListener,
1515
detachThemeListener,
1616
inferBasePath,
1717
syncTabWithLocation,
1818
syncThemeWithSettings,
19-
} from "./app-settings";
19+
} from "./app-settings.ts";
2020

2121
type LifecycleHost = {
2222
basePath: string;

‎ui/src/ui/app-polling.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { OpenClawApp } from "./app";
2-
import { loadDebug } from "./controllers/debug";
3-
import { loadLogs } from "./controllers/logs";
4-
import { loadNodes } from "./controllers/nodes";
1+
import type { OpenClawApp } from "./app.ts";
2+
import { loadDebug } from "./controllers/debug.ts";
3+
import { loadLogs } from "./controllers/logs.ts";
4+
import { loadNodes } from "./controllers/nodes.ts";
55

66
type PollingHost = {
77
nodesPollInterval: number | null;

‎ui/src/ui/app-render.helpers.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { html } from "lit";
22
import { repeat } from "lit/directives/repeat.js";
3-
import type { AppViewState } from "./app-view-state";
4-
import type { ThemeMode } from "./theme";
5-
import type { ThemeTransitionContext } from "./theme-transition";
6-
import type { SessionsListResult } from "./types";
7-
import { OpenClawApp } from "./app";
8-
import { refreshChat } from "./app-chat";
9-
import { syncUrlWithSessionKey } from "./app-settings";
10-
import { ChatState, loadChatHistory } from "./controllers/chat";
11-
import { icons } from "./icons";
12-
import { iconForTab, pathForTab, titleForTab, type Tab } from "./navigation";
3+
import type { AppViewState } from "./app-view-state.ts";
4+
import type { ThemeTransitionContext } from "./theme-transition.ts";
5+
import type { ThemeMode } from "./theme.ts";
6+
import type { SessionsListResult } from "./types.ts";
7+
import { refreshChat } from "./app-chat.ts";
8+
import { syncUrlWithSessionKey } from "./app-settings.ts";
9+
import { OpenClawApp } from "./app.ts";
10+
import { ChatState, loadChatHistory } from "./controllers/chat.ts";
11+
import { icons } from "./icons.ts";
12+
import { iconForTab, pathForTab, titleForTab, type Tab } from "./navigation.ts";
1313

1414
export function renderTab(state: AppViewState, tab: Tab) {
1515
const href = pathForTab(tab, state.basePath);

‎ui/src/ui/app-render.ts‎

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { html, nothing } from "lit";
2-
import type { AppViewState } from "./app-view-state";
2+
import type { AppViewState } from "./app-view-state.ts";
33
import { parseAgentSessionKey } from "../../../src/routing/session-key.js";
4-
import { OpenClawApp } from "./app";
5-
import { ChatHost, refreshChatAvatar } from "./app-chat";
6-
import { renderChatControls, renderTab, renderThemeToggle } from "./app-render.helpers";
7-
import { loadAgentFileContent, loadAgentFiles, saveAgentFile } from "./controllers/agent-files";
8-
import { loadAgentIdentities, loadAgentIdentity } from "./controllers/agent-identity";
9-
import { loadAgentSkills } from "./controllers/agent-skills";
10-
import { loadAgents } from "./controllers/agents";
11-
import { loadChannels } from "./controllers/channels";
12-
import { ChatState, loadChatHistory } from "./controllers/chat";
4+
import { ChatHost, refreshChatAvatar } from "./app-chat.ts";
5+
import { renderChatControls, renderTab, renderThemeToggle } from "./app-render.helpers.ts";
6+
import { OpenClawApp } from "./app.ts";
7+
import { loadAgentFileContent, loadAgentFiles, saveAgentFile } from "./controllers/agent-files.ts";
8+
import { loadAgentIdentities, loadAgentIdentity } from "./controllers/agent-identity.ts";
9+
import { loadAgentSkills } from "./controllers/agent-skills.ts";
10+
import { loadAgents } from "./controllers/agents.ts";
11+
import { loadChannels } from "./controllers/channels.ts";
12+
import { ChatState, loadChatHistory } from "./controllers/chat.ts";
1313
import {
1414
applyConfig,
1515
ConfigState,
@@ -18,56 +18,56 @@ import {
1818
saveConfig,
1919
updateConfigFormValue,
2020
removeConfigFormValue,
21-
} from "./controllers/config";
21+
} from "./controllers/config.ts";
2222
import {
2323
loadCronRuns,
2424
toggleCronJob,
2525
runCronJob,
2626
removeCronJob,
2727
addCronJob,
28-
} from "./controllers/cron";
29-
import { loadDebug, callDebugMethod } from "./controllers/debug";
28+
} from "./controllers/cron.ts";
29+
import { loadDebug, callDebugMethod } from "./controllers/debug.ts";
3030
import {
3131
approveDevicePairing,
3232
loadDevices,
3333
rejectDevicePairing,
3434
revokeDeviceToken,
3535
rotateDeviceToken,
36-
} from "./controllers/devices";
36+
} from "./controllers/devices.ts";
3737
import {
3838
loadExecApprovals,
3939
removeExecApprovalsFormValue,
4040
saveExecApprovals,
4141
updateExecApprovalsFormValue,
42-
} from "./controllers/exec-approvals";
43-
import { loadLogs, LogsState } from "./controllers/logs";
44-
import { loadNodes } from "./controllers/nodes";
45-
import { loadPresence } from "./controllers/presence";
46-
import { deleteSession, loadSessions, patchSession } from "./controllers/sessions";
42+
} from "./controllers/exec-approvals.ts";
43+
import { loadLogs, LogsState } from "./controllers/logs.ts";
44+
import { loadNodes } from "./controllers/nodes.ts";
45+
import { loadPresence } from "./controllers/presence.ts";
46+
import { deleteSession, loadSessions, patchSession } from "./controllers/sessions.ts";
4747
import {
4848
installSkill,
4949
loadSkills,
5050
saveSkillApiKey,
5151
updateSkillEdit,
5252
updateSkillEnabled,
53-
} from "./controllers/skills";
54-
import { icons } from "./icons";
55-
import { TAB_GROUPS, subtitleForTab, titleForTab } from "./navigation";
56-
import { ConfigUiHints } from "./types";
57-
import { renderAgents } from "./views/agents";
58-
import { renderChannels } from "./views/channels";
59-
import { renderChat } from "./views/chat";
60-
import { renderConfig } from "./views/config";
61-
import { renderCron } from "./views/cron";
62-
import { renderDebug } from "./views/debug";
63-
import { renderExecApprovalPrompt } from "./views/exec-approval";
64-
import { renderGatewayUrlConfirmation } from "./views/gateway-url-confirmation";
65-
import { renderInstances } from "./views/instances";
66-
import { renderLogs } from "./views/logs";
67-
import { renderNodes } from "./views/nodes";
68-
import { renderOverview } from "./views/overview";
69-
import { renderSessions } from "./views/sessions";
70-
import { renderSkills } from "./views/skills";
53+
} from "./controllers/skills.ts";
54+
import { icons } from "./icons.ts";
55+
import { TAB_GROUPS, subtitleForTab, titleForTab } from "./navigation.ts";
56+
import { ConfigUiHints } from "./types.ts";
57+
import { renderAgents } from "./views/agents.ts";
58+
import { renderChannels } from "./views/channels.ts";
59+
import { renderChat } from "./views/chat.ts";
60+
import { renderConfig } from "./views/config.ts";
61+
import { renderCron } from "./views/cron.ts";
62+
import { renderDebug } from "./views/debug.ts";
63+
import { renderExecApprovalPrompt } from "./views/exec-approval.ts";
64+
import { renderGatewayUrlConfirmation } from "./views/gateway-url-confirmation.ts";
65+
import { renderInstances } from "./views/instances.ts";
66+
import { renderLogs } from "./views/logs.ts";
67+
import { renderNodes } from "./views/nodes.ts";
68+
import { renderOverview } from "./views/overview.ts";
69+
import { renderSessions } from "./views/sessions.ts";
70+
import { renderSkills } from "./views/skills.ts";
7171

7272
const AVATAR_DATA_RE = /^data:/i;
7373
const AVATAR_HTTP_RE = /^https?:\/\//i;

‎ui/src/ui/app-scroll.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
2-
import { handleChatScroll, scheduleChatScroll, resetChatScroll } from "./app-scroll";
2+
import { handleChatScroll, scheduleChatScroll, resetChatScroll } from "./app-scroll.ts";
33

44
/* ------------------------------------------------------------------ */
55
/* Helpers */

‎ui/src/ui/app-settings.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
2-
import type { Tab } from "./navigation";
3-
import { setTabFromRoute } from "./app-settings";
2+
import type { Tab } from "./navigation.ts";
3+
import { setTabFromRoute } from "./app-settings.ts";
44

55
type SettingsHost = Parameters<typeof setTabFromRoute>[0] & {
66
logsPollInterval: number | null;

0 commit comments

Comments
 (0)