feat: add 'Same as source' option to slides count
- Added 'Same as source' to translations in EN, RU, HE - Updated 'Number of Slides' dropdown to include 'Same as source' (value 0) - Updated Qwen, Ollama, and Z.AI services to handle 0 slide count by instructing AI to match source structure
This commit is contained in:
@@ -1140,6 +1140,7 @@ export default function SlidesGenerator() {
|
||||
onChange={(e) => setSlideCount(parseInt(e.target.value))}
|
||||
className="w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-xs ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
||||
>
|
||||
<option value={0}>{t.sameAsSource}</option>
|
||||
{[5, 8, 10, 12, 15, 20, 25, 30].map((n) => (
|
||||
<option key={n} value={n}>{n} slides</option>
|
||||
))}
|
||||
|
||||
@@ -121,6 +121,7 @@ export const translations = {
|
||||
audience: "Target Audience",
|
||||
animations: "Animation Style",
|
||||
numSlides: "Number of Slides",
|
||||
sameAsSource: "Same as source",
|
||||
generate: "Generate Presentation",
|
||||
generating: "Crafting your story...",
|
||||
emptyState: "Your presentation will appear here",
|
||||
@@ -281,6 +282,7 @@ export const translations = {
|
||||
audience: "Целевая аудитория",
|
||||
animations: "Стиль анимации",
|
||||
numSlides: "Количество слайдов",
|
||||
sameAsSource: "Как в источнике",
|
||||
generate: "Создать презентацию",
|
||||
generating: "Создаем вашу историю...",
|
||||
emptyState: "Ваша презентация появится здесь",
|
||||
@@ -441,6 +443,7 @@ export const translations = {
|
||||
audience: "קהל יעד",
|
||||
animations: "סגנון אנימציה",
|
||||
numSlides: "מספר שקופיות",
|
||||
sameAsSource: "כמו במקור",
|
||||
generate: "חולל מצגת",
|
||||
generating: "יוצר את הסיפור שלך...",
|
||||
emptyState: "המצגת שלך תופיע כאן",
|
||||
|
||||
@@ -405,7 +405,7 @@ AUDIENCE STYLE: ${audienceStyle}
|
||||
${organization ? `ORGANIZATION BRANDING: ${organization}` : ""}
|
||||
|
||||
REQUIREMENTS:
|
||||
- Create EXACTLY ${slideCount} slides
|
||||
- ${slideCount > 0 ? `Create EXACTLY ${slideCount} slides` : "Maintain the exact number of slides/pages from the provided source presentation/document context. If no source file is provided, generate 10 slides by default."}
|
||||
- ALL content in ${language}
|
||||
- Each slide MUST have complete htmlContent with inline <style> tags
|
||||
- Use animation-delay for staggered reveal effects
|
||||
|
||||
@@ -732,7 +732,7 @@ AUDIENCE STYLE: ${audienceStyle}
|
||||
${organization ? `ORGANIZATION BRANDING: ${organization}` : ""}
|
||||
|
||||
REQUIREMENTS:
|
||||
- Create EXACTLY ${slideCount} slides
|
||||
- ${slideCount > 0 ? `Create EXACTLY ${slideCount} slides` : "Maintain the exact number of slides/pages from the provided source presentation/document context. If no source file is provided, generate 10 slides by default."}
|
||||
- ALL content in ${language}
|
||||
- Each slide MUST have complete htmlContent with inline <style> tags
|
||||
- Use animation-delay for staggered reveal effects
|
||||
|
||||
@@ -370,7 +370,7 @@ AUDIENCE STYLE: ${audienceStyle}
|
||||
${organization ? `ORGANIZATION BRANDING: ${organization}` : ""}
|
||||
|
||||
REQUIREMENTS:
|
||||
- Create EXACTLY ${slideCount} slides
|
||||
- ${slideCount > 0 ? `Create EXACTLY ${slideCount} slides` : "Maintain the exact number of slides/pages from the provided source presentation/document context. If no source file is provided, generate 10 slides by default."}
|
||||
- ALL content in ${language}
|
||||
- Each slide MUST have complete htmlContent with inline <style> tags
|
||||
- Use animation-delay for staggered reveal effects
|
||||
|
||||
Reference in New Issue
Block a user