feat: Add Slides Generator tool with multi-language support and HTML5 presentation design

- Added SlidesPresentation and Slide types
- Implemented generateSlides method in all services (Qwen, Ollama, Z.AI)
- Created stunning SlidesGenerator component with:
  - 18 language support (English, Chinese, Spanish, French, etc.)
  - 6 theme options (Corporate, Modern, Minimal, Dark, Vibrant, Gradient)
  - 7 audience presets (Executives, Investors, Technical, etc.)
  - HTML5 slide preview with navigation
  - Fullscreen presentation mode
  - Auto-play functionality
  - Export to standalone HTML file
  - Slide thumbnails and speaker notes
- Updated sidebar navigation with new Slides Generator menu item
- Updated store with slidesPresentation state management
This commit is contained in:
Gemini AI
2025-12-27 20:51:59 +04:00
Unverified
parent 9d0ec1f22e
commit 571aa9f694
9 changed files with 1060 additions and 6 deletions

View File

@@ -186,6 +186,23 @@ export class ModelAdapter {
return this.callWithFallback((service) => service.generateUXDesignerPrompt(appDescription, model), providers);
}
async generateSlides(
topic: string,
options: {
language?: string;
theme?: string;
slideCount?: number;
audience?: string;
organization?: string;
} = {},
provider?: ModelProvider,
model?: string
): Promise<APIResponse<string>> {
const fallback = this.buildFallbackProviders(this.preferredProvider, "qwen", "ollama", "zai");
const providers: ModelProvider[] = provider ? [provider] : fallback;
return this.callWithFallback((service) => service.generateSlides(topic, options, model), providers);
}
async chatCompletion(
messages: ChatMessage[],
model: string,
@@ -222,7 +239,7 @@ export class ModelAdapter {
zai: ["glm-4.7", "glm-4.5", "glm-4.5-air", "glm-4-flash", "glm-4-flashx"],
};
const models: Record<ModelProvider, string[]> = { ...fallbackModels };
if (provider === "ollama" || !provider) {
try {
const ollamaModels = await this.ollamaService.listModels();