Skip to content

Commit 86d9cc8

Browse files
author
harvey_xiang
committed
Merge branch 'v2' into feat/intl
2 parents f368537 + fc455c7 commit 86d9cc8

File tree

34 files changed

+4383
-4456
lines changed

34 files changed

+4383
-4456
lines changed

app/components/AppHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function gotoHome() {
5959
base: 'w-90 h-10 text-[#94A3B8] rounded-lg ring-slate-600'
6060
}"
6161
/>
62-
<!-- <AssistantCollapse class="ml-2.5" /> -->
62+
<AssistantCollapse class="ml-2.5" />
6363

6464
<template #right>
6565
<SiteSwitcher />

app/components/Assistant/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function onStopStreaming() {
5656
<Transition name="slide">
5757
<div
5858
v-if="isOpen"
59-
class="h-full shrink-0 overflow-hidden"
59+
class="h-screen sticky top-0 shrink-0 overflow-hidden"
6060
>
6161
<UDashboardSidebar
6262
id="assistant"

app/layouts/default.vue

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,58 @@
1+
<script setup lang="ts">
2+
const route = useRoute()
3+
const nuxtApp = useNuxtApp()
4+
5+
// Handle scroll reset on page navigation finish
6+
nuxtApp.hook('page:finish', () => {
7+
nextTick(() => {
8+
// Check if there is a hash
9+
if (route.hash) {
10+
const el = document.querySelector(route.hash)
11+
if (el) {
12+
el.scrollIntoView({ behavior: 'smooth' })
13+
}
14+
} else {
15+
// Reset scroll to top if no hash
16+
const el = document.getElementById('dashboard-panel-main')
17+
if (el) {
18+
el.scrollTop = 0
19+
}
20+
}
21+
})
22+
})
23+
24+
watch(() => route.hash, (hash) => {
25+
if (hash) {
26+
nextTick(() => {
27+
const el = document.querySelector(hash)
28+
if (el) {
29+
el.scrollIntoView({ behavior: 'smooth' })
30+
}
31+
})
32+
}
33+
})
34+
35+
onMounted(() => {
36+
if (route.hash) {
37+
nextTick(() => {
38+
const el = document.querySelector(route.hash)
39+
if (el) {
40+
el.scrollIntoView({ behavior: 'smooth' })
41+
}
42+
})
43+
}
44+
})
45+
</script>
46+
147
<template>
248
<UDashboardGroup
349
:persistent="false"
450
unit="px"
51+
class="h-screen overflow-hidden"
552
>
653
<UDashboardPanel
754
id="main"
8-
class="overflow-y-auto scrollbar-hide"
55+
class="h-full overflow-y-auto scrollbar-hide "
956
>
1057
<slot />
1158
</UDashboardPanel>

app/utils/oas.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ function generateSampleFromSchema(schema: SchemaObject, api: OASDocument): unkno
225225
Object.entries(schema.properties).forEach(([key, propSchema]) => {
226226
obj[key] = generateSampleFromSchema(propSchema as SchemaObject, api)
227227
})
228+
} else if ('items' in schema) {
229+
return generateSampleFromSchema((schema as any).items as SchemaObject, api)
228230
}
231+
229232
return obj
230233
}
231234

content/cn/api_docs/api.json

