Skip to content

Create CSV artifacts from non-tabular document responses #1066

Description

@paullizer

Issue

When a user selects a non-tabular document such as a PDF or Word file and asks Chat to generate a CSV, the assistant can render comma-delimited rows in its response but no downloadable CSV artifact is created.

Steps to Reproduce

  1. Upload or select a PDF or Word document containing extractable structured information.
  2. Ask Chat to turn the document into a CSV.
  3. Observe that the assistant returns CSV-like text or a Markdown/code block, but no downloadable CSV artifact.

Expected Behavior

An explicit CSV request should create a downloadable .csv artifact from valid comma-delimited rows rendered by the assistant, regardless of whether the source document was originally tabular.

Actual Behavior

The response contains CSV-like text, but the artifact export path does not recognize it and no CSV file is generated.

Impact

Users must manually copy assistant output into a file, and the existing CSV-generation affordance appears broken for common PDF and Word extraction workflows.

Acceptance Criteria

  • Explicit CSV requests over non-tabular documents create a downloadable CSV artifact when the assistant returns valid comma-delimited rows.
  • CSV parsing preserves quoted commas, escaped quotes, multiline values, and column order.
  • Prose and citation text outside the CSV block are not included in the export.
  • Existing Markdown-table and tab-separated export behavior remains unchanged.
  • Focused regression coverage validates PDF/Word-style conversion responses.

Notes

The existing assistant-table export helper recognizes Markdown pipe tables and tab-separated output. The observed response already contains comma-delimited data, suggesting the missing capability is at the assistant-output parsing/artifact boundary.
Related context: #1031, #1055, and #1058.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions