mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 18:04:45 +00:00
fix: allow direct media failure summaries
This commit is contained in:
@@ -29,6 +29,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Providers/MiniMax: declare CN endpoint auth aliases in the plugin manifest so `minimax-cn` and `minimax-portal-cn` reuse the correct base auth profiles instead of falling back to unrelated models after 401s. Fixes #63823. Thanks @kamusis.
|
||||
- Agents/model fallback: suppress fallback notices when the active OpenAI Codex runtime reports the same canonical OpenAI model.
|
||||
- Agents/music generation: remove model-controlled request timeouts while keeping configured timeouts at a 120-second floor.
|
||||
- Agents/media generation: stop logging delivered failure summaries as missing message-tool delivery when no generated media was expected.
|
||||
- Agents/edit tool: honor `file_path` and related path aliases when resolving edit-recovery targets, so post-write errors no longer surface false edit failures after the file actually changed. Fixes #81909. Thanks @giodl73-repo.
|
||||
- QQBot: treat only explicit truthy `QQBOT_DEBUG` values as enabling debug logs, so false-like values such as `0` no longer expose debug output. Fixes #82644. (#82697) Thanks @leno23.
|
||||
- Agents/session_status: resolve implicit no-arg status lookups against the live run session, so `/think` changes report the current thinking level instead of stale sandbox state. Fixes #82669. (#82696) Thanks @leno23.
|
||||
|
||||
@@ -1387,7 +1387,7 @@ describe("deliverSubagentAnnouncement completion delivery", () => {
|
||||
expect(sendMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("accepts failed generated media completion notices through the message tool", async () => {
|
||||
it("accepts failed generated media completion notices without requiring message-tool delivery", async () => {
|
||||
const callGateway = createGatewayMock({
|
||||
result: {
|
||||
payloads: [],
|
||||
@@ -1428,12 +1428,11 @@ describe("deliverSubagentAnnouncement completion delivery", () => {
|
||||
path: "direct",
|
||||
});
|
||||
expectGatewayAgentParams(callGateway, {
|
||||
deliver: false,
|
||||
deliver: true,
|
||||
channel: "discord",
|
||||
accountId: "acct-1",
|
||||
to: "dm:U123",
|
||||
threadId: undefined,
|
||||
sourceReplyDeliveryMode: "message_tool_only",
|
||||
});
|
||||
expect(sendMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -1485,6 +1484,44 @@ describe("deliverSubagentAnnouncement completion delivery", () => {
|
||||
expect(sendMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("allows visible direct delivery for media generation failure summaries without generated media", async () => {
|
||||
const callGateway = createGatewayMock({
|
||||
result: {
|
||||
payloads: [{ text: "Music generation failed. Provider timed out." }],
|
||||
},
|
||||
});
|
||||
const result = await deliverDiscordDirectMessageCompletion({
|
||||
callGateway,
|
||||
sourceTool: "music_generate",
|
||||
internalEvents: [
|
||||
{
|
||||
type: "task_completion",
|
||||
source: "music_generation",
|
||||
childSessionKey: "music_generate:task-123",
|
||||
childSessionId: "task-123",
|
||||
announceType: "music generation task",
|
||||
taskLabel: "night-drive synthwave",
|
||||
status: "error",
|
||||
statusLabel: "failed",
|
||||
result: "All music generation models failed.",
|
||||
replyInstruction: "Tell the user music generation failed.",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
expectRecordFields(result, {
|
||||
delivered: true,
|
||||
path: "direct",
|
||||
});
|
||||
expectGatewayAgentParams(callGateway, {
|
||||
deliver: true,
|
||||
channel: "discord",
|
||||
accountId: "acct-1",
|
||||
to: "dm:U123",
|
||||
threadId: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
it("reports generated media group completions that miss required message-tool delivery", async () => {
|
||||
const callGateway = createGatewayMock({
|
||||
result: {
|
||||
|
||||
@@ -633,7 +633,8 @@ async function sendSubagentAnnounceDirectly(params: {
|
||||
expectsCompletionMessage: params.expectsCompletionMessage,
|
||||
sourceTool: params.sourceTool,
|
||||
});
|
||||
const requiresMessageToolDelivery = agentMediatedCompletion;
|
||||
const expectedMediaUrls = collectExpectedMediaFromInternalEvents(params.internalEvents);
|
||||
const requiresMessageToolDelivery = agentMediatedCompletion && expectedMediaUrls.length > 0;
|
||||
const completionSourceReplyDeliveryMode = requiresMessageToolDelivery
|
||||
? "message_tool_only"
|
||||
: undefined;
|
||||
@@ -766,7 +767,6 @@ async function sendSubagentAnnounceDirectly(params: {
|
||||
error: "completion agent did not deliver through the message tool",
|
||||
};
|
||||
}
|
||||
const expectedMediaUrls = collectExpectedMediaFromInternalEvents(params.internalEvents);
|
||||
if (
|
||||
agentMediatedCompletion &&
|
||||
expectedMediaUrls.length > 0 &&
|
||||
|
||||
Reference in New Issue
Block a user