Skip to content

feat(tarko): support real data file uploads - #1942

Open
SC123667 wants to merge 1 commit into
bytedance:mainfrom
SC123667:codex/real-file-upload-323
Open

feat(tarko): support real data file uploads#1942
SC123667 wants to merge 1 commit into
bytedance:mainfrom
SC123667:codex/real-file-upload-323

Conversation

@SC123667

Copy link
Copy Markdown

Summary

  • persist non-image chat attachments under uploads/ in the current Agent workspace through a new /api/v1/files/upload endpoint
  • show uploaded-file chips, progress, removal, and errors in both welcome-page and session chat inputs while preserving the existing image data-URL flow
  • append safe workspace-relative paths to the submitted message so the Agent can open and analyze CSV, JSON, documents, and other data files with its workspace tools
  • reuse the existing CSRF flow for multipart requests, sanitize filenames, add collision-resistant suffixes, limit uploads to 10 files / 20 MB each, and avoid exposing absolute host paths
  • add a patch changeset plus server and UI regression tests

Why

The file picker previously accepted only images, and the change handler silently ignored every non-image file. The UI could therefore look as if a data file had been selected even though no bytes reached the Agent workspace.

This implementation is based on current main and follows the current /api/v1 and CSRF conventions. It is also a current-main alternative related to #1557 while keeping image attachments on their existing client-side path.

Fixes #323.

Validation

  • pnpm install --frozen-lockfile
  • pnpm bootstrap
  • pnpm test — 842 passed, 13 skipped
  • pnpm --filter @tarko/agent-server test — 66 passed
  • pnpm --filter @tarko/agent-ui test — 4 passed
  • pnpm --filter @tarko/agent-server run build
  • pnpm --filter @tarko/agent-ui run build
  • Prettier check and git diff --check

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 978da3c
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/6a7b0edde40ca90008c99f41
😎 Deploy Preview https://deploy-preview-1942--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit 978da3c
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/6a7b0edd2d02580008ba85d4
😎 Deploy Preview https://deploy-preview-1942--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

上传数据文件无反应,总提示我未上传

2 participants