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

推荐订阅源

爱范儿
爱范儿
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
Netflix TechBlog - Medium
GbyAI
GbyAI
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
Martin Fowler
Martin Fowler
腾讯CDC
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
WordPress大学
WordPress大学
P
Proofpoint News Feed
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator 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
refactor(agents): remove video task status wrappers · ope...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

6969

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

7070

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

7171

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

72-

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

73-

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

7472

}));

7573
7674

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

Original file line numberDiff line numberDiff line change

@@ -17,8 +17,6 @@ const videoGenerationTaskStatusMocks = vi.hoisted(() => ({

1717

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

1818

buildVideoGenerationTaskStatusText: vi.fn(() => "Video generation task status"),

1919

findActiveVideoGenerationTaskForSession: vi.fn(),

20-

getVideoGenerationTaskProviderId: vi.fn(),

21-

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

2220

VIDEO_GENERATION_TASK_KIND: "video_generation",

2321

}));

2422

const musicGenerationTaskStatusMocks = vi.hoisted(() => ({

Original file line numberDiff line numberDiff line change

@@ -24,8 +24,6 @@ const videoGenerationTaskStatusMocks = vi.hoisted(() => ({

2424

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

2525

buildVideoGenerationTaskStatusText: vi.fn(() => "Video generation task status"),

2626

findActiveVideoGenerationTaskForSession: vi.fn(),

27-

getVideoGenerationTaskProviderId: vi.fn(),

28-

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

2927

VIDEO_GENERATION_TASK_KIND: "video_generation",

3028

}));

3129
Original file line numberDiff line numberDiff line change

@@ -7,8 +7,6 @@ import {

77

buildVideoGenerationTaskStatusDetails,

88

buildVideoGenerationTaskStatusText,

99

findActiveVideoGenerationTaskForSession,

10-

getVideoGenerationTaskProviderId,

11-

isActiveVideoGenerationTask,

1210

VIDEO_GENERATION_TASK_KIND,

1311

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

1412

@@ -48,8 +46,8 @@ describe("video generation task status", () => {

4846

});

4947
5048

it("recognizes active session-backed video generation tasks", () => {

51-

expect(

52-

isActiveVideoGenerationTask({

49+

taskRuntimeInternalMocks.listTasksForOwnerKey.mockReturnValue([

50+

{

5351

taskId: "task-1",

5452

runtime: "cli",

5553

taskKind: VIDEO_GENERATION_TASK_KIND,

@@ -62,10 +60,8 @@ describe("video generation task status", () => {

6260

deliveryStatus: "not_applicable",

6361

notifyPolicy: "silent",

6462

createdAt: Date.now(),

65-

}),

66-

).toBe(true);

67-

expect(

68-

isActiveVideoGenerationTask({

63+

},

64+

{

6965

taskId: "task-2",

7066

runtime: "cron",

7167

taskKind: VIDEO_GENERATION_TASK_KIND,

@@ -78,8 +74,10 @@ describe("video generation task status", () => {

7874

deliveryStatus: "not_applicable",

7975

notifyPolicy: "silent",

8076

createdAt: Date.now(),

81-

}),

82-

).toBe(false);

77+

},

78+

]);

79+
80+

expect(findActiveVideoGenerationTaskForSession("agent:main")?.taskId).toBe("task-1");

8381

});

8482
8583

it("prefers a running task over queued session siblings", () => {

@@ -121,7 +119,6 @@ describe("video generation task status", () => {

121119
122120

expect(task?.taskId).toBe("task-running");

123121

const activeTask = expectActiveVideoGenerationTask(task);

124-

expect(getVideoGenerationTaskProviderId(activeTask)).toBe("openai");

125122

expect(buildVideoGenerationTaskStatusText(activeTask, { duplicateGuard: true })).toContain(

126123

"Do not call video_generate again for this request.",

127124

);

Original file line numberDiff line numberDiff line change

@@ -11,27 +11,12 @@ import {

1111

buildMediaGenerationTaskStatusText,

1212

findActiveMediaGenerationTaskForSession,

1313

findDuplicateGuardMediaGenerationTaskForSession,

14-

getMediaGenerationTaskProviderId,

15-

isActiveMediaGenerationTask,

1614

} from "./media-generation-task-status-shared.js";

1715
1816

export const VIDEO_GENERATION_TASK_KIND = "video_generation";

1917

const VIDEO_GENERATION_SOURCE_PREFIX = "video_generate";

2018

const RECENT_VIDEO_GENERATION_DUPLICATE_GUARD_MS = 2 * 60_000;

2119
22-

/** Returns whether a task is an active video generation task. */

23-

export function isActiveVideoGenerationTask(task: TaskRecord): boolean {

24-

return isActiveMediaGenerationTask({

25-

task,

26-

taskKind: VIDEO_GENERATION_TASK_KIND,

27-

});

28-

}

29-
30-

/** Extracts the provider id from a video generation task source. */

31-

export function getVideoGenerationTaskProviderId(task: TaskRecord): string | undefined {

32-

return getMediaGenerationTaskProviderId(task, VIDEO_GENERATION_SOURCE_PREFIX);

33-

}

34-
3520

/** Finds an active video generation task for a session. */

3621

export function findActiveVideoGenerationTaskForSession(

3722

sessionKey?: string,