把回复转发给 IM 适配器(sendReply)时剥掉 <action>/<narration> 动作/内心独白(Web 端 才渲染灰斜体,IM 只能收纯文本),并按 <p> 段落拆成多条气泡分别发送;多气泡发送间隔 随机 0.5~2s(仅 IM,Web 前端不延迟)。新增 sanitize.go stripNarration/splitBubbles/ bubbleGap + 测试。
28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
import { Button } from "../../../components/primitives";
|
|
import { ChannelLogList } from "./channelLogList";
|
|
|
|
/** Overlay that renders one adapter config's send/receive message log, or the
|
|
* adapter overview (adapter == null). Reused by the list page's per-account
|
|
* "消息日志" button. */
|
|
export function ChannelLogPanel({ adapter, onClose }: { adapter: string | null; onClose: () => void }): React.ReactNode {
|
|
return (
|
|
<div className="fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/40 p-4 backdrop-blur-sm" onClick={onClose}>
|
|
<div
|
|
className="w-full max-w-3xl rounded-[var(--mu-radius-lg)] bg-[var(--mu-surface-1)] shadow-2xl"
|
|
onClick={(e) => e.stopPropagation()}
|
|
>
|
|
<div className="flex items-center gap-2 border-b border-[var(--mu-glass-border)] px-5 py-3">
|
|
<span className="text-sm font-semibold">消息日志</span>
|
|
<span className="ml-auto text-xs text-[var(--mu-text-lo)]">弹出视图</span>
|
|
<Button size="sm" variant="soft" onClick={onClose}>
|
|
关闭
|
|
</Button>
|
|
</div>
|
|
<div className="max-h-[70vh] overflow-y-auto px-5 py-4">
|
|
<ChannelLogList adapter={adapter} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|