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

推荐订阅源

M
MIT News - Artificial intelligence
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
The Cloudflare Blog
IT之家
IT之家
雷峰网
雷峰网
小众软件
小众软件
博客园 - 叶小钗
博客园 - 聂微东
爱范儿
爱范儿
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
博客园 - 【当耐特】
V
V2EX
博客园_首页
T
Tailwind CSS Blog

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(googlechat): return sent thread metadata · openclaw/o...
franco-viott · 2026-06-16 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -135,6 +135,7 @@ describe("googlechat message actions", () => {

135135

});

136136

sendGoogleChatMessage.mockResolvedValue({

137137

messageName: "spaces/AAA/messages/msg-1",

138+

threadName: "spaces/AAA/threads/thread-1",

138139

});

139140
140141

if (!googlechatMessageActions.handleAction) {

@@ -174,7 +175,12 @@ describe("googlechat message actions", () => {

174175

thread: "thread-1",

175176

attachments: [{ attachmentUploadToken: "token-1", contentName: "remote.png" }],

176177

});

177-

expectJsonResult(result, { ok: true, to: "spaces/AAA" });

178+

expectJsonResult(result, {

179+

ok: true,

180+

to: "spaces/AAA",

181+

messageName: "spaces/AAA/messages/msg-1",

182+

threadName: "spaces/AAA/threads/thread-1",

183+

});

178184

});

179185
180186

it("routes upload-file through the same attachment upload path with filename override", async () => {

@@ -198,6 +204,7 @@ describe("googlechat message actions", () => {

198204

});

199205

sendGoogleChatMessage.mockResolvedValue({

200206

messageName: "spaces/BBB/messages/msg-2",

207+

threadName: "spaces/BBB/threads/thread-2",

201208

});

202209
203210

if (!googlechatMessageActions.handleAction) {

@@ -232,7 +239,12 @@ describe("googlechat message actions", () => {

232239

thread: undefined,

233240

attachments: [{ attachmentUploadToken: "token-2", contentName: "renamed.txt" }],

234241

});

235-

expectJsonResult(result, { ok: true, to: "spaces/BBB" });

242+

expectJsonResult(result, {

243+

ok: true,

244+

to: "spaces/BBB",

245+

messageName: "spaces/BBB/messages/msg-2",

246+

threadName: "spaces/BBB/threads/thread-2",

247+

});

236248

});

237249
238250

it("removes only matching app reactions on react remove", async () => {

Original file line numberDiff line numberDiff line change

@@ -148,7 +148,7 @@ export const googlechatMessageActions: ChannelMessageActionAdapter = {

148148

buffer: loaded.buffer,

149149

contentType: loaded.contentType,

150150

});

151-

await sendGoogleChatMessage({

151+

const sent = await sendGoogleChatMessage({

152152

account,

153153

space,

154154

text: content,

@@ -162,20 +162,20 @@ export const googlechatMessageActions: ChannelMessageActionAdapter = {

162162

]

163163

: undefined,

164164

});

165-

return jsonResult({ ok: true, to: space });

165+

return jsonResult({ ok: true, to: space, ...sent });

166166

}

167167
168168

if (action === "upload-file") {

169169

throw new Error("upload-file requires media, filePath, or path");

170170

}

171171
172-

await sendGoogleChatMessage({

172+

const sent = await sendGoogleChatMessage({

173173

account,

174174

space,

175175

text: content,

176176

thread: threadId ?? undefined,

177177

});

178-

return jsonResult({ ok: true, to: space });

178+

return jsonResult({ ok: true, to: space, ...sent });

179179

}

180180
181181

if (action === "react") {

Original file line numberDiff line numberDiff line change

@@ -142,7 +142,7 @@ export async function sendGoogleChatMessage(params: {

142142

thread?: string;

143143

cardsV2?: GoogleChatCardV2[];

144144

attachments?: Array<{ attachmentUploadToken: string; contentName?: string }>;

145-

}): Promise<{ messageName?: string } | null> {

145+

}): Promise<{ messageName?: string; threadName?: string } | null> {

146146

const { account, space, text, thread, cardsV2, attachments } = params;

147147

if (

148148

text &&

@@ -175,11 +175,11 @@ export async function sendGoogleChatMessage(params: {

175175

urlObj.searchParams.set("messageReplyOption", "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD");

176176

}

177177

const url = urlObj.toString();

178-

const result = await fetchJson<{ name?: string }>(account, url, {

178+

const result = await fetchJson<{ name?: string; thread?: { name?: string } }>(account, url, {

179179

method: "POST",

180180

body: JSON.stringify(body),

181181

});

182-

return result ? { messageName: result.name } : null;

182+

return result ? { messageName: result.name, threadName: result.thread?.name } : null;

183183

}

184184
185185

export async function updateGoogleChatMessage(params: {

Original file line numberDiff line numberDiff line change

@@ -99,10 +99,15 @@ const account = {

9999

config: {},

100100

} as ResolvedGoogleChatAccount;

101101
102-

function stubSuccessfulSend(name: string) {

103-

const fetchMock = vi

104-

.fn()

105-

.mockResolvedValue(new Response(JSON.stringify({ name }), { status: 200 }));

102+

function stubSuccessfulSend(name: string, threadName?: string) {

103+

const fetchMock = vi.fn().mockResolvedValue(

104+

new Response(

105+

JSON.stringify({ name, ...(threadName ? { thread: { name: threadName } } : {}) }),

106+

{

107+

status: 200,

108+

},

109+

),

110+

);

106111

vi.stubGlobal("fetch", fetchMock);

107112

return fetchMock;

108113

}

@@ -239,9 +244,9 @@ describe("sendGoogleChatMessage", () => {

239244

});

240245
241246

it("adds messageReplyOption when sending to an existing thread", async () => {

242-

const fetchMock = stubSuccessfulSend("spaces/AAA/messages/123");

247+

const fetchMock = stubSuccessfulSend("spaces/AAA/messages/123", "spaces/AAA/threads/xyz");

243248
244-

await sendGoogleChatMessage({

249+

const result = await sendGoogleChatMessage({

245250

account,

246251

space: "spaces/AAA",

247252

text: "hello",

@@ -260,6 +265,10 @@ describe("sendGoogleChatMessage", () => {

260265

};

261266

expect(body.text).toBe("hello");

262267

expect(body.thread?.name).toBe("spaces/AAA/threads/xyz");

268+

expect(result).toEqual({

269+

messageName: "spaces/AAA/messages/123",

270+

threadName: "spaces/AAA/threads/xyz",

271+

});

263272

});

264273
265274

it("does not set messageReplyOption for non-thread sends", async () => {