feat: add slides generation tool with multiple slide types
Some checks failed
CI / Lint, Test & Build (push) Failing after 17s
CI / Deploy production (on server) (push) Has been skipped

- Add slides.tool.ts with support for title, bullets, chart, stats, table, cards, timeline, quote, comparison, equation, image, summary slide types
- Chart types: bar, horizontal-bar, line, donut, radar
- Integrate with agent executor and canvas system
- Add multilingual support (en/fr)
- Various UI improvements and bug fixes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Antigravity
2026-05-22 17:18:48 +00:00
parent 0f6b9509da
commit 5728452b4a
68 changed files with 6990 additions and 2584 deletions

View File

@@ -0,0 +1,67 @@
/**
* Shared types for the Presentation / Slides system.
* Used by both the server-side tool (slides.tool.ts) and the client renderer (slides-renderer.tsx).
*/
export interface SlideChart {
type: 'bar' | 'line' | 'area' | 'pie' | 'radar' | 'waterfall' | 'funnel' | 'combo' | 'stacked-bar' | 'gauge' | 'treemap'
data: Array<Record<string, string | number>>
/** Key in data objects used for the X-axis / labels (defaults to "name") */
xKey?: string
/** Keys for data series. Defaults to all keys except xKey */
yKeys?: string[]
colors?: string[]
showLegend?: boolean
showGrid?: boolean
/** For combo charts: which yKeys to render as lines (others as bars) */
lineKeys?: string[]
/** For gauge: target value (0-100) */
gaugeValue?: number
/** For gauge: label below the value */
gaugeLabel?: string
}
export interface SlideSpec {
title: string
subtitle?: string
/** Bullet points, stat values, card items, etc. */
content: string[]
layout?: 'title' | 'content' | 'section' | 'two-column' | 'cards' | 'stats' | 'quote' | 'toc' | 'summary' | 'image' | 'chart' | 'diagram' | 'timeline' | 'kpi-dashboard' | 'data-table'
imageUrl?: string
/** Speaker notes / talking points for the presenter (2-3 sentences) */
notes?: string
/** Recharts-compatible chart spec — used with layout="chart" */
chart?: SlideChart
/** Mermaid diagram source — used with layout="diagram" */
mermaid?: string
/** react-icons identifier e.g. "FaRocket" — decorative icon */
icon?: string
/** For data-table layout: column headers */
tableHeaders?: string[]
/** For data-table layout: rows of data (each row is array of cell values) */
tableRows?: string[][]
}
/** Executive presentation template types */
export type SlideTemplate = 'auto' | 'board-update' | 'project-status' | 'strategy-review' | 'quarterly-results'
export interface PresentationSpec {
title: string
slides: SlideSpec[]
/** Palette key — one of the PALETTES keys or alias */
theme?: string
/** "sharp" | "brutalist" | "creative" | "rounded" | "pill" — affects border radius */
style?: string
author?: string
/** Executive template used for structure guidance */
template?: SlideTemplate
}
export interface Palette {
primary: string
secondary: string
accent: string
light: string
bg: string
isDark: boolean
}