feat: backend selector setting

This commit is contained in:
DeskClaw Bot
2026-04-21 17:44:01 +00:00
Unverified
parent c231c54778
commit 5e6d7f9709
4 changed files with 38 additions and 1 deletions

View File

@@ -474,8 +474,9 @@ async function initialize(): Promise<void> {
});
// Start Gateway automatically (this seeds missing bootstrap files with full templates)
const gatewayBackend = await getSetting('gatewayBackend');
const gatewayAutoStart = await getSetting('gatewayAutoStart');
if (!isE2EMode && gatewayAutoStart) {
if (!isE2EMode && gatewayBackend === 'openclaw' && gatewayAutoStart) {
try {
await syncAllProviderAuthToRuntime();
logger.debug('Auto-starting Gateway...');
@@ -487,6 +488,8 @@ async function initialize(): Promise<void> {
}
} else if (isE2EMode) {
logger.info('Gateway auto-start skipped in E2E mode');
} else if (gatewayBackend !== 'openclaw') {
logger.info(`Gateway auto-start skipped (backend=${gatewayBackend})`);
} else {
logger.info('Gateway auto-start disabled in settings');
}

View File

@@ -35,6 +35,7 @@ export interface AppSettings {
gatewayAutoStart: boolean;
gatewayPort: number;
gatewayToken: string;
gatewayBackend: 'openclaw' | 'hermes';
proxyEnabled: boolean;
proxyServer: string;
proxyHttpServer: string;
@@ -86,6 +87,7 @@ function createDefaultSettings(): AppSettings {
gatewayAutoStart: true,
gatewayPort: 18789,
gatewayToken: generateToken(),
gatewayBackend: 'openclaw',
proxyEnabled: false,
proxyServer: '',
proxyHttpServer: '',