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

推荐订阅源

月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
T
Tailwind CSS Blog
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
H
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
腾讯CDC
V
V2EX
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog
M
MIT News - Artificial intelligence
宝玉的分享
宝玉的分享

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: keep user turn enrichment off dispatch · openclaw/op...
shakkernerd · 2026-05-27 · via Recent Commits to openclaw:main

@@ -2596,16 +2596,19 @@ export const chatHandlers: GatewayRequestHandlers = {

25962596

const preparedUserTurnMediaPromise =

25972597

normalizedAttachments.length > 0 ? getPersistedMediaForTranscript() : Promise.resolve([]);

25982598

const userTurnMediaPromise = preparedUserTurnMediaPromise.then(buildChatSendUserTurnMedia);

2599-

const userTurnInputPromise: Promise<UserTurnInput> = userTurnMediaPromise.then((media) => ({

2599+

const baseUserTurnInput: UserTurnInput = {

26002600

text: rawMessage,

2601+

timestamp: now,

2602+

idempotencyKey: `${clientRunId}:user`,

2603+

};

2604+

const userTurnInputPromise: Promise<UserTurnInput> = userTurnMediaPromise.then((media) => ({

2605+

...baseUserTurnInput,

26012606

...(media.length > 0

26022607

? {

26032608

media,

26042609

mediaOnlyText: "[User sent media without caption]",

26052610

}

26062611

: {}),

2607-

timestamp: now,

2608-

idempotencyKey: `${clientRunId}:user`,

26092612

}));

26102613

const pluginBoundMediaFieldsPromise =

26112614

explicitOriginTargetsPlugin && parsedImages.length > 0

@@ -2701,37 +2704,33 @@ export const chatHandlers: GatewayRequestHandlers = {

27012704

const deliveredReplies: Array<{ payload: ReplyPayload; kind: "block" | "final" }> = [];

27022705

let appendedWebchatAgentMedia = false;

27032706

let agentRunStarted = false;

2704-

const userTurnRecorderPromise: Promise<UserTurnTranscriptRecorder> =

2705-

userTurnInputPromise.then((input) =>

2706-

createUserTurnTranscriptRecorder({

2707-

input,

2708-

target: () => {

2709-

const { storePath: latestStorePath, entry: latestEntry } =

2710-

loadSessionEntry(sessionKey);

2711-

const resolvedSessionId = latestEntry?.sessionId ?? backingSessionId;

2712-

if (!resolvedSessionId) {

2713-

return undefined;

2714-

}

2715-

return {

2716-

sessionId: resolvedSessionId,

2717-

sessionKey,

2718-

sessionEntry: latestEntry ?? entry,

2719-

storePath: latestStorePath,

2720-

agentId,

2721-

config: cfg,

2722-

};

2723-

},

2724-

errorContext: "gateway chat user turn transcript",

2725-

beforeMessageWrite: runAgentHarnessBeforeMessageWriteHook,

2726-

onPersistenceError: (error) => {

2727-

context.logGateway.warn(

2728-

`gateway user transcript persistence failed: ${formatForLog(error)}`,

2729-

);

2730-

},

2731-

}),

2732-

);

2707+

const userTurnRecorder: UserTurnTranscriptRecorder = createUserTurnTranscriptRecorder({

2708+

input: baseUserTurnInput,

2709+

resolveInput: () => userTurnInputPromise,

2710+

target: () => {

2711+

const { storePath: latestStorePath, entry: latestEntry } = loadSessionEntry(sessionKey);

2712+

const resolvedSessionId = latestEntry?.sessionId ?? backingSessionId;

2713+

if (!resolvedSessionId) {

2714+

return undefined;

2715+

}

2716+

return {

2717+

sessionId: resolvedSessionId,

2718+

sessionKey,

2719+

sessionEntry: latestEntry ?? entry,

2720+

storePath: latestStorePath,

2721+

agentId,

2722+

config: cfg,

2723+

};

2724+

},

2725+

errorContext: "gateway chat user turn transcript",

2726+

beforeMessageWrite: runAgentHarnessBeforeMessageWriteHook,

2727+

onPersistenceError: (error) => {

2728+

context.logGateway.warn(

2729+

`gateway user transcript persistence failed: ${formatForLog(error)}`,

2730+

);

2731+

},

2732+

});

27332733

const persistGatewayUserTurnTranscript = async () => {

2734-

const userTurnRecorder = await userTurnRecorderPromise;

27352734

await measureDiagnosticsTimelineSpan(

27362735

"gateway.chat_send.persist_user_transcript",

27372736

async () => {

@@ -2842,7 +2841,6 @@ export const chatHandlers: GatewayRequestHandlers = {

28422841

},

28432842

deliver: async (payload, info) => {

28442843

if (getReplyPayloadMetadata(payload)?.beforeAgentRunBlocked === true) {

2845-

const userTurnRecorder = await userTurnRecorderPromise;

28462844

userTurnRecorder.markBlocked();

28472845

}

28482846

switch (info.kind) {

@@ -2870,7 +2868,6 @@ export const chatHandlers: GatewayRequestHandlers = {

28702868

"gateway.chat_send.dispatch_inbound",

28712869

async () => {

28722870

applyChatSendManagedMediaFields(ctx, await pluginBoundMediaFieldsPromise);

2873-

const userTurnRecorder = await userTurnRecorderPromise;

28742871

const dispatchResult = await dispatchInboundMessage({

28752872

ctx,

28762873

cfg,

@@ -2915,7 +2912,6 @@ export const chatHandlers: GatewayRequestHandlers = {

29152912

},

29162913

});

29172914

if (dispatchResult.beforeAgentRunBlocked === true) {

2918-

const userTurnRecorder = await userTurnRecorderPromise;

29192915

userTurnRecorder.markBlocked();

29202916

}

29212917

return dispatchResult;

@@ -2940,7 +2936,6 @@ export const chatHandlers: GatewayRequestHandlers = {

29402936

.map((payload) => payload.text?.trim())

29412937

.filter((text): text is string => Boolean(text))

29422938

.join(" | ") || undefined;

2943-

const userTurnRecorder = await userTurnRecorderPromise;

29442939

if (

29452940

agentRunStarted &&

29462941

returnedAgentErrorPayloads.length > 0 &&

@@ -3501,7 +3496,6 @@ export const chatHandlers: GatewayRequestHandlers = {

35013496

);

35023497

})

35033498

.catch(async (err) => {

3504-

const userTurnRecorder = await userTurnRecorderPromise;

35053499

const emitAfterError =

35063500

userTurnRecorder.hasPersisted() || userTurnRecorder.isBlocked()

35073501

? Promise.resolve()