Skip to content

Commit 5733fb0

Browse files
authored
refactor(ui): localize internal-only symbols (#100931)
1 parent 94a0d2e commit 5733fb0

6 files changed

Lines changed: 10 additions & 17 deletions

File tree

‎ui/src/api/types.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ export type ChannelAccountSnapshot = {
7373
application?: unknown;
7474
};
7575

76-
export type WhatsAppSelf = {
76+
type WhatsAppSelf = {
7777
e164?: string | null;
7878
jid?: string | null;
7979
};
8080

81-
export type WhatsAppDisconnect = {
81+
type WhatsAppDisconnect = {
8282
at: number;
8383
status?: number | null;
8484
error?: string | null;
@@ -105,7 +105,7 @@ export type TelegramBot = {
105105
username?: string | null;
106106
};
107107

108-
export type TelegramWebhook = {
108+
type TelegramWebhook = {
109109
url?: string | null;
110110
hasCustomCert?: boolean | null;
111111
};
@@ -131,7 +131,7 @@ export type TelegramStatus = {
131131
lastProbeAt?: number | null;
132132
};
133133

134-
export type DiscordBot = {
134+
type DiscordBot = {
135135
id?: string | null;
136136
username?: string | null;
137137
};
@@ -155,7 +155,7 @@ export type DiscordStatus = {
155155
lastProbeAt?: number | null;
156156
};
157157

158-
export type GoogleChatProbe = {
158+
type GoogleChatProbe = {
159159
ok: boolean;
160160
status?: number | null;
161161
error?: string | null;

‎ui/src/app/exec-approval.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,7 @@ export function addExecApproval(
214214
return next;
215215
}
216216

217-
export function removeExecApproval(
218-
queue: ExecApprovalRequest[],
219-
id: string,
220-
): ExecApprovalRequest[] {
217+
function removeExecApproval(queue: ExecApprovalRequest[], id: string): ExecApprovalRequest[] {
221218
return pruneExecApprovalQueue(queue).filter((entry) => entry.id !== id);
222219
}
223220

‎ui/src/lib/channels/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export async function loadChannels(
136136
await refresh;
137137
}
138138

139-
export async function startWhatsAppLogin(state: ChannelsState, force: boolean) {
139+
async function startWhatsAppLogin(state: ChannelsState, force: boolean) {
140140
if (!state.client || !state.connected || state.whatsappBusy) {
141141
return;
142142
}

‎ui/src/pages/chat/realtime-talk-conversation.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,7 @@ function shouldStartNewRealtimeUserEntry(
201201
return true;
202202
}
203203

204-
export function mergeRealtimeTranscriptText(
205-
existing: string,
206-
incoming: string,
207-
isFinal: boolean,
208-
): string {
204+
function mergeRealtimeTranscriptText(existing: string, incoming: string, isFinal: boolean): string {
209205
if (existing.trim() === "") {
210206
return incoming.trimStart();
211207
}

‎ui/src/pages/tasks/data.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export function normalizeTasksCancelResult(value: unknown): TasksCancelResult |
192192
};
193193
}
194194

195-
export function normalizeTaskEventPayload(value: unknown): TaskEventPayload | null {
195+
function normalizeTaskEventPayload(value: unknown): TaskEventPayload | null {
196196
if (!isRecord(value)) {
197197
return null;
198198
}

‎ui/src/pages/tasks/tasks-page.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function formatTaskError(error: unknown, fallback: string): string {
2323
return typeof error === "string" && error.trim() ? error.trim() : fallback;
2424
}
2525

26-
export class TasksPage extends LitElement {
26+
class TasksPage extends LitElement {
2727
override createRenderRoot() {
2828
return this;
2929
}

0 commit comments

Comments
 (0)