Add a PowerPoint agent that creates, edits, designs, previews and exports presentations - #225
Open
MikeAlhayek wants to merge 7 commits into
Open
MikeAlhayek wants to merge 7 commits into
MikeAlhayek wants to merge 7 commits into
Conversation
…-conversation workspaces GeneratedFileContent.EncodedContent stores a file that is already encoded as given, without resolving a writer, and GeneratedDocumentRequest.ContentType overrides the media type it is served with. IConversationWorkspaceCleanupHandler lets a feature that keeps working state per conversation remove it when the conversation is deleted. These are the same changes the PDF agent makes, so the two branches merge cleanly.
A resolved read model of a deck (slides, elements, text, tables, charts, pictures, themes, masters, layouts), the edits the engine applies, the shared text measurer and layout used both to fit text and to draw it, a display-list slide renderer with an SVG writer, the diagram composer, theme presets, and the per-conversation workspace that keeps decks and their earlier versions.
Creates decks from theme presets or templates, reads them into the model, applies batches of edits all-or-nothing (slides, elements, text, tables, charts with embedded workbooks, diagrams, themes, masters, templates, backgrounds, footers, sections, logos), fits text the way autofit does, and validates with OpenXmlValidator. Uploaded .pptx and .potx files are imported through it, a Markdown .pptx writer is registered for generated files, and .potx uploads are accepted and indexed like decks.
The presentation-agent is a hidden, always-available system agent exposed over A2A, mirroring the Tabular Data Agent. Its tools understand, create, edit, design, review, preview and export decks in a per-conversation workspace: slides and elements in batches, paragraph rewrites that keep formatting, tables and charts filled from tabular data and kept linked, theme, master, template and branding changes, diagrams and generated pictures, quality checks, comparisons, undo, SVG previews behind [fig:N] markers, and .pptx or PDF export. Uploaded decks are imported on first use and never changed. The workspace is removed with the conversation, its history or its upload, a steering handler sends uploaded .pptx and .potx files to the agent, and generate_file sends deck requests to it while it is enabled.
The PDF package registers a renderer that paints the same display lists the preview paints into one PDF page per slide, so an exported PDF matches the preview and the deck in PowerPoint.
Covers creating, reading, editing and validating decks with every theme, layout, chart type and diagram kind; all-or-nothing edits; the Markdown writer; template import and ingestion; SVG escaping; argument parsing; colours; the workspace history; the quality checks; the agent profile and registrations; workspace cleanup; and the tools end to end, including a six-slide deck that validates, uploads, edits across calls, previews, tabular charts and PDF export.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #222.
Summary
Adds a Presentation Agent (
presentation-agent) that creates, edits, designs, reviews, previews and exports PowerPoint decks, built the way the Tabular Data Agent is: a code-defined system agent that is always available to the primary model, exposed over A2A, and hidden from the agent pickers.AddOpenXml()registers it;AddPdf()adds PDF export..pptxfiles in a per-conversation workspace. Every tool call applies its edits as one all-or-nothing batch and saves a new version, so later turns, previews and exports see the same file. Uploads are copied in on first use and never changed;.potxtemplates are imported as designs. Recent versions are kept for undo and comparison, and the workspace is removed with the conversation, its history, or its upload.#ids, theme, search, extract content.tabular_sqlover the tabular workspace, and kept linked for refresh. Charts carry an embedded workbook, so they stay editable in PowerPoint.check_presentation(layout, consistency, accessibility, readability, links, media, file, rendering, each with a fix),analyze_presentation,compare_presentations, undo.[fig:N]markers, bounded, with a text fallback, a non-requestable format, and labelled boxes for SmartArt, 3D and embedded objects; export as.pptx, or PDF withAddPdf(); outline, notes, presenter script, handout or all text..pptx/.potxfiles, andgenerate_filesends deck requests to the agent while it is enabled..pptxIGeneratedFileWriter, for code that writes a deck in one step.Shared plumbing is identical to the PDF agent branch (
GeneratedFileContent.EncodedContent,GeneratedDocumentRequest.ContentType,IConversationWorkspaceCleanupHandler), and the other shared files were edited on lines that branch doesn't touch, so the two should merge cleanly.Verification
OpenXmlValidator, and a failing edit changes nothing), the tools end to end (a six-slide deck exports with 0 validation errors; an uploaded deck is listed and previewed; edits persist across calls; a chart and a table come from a CSV; PDF export has one page per slide), and the agent profile, registrations and cleanup handlers.ValidateOnBuild.Known limitations
.pptxfile is unaffected.🤖 Generated with Claude Code