惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
H
Help Net Security
罗磊的独立博客
The Cloudflare Blog
J
Java Code Geeks
博客园 - 叶小钗
I
InfoQ
B
Blog
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
月光博客
月光博客
博客园_首页
雷峰网
雷峰网
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
美团技术团队
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美

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
fix: canonicalize diagnostic session aliases · openclaw/o...
steipete · 2026-05-03 · via Recent Commits to openclaw:main

@@ -46,48 +46,95 @@ function sessionRefs(params: { sessionId?: string; sessionKey?: string }): strin

4646

return refs;

4747

}

484849+

function registerSessionActivityRefs(

50+

activity: SessionActivity,

51+

params: { sessionId?: string; sessionKey?: string; runId?: string },

52+

): void {

53+

activity.sessionId ??= params.sessionId;

54+

activity.sessionKey ??= params.sessionKey;

55+

for (const ref of sessionRefs(params)) {

56+

activityByRef.set(ref, activity);

57+

}

58+

if (params.runId) {

59+

activityByRunId.set(params.runId, activity);

60+

}

61+

}

62+63+

function replaceSessionActivityReferences(source: SessionActivity, target: SessionActivity): void {

64+

for (const [ref, activity] of activityByRef) {

65+

if (activity === source) {

66+

activityByRef.set(ref, target);

67+

}

68+

}

69+

for (const [runId, activity] of activityByRunId) {

70+

if (activity === source) {

71+

activityByRunId.set(runId, target);

72+

}

73+

}

74+

}

75+76+

function mergeSessionActivity(target: SessionActivity, source: SessionActivity): void {

77+

target.sessionId ??= source.sessionId;

78+

target.sessionKey ??= source.sessionKey;

79+

target.activeEmbeddedRun ||= source.activeEmbeddedRun;

80+

for (const [key, tool] of source.activeTools) {

81+

target.activeTools.set(key, tool);

82+

}

83+

for (const call of source.activeModelCalls) {

84+

target.activeModelCalls.add(call);

85+

}

86+

if (source.lastProgressAt > target.lastProgressAt) {

87+

target.lastProgressAt = source.lastProgressAt;

88+

target.lastProgressReason = source.lastProgressReason;

89+

}

90+

replaceSessionActivityReferences(source, target);

91+

}

92+4993

function resolveSessionActivity(params: {

5094

sessionId?: string;

5195

sessionKey?: string;

5296

runId?: string;

5397

create?: boolean;

5498

}): SessionActivity | undefined {

99+

let activity: SessionActivity | undefined;

55100

if (params.runId) {

56101

const byRun = activityByRunId.get(params.runId);

57102

if (byRun) {

58-

return byRun;

103+

activity = byRun;

59104

}

60105

}

6110662107

for (const ref of sessionRefs(params)) {

63-

const activity = activityByRef.get(ref);

64-

if (activity) {

65-

if (params.runId) {

66-

activityByRunId.set(params.runId, activity);

67-

}

68-

return activity;

108+

const byRef = activityByRef.get(ref);

109+

if (!byRef) {

110+

continue;

111+

}

112+

if (!activity) {

113+

activity = byRef;

114+

} else if (activity !== byRef) {

115+

mergeSessionActivity(activity, byRef);

69116

}

70117

}

71118119+

if (activity) {

120+

registerSessionActivityRefs(activity, params);

121+

return activity;

122+

}

123+72124

if (!params.create) {

73125

return undefined;

74126

}

7512776-

const activity: SessionActivity = {

128+

const created: SessionActivity = {

77129

sessionId: params.sessionId,

78130

sessionKey: params.sessionKey,

79131

activeEmbeddedRun: false,

80132

activeTools: new Map(),

81133

activeModelCalls: new Set(),

82134

lastProgressAt: Date.now(),

83135

};

84-

for (const ref of sessionRefs(params)) {

85-

activityByRef.set(ref, activity);

86-

}

87-

if (params.runId) {

88-

activityByRunId.set(params.runId, activity);

89-

}

90-

return activity;

136+

registerSessionActivityRefs(created, params);

137+

return created;

91138

}

9213993140

function touchSessionActivity(activity: SessionActivity, reason: string, now = Date.now()): void {