Merge main into PR #221 to resolve conflicts

Resolved merge conflicts in public/views/settings.html:
- Fixed HTML entity escaping for quote characters in presetHint text
- Fixed HTML entity escaping for pendingPresetName text
This commit is contained in:
Badri Narayanan S
2026-02-01 16:20:55 +05:30
9 changed files with 82 additions and 36 deletions

View File

@@ -13,8 +13,6 @@
*/
import path from 'path';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
import express from 'express';
import { getPublicConfig, saveConfig, config } from '../config.js';
import { DEFAULT_PORT, ACCOUNT_CONFIG_PATH, MAX_ACCOUNTS, DEFAULT_PRESETS } from '../constants.js';
@@ -22,18 +20,10 @@ import { readClaudeConfig, updateClaudeConfig, replaceClaudeConfig, getClaudeCon
import { logger } from '../utils/logger.js';
import { getAuthorizationUrl, completeOAuthFlow, startCallbackServer } from '../auth/oauth.js';
import { loadAccounts, saveAccounts } from '../account-manager/storage.js';
import { getPackageVersion } from '../utils/helpers.js';
// Get package version
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
let packageVersion = '1.0.0';
try {
const packageJsonPath = path.join(__dirname, '../../package.json');
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
packageVersion = packageJson.version;
} catch (error) {
logger.warn('[WebUI] Could not read package.json version, using default');
}
const packageVersion = getPackageVersion();
// OAuth state storage (state -> { server, verifier, state, timestamp })
// Maps state ID to active OAuth flow data