114 Commits

Author SHA1 Message Date
ymq
631b2da7a4 feat: 检索结果媒体使用entire_url()+位置信息(bbox/时间戳)显示 2026-08-12 11:07:15 +08:00
rag
9c602a0e8d fix: media_cards 标签同时读取 media_tags 表和 metadata.tags 2026-08-12 10:59:24 +08:00
rag
afae286434 fix: 声纹页面修复 - 移除broken quotes+暂时跳过tags查询 2026-08-11 18:06:43 +08:00
rag
51ea4096aa fix: 声纹页面显示+tags查询sqlor兼容 2026-08-11 18:01:09 +08:00
rag
da0ec1397b fix: 声纹页面查询包含已提取声纹的视频 2026-08-11 17:11:31 +08:00
ymq
3458af766c fix: graph API 用 localhost:9092(无外网端口) 2026-08-11 17:04:31 +08:00
ymq
239b82c85d fix: KB删除时清理VDB/Graph/physical文件
- 修复物理文件删除:路径不以/idfile/开头,改为检查/开头
- 新增VDB向量删除:调用vectordb API删除该KB的所有向量
- 新增Graph图数据库清理
- 新增entities/entity_relations表清理
2026-08-11 17:03:33 +08:00
ymq
3b1cda8d2f feat: 检索结果多媒体文件使用 bricks 控件播放
- 视频(mp4等): VideoPlayer 控件
- 音频(mp3等): Html <audio> 控件
- 图片(png等): Image 控件
- file_path 透传到前端构造媒体 URL
2026-08-10 18:09:15 +08:00
ymq
6dbec41c34 fix: LIKE 中的 % 需转义为 %% 避免被 sqlor 误解析 2026-08-10 17:53:28 +08:00
ymq
f86cda6ebd fix: 标签检索过滤人脸生成文件,metadata含face的文档不再出现在检索结果 2026-08-10 17:51:35 +08:00
ymq
9ac8192693 fix: 视频上传增加声纹提取,修复 metadata 永远 pending
- 视频处理新增:ffmpeg 提取音频 → voiceprint/extract 声纹 API
- meta_parts['video'] 成功时从 'pending' 改为 'done'
- voiceprint 结果写入 meta_parts
2026-08-10 17:42:52 +08:00
ymq
a22ea76cb8 fix: document_chunks also use created_at (no updated_at column) 2026-08-10 17:02:08 +08:00
ymq
1a45ca2cb3 fix: use created_at instead of updated_at for ORDER BY 2026-08-10 16:59:12 +08:00
ymq
f181de9a10 fix: 纯标签检索支持非文本文档(视频/图片等)
- tag-only 检索从 documents 表查询而非仅查 document_chunks
- 对无 chunks 的文档显示文件名和类型图标
- 有 chunks 的文本文档显示内容预览
2026-08-10 16:56:54 +08:00
ymq
3425c09188 feat: 标签支持多选后直接检索,无关键词时可纯标签检索
- search_result.dspy: 标签解析提前,query为空但标签有值时走直接DB查询
- search.ui: tag_selector添加changed事件触发检索,更新首页提示文案
2026-08-10 11:20:00 +08:00
ymq
70a958180f fix: 搜索页标签过滤改用UiCode多选+声明式{{widget}}传参,移除自定义JS 2026-08-07 18:00:03 +08:00
ymq
9c86291bbf fix: 标签属于组织非知识库 — tag_options按org_id过滤,search.ui页面加载即显示,search_result kb_id=all时不限 2026-08-07 17:52:31 +08:00
ymq
172b302641 fix: kb_options.dspy org_id过滤与kb_list一致,用用户实际org_id 2026-08-07 17:49:29 +08:00
ymq
1206e27336 feat: 知识检索添加多选标签过滤 — tag_options.dspy + search.ui标签芯片 + search_result按标签过滤 2026-08-07 17:27:47 +08:00
ymq
c912805534 fix: 标签选中状态改用☑文字判断,不再依赖Bricks未渲染的data-sel DOM属性 2026-08-07 16:55:30 +08:00
ymq
86e235df58 fix: DSPY中用uuid()不用getID() 2026-08-07 16:49:14 +08:00
ymq
fcb7d1b744 fix: getID不带参数调用 2026-08-07 16:48:54 +08:00
ymq
24bc017e1f fix: 所有id统一32字节 — init.py去掉[:16], DSPY文件改用getID(32)去import uuid 2026-08-07 16:47:50 +08:00
ymq
0fff825331 fix: save_tags.dspy media_tags id改为32字节 getID(32) 2026-08-07 16:40:38 +08:00
ymq
608be82e68 fix: save_tags.dspy uuid→getID(16),DSPY禁止import,改用预置getID 2026-08-07 16:31:57 +08:00
ymq
417ea70a34 fix: save_tags.dspy 缺少 import uuid,导致 uuid.uuid4() 报错无法写入标签 2026-08-07 15:46:31 +08:00
ymq
1c03bb8071 fix: 标签保存后不再整页刷新,改为关闭弹窗+AJAX刷新卡片面板 2026-08-07 15:38:20 +08:00
000b3c0b10 fix: tag save blocks browser — capture 'this' before fetch (then callback 'this' is window, causing infinite loop) 2026-08-06 16:06:43 +08:00
26c8d6b77a fix: save_tags return empty — fetch URL missing _webbricks_=1 (dspy returns HTML without it) 2026-08-06 15:55:10 +08:00
fb706f72d9 bugfix 2026-08-06 14:59:55 +08:00
bbf5b5f257 fix: tag save — close popup + location.reload (PopupWindow.clear_widgets breaks popup) 2026-08-06 14:45:26 +08:00
87ce210b58 fix: save_tags shows close button to dismiss popup after result 2026-08-06 14:37:11 +08:00
13b36df084 fix: tag save → backend save_tags.dspy returns widget, replaces popup content (no reload) 2026-08-06 14:14:42 +08:00
ee0a563e92 fix: KB card buttons stick to bottom via filler; tag save uses reload instead of fragile DOM refresh 2026-08-06 14:09:30 +08:00
e2d17b630b fix: rename form use 'value' not 'defaultValue' for Form pre-fill 2026-08-06 13:57:05 +08:00
14c72e29d7 fix: index.ui new_kb_form URL missing /rag/ prefix → use relative path 2026-08-06 13:55:35 +08:00
09336b3c10 fix: tag_list_panel use cheight instead of filler for proper scrolling 2026-08-06 13:51:57 +08:00
861cf0af19 fix: all popups close before action (rename, delete, tags) 2026-08-06 13:48:51 +08:00
017500e147 fix: storage_stats join knowledge_bases for org-consistent doc count; clean orphaned docs 2026-08-06 13:44:57 +08:00
70f8f27abb fix: kb_list only show org KBs (no NULL); tag_form close popup before refresh (remove alert) 2026-08-06 13:40:30 +08:00
7b99ebd16e fix: add import os in delete_kb; kb_list org filter + DynamicColumn layout 2026-08-06 13:37:30 +08:00
52bdc7ce40 fix: delete_kb returns urlwidget (not JSON), so bricks can render redirect to index.ui 2026-08-05 19:03:14 +08:00
d9e1e77341 refactor: delete KB uses PopupWindow confirm form instead of JS confirm (no inline script) 2026-08-05 18:20:23 +08:00
ee4bf7548a fix: delete script — assign JSON-safe name to JS var, no \n in string, no inline concat 2026-08-05 18:12:27 +08:00
c0c5ba831f fix: escape KB name directly for JS single-quoted string, bypassing json.dumps double-quote entanglement 2026-08-05 17:40:35 +08:00
ce457babe7 fix: rename_kb returns json.dumps; delete btn uses pre-computed safe_name 2026-08-05 17:30:39 +08:00
e1f0c406ac fix(kb): escape namestr with json.dumps in delete button JS to prevent SyntaxError
Root cause: namestr directly concatenated into JS confirm() string broke
when KB name contained quotes or special chars. The SyntaxError prevented
event.stopPropagation() from executing, which caused the card click to
also fire (navigating to detail.ui).
2026-08-05 17:15:13 +08:00
5de0a87708 fix(kb): rename 403 (Jinja->Python), delete JS error (stopPropagation), card click restore
- rename_kb_form.dspy: {{entire_url(...)}} Jinja syntax invalid in .dspy, use Python entire_url()
- kb_list.dspy: card VBox click restored (navigates to detail.ui)
- rename button: add event.stopPropagation() script before urlwidget
- delete button: add event.stopPropagation(), use json.dumps for namestr safety
2026-08-05 16:57:08 +08:00
37fc233df2 fix: handle NULL org_id in rename/delete KB handlers (OR org_id IS NULL) 2026-08-05 16:46:16 +08:00
8f1f75c947 feat(kb): add rename and delete knowledge base
- kb_list.dspy: add per-card rename (popup form) and delete (confirm+cascade) buttons
- rename_kb_form.dspy: popup form with name + description fields
- rename_kb.dspy: UPDATE knowledge_bases handler
- delete_kb.dspy: cascade delete (docs, chunks, media_tags, tags, files) handler
2026-08-05 16:27:32 +08:00