慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311
修(Control UI)之制,存其本构,以备其存(#85879) · openclaw/openclaw@1a60c19
clawsweeper · 2026-05-24 · via Recent Commits to openclaw:main

@@ -87,6 +87,23 @@ function applyConfigSchema(state: ConfigState, res: ConfigSchemaResponse) {

8787

state.configSchemaVersion = res.version ?? null;

8888

}

898990+

function asConfigRecord(value: unknown): Record<string, unknown> | null {

91+

if (!value || typeof value !== "object" || Array.isArray(value)) {

92+

return null;

93+

}

94+

return value as Record<string, unknown>;

95+

}

96+97+

function resolveEditableSnapshotConfig(

98+

snapshot: ConfigSnapshot | null | undefined,

99+

): Record<string, unknown> | null {

100+

return (

101+

asConfigRecord(snapshot?.sourceConfig) ??

102+

asConfigRecord(snapshot?.resolved) ??

103+

asConfigRecord(snapshot?.config)

104+

);

105+

}

106+90107

export function applyConfigSnapshot(

91108

state: ConfigState,

92109

snapshot: ConfigSnapshot,

@@ -95,15 +112,16 @@ export function applyConfigSnapshot(

95112

const preservePendingChanges = state.configFormDirty && options.discardPendingChanges !== true;

96113

const draftBaseHash = state.configDraftBaseHash ?? state.configSnapshot?.hash ?? null;

97114

state.configSnapshot = snapshot;

115+

const editableConfig = resolveEditableSnapshotConfig(snapshot);

98116

const rawAvailable = typeof snapshot.raw === "string";

99117

if (!rawAvailable && state.configFormMode === "raw") {

100118

state.configFormMode = "form";

101119

}

102120

const rawFromSnapshot: string =

103121

typeof snapshot.raw === "string"

104122

? snapshot.raw

105-

: snapshot.config && typeof snapshot.config === "object"

106-

? serializeConfigForm(snapshot.config)

123+

: editableConfig

124+

? serializeConfigForm(editableConfig)

107125

: state.configRaw;

108126

if (!preservePendingChanges || state.configFormMode === "raw") {

109127

state.configRaw = rawFromSnapshot;

@@ -116,8 +134,8 @@ export function applyConfigSnapshot(

116134

state.configIssues = Array.isArray(snapshot.issues) ? snapshot.issues : [];

117135118136

if (!preservePendingChanges) {

119-

state.configForm = cloneConfigObject(snapshot.config ?? {});

120-

state.configFormOriginal = cloneConfigObject(snapshot.config ?? {});

137+

state.configForm = cloneConfigObject(editableConfig ?? {});

138+

state.configFormOriginal = cloneConfigObject(editableConfig ?? {});

121139

state.configRawOriginal = rawFromSnapshot;

122140

state.configFormDirty = false;

123141

state.configDraftBaseHash = snapshot.hash ?? null;

@@ -232,7 +250,7 @@ async function submitConfigChange(

232250233251

function syncConfigDraft(state: ConfigState, nextForm: Record<string, unknown>) {

234252

const original = cloneConfigObject(

235-

state.configFormOriginal ?? state.configSnapshot?.config ?? {},

253+

state.configFormOriginal ?? resolveEditableSnapshotConfig(state.configSnapshot) ?? {},

236254

);

237255

const nextRaw = serializeConfigForm(nextForm);

238256

const originalRaw = serializeConfigForm(original);

@@ -284,7 +302,9 @@ export async function runUpdate(state: ConfigState) {

284302

}

285303286304

function mutateConfigForm(state: ConfigState, mutate: (draft: Record<string, unknown>) => void) {

287-

const base = cloneConfigObject(state.configForm ?? state.configSnapshot?.config ?? {});

305+

const base = cloneConfigObject(

306+

state.configForm ?? resolveEditableSnapshotConfig(state.configSnapshot) ?? {},

307+

);

288308

mutate(base);

289309

syncConfigDraft(state, base);

290310

}

@@ -374,12 +394,7 @@ export function updateConfigFormValue(

374394

}

375395376396

export function stageConfigPreset(state: ConfigState, patch: Record<string, unknown>) {

377-

const snapshotConfig =

378-

state.configSnapshot?.config &&

379-

typeof state.configSnapshot.config === "object" &&

380-

!Array.isArray(state.configSnapshot.config)

381-

? state.configSnapshot.config

382-

: null;

397+

const snapshotConfig = resolveEditableSnapshotConfig(state.configSnapshot);

383398

const baseSource = state.configForm ?? snapshotConfig;

384399

if (!baseSource || (!state.configForm && !state.configSnapshot?.hash)) {

385400

return;

@@ -393,12 +408,11 @@ export function stageConfigPreset(state: ConfigState, patch: Record<string, unkn

393408

}

394409395410

export function resetConfigPendingChanges(state: ConfigState) {

396-

state.configForm = cloneConfigObject(

397-

state.configFormOriginal ?? state.configSnapshot?.config ?? {},

398-

);

411+

const editableConfig = resolveEditableSnapshotConfig(state.configSnapshot);

412+

state.configForm = cloneConfigObject(state.configFormOriginal ?? editableConfig ?? {});

399413

state.configRaw =

400414

state.configRawOriginal ??

401-

serializeConfigForm(state.configFormOriginal ?? state.configSnapshot?.config ?? {});

415+

serializeConfigForm(state.configFormOriginal ?? editableConfig ?? {});

402416

state.configFormDirty = false;

403417

state.configDraftBaseHash = state.configSnapshot?.hash ?? null;

404418

autoAllowlistedPluginIdsByState.delete(state);

@@ -434,8 +448,7 @@ export function ensureAgentConfigEntry(state: ConfigState, agentId: string): num

434448

if (!normalizedAgentId) {

435449

return -1;

436450

}

437-

const source =

438-

state.configForm ?? (state.configSnapshot?.config as Record<string, unknown> | null);

451+

const source = state.configForm ?? resolveEditableSnapshotConfig(state.configSnapshot);

439452

const existingIndex = findAgentConfigEntryIndex(source, normalizedAgentId);

440453

if (existingIndex >= 0) {

441454

return existingIndex;

@@ -451,8 +464,7 @@ export function stageDefaultAgentConfigEntry(state: ConfigState, agentId: string

451464

if (!normalizedAgentId) {

452465

return false;

453466

}

454-

const source =

455-

state.configForm ?? (state.configSnapshot?.config as Record<string, unknown> | null);

467+

const source = state.configForm ?? resolveEditableSnapshotConfig(state.configSnapshot);

456468

const targetIndex = findAgentConfigEntryIndex(source, normalizedAgentId);

457469

if (targetIndex < 0) {

458470

return false;