fix: surface actionable channel message errors

This commit is contained in:
xmanrui 2026-08-25 14:54:50 +08:00
parent b42fc411c2
commit 7cbed3aefb
59 changed files with 2405 additions and 607 deletions

View file

@ -7,6 +7,7 @@
*/
import { normalizeAgentPresetCatalog, normalizeAgentPresetId } from "../../agent-preset.js";
import { normalizeLastMessageError } from "../../last-message-error.js";
export const FEISHU_RPC_CHANNEL = "/feishu";
@ -206,6 +207,7 @@ export function normalizeBotConnection(value, fallbackBotId) {
groupMessagePermissionGranted: value.groupMessagePermissionGranted === true,
bot: normalizeBot(value.bot),
health: normalizeHealth(value.health, connected),
lastMessageError: normalizeLastMessageError(value.lastMessageError),
error: normalizeError(value.error),
};
}
@ -226,6 +228,7 @@ export function normalizeBotsSnapshot(value) {
configured: true,
bot: value.bot,
health: value.health,
lastMessageError: value.lastMessageError,
error: value.error,
}];
}

View file

@ -23,7 +23,11 @@ import {
EMPTY_AGENT_PRESET_CATALOG,
} from "../../agent-preset.js";
import { useWorkspaceSnapshotFence } from "../../workspace-snapshot-fence.js";
import { BotStatusMeta, ChannelListHeading } from "../../channel-card-meta.js";
import {
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
} from "../../channel-card-meta.js";
import { installFeishuStyles } from "./styles.js";
export const name = "feishu-settings";
@ -661,6 +665,10 @@ export function BotCard({
}, "移除接入")),
summary ? h("div", { className: "bxf-healthSummary dim-cardSummary", "data-error": actionError || connection.error ? "true" : undefined },
summary) : null,
connection.lastMessageError ? h(LastMessageErrorSummary, {
className: "bxf-healthSummary",
error: connection.lastMessageError,
}) : null,
testNotice ? h("div", {
className: "bxf-healthSummary dim-cardFeedback",
role: "status",