mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 10:30:46 +08:00
Files the tutor produces were only reachable through the one assistant bubble that made them, so finding a deck or spreadsheet again meant scrolling the transcript. The activity panel already folded every message's attachments into one list but ignored the `generated` flag that distinguishes output from upload, lumping both into "Attachments". Split them: generated files get their own card, above uploads, since what a conversation produced is what you come back for. Rows reuse the existing open-in-viewer path, and show a size plus a hover title with the file's location under the data root — derived from the artifact URL, so no absolute server path is persisted or sent to the browser. Two gaps behind "I can't find the file" are fixed with it: - A generated .pptx routed to the preview drawer's `office-text` branch, which renders `extracted_text` — a field only the upload path filled in, so produced decks opened blank. Artifacts now get preview text extracted while the file is still on disk, bounded to 20k chars and limited to formats the browser cannot render itself. The cancelled-turn path deliberately skips it rather than starting blocking work while unwinding. - Path resolution goes through `is_public_output_path`, the same guard `/api/outputs` applies, so a crafted URL cannot walk out of the public workspace. The artifact→attachment mapping moves out of `turn_runtime` into its own module, and the panel's 90-line message fold moves to `lib/session-activity` — it is pure data reduction with no React in it, which leaves the panel presentational and the fold directly testable.