feat: enhance after-pack script to copy OpenClaw runtime dependencies
- Added a new script `bundle-openclaw.mjs` to bundle OpenClaw runtime dependencies. - Updated `after-pack.cjs` to copy bundled OpenClaw runtime and its node_modules. - Improved cleanup of unnecessary development files in node_modules. - Adjusted paths for resources in the packaging process. style: update loading indicator styles in ChatHistoryPanel - Changed the border radius and padding for the loading indicator in ChatHistoryPanel. fix: improve ProvidersSection to handle provider account syncing - Added logic to sync model configuration to provider accounts. - Introduced error handling and loading states during the sync process. - Enhanced vendor resolution and account management logic. fix: fallback session handling in chat store - Implemented fallback session logic in loadSessions to ensure a valid session is always available on error.
This commit is contained in:
@@ -16,6 +16,7 @@ import { dispatchLocalHostApi } from '@electron/api/router';
|
||||
import { syncProviderRuntimeSnapshot } from '@electron/service/provider-runtime-sync';
|
||||
import { applyLaunchAtStartupSetting, syncLaunchAtStartupSettingFromConfig } from '@electron/service/launch-at-startup';
|
||||
import { ensureBuiltinSkillsInstalled, ensurePreinstalledSkillsInstalled } from '@electron/utils/skill-config';
|
||||
import { syncGatewayConfigBeforeLaunch } from '@electron/gateway/config-sync';
|
||||
|
||||
// 初始化 updater,确保在 app ready 之前或者之中注册好 IPC
|
||||
appUpdater.init();
|
||||
@@ -140,8 +141,16 @@ app.whenReady().then(async () => {
|
||||
log.warn('Failed to install preinstalled skills:', error);
|
||||
});
|
||||
|
||||
gatewayManager.init();
|
||||
try {
|
||||
await syncGatewayConfigBeforeLaunch();
|
||||
} catch (error) {
|
||||
log.warn('Failed to sync OpenClaw config before launch:', error);
|
||||
}
|
||||
|
||||
refreshProviderRuntime();
|
||||
void gatewayManager.init().catch((error) => {
|
||||
log.warn('Failed to initialize GatewayManager:', error);
|
||||
});
|
||||
|
||||
onProviderChange(() => {
|
||||
const runtimeSync = refreshProviderRuntime();
|
||||
|
||||
Reference in New Issue
Block a user