WeKnora/internal/application/service
ochan.kwon 33e919cc80 fix(knowledge): delete extracted images from storage when knowledge is removed
Previously, only the original uploaded file was deleted via knowledge.FilePath.
Images extracted by the builtin parser (stored as individual S3/MinIO/local files
via ImageResolver) were never cleaned up, causing orphan files to accumulate.

- Add ListImageInfoByKnowledgeIDs repository method (no chunk_type filter)
- Add collectImageURLs utility with URL deduplication and JSON parse logging
- Add deleteExtractedImages helper (standalone, best-effort with error logging)
- Fix DeleteKnowledge: collect image URLs before errgroup, delete in file goroutine
- Fix DeleteKnowledgeList: bulk collect with KB-level fileSvc mapping
- Fix cleanupKnowledgeResources: collect before chunk deletion, delete after
- Fix ProcessKBDelete: collect before chunk deletion for KB-wide cleanup
2026-04-02 12:04:04 +08:00
..
chat_pipeline feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
file fix(storage): add S3 provider scheme support to frontend and backend allowlists 2026-03-30 16:57:27 +08:00
llmcontext feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
memory feat: implement preview of user level memory graph 2026-02-25 14:29:54 +08:00
metric refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure 2025-11-28 16:17:52 +08:00
retriever perf: 为批量索引添加并发保存优化 2026-01-14 17:21:42 +08:00
agent_service.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
agent_share.go feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
chunk.go feat: enhance document loading and state management in doc-content component 2026-03-02 21:21:49 +08:00
custom_agent.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
dataset.go init commit 2025-08-05 15:08:07 +08:00
datasource_service.go feat(datasource): enhance DataSourceSettings and DataSourceSyncLogs functionality 2026-03-30 20:46:07 +08:00
evaluation.go feat(knowledge): add channel support to knowledge entries and related components 2026-03-25 22:08:29 +08:00
extract.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
graph.go feat(graph): enhance graph extraction prompt rendering and language context handling 2026-03-25 22:08:29 +08:00
image_multimodal.go fix(i18n): use WEKNORA_LANGUAGE env for prompt language fallback instead of hardcoded zh-CN 2026-04-02 12:01:25 +08:00
kbshare.go feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
knowledge.go fix(knowledge): delete extracted images from storage when knowledge is removed 2026-04-02 12:04:04 +08:00
knowledge_image_cleanup_test.go fix(knowledge): delete extracted images from storage when knowledge is removed 2026-04-02 12:04:04 +08:00
knowledge_manual_test.go fix: sanitize tab chars and avoid double .md extension in manual download filename 2026-03-16 18:18:23 +08:00
knowledgebase.go fix(knowledge): delete extracted images from storage when knowledge is removed 2026-04-02 12:04:04 +08:00
knowledgebase_search.go feat: enhance input field and agent stream display with improved handling and sanitization 2026-03-16 02:26:47 +08:00
knowledgebase_search_faq.go feat: enhance input field and agent stream display with improved handling and sanitization 2026-03-16 02:26:47 +08:00
knowledgebase_search_fusion.go feat: enhance input field and agent stream display with improved handling and sanitization 2026-03-16 02:26:47 +08:00
knowledgebase_search_results.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
knowledgebase_search_shared.go feat: enhance input field and agent stream display with improved handling and sanitization 2026-03-16 02:26:47 +08:00
mcp_service.go feat: add built-in MCP service support 2026-03-05 21:57:01 +08:00
message.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
metric_hook.go refactor: Clean up code by removing unnecessary blank lines and improving comments for better readability and maintainability 2025-11-28 16:10:37 +08:00
model.go feat(prompts): update assistant descriptions and add intent-specific templates 2026-03-25 22:08:29 +08:00
ocr_sanitizer.go feat: use language-neutral English prompts for multilingual LLM responses 2026-03-06 21:08:12 +08:00
ocr_sanitizer_test.go feat: introduce WeKnora Lite edition with lightweight configuration and deployment 2026-03-02 21:21:49 +08:00
organization.go feat(i18n): update localization for knowledge bases and organization features 2026-02-09 11:40:25 +08:00
session.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
session_agent_qa.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
session_knowledge_qa.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
session_qa_helpers.go feat(session): restrict @mentions to agent's allowed knowledge base scope 2026-04-02 10:31:20 +08:00
skill_service.go feat: adapt preloaded skills to smart-reasoning agent 2026-02-04 20:08:49 +08:00
tag.go feat: enhance document loading and state management in doc-content component 2026-03-02 21:21:49 +08:00
tenant.go feat(security): add AES-256-GCM encryption for API keys at rest 2026-03-09 10:35:07 +08:00
user.go simplify oidc callback result payload 2026-04-01 20:47:18 +08:00
web_search.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
web_search_provider.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
web_search_state.go feat: Add DataSchema tool for retrieving schema information from CSV and Excel files 2025-12-29 20:03:51 +08:00