dify/api/services/knowledge_fs
Jyong afa771dcac feat(knowledge-fs): keep query images with retrieval test history
Query images attached to a retrieval test vanished as soon as the run's
history record was selected, and were never shown again after a reload,
because nothing persisted them: the gateway dropped `queryImages` when writing
`answer_traces`, the console trace/research responses had no image field, and
the composer cleared its images on every record selection.

- knowledge-fs: add a nullable JSON `query_images` column to `answer_traces`
  (migration 0049 for postgres and tidb), persist and read it in the answer
  trace repository, and expose `queryImages` on quality trace list items.
- api: enrich trace and research task responses with
  `KnowledgeFSQueryImageResponse`, resolving file names and short-lived signed
  preview URLs only for files the acting account still owns; regenerate the
  console and service contracts.
- web: keep composer images scoped to the selected record like the query
  text, remember images per run in this session, fall back to persisted
  previews (with a labelled placeholder when the file is gone), show them in
  the result panel and as a count on history records, and carry them into
  retests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zw5G5SX3HmVfnZof6YWAc
2026-09-02 09:17:36 -04:00
..
__init__.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
app_admission_service.py fix(workflow): stabilize KnowledgeFS retrieval access 2026-08-11 11:51:17 -04:00
app_binding_management.py Fix workflow binding sync session handling 2026-08-09 22:50:44 -04:00
app_execution_capability.py feat(knowledge-fs): add automatic metadata filtering to retrieval node 2026-09-02 02:55:12 -04:00
batch_capability.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
buffered_upload_admission.py perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
capability_broker.py refactor(knowledge_fs): replace credential service with dataset API key authorization. Remove the API token feature at the space level for knowledgeFs. 2026-08-26 15:40:18 +08:00
cleanup.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
control_plane_service.py fix(knowledge-fs): persist icon style selection (WTA-2068) 2026-08-17 17:31:25 +08:00
control_space_commands.py default KnowledgeFS external access on creation 2026-08-19 00:33:43 -04:00
control_space_lifecycle.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
control_space_management.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
cutover_runtime_gate.py feat(knowledge-fs): automate greenfield workspace cutover 2026-07-28 09:12:50 -04:00
cutover.py feat(knowledge-fs): automate greenfield workspace cutover 2026-07-28 09:12:50 -04:00
data_facade.py feat(knowledge-fs): keep query images with retrieval test history 2026-09-02 09:17:36 -04:00
download_service.py fix(knowledge-fs): align document download contracts 2026-08-12 11:43:32 +08:00
greenfield_initializer.py feat(knowledge-fs): automate greenfield workspace cutover 2026-07-28 09:12:50 -04:00
initial_source_preview_job.py feat(knowledge-fs): support datasource-driven source previews 2026-08-12 08:33:52 +08:00
initial_source_preview.py fix(knowledge-fs): disambiguate preview page types 2026-08-12 09:59:43 +08:00
lifecycle_port.py feat(dataset): support deferred New RAG model setup 2026-07-28 23:19:25 +08:00
lifecycle_readiness.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
lifecycle_remote_http.py feat(dataset): support deferred New RAG model setup 2026-07-28 23:19:25 +08:00
lifecycle_saga.py feat(dataset): support deferred New RAG model setup 2026-07-28 23:19:25 +08:00
membership_changes.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
object_storage.py feat(knowledge): stage document uploads before admission 2026-08-10 10:58:17 -04:00
observability.py Refactor frontend architecture and simplify implementation 2026-07-29 02:30:27 -04:00
orphan_reconciler.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
product_application_service.py fix(knowledge-fs): persist icon style selection (WTA-2068) 2026-08-17 17:31:25 +08:00
product_authorization.py feat(dataset): add New Knowledge space actions 2026-07-29 12:15:33 +08:00
product_dto.py feat(knowledge-fs): keep query images with retrieval test history 2026-09-02 09:17:36 -04:00
product_operations.py perf(knowledge-fs): harden cross-format document ingestion 2026-08-31 07:48:35 -04:00
product_remote_http.py feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
product_remote.py feat(knowledge-fs): add profile-driven multimodal retrieval 2026-09-02 01:01:57 -04:00
product_service.py fix(knowledge-fs): persist icon style selection (WTA-2068) 2026-08-17 17:31:25 +08:00
query_images.py feat(knowledge-fs): keep query images with retrieval test history 2026-09-02 09:17:36 -04:00
remote_images.py fix(knowledge-fs): persist document images across formats 2026-08-26 03:58:04 -04:00
remote_registry.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
revocation_commands.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
revocation_reconciler.py Expand application capabilities and refactor core workflows 2026-07-22 05:09:09 -04:00
runtime.py fix(knowledge-fs): align retrieval test timeout 2026-09-01 13:51:15 -04:00
service_api_authorization.py refactor(knowledge_fs): replace credential service with dataset API key authorization. Remove the API token feature at the space level for knowledgeFs. 2026-08-26 15:40:18 +08:00
source_import_commit_service.py fix(knowledge-fs): enhance source import handling and error recovery for remote updates 2026-09-02 18:38:38 +08:00
space_tag_service.py feat(knowledge-fs): update space tag management and improve type annotations 2026-08-13 11:14:52 +08:00
staged_upload_service.py feat(knowledge_fs): expand supported document upload formats 2026-08-25 19:58:15 +08:00