feat(panel): modularize 3-tab preferences, add model context windows, and optimize telemetry

- Refactor Preferences into decoupled General, Structure, and Other tabs with unified settings schema, factory reset, and trajectory cache rebuild endpoints
- Extract standalone widget, metric, and step-table column registries to customize topbar/composer slots, hover popup modules, live overview layout, and step detail columns
- Add bilingual zh-CN/en-US i18n dictionaries, theme accent presets, and font scale controls across Shadow DOM overlay and sidebar views
- Support per-model host-advertised context window rules across App and IDE transports
- Preserve CLEARED step generation timings, memoize per-poll model resolution, optimize LOESS sorted-x fitting, and update bilingual READMEs and test suites
This commit is contained in:
fish
2026-11-15 01:18:29 +09:00
parent ad33e9cc62
commit 18c608ae63
63 changed files with 16614 additions and 5873 deletions
+15
View File
@@ -12,6 +12,21 @@ import { ensureLsEndpointDiscovered } from './ls-discovery.mjs';
const QUOTA_CACHE_TTL_MS = 10_000;
const QUOTA_RETRY_COOLDOWN_MS = 5_000;
let contextModelCatalog = null;
export function getContextModelCatalog() {
const { baseUrl, csrfToken } = lsRuntimeEndpoint;
if (!contextModelCatalog || contextModelCatalog.baseUrl !== baseUrl || contextModelCatalog.csrfToken !== csrfToken ||
Date.now() >= contextModelCatalog.expiresAt) {
contextModelCatalog = {
baseUrl,
csrfToken,
expiresAt: Date.now() + 30000,
promise: callLsRpc('GetAvailableModels', {}, 1500).then((data) => data?.response?.models).catch(() => null),
};
}
return contextModelCatalog.promise;
}
async function postLsRpcOnce(baseUrl, csrfToken, method, body, timeoutMs) {
return fetch(`${baseUrl}/exa.language_server_pb.LanguageServerService/${method}`, {