feat: add stable proactive delivery

This commit is contained in:
xmanrui 2026-08-30 11:24:53 +08:00
parent 410cb822d7
commit 31792d7bc8
88 changed files with 6427 additions and 488 deletions

View file

@ -11,6 +11,7 @@ import {
} from '../../agent-preset.js';
import { useWorkspaceSnapshotFence } from '../../workspace-snapshot-fence.js';
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -238,14 +239,21 @@ export function AccountCard({
h('div', { className: 'dim-botName' },
h('h3', { title: account.bot.name }, account.bot.name),
h('p', { title: account.bot.clientIdMasked }, account.bot.clientIdMasked))),
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
})),
h('div', { className: 'dim-botCardTools' },
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
}),
h(BotSettingsButton, {
channel: 'dingtalk',
botId: account.botId,
botName: account.bot.name,
connected: account.connected,
}))),
h(WorkspaceEditor, {
workspace: account.workspace,
disabled: Boolean(busy),

View file

@ -24,6 +24,7 @@ import {
} from "../../agent-preset.js";
import { useWorkspaceSnapshotFence } from "../../workspace-snapshot-fence.js";
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -593,15 +594,22 @@ export function BotCard({
h("h3", { id: titleId, title: bot.name }, bot.name),
h("p", { title: bot.appIdMasked }, bot.appIdMasked ?? "应用标识已安全保存")),
),
h(BotStatusMeta, {
className: "bxf-healthPill",
dotClassName: "bxf-dot",
tone,
stateLabel: HEALTH_LABELS[stateForDisplay] ?? "状态未知",
lastCheckedAt: health.lastCheckedAt,
formatCheckedTime,
healthState: stateForDisplay,
}),
h("div", { className: "dim-botCardTools" },
h(BotStatusMeta, {
className: "bxf-healthPill",
dotClassName: "bxf-dot",
tone,
stateLabel: HEALTH_LABELS[stateForDisplay] ?? "状态未知",
lastCheckedAt: health.lastCheckedAt,
formatCheckedTime,
healthState: stateForDisplay,
}),
h(BotSettingsButton, {
channel: "feishu",
botId: connection.botId,
botName: bot.name,
connected,
})),
),
h(WorkspaceEditor, {
workspace: connection.workspace,

View file

@ -12,6 +12,7 @@ import {
} from '../../agent-preset.js';
import { useWorkspaceSnapshotFence } from '../../workspace-snapshot-fence.js';
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -182,14 +183,21 @@ export function AccountCard({
h('div', { className: 'ddt-avatar dim-botAvatar dqq-avatar', 'aria-hidden': 'true' }, h(QqLogoGlyph, { size: 29 })),
h('div', { className: 'dim-botName' },
h('h3', null, account.bot.name), h('p', null, account.bot.appIdMasked))),
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
})),
h('div', { className: 'dim-botCardTools' },
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
}),
h(BotSettingsButton, {
channel: 'qq',
botId: account.botId,
botName: account.bot.name,
connected: account.connected,
}))),
h(WorkspaceEditor, {
workspace: account.workspace,
disabled: Boolean(busy),

View file

@ -12,6 +12,7 @@ import {
} from '../../agent-preset.js';
import { useWorkspaceSnapshotFence } from '../../workspace-snapshot-fence.js';
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -88,14 +89,21 @@ export function createTokenChannelSettings(definition) {
h(LogoGlyph, { size: 29 })),
h('div', { className: 'dim-botName' },
h('h3', null, account.bot.name), h('p', null, identity))),
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
})),
h('div', { className: 'dim-botCardTools' },
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
}),
h(BotSettingsButton, {
channel: channel.toLowerCase(),
botId: account.botId,
botName: account.bot.name,
connected: account.connected,
}))),
h(WorkspaceEditor, {
workspace: account.workspace,
disabled: Boolean(busy),

View file

@ -12,6 +12,7 @@ import {
} from '../../agent-preset.js';
import { useWorkspaceSnapshotFence } from '../../workspace-snapshot-fence.js';
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -181,14 +182,21 @@ export function AccountCard({
h('div', { className: 'ddt-avatar dim-botAvatar dwecom-avatar', 'aria-hidden': 'true' }, h(WecomLogoGlyph, { size: 29 })),
h('div', { className: 'dim-botName' },
h('h3', null, account.bot.name), h('p', null, account.bot.appIdMasked))),
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
})),
h('div', { className: 'dim-botCardTools' },
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
}),
h(BotSettingsButton, {
channel: 'wecom',
botId: account.botId,
botName: account.bot.name,
connected: account.connected,
}))),
h(WorkspaceEditor, {
workspace: account.workspace,
disabled: Boolean(busy),

View file

@ -23,6 +23,7 @@ import {
} from '../../agent-preset.js';
import { useWorkspaceSnapshotFence } from '../../workspace-snapshot-fence.js';
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -222,14 +223,21 @@ export function AccountCard({
h('div', { className: 'dxw-accountIdentity dim-botIdentity' },
h('div', { className: 'dxw-avatar dim-botAvatar', 'aria-hidden': 'true' }, h(WeixinLogoGlyph, { size: 27 })),
h('div', { className: 'dim-botName' }, h('h3', null, account.bot.name), h('p', null, account.bot.accountIdMasked))),
h(BotStatusMeta, {
className: 'dxw-health',
dotClassName: 'dxw-dot',
tone,
stateLabel: account.connected ? '运行正常' : state === 'connecting' ? '正在连接' : '连接未就绪',
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
})),
h('div', { className: 'dim-botCardTools' },
h(BotStatusMeta, {
className: 'dxw-health',
dotClassName: 'dxw-dot',
tone,
stateLabel: account.connected ? '运行正常' : state === 'connecting' ? '正在连接' : '连接未就绪',
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
}),
h(BotSettingsButton, {
channel: 'weixin',
botId: account.botId,
botName: account.bot.name,
connected: account.connected,
}))),
h(WorkspaceEditor, {
workspace: account.workspace,
disabled: Boolean(busy),

View file

@ -12,6 +12,7 @@ import {
} from '../../agent-preset.js';
import { useWorkspaceSnapshotFence } from '../../workspace-snapshot-fence.js';
import {
BotSettingsButton,
BotStatusMeta,
ChannelListHeading,
LastMessageErrorSummary,
@ -318,14 +319,21 @@ export function WhatsappAccountCard({
}, h(WhatsappLogoGlyph, { size: 29 })),
h('div', { className: 'dim-botName' },
h('h3', null, account.bot.name), h('p', null, account.bot.idMasked))),
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
})),
h('div', { className: 'dim-botCardTools' },
h(BotStatusMeta, {
className: 'ddt-health',
dotClassName: 'ddt-dot',
tone,
stateLabel,
lastCheckedAt: account.health.lastCheckedAt,
formatCheckedTime: checkedTime,
}),
h(BotSettingsButton, {
channel: 'whatsapp',
botId: account.botId,
botName: account.bot.name,
connected: account.connected,
}))),
h(WorkspaceEditor, {
workspace: account.workspace,
disabled: Boolean(busy),