style: lint

This commit is contained in:
Neko Ayaka
2025-12-10 15:11:09 +08:00
parent f171bb5a8d
commit 42d735cfa2
5 changed files with 17 additions and 10 deletions
@@ -73,7 +73,7 @@ jobs:
# NOTICE:
#
# Here installing wrangler to global is required, or otherwise:
# ERR_PNPM_ADDING_TO_ROOT Running this command will add the dependency to the workspace root...
# ERR_PNPM_ADDING_TO_ROOT Running this command will add the dependency to the workspace root...
# error occurs.
#
# Since https://github.com/cloudflare/wrangler-action/pull/339#issuecomment-2667622947 rejected the -g support
@@ -57,7 +57,7 @@ jobs:
# NOTICE:
#
# Here installing wrangler to global is required, or otherwise:
# ERR_PNPM_ADDING_TO_ROOT Running this command will add the dependency to the workspace root...
# ERR_PNPM_ADDING_TO_ROOT Running this command will add the dependency to the workspace root...
# error occurs.
#
# Since https://github.com/cloudflare/wrangler-action/pull/339#issuecomment-2667622947 rejected the -g support
+3 -1
View File
@@ -56,7 +56,9 @@ vi.mock('./mods/api/channel-server', () => ({
initialize: mockInitialize,
onContextUpdate: (cb: typeof contextUpdateHandler) => {
contextUpdateHandler = cb
return () => { contextUpdateHandler = null }
return () => {
contextUpdateHandler = null
}
},
sendContextUpdate: mockSendContextUpdate,
}),
+5 -5
View File
@@ -1931,6 +1931,11 @@ export const useProvidersStore = defineStore('providers', () => {
// Available providers (only those that are properly configured)
const availableProviders = computed(() => Object.keys(providerMetadata).filter(providerId => configuredProviders.value[providerId]))
// Store available models for each provider
const availableModels = ref<Record<string, ModelInfo[]>>({})
const isLoadingModels = ref<Record<string, boolean>>({})
const modelLoadError = ref<Record<string, string | null>>({})
async function resetProviderSettings() {
providerCredentials.value = {}
configuredProviders.value = {}
@@ -1943,11 +1948,6 @@ export const useProvidersStore = defineStore('providers', () => {
await updateConfigurationStatus()
}
// Store available models for each provider
const availableModels = ref<Record<string, ModelInfo[]>>({})
const isLoadingModels = ref<Record<string, boolean>>({})
const modelLoadError = ref<Record<string, string | null>>({})
// Function to fetch models for a specific provider
async function fetchModelsForProvider(providerId: string) {
const config = providerCredentials.value[providerId]
+7 -2
View File
@@ -6,7 +6,7 @@ interface OPFSContext extends Live2DFactoryContext {
declare global {
interface FileSystemDirectoryHandle {
values(): AsyncIterableIterator<FileSystemDirectoryHandle | FileSystemFileHandle>
values: () => AsyncIterableIterator<FileSystemDirectoryHandle | FileSystemFileHandle>
}
}
@@ -60,6 +60,7 @@ export class OPFSCache {
try {
const root = await navigator.storage.getDirectory()
const dirHandle = await root.getDirectoryHandle(key, { create: false })
// eslint-disable-next-line no-console
console.debug(`[OPFS] Cache hit for ${key}`)
const files = await OPFSCache.readDirectoryRecursive(dirHandle, '')
@@ -68,13 +69,14 @@ export class OPFSCache {
return files
}
}
catch (e) {
catch {
// Cache Miss
}
return null
}
static async save(key: string, files: File[]): Promise<void> {
// eslint-disable-next-line no-console
console.debug(`[OPFS] Saving ${files.length} files to ${key}`)
try {
@@ -94,6 +96,7 @@ export class OPFSCache {
// reconstruct settings files from ModelSettings
const settings: ModelSettings = (files as any).settings
if (settings) {
// eslint-disable-next-line no-console
console.debug('[OPFS] Reconstructing settings file...')
const settingsJson = JSON.stringify(settings.json)
const settingsFileName = settings.url || 'model.model3.json'
@@ -103,6 +106,7 @@ export class OPFSCache {
}
await Promise.all(writePromises)
// eslint-disable-next-line no-console
console.debug(`[OPFS] Saved to cache`)
}
catch (e) {
@@ -145,6 +149,7 @@ export class OPFSCache {
}
// cache miss
// eslint-disable-next-line no-console
console.debug(`[OPFS] Cache miss for ${key}`)
context.opfsKey = key