WeKnora/internal/types
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
..
interfaces fix(knowledge): delete extracted images from storage when knowledge is removed 2026-04-02 12:04:04 +08:00
agent.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
builtin_agent_config.go feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
chat.go add oidc 2026-03-30 11:13:44 +08:00
chat_history_config.go feat: implement chat history and retrieval settings 2026-03-09 11:46:56 +08:00
chat_manage.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
chunk.go feat: implement parent-child chunking strategy for enhanced context management 2026-03-05 18:14:14 +08:00
cleanup.go init commit 2025-08-05 15:08:07 +08:00
const.go feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
context_helpers.go fix(i18n): use WEKNORA_LANGUAGE env for prompt language fallback instead of hardcoded zh-CN 2026-04-02 12:01:25 +08:00
custom_agent.go feat(web-search): refactor web search provider 2026-03-31 20:22:34 +08:00
dataset.go init commit 2025-08-05 15:08:07 +08:00
datasource.go refactor(datasource): remove WeCom document integration and related components 2026-03-30 20:46:07 +08:00
docparser.go feat: implement parent-child chunking strategy for enhanced context management 2026-03-05 18:14:14 +08:00
embedding.go perf: 优化FAQ索引更新和删除性能 2026-01-14 17:30:04 +08:00
errors.go init commit 2025-08-05 15:08:07 +08:00
evaluation.go refactor: Update tenant ID handling across the application 2025-11-25 16:30:54 +08:00
event_bus.go refactor: Implement event-driven streaming and enhance session management 2025-11-07 22:41:41 +08:00
extract_graph.go fix(i18n): use WEKNORA_LANGUAGE env for prompt language fallback instead of hardcoded zh-CN 2026-04-02 12:01:25 +08:00
faq.go feat(types): enhance FAQ metadata normalization and sanitization 2026-03-19 18:20:09 +08:00
faq_test.go feat(chunk): implement batch deletion for chunks to avoid MySQL placeholder limit 2026-03-19 18:20:09 +08:00
graph.go feat: implement preview of user level memory graph 2026-02-25 14:29:54 +08:00
json.go init commit 2025-08-05 15:08:07 +08:00
knowledge.go feat(knowledge): add channel support to knowledge entries and related components 2026-03-25 22:08:29 +08:00
knowledgebase.go fix(storage): add S3 provider scheme support to frontend and backend allowlists 2026-03-30 16:57:27 +08:00
knowledgebase_test.go fix(storage): add S3 provider scheme support to frontend and backend allowlists 2026-03-30 16:57:27 +08:00
mcp.go fix: use service name for MCP tool naming with collision protection (#715) 2026-03-21 10:22:05 +08:00
memory.go feat: implement preview of user level memory graph 2026-02-25 14:29:54 +08:00
message.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
model.go refactor: use unified NVIDIA API for both chat and VLM 2026-03-30 10:38:50 +08:00
organization.go feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
placeholder.go feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
qa_request.go refactor: consolidate QA request handling and improve session service interface 2026-03-16 02:26:47 +08:00
retrieval_config.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
retriever.go feat: support weaviate vectordb for knowledge retrieve 2026-03-09 10:36:16 +08:00
search.go feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
session.go feat: 添加思考模式配置支持 2025-12-31 15:36:20 +08:00
tag.go perf: batch tag reference counting 2026-01-20 18:19:44 +08:00
tenant.go feat: implement chat history and retrieval settings 2026-03-09 11:46:56 +08:00
user.go add oidc 2026-03-30 11:13:44 +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