From 1622e08372eb4147b5a5a8fa3f41e5eac7c49176 Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Tue, 3 Feb 2026 06:45:35 -0800 Subject: [PATCH] format --- app/src/components/ServerTab/ServerTab.tsx | 2 +- app/src/lib/api/client.ts | 84 +++++++++++++--------- tauri/src/platform/filesystem.ts | 2 +- web/src/platform/filesystem.ts | 2 +- 4 files changed, 53 insertions(+), 37 deletions(-) diff --git a/app/src/components/ServerTab/ServerTab.tsx b/app/src/components/ServerTab/ServerTab.tsx index d77c7800..69fc7117 100644 --- a/app/src/components/ServerTab/ServerTab.tsx +++ b/app/src/components/ServerTab/ServerTab.tsx @@ -1,8 +1,8 @@ import { ConnectionForm } from '@/components/ServerSettings/ConnectionForm'; import { DataFolders } from '@/components/ServerSettings/DataFolders'; +import { ProviderSettings } from '@/components/ServerSettings/ProviderSettings'; import { ServerStatus } from '@/components/ServerSettings/ServerStatus'; import { UpdateStatus } from '@/components/ServerSettings/UpdateStatus'; -import { ProviderSettings } from '@/components/ServerSettings/ProviderSettings'; import { usePlatform } from '@/platform/PlatformContext'; export function ServerTab() { diff --git a/app/src/lib/api/client.ts b/app/src/lib/api/client.ts index 01f548d2..da64d4ff 100644 --- a/app/src/lib/api/client.ts +++ b/app/src/lib/api/client.ts @@ -1,30 +1,30 @@ -import { useServerStore } from '@/stores/serverStore'; import type { LanguageCode } from '@/lib/constants/languages'; +import { useServerStore } from '@/stores/serverStore'; import type { - VoiceProfileCreate, - VoiceProfileResponse, - ProfileSampleResponse, - GenerationRequest, - GenerationResponse, - HistoryQuery, - HistoryListResponse, - HistoryResponse, - TranscriptionResponse, - HealthResponse, - ModelStatusListResponse, - ModelDownloadRequest, ActiveTasksResponse, FolderPathsResponse, + GenerationRequest, + GenerationResponse, + HealthResponse, + HistoryListResponse, + HistoryQuery, + HistoryResponse, + ModelDownloadRequest, + ModelStatusListResponse, + ProfileSampleResponse, StoryCreate, - StoryResponse, StoryDetailResponse, + StoryItemBatchUpdate, StoryItemCreate, StoryItemDetail, - StoryItemBatchUpdate, - StoryItemReorder, StoryItemMove, - StoryItemTrim, + StoryItemReorder, StoryItemSplit, + StoryItemTrim, + StoryResponse, + TranscriptionResponse, + VoiceProfileCreate, + VoiceProfileResponse, } from './types'; class ApiClient { @@ -328,7 +328,15 @@ class ApiClient { return response.blob(); } - async importGeneration(file: File): Promise<{ id: string; profile_id: string; profile_name: string; text: string; message: string }> { + async importGeneration( + file: File, + ): Promise<{ + id: string; + profile_id: string; + profile_name: string; + text: string; + message: string; + }> { const url = `${this.getBaseUrl()}/history/import`; const formData = new FormData(); formData.append('file', file); @@ -387,7 +395,12 @@ class ApiClient { } async triggerModelDownload(modelName: string): Promise<{ message: string }> { - console.log('[API] triggerModelDownload called for:', modelName, 'at', new Date().toISOString()); + console.log( + '[API] triggerModelDownload called for:', + modelName, + 'at', + new Date().toISOString(), + ); const result = await this.request<{ message: string }>('/models/download', { method: 'POST', body: JSON.stringify({ model_name: modelName } as ModelDownloadRequest), @@ -420,10 +433,7 @@ class ApiClient { return this.request('/channels'); } - async createChannel(data: { - name: string; - device_ids: string[]; - }): Promise<{ + async createChannel(data: { name: string; device_ids: string[] }): Promise<{ id: string; name: string; is_default: boolean; @@ -465,10 +475,7 @@ class ApiClient { return this.request(`/channels/${channelId}/voices`); } - async setChannelVoices( - channelId: string, - profileIds: string[], - ): Promise<{ message: string }> { + async setChannelVoices(channelId: string, profileIds: string[]): Promise<{ message: string }> { return this.request(`/channels/${channelId}/voices`, { method: 'PUT', body: JSON.stringify({ profile_ids: profileIds }), @@ -479,10 +486,7 @@ class ApiClient { return this.request(`/profiles/${profileId}/channels`); } - async setProfileChannels( - profileId: string, - channelIds: string[], - ): Promise<{ message: string }> { + async setProfileChannels(profileId: string, channelIds: string[]): Promise<{ message: string }> { return this.request(`/profiles/${profileId}/channels`, { method: 'PUT', body: JSON.stringify({ channel_ids: channelIds }), @@ -545,21 +549,33 @@ class ApiClient { }); } - async moveStoryItem(storyId: string, itemId: string, data: StoryItemMove): Promise { + async moveStoryItem( + storyId: string, + itemId: string, + data: StoryItemMove, + ): Promise { return this.request(`/stories/${storyId}/items/${itemId}/move`, { method: 'PUT', body: JSON.stringify(data), }); } - async trimStoryItem(storyId: string, itemId: string, data: StoryItemTrim): Promise { + async trimStoryItem( + storyId: string, + itemId: string, + data: StoryItemTrim, + ): Promise { return this.request(`/stories/${storyId}/items/${itemId}/trim`, { method: 'PUT', body: JSON.stringify(data), }); } - async splitStoryItem(storyId: string, itemId: string, data: StoryItemSplit): Promise { + async splitStoryItem( + storyId: string, + itemId: string, + data: StoryItemSplit, + ): Promise { return this.request(`/stories/${storyId}/items/${itemId}/split`, { method: 'POST', body: JSON.stringify(data), diff --git a/tauri/src/platform/filesystem.ts b/tauri/src/platform/filesystem.ts index 70972eb2..226a2cba 100644 --- a/tauri/src/platform/filesystem.ts +++ b/tauri/src/platform/filesystem.ts @@ -1,4 +1,4 @@ -import type { PlatformFilesystem, FileFilter } from '@/platform/types'; +import type { FileFilter, PlatformFilesystem } from '@/platform/types'; export const tauriFilesystem: PlatformFilesystem = { async saveFile(filename: string, blob: Blob, filters?: FileFilter[]) { diff --git a/web/src/platform/filesystem.ts b/web/src/platform/filesystem.ts index b9d74690..d2717bd2 100644 --- a/web/src/platform/filesystem.ts +++ b/web/src/platform/filesystem.ts @@ -1,4 +1,4 @@ -import type { PlatformFilesystem, FileFilter } from '@/platform/types'; +import type { FileFilter, PlatformFilesystem } from '@/platform/types'; export const webFilesystem: PlatformFilesystem = { async saveFile(filename: string, blob: Blob, _filters?: FileFilter[]) {