Lines changed: 143 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@
751751
"properties": {
752752
"file_data": {
753753
"type": "string",
754-
"description": "可访问的文件URL或者base64, 只支持四种类型txt / pdf / doc / docx, 单文件不超过100MB、200页,总数不超过20个。type为file时必填。"
754+
"description": "可访问的文件URL或者base64, 只支持四种类型txt / pdf / doc / docx / json / md / xml, 单文件不超过100MB、200页,总数不超过20个。type为file时必填。"
755755
}
756756
}
757757
}
@@ -1104,6 +1104,16 @@
11041104
"title": "Tool Memroy Limit Number",
11051105
"description": "限定返回的工具记忆条数,用于控制召回的工具记忆个数,仅在 include_tool_memory=true 时生效。不传时使用系统默认值6,最大值为25。",
11061106
"default": 6
1107+
},
1108+
"include_skill": {
1109+
"type": "boolean",
1110+
"title": "Include Skill",
1111+
"description": "是否启用技能(Skill)召回。开启后,系统会根据查询内容智能召回工具相关的记忆。不传时该功能默认关闭。"
1112+
},
1113+
"skill_limit_number": {
1114+
"type": "number",
1115+
"title": "Include Skill",
1116+
"description": "限定返回的技能(Skill)条数,用于控制召回的技能个数,仅在 include_skill=true 时生效。不传时使用系统默认值6,最大值为25。"
11071117
}
11081118
},
11091119
"title": "SearchMemoryRequest"
@@ -1335,6 +1345,129 @@
13351345
},
13361346
"title": "ToolMemoryDetail"
13371347
},
1348+
"SkillValue": {
1349+
"type": "object",
1350+
"properties": {
1351+
"name": {
1352+
"type": "string",
1353+
"title": "Name",
1354+
"description": "技能 Skill 的名称,用于展示与识别该能力。"
1355+
},
1356+
"description": {
1357+
"type": "string",
1358+
"title": "Description",
1359+
"description": "技能 Skill 的描述。"
1360+
},
1361+
"procedure": {
1362+
"type": "string",
1363+
"title": "Procedure",
1364+
"description": "完成该任务的推荐流程或操作步骤。"
1365+
},
1366+
"experience": {
1367+
"type": "array",
1368+
"title": "Experience",
1369+
"items": {
1370+
"type": "string"
1371+
},
1372+
"description": "来自历史任务的经验沉淀,包括最佳实践、常见误区与避坑建议。"
1373+
},
1374+
"preference": {
1375+
"type": "array",
1376+
"title": "Preference",
1377+
"items": {
1378+
"type": "string"
1379+
},
1380+
"description": "用户在该类任务中的偏好设定,例如风格、约束条件或优先级。"
1381+
},
1382+
"examples": {
1383+
"type": "array",
1384+
"title": "Examples",
1385+
"items": {
1386+
"type": "string"
1387+
},
1388+
"description": "该技能 Skill 的典型使用示例,帮助 Agent 理解输入输出形式与使用边界。"
1389+
},
1390+
"script": {
1391+
"type": "object",
1392+
"title": "Script",
1393+
"description": "用于完成该 Skill 的可复用代码脚本或逻辑实现。"
1394+
},
1395+
"others": {
1396+
"type": "object",
1397+
"title": "Others",
1398+
"description": "其他补充信息。"
1399+
}
1400+
}
1401+
},
1402+
"SkillDetail": {
1403+
"type": "object",
1404+
"properties": {
1405+
"id": {
1406+
"type": "string",
1407+
"title": "ID",
1408+
"description": "技能 Skill 的唯一标识符,系统内部用于区分不同的记忆条目。"
1409+
},
1410+
"skill_value": {
1411+
"type": "object",
1412+
"title": "Skill Value",
1413+
"description": "技能 Skill 的具体内容。",
1414+
"items": {
1415+
"$ref": "#/components/schemas/SkillValue"
1416+
}
1417+
},
1418+
"skill_url": {
1419+
"type": "string",
1420+
"title": "Skill Url",
1421+
"description": "技能 Skill 的下载链接,下载为可复用的技能实现或配置文件。"
1422+
},
1423+
"skill_type": {
1424+
"type": "string",
1425+
"title": "Skill Type",
1426+
"description": "技能 Skill 的类型。"
1427+
},
1428+
"create_time": {
1429+
"type": "string",
1430+
"title": "Create Time",
1431+
"description": "技能 Skill 内容创建的时间,通常为 ISO 8601 格式。"
1432+
},
1433+
"conversation_id": {
1434+
"type": "string",
1435+
"title": "Conversation ID",
1436+
"description": "与该技能 Skill 关联的会话的唯一标识符。"
1437+
},
1438+
"status": {
1439+
"type": "string",
1440+
"title": "Status",
1441+
"description": "技能 Skill 的状态,当前所有检索到的技能 Skill 都是 activated。activated:激活状态,当前可检索和使用的技能 Skill 。",
1442+
"enum": [
1443+
"activated"
1444+
]
1445+
},
1446+
"confidence": {
1447+
"type": "number",
1448+
"title": "Confidence",
1449+
"description": "技能 Skill 的置信度分数,范围 0~1,数值越接近 1 表示该技能 Skill 越准确可靠。\n置信度分数会随着模型对该技能 Skill 的推理次数增加而逐渐衰减,用于反映技能 Skill 随着时间或使用频率可能产生的不确定性。"
1450+
},
1451+
"tags": {
1452+
"type": "array",
1453+
"items": {
1454+
"type": "string"
1455+
},
1456+
"description": "与技能 Skill 相关的标签列表,用于分类、检索或主题标记。数组中的每个元素都是string,例如 [\"人物\", \"事件\", \"工作\"]。"
1457+
},
1458+
"update_time": {
1459+
"type": "string",
1460+
"title": "Update Time",
1461+
"description": "技能 Skill 最后一次被修改或更新的时间,通常为 ISO 8601 格式"
1462+
},
1463+
"relativity": {
1464+
"type": "string",
1465+
"title": "Relativity",
1466+
"description": "查询内容与该技能 Skill 的相关性分数,范围 0~1,数值越接近 1 表示越相关。"
1467+
}
1468+
},
1469+
"title": "SkillDetail"
1470+
},
13381471
"SearchMemoryResponseData": {
13391472
"type": "object",
13401473
"title": "SearchMemoryResponseData",
@@ -1367,6 +1500,14 @@
13671500
"type": "string",
13681501
"title": "Preference Note",
13691502
"description": "召回偏好记忆时,返回的偏好使用说明。"
1503+
},
1504+
"skill_detail_list": {
1505+
"type": "array",
1506+
"title": "Skill Detail List",
1507+
"description": "返回的技能 Skill 详情列表。",
1508+
"items": {
1509+
"$ref": "#/components/schemas/SkillDetail"
1510+
}
13701511
}
13711512
}
13721513
},
@@ -2010,7 +2151,7 @@
20102151
"content": {
20112152
"type": "string",
20122153
"title": "Content",
2013-
"description": "文档内容输入方式支持 URL 或 Base64 编码,可上传的文档类型包括:PDF、DOCX、DOC、TXT。"
2154+
"description": "文档内容输入方式支持 URL 或 Base64 编码,可上传的文档类型包括:PDF、DOCX、DOC、TXT、JSON、MD、XML"
20142155
}
20152156
}
20162157
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 修改记忆
3+
openapi: "POST /add/feedback"
4+
---
5+
<!-- Menu Mapping -->
6+
7+

