dify/api/tests/unit_tests
Harry 65e89520c0 refactor: unify download item types and eliminate extension-based branching
Merge AssetDownloadItem, AssetInlineItem into SandboxDownloadItem with
optional 'content' field. All consumers now follow a clean pipeline:
  get items → accessor.resolve_items() → AppAssetService.to_download_items() → download

Key changes:
- SandboxDownloadItem gains content: bytes | None (entities.py)
- ZipSandbox.download_items() handles both inline (base64 heredoc) and
  remote (curl) via a single pipeline — no structural branching
- AssetDownloadService.build_download_script() takes unified list
- CachedContentAccessor.resolve_items() batch-enriches items from DB
  (extension-agnostic, no 'if md' checks needed)
- AppAssetService.to_download_items() converts AssetItem → SandboxDownloadItem
- DraftAppAssetsInitializer, package_and_upload, export_bundle simplified
- file_upload/node.py switched to SandboxDownloadItem
- Deleted AssetDownloadItem and AssetInlineItem classes
2026-03-10 17:12:15 +08:00
..
configs feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
controllers fix: fix use fastopenapi lead user is anonymouse (#32236) 2026-02-11 15:53:51 +08:00
core refactor: unify download item types and eliminate extension-based branching 2026-03-10 17:12:15 +08:00
extensions Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-09 17:00:56 +08:00
factories refactor: document_indexing_sync_task split db session (#32129) 2026-02-09 17:12:16 +08:00
fields refactor: port api/fields/file_fields.py (#30638) 2026-01-06 22:55:58 +08:00
libs Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-11 12:44:05 +08:00
models feat: Human Input Node (#32060) 2026-02-09 14:57:23 +08:00
oss feat: support tencent cos custom domain (#30193) 2025-12-29 15:41:02 +08:00
repositories Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-09 17:00:56 +08:00
services Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-13 15:17:52 +08:00
tasks refactor: document_indexing_sync_task split db session (#32129) 2026-02-09 17:12:16 +08:00
tools feat: extract mcp tool usage (#31802) 2026-02-09 09:52:14 +08:00
utils fix: ruff 2026-03-10 17:12:15 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
.gitignore Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
conftest.py fix(api): excessive high CPU usage caused by RedisClientWrapper (#32212) 2026-02-11 09:49:29 +08:00