73 Commits

Author SHA1 Message Date
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
1dd59f7caa feat(tags): multi-select tag list + dedup create + tag_sync endpoint
- tag_form.dspy: rewrite as multi-select checkbox list (clickable rows with toggle)
  + input field for new tag with + button (calls /api/tag/create with dedup)
  + submit button calls /api/tag/sync to sync media_tags
  + dynamically add new tag row to list after creation
- media_cards.dspy: read tags from media_tags table instead of metadata
- init.py: tag_create_handler adds dedup (check existing by kb_id+name)
- init.py: new tag_sync_handler (full sync: delete old + insert selected)
- config.json: add /api/tag/sync route
2026-08-05 15:36:44 +08:00
371afae84a fix: file list action buttons spacing 6px->14px; drop analysis button; legacy /api/doc/upload now saves via FileStorage (flat files/ layout caused 404) 2026-08-05 12:17:25 +08:00
267fd276c5 fix: escape literal % in LIKE patterns (aiomysql %-format conflict -> TypeError) 2026-08-05 11:55:18 +08:00
3cb591ed92 feat: detail.ui face/voiceprint media card popups (DynamicColumn, image/audio playback) + tag buttons on cards and file list rows (tag_form.dspy -> add_tag.dspy, refresh media panel) 2026-08-05 10:55:50 +08:00
6878b58c95 refactor: kb cards via module-local kb_list.dspy (drop /api/kb/list dep); detail.ui file list -> filler+VScrollPanel no fixed height 2026-08-04 16:14:45 +08:00
548fc6013e feat: per-org storage quota enforcement — org_storage_limits table, upload rejection, UI display 2026-08-04 15:36:53 +08:00
f160589370 bugfix 2026-08-04 14:40:18 +08:00
020c84bdfc bugfix 2026-08-04 14:34:10 +08:00
0bd425a2aa feat: put search results in VScrollPanel with filler layout (no fixed height) 2026-08-04 14:04:07 +08:00
7993b186da fix: stop double-encoding keyword - pass raw value as httpcall params (CRUD style); defensive unquote fallback in dspy for legacy cached UI 2026-08-04 11:33:52 +08:00
dfad26d3c7 feat: hybrid search - add keyword LIKE recall merged with vector results, mark kw hits 2026-08-03 19:19:32 +08:00
bd03743c6f fix: use resultValue() not getValue() for kb selector - getValue returns object, broke kb_id in URL 2026-08-03 18:52:34 +08:00
2d4ff6a19f debug: log incoming params_kw in search_result.dspy 2026-08-03 18:34:50 +08:00
84448259e2 fix: GPU URLs need :10443, create VDB collection before upsert, align VDB id with chunk id 2026-08-03 17:02:06 +08:00
598f5c5c23 sync: add batch_ingest.dspy from test env 2026-08-03 10:40:25 +08:00
8ab8987776 chore: remove debug traces from upload_file.dspy 2026-07-31 18:59:15 +08:00
5bf3ef3822 trace: check if DBPools blocks in background task 2026-07-31 18:56:51 +08:00
2f7acc8120 debug: trace background_reco execution in upload_file.dspy 2026-07-31 18:53:31 +08:00
8dad4e9b5e feat: async upload — return immediately, ingest in background 2026-07-31 18:17:47 +08:00
cdc02e31e4 fix: search.ui - call buildUrlwidgetHandler result to actually fire HTTP request 2026-07-31 16:35:10 +08:00
7792aa913e fix: search.ui - code→UiCode widgettype + bricks.app.root→this.parent for urlwidget sub-page 2026-07-31 16:14:53 +08:00
7badd6e683 fix: search.ui getWidgetById 用 this 替代 bricks.app.root 2026-07-31 15:48:55 +08:00
a644e41de3 fix: search.ui buildUrlwidgetHandler 参数顺序错误导致 TypeError 2026-07-31 15:04:43 +08:00
0cb6f34135 fix: search_result.dspy 用 StreamHttpClient + try/except 替代裸 aiohttp 2026-07-31 14:59:18 +08:00
0d6acfb4ef feat: analysis cards with face/voiceprint results + tag system 2026-07-31 14:58:21 +08:00
9b3cfb86c0 refactor: 用 StreamHttpClient 替代 aiohttp — DSPY 预置全局变量 2026-07-31 13:45:42 +08:00
848644f229 fix: import aiohttp — 原代码所有 aiohttp 调用被 except:pass 静默吞掉 NameError 2026-07-31 13:31:52 +08:00
d92275d811 fix: actually remove unused var tree in detail.ui 2026-07-30 18:25:16 +08:00
df8d220308 fix: return type consistency + textAlign→halign + remove unused var (Agent 2 review) 2026-07-30 18:24:04 +08:00
1cb82b912d add text extraction for PDF/DOCX/PPTX/XLSX and MP4 keyframe CLIP embedding in upload_file.dspy 2026-07-30 18:06:26 +08:00
c6110522c1 fix: root folder upload __root__ → empty string 2026-07-30 18:00:00 +08:00
5b1fb8e564 fix: try/except around DB queries (Agent 2 review) 2026-07-30 17:43:18 +08:00
a440887028 fix: search bind passes {options:{url:...}} to buildUrlwidgetHandler 2026-07-30 17:28:30 +08:00
448645b0e2 fix: delete reloads file_list.dspy instead of delete response 2026-07-30 17:13:58 +08:00
89cb31897b fix: restore col widths + absolute delete URL + _webbricks_=1 2026-07-30 17:04:49 +08:00
5ec01c3b18 fix: restore tree root node (📁 根目录) 2026-07-30 16:55:19 +08:00
8e1ef924e5 fix: download URL /idfile prefix, delete uses fetch, filename left-aligned 2026-07-30 16:17:20 +08:00
40cf8f3291 fix: int(total_size) + json.dumps default=str (Agent 2 review) 2026-07-30 16:02:53 +08:00
eaa8d37816 fix: storage stats use int for doc/chunk counts 2026-07-30 15:48:58 +08:00
f968f9f578 feat: dynamic storage stats display via storage_stats.dspy 2026-07-30 15:45:07 +08:00
Hermes
f63f742f8e fix: restore del_url line in file_list.dspy 2026-07-30 15:06:20 +08:00