mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 03:27:00 +08:00
fix: windows打包
This commit is contained in:
@@ -1,2 +1,8 @@
|
||||
shamefully-hoist=true
|
||||
electron_mirror=https://npmmirror.com/mirrors/electron/
|
||||
# Keep the Windows x64 sherpa-onnx optional runtime available when packaging
|
||||
# Windows from macOS/Linux hosts.
|
||||
supportedArchitectures.os[]=darwin
|
||||
supportedArchitectures.os[]=win32
|
||||
supportedArchitectures.cpu[]=arm64
|
||||
supportedArchitectures.cpu[]=x64
|
||||
|
||||
@@ -1117,6 +1117,7 @@ app.whenReady().then(async () => {
|
||||
|
||||
ipcMain.handle('ai:listProviders', () => aiProviderService.list())
|
||||
ipcMain.handle('ai:getRuntimeConfig', () => aiProviderService.getRuntimeConfig())
|
||||
ipcMain.handle('ai:getVisionRuntimeConfig', () => aiProviderService.getVisionRuntimeConfig())
|
||||
ipcMain.handle('ai:saveProvider', (_, provider: AIProviderConfig) =>
|
||||
aiProviderService.save(provider)
|
||||
)
|
||||
|
||||
Vendored
+2
@@ -40,6 +40,7 @@ import type {
|
||||
AIProviderConfig,
|
||||
AIProviderListResult,
|
||||
AIRuntimeModelConfig,
|
||||
AIVisionRuntimeConfig,
|
||||
AIVisionTestRequest,
|
||||
AIVisionTestResult,
|
||||
LegacyAIConfig
|
||||
@@ -238,6 +239,7 @@ declare global {
|
||||
}>
|
||||
listAIProviders: () => Promise<AIProviderListResult>
|
||||
getAIRuntimeConfig: () => Promise<AIRuntimeModelConfig>
|
||||
getAIVisionRuntimeConfig: () => Promise<AIVisionRuntimeConfig>
|
||||
getAiSearchProviderStatus: () => Promise<AiSearchProviderStatus>
|
||||
authorizeAiSearchExternalProvider: (
|
||||
request: AiSearchExternalAuthorizationRequest
|
||||
|
||||
@@ -124,6 +124,7 @@ const api = {
|
||||
ipcRenderer.invoke('ai:chat', messages, options),
|
||||
listAIProviders: () => ipcRenderer.invoke('ai:listProviders'),
|
||||
getAIRuntimeConfig: () => ipcRenderer.invoke('ai:getRuntimeConfig'),
|
||||
getAIVisionRuntimeConfig: () => ipcRenderer.invoke('ai:getVisionRuntimeConfig'),
|
||||
getAiSearchProviderStatus: (): Promise<AiSearchProviderStatus> =>
|
||||
ipcRenderer.invoke('ai-search:getProviderStatus'),
|
||||
authorizeAiSearchExternalProvider: (
|
||||
|
||||
@@ -64,6 +64,8 @@ describe('preload IPC contract', () => {
|
||||
expect(invoke).toHaveBeenLastCalledWith('cache:clear', 'knowledge')
|
||||
await api.openKnowledgeDirectory()
|
||||
expect(invoke).toHaveBeenLastCalledWith('cache:openKnowledgeDirectory')
|
||||
await api.getAIVisionRuntimeConfig()
|
||||
expect(invoke).toHaveBeenLastCalledWith('ai:getVisionRuntimeConfig')
|
||||
|
||||
await api.getImage('fixture-md5', 'fixture.dat', 'fixture-session', {
|
||||
force: true,
|
||||
|
||||
Reference in New Issue
Block a user