feat: add monitoring settings tab, workbench view, and inspection alert improvements
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled

This commit is contained in:
2026-10-30 12:12:04 +08:00
committed by trae-solo-agent
parent 16dd04f746
commit 4a02370006
26 changed files with 2569 additions and 233 deletions

View File

@@ -9,6 +9,10 @@ const safeParse = <T>(value: string | null): T | null => {
export const LOCAL_STORAGE_ADAPTER_CHANGED_EVENT = 'netcatty:local-storage-adapter-changed';
// 全局钩子:写后调用。AppSideEffects 注册后用来同步权威源。
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(globalThis as any).__NETCATTY_SETTINGS_SYNC__ = null as null | ((key: string, value: string | null) => void);
const pendingChangedKeys = new Set<string>();
let emitChangedKeysTimer: ReturnType<typeof setTimeout> | null = null;
@@ -55,6 +59,8 @@ function safeSetItem(key: string, value: string): boolean {
}
localStorage.setItem(key, value);
emitLocalStorageAdapterChanged(key);
// 同步到权威源(如果钩子已注册)
try { (globalThis as any).__NETCATTY_SETTINGS_SYNC__?.(key, value); } catch {}
return true;
} catch (err) {
if (
@@ -107,5 +113,7 @@ export const localStorageAdapter = {
if (localStorage.getItem(key) === null) return;
localStorage.removeItem(key);
emitLocalStorageAdapterChanged(key);
// 同步到权威源(删除)
try { (globalThis as any).__NETCATTY_SETTINGS_SYNC__?.(key, null); } catch {}
},
};