feat(components): 新增 Drawer 组件并优化 Playground 页面

- 新增 Drawer 组件用于创建可滑动的抽屉式界面
-优化 Playground 页面布局和样式,增加 logo 和 frosted glass 效果
- 添加统计卡片组件和动画效果,提升用户体验
- 新增数据项目图标组件
This commit is contained in:
zhaoweijie
2025-08-22 21:28:40 +08:00
parent 37a11fbb8b
commit 6fb71b01f0
20 changed files with 672 additions and 126 deletions

View File

@@ -108,20 +108,23 @@ export const getSystemPromptForWeb = async (
// .join("\n")
}
for (const key of Object.keys(iodSearchResults)) {
const arr = iodSearchResults[key]
_iodSearchResults[key] = arr.data.map((res) => ({
doId: res.doId,
name: res.name,
url: res.url,
data_type: res.data_type,
data_space: res.data_space,
content: res.content || res.description,
tokenCount:
res.content || res.description
? calculateTokenCount(res.content || res.description)
: 0,
traceId: res?.traceId
}))
const record = iodSearchResults[key]
_iodSearchResults[key] = {
...record,
data: record.data.map((res) => ({
doId: res.doId,
name: res.name,
url: res.url,
data_type: res.data_type,
data_space: res.data_space,
content: res.content || res.description,
tokenCount:
res.content || res.description
? calculateTokenCount(res.content || res.description)
: 0,
traceId: res?.traceId
}))
}
}
} finally {
resolve(0)
@@ -130,8 +133,8 @@ export const getSystemPromptForWeb = async (
])
// let search_results_iod = ""
debugger
let iod_search_results = Object.values(_iodSearchResults)
.map(item => item.data)
.flat()
.map((result, idx) => {
const nameAttr = result.name ? ` name="${result.name}"` : ""