feat: 接入聊天历史界面与外链会话恢复

- 新增管理端与用户端聊天历史接口和页面

- 外链聊天支持访问令牌登录、身份保活与当前会话恢复

- 聊天执行链路切到统一 runtime 与 chatlog 查询接口
This commit is contained in:
2026-04-05 11:37:25 +08:00
parent 25e80433a5
commit a4f75a5e4c
48 changed files with 3724 additions and 972 deletions

View File

@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<g fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 3.5h10v6.1a1.4 1.4 0 0 1-1.4 1.4H8.1l-2.2 2V11H4.4A1.4 1.4 0 0 1 3 9.6V3.5Z"/>
<path d="M5.4 6h3.1M5.4 8.1h1.9"/>
<circle cx="10.4" cy="7.4" r="1.8"/>
<path d="M10.4 6.6v.95l.72.48"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 394 B

View File

@@ -10,6 +10,7 @@ const SvgDownloadIcon = createIconifyIcon('svg:download');
const SvgCardIcon = createIconifyIcon('svg:card');
const SvgBellIcon = createIconifyIcon('svg:bell');
const SvgCakeIcon = createIconifyIcon('svg:cake');
const SvgChatHistoryIcon = createIconifyIcon('svg:chat-history');
const SvgAntdvLogoIcon = createIconifyIcon('svg:antdv-logo');
const SvgGithubIcon = createIconifyIcon('svg:github');
const SvgGoogleIcon = createIconifyIcon('svg:google');
@@ -44,6 +45,7 @@ export {
SvgBellIcon,
SvgCakeIcon,
SvgCardIcon,
SvgChatHistoryIcon,
SvgDataCenterIcon,
SvgDepartmentIcon,
SvgDingDingIcon,

View File

@@ -1,6 +1,7 @@
import type { IconifyIconStructure } from '@easyflow-core/icons';
import { addIcon } from '@easyflow-core/icons';
import chatHistorySvg from './icons/chat-history.svg?raw';
let loaded = false;
if (!loaded) {
@@ -39,6 +40,14 @@ function parseSvg(svgData: string): IconifyIconStructure {
* <Icon icon="svg:avatar"></Icon>
*/
async function loadSvgIcons() {
addIcon('svg:chat-history', {
...parseSvg(
typeof chatHistorySvg === 'object'
? chatHistorySvg.default
: chatHistorySvg,
),
});
const svgEagers = import.meta.glob('./icons/**', {
eager: true,
query: '?raw',