content/cn/api_docs/help/error_codes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: 错误码
1010
| 40002 | 必填参数不能为空 | 补充缺失的必填字段 |
1111
| 40003 | 参数为空 | 检查传入的列表或对象是否为空 |
1212
| 40006 | 不支持的类型 | 检查 type 字段取值 |
13-
| 40007 | 不支持的文件类型 | 仅上传允许的格式(.pdf, .docx, .doc, .txt) |
13+
| 40007 | 不支持的文件类型 | 仅上传允许的格式(.pdf, .docx, .doc, .txt, .json, .md, .xml|
1414
| 40008 | Base64 内容非法 | 检查 Base64 字符串是否包含非法字符 |
1515
| 40009 | Base64 格式非法 | 检查 Base64 编码格式是否正确 |
1616
| 40010 | 用户 ID 过长 | user_id 长度不能超过 100 字符 |

content/cn/changelog.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
versions:
2+
- name: v2.0.3
3+
date: 2026-01-22
4+
changedInfo:
5+
New Features:
6+
- type: 文档
7+
changedInfo:
8+
- 开源项目文档,修复格式、示例描述、中英文不匹配问题,新增使用小 tips。
9+
- type: Dashboard
10+
changedInfo:
11+
- 知识库新增支持文件类型, 支持 json、md、xml。
12+
- type: GitHub 示例仓库
13+
changedInfo:
14+
- 调整启动方式(新建类server router),移除 src/memos/product_api.py 引用。
15+
Improvements:
16+
- type: 开源项目
17+
changedInfo:
18+
- 优化文字与图片记忆添加,将两类信息作为单条消息协同处理。
19+
- 知识库检索支持 all 字段。
20+
Bug Fixes:
21+
- type: 开源项目
22+
changedInfo:
23+
- 修复当检索输入文本过长时的调用异常。
24+
225
- name: v2.0.2
326
date: 2026-01-15
427
changedInfo:
@@ -25,7 +48,7 @@ versions:
2548
- type: 获取记忆接口
2649
changedInfo:
2750
- 修复了获取记忆接口在入参为 include_preference=False 时的调用错误。
28-
51+
2952
- name: v2.0.1
3053
date: 2026-01-08
3154
changedInfo:

0 commit comments

Comments
 (0)