mirror of
https://github.com/storytold/deckcraft.git
synced 2026-12-02 22:30:34 +00:00
Merge pull request #2212
This commit is contained in:
@@ -247,7 +247,11 @@ fn export_tool_lists_pdf_and_its_options() {
|
||||
assert!(formats.iter().any(|x| x == f), "format {f}: {export}");
|
||||
}
|
||||
assert_eq!(props["layout"]["enum"], json!(["slides", "notes", "handouts"]));
|
||||
assert_eq!(props["perPage"]["enum"], json!([1, 2, 3, 4, 6, 9]));
|
||||
// Gemini function declarations accept only string enums (#2211): perPage stays a plain integer
|
||||
// and the allowed values are spelled out in the description (the engine validates the set).
|
||||
assert_eq!(props["perPage"]["type"], "integer");
|
||||
assert!(props["perPage"].get("enum").is_none(), "{export}");
|
||||
assert!(props["perPage"]["description"].as_str().unwrap().contains("1, 2, 3, 4, 6 or 9"), "{export}");
|
||||
for p in ["dpi", "slides", "includeHidden", "textLayer", "frame", "paper", "orientation"] {
|
||||
assert!(props.get(p).is_some(), "{p}: {export}");
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ pub fn tool_definitions() -> Vec<Value> {
|
||||
"all": boolean("All slides (images)"),
|
||||
"scale": num("Pixels per point for images (default 2)"),
|
||||
"layout": {"type": "string", "enum": ["slides", "notes", "handouts"], "description": "PDF page layout (default slides)"},
|
||||
"perPage": {"type": "integer", "enum": [1, 2, 3, 4, 6, 9], "description": "PDF handouts: slides per page (default 6)"},
|
||||
"perPage": {"type": "integer", "description": "PDF handouts: slides per page (1, 2, 3, 4, 6 or 9; default 6)"},
|
||||
"dpi": num("PDF: raster resolution of slide artwork, 36-600 (default 200)"),
|
||||
"slides": {"type": "array", "items": {"type": "integer", "minimum": 0}, "description": "PDF and GIF: slide indices to export, in order (default all)"},
|
||||
"includeHidden": boolean("PDF and GIF: include hidden slides (default false)"),
|
||||
|
||||
Reference in New Issue
Block a user