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

推荐订阅源

月光博客
月光博客
云风的 BLOG
云风的 BLOG
小众软件
小众软件
雷峰网
雷峰网
博客园 - 【当耐特】
V
V2EX
WordPress大学
WordPress大学
IT之家
IT之家
Last Week in AI
Last Week in AI
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
The Cloudflare Blog
Jina AI
Jina AI
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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
refactor: unify async media generation · openclaw/opencla...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -13,6 +13,7 @@ import type { ContextEngine } from "../../context-engine/types.js";

1313

import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js";

1414

import { __testing as cliBackendsTesting } from "../cli-backends.js";

1515

import { hashCliSessionText } from "../cli-session.js";

16+

import { buildActiveImageGenerationTaskPromptContextForSession } from "../image-generation-task-status.js";

1617

import { buildActiveMusicGenerationTaskPromptContextForSession } from "../music-generation-task-status.js";

1718

import { buildActiveVideoGenerationTaskPromptContextForSession } from "../video-generation-task-status.js";

1819

import {

@@ -50,6 +51,16 @@ vi.mock("../video-generation-task-status.js", () => ({

5051

isActiveVideoGenerationTask: vi.fn(() => false),

5152

}));

525354+

vi.mock("../image-generation-task-status.js", () => ({

55+

IMAGE_GENERATION_TASK_KIND: "image_generation",

56+

buildActiveImageGenerationTaskPromptContextForSession: vi.fn(() => undefined),

57+

buildImageGenerationTaskStatusDetails: vi.fn(() => ({})),

58+

buildImageGenerationTaskStatusText: vi.fn(() => ""),

59+

findActiveImageGenerationTaskForSession: vi.fn(() => undefined),

60+

getImageGenerationTaskProviderId: vi.fn(() => undefined),

61+

isActiveImageGenerationTask: vi.fn(() => false),

62+

}));

63+5364

vi.mock("../music-generation-task-status.js", () => ({

5465

MUSIC_GENERATION_TASK_KIND: "music_generation",

5566

buildActiveMusicGenerationTaskPromptContextForSession: vi.fn(() => undefined),

@@ -62,6 +73,9 @@ const mockGetGlobalHookRunner = vi.mocked(getGlobalHookRunner);

6273

const mockBuildActiveVideoGenerationTaskPromptContextForSession = vi.mocked(

6374

buildActiveVideoGenerationTaskPromptContextForSession,

6475

);

76+

const mockBuildActiveImageGenerationTaskPromptContextForSession = vi.mocked(

77+

buildActiveImageGenerationTaskPromptContextForSession,

78+

);

6579

const mockBuildActiveMusicGenerationTaskPromptContextForSession = vi.mocked(

6680

buildActiveMusicGenerationTaskPromptContextForSession,

6781

);

@@ -187,6 +201,7 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {

187201

});

188202

mockGetGlobalHookRunner.mockReturnValue(null);

189203

getRuntimeConfigMock.mockReturnValue({});

204+

mockBuildActiveImageGenerationTaskPromptContextForSession.mockReturnValue(undefined);

190205

mockBuildActiveVideoGenerationTaskPromptContextForSession.mockReturnValue(undefined);

191206

mockBuildActiveMusicGenerationTaskPromptContextForSession.mockReturnValue(undefined);

192207

});

@@ -195,6 +210,7 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {

195210

cliBackendsTesting.resetDepsForTest();

196211

getRuntimeConfigMock.mockReset();

197212

mockGetGlobalHookRunner.mockReset();

213+

mockBuildActiveImageGenerationTaskPromptContextForSession.mockReset();

198214

mockBuildActiveVideoGenerationTaskPromptContextForSession.mockReset();

199215

mockBuildActiveMusicGenerationTaskPromptContextForSession.mockReset();

200216

vi.unstubAllEnvs();

@@ -887,6 +903,9 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {

887903

it("applies direct-run prepend system context helpers on the CLI path", async () => {

888904

const { dir, sessionFile } = createSessionFile();

889905

try {

906+

mockBuildActiveImageGenerationTaskPromptContextForSession.mockReturnValue(

907+

"active image task",

908+

);

890909

mockBuildActiveVideoGenerationTaskPromptContextForSession.mockReturnValue(

891910

"active video task",

892911

);

@@ -915,7 +934,10 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {

915934

});

916935917936

expect(context.systemPrompt).toBe(

918-

"active video task\n\nhook prepend system\n\nhook system\n\nCurrent model identity: test-cli/test-model. If asked what model you are, answer with this value for the current run.",

937+

"active image task\n\nactive video task\n\nhook prepend system\n\nhook system\n\nCurrent model identity: test-cli/test-model. If asked what model you are, answer with this value for the current run.",

938+

);

939+

expect(mockBuildActiveImageGenerationTaskPromptContextForSession).toHaveBeenCalledWith(

940+

"agent:main:test",

919941

);

920942

expect(mockBuildActiveVideoGenerationTaskPromptContextForSession).toHaveBeenCalledWith(

921943

"agent:main:test",