feat(recall): 检索为王——op=search 模糊搜索 + days/day 按日期翻页,退役盲列 list
用户定调:记起的往往是「一段事」而非「第几条」,search 价值高于 list;list 也必须按日期走而非盲目罗列。
recall 从 list/files/link 升级为 search/days/day/files/link:
- op=search {query, count}:碎片级全库模糊检索(主入口)。空白/标点分词多词择优,
子串直匹;CJK 长词整串不中时二元字组过半即模糊命中(得分 0.9 折算),英文大小写不敏感;
结果按相关度排序、标注匹配百分比与所属日期,默认 10 条上限 30;无命中回友好提示并引导 days。
- op=days:日期索引(哪天、几条)——只记得「大概哪天」时的入口;op=day {date} 取整天完整日记。
- 开场注入头行与工具 description 同步改口径(提起旧事 → search;记时间 → days/day);
存储/存在性判定/files/link 不变。op=list 退役(含 skip 盲翻页参数)。
探针 12 项全过:精确/模糊(打折分)/多词排名/大小写/无命中/days 计数/day 整天/空天/日期校验/退役提示。
This commit is contained in:
@@ -235,7 +235,7 @@
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "recall",
|
||||
"description": "Access your long-term memory: the work diary. Each finished session leaves one short fragment (a few dozen characters, headed by the source session id), stored permanently; only the newest fragments were injected at session start. Read-only.\n\nop=list Older diary fragments beyond the injected window. Optional: skip (default = skip the injected window), count (default 20, max 50).\nop=files List files of a past session that still exist on disk right now. Requires id (the session id from a diary fragment's 【…】 heading).\nop=link Mint a temporary download link for one of those files. Requires id and path (a name from op=files).",
|
||||
"description": "Access your long-term memory: the work diary. Each finished session leaves one short fragment (a few dozen characters, headed by the source session id), stored permanently; only the newest fragments were injected at session start. When the user vaguely recalls something from the past, search is your primary entry — you cannot know what you have forgotten. Read-only.\n\nop=search Requires query (keywords; space-separated words rank better, e.g. '身份证 水印'). Fuzzy fragment-level match across ALL dates (Chinese tolerant to partial phrases), best matches first. Optional count (default 10, max 30).\nop=days No arguments. Index of diary days (date + fragment count) — use when the user remembers roughly WHEN but not what; then op=day.\nop=day Requires date (YYYY-MM-DD, as listed by op=days). Full fragments of that day.\nop=files Requires id (the session id from a diary fragment's 【…】 heading). Files of that past session that still exist on disk right now.\nop=link Requires id and path (a name from op=files). Mint a temporary download link.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -245,19 +245,25 @@
|
||||
"op": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"list",
|
||||
"search",
|
||||
"days",
|
||||
"day",
|
||||
"files",
|
||||
"link"
|
||||
],
|
||||
"description": "What to recall: list = older diary fragments; files = a past session's current artifacts; link = a download link for one of them."
|
||||
"description": "What to recall: search = keyword fuzzy over all diary fragments (primary); days = which dates have entries; day = one date's full diary; files = a past session's current artifacts; link = a download link for one of them."
|
||||
},
|
||||
"skip": {
|
||||
"type": "integer",
|
||||
"description": "op=list: how many newest fragments to skip. Default = the window already injected at session start."
|
||||
"query": {
|
||||
"type": "string",
|
||||
"description": "op=search: keywords to look for (space-separated words rank best, e.g. '身份证 水印'). Chinese and English both supported, case-insensitive."
|
||||
},
|
||||
"count": {
|
||||
"type": "integer",
|
||||
"description": "op=list: fragments to return (default 20, max 50)."
|
||||
"description": "op=search: max fragments to return (default 10, max 30)."
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"description": "op=day: the day to open, YYYY-MM-DD exactly as shown by op=days."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
|
||||
Reference in New Issue
Block a user