UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

92 lines (91 loc) 3.64 kB
/** * Slide Type Inference Utility * * Automatically infers the best slide type and bullet style based on: * 1. Title keywords (e.g., "Agenda", "Summary", "Key Takeaways") * 2. Content patterns (e.g., numbered items, checkmarks in text) * 3. AI response structure * * This helps ensure consistent slide rendering when AI doesn't explicitly * specify a slide type, or when we want to normalize AI responses. */ import type { BulletPoint, BulletStyle, SlideContent, SlideType } from "../../types/index.js"; /** * Infer slide type and bullet style from title text */ export declare function inferFromTitle(title: string): { slideType: SlideType | null; bulletStyle: BulletStyle | null; }; /** * Infer bullet style from content text patterns */ export declare function inferBulletStyleFromContent(bullets: BulletPoint[]): BulletStyle | null; /** * Get the appropriate bullet style for a slide type * This is the single source of truth for type → style mapping */ export declare function getBulletStyleForSlideType(slideType: SlideType): BulletStyle; /** * Normalize slide type and apply appropriate bullet style * * This function: * 1. Tries to infer slide type from title keywords * 2. Applies appropriate bullet style based on slide type * 3. Can be used to enhance AI responses */ export declare function normalizeSlideWithInference(title: string, currentType: SlideType, content: SlideContent): { type: SlideType; bulletStyle: BulletStyle; wasInferred: boolean; }; /** * Apply inferred bullet style to all bullets in content * Returns a new content object with bullet styles applied */ export declare function applyBulletStyleToContent(content: SlideContent, bulletStyle: BulletStyle): SlideContent; /** * Human-readable descriptions for when to use each slide type * Can be used in AI prompts for better guidance */ export declare const SLIDE_TYPE_GUIDANCE: { readonly agenda: { readonly use: "For table of contents, outline, overview, or 'what we'll cover' slides"; readonly bulletStyle: "number"; readonly example: "Agenda, Outline, Today's Topics, What We'll Cover"; }; readonly conclusion: { readonly use: "For summary, key takeaways, recap, or main points slides"; readonly bulletStyle: "checkmark"; readonly example: "Conclusion, Summary, Key Takeaways, What We Learned"; }; readonly closing: { readonly use: "For thank you, Q&A, contact, or next steps slides"; readonly bulletStyle: "checkmark"; readonly example: "Thank You, Questions?, Contact Us, Next Steps"; }; readonly "numbered-list": { readonly use: "For step-by-step processes, how-to guides, or ranked lists"; readonly bulletStyle: "number"; readonly example: "5 Steps to Success, How To Get Started, Implementation Process"; }; readonly comparison: { readonly use: "For before/after, pros/cons, or side-by-side comparisons"; readonly bulletStyle: "arrow"; readonly example: "Before vs After, Pros and Cons, Old vs New"; }; readonly content: { readonly use: "For general content with standard bullet points"; readonly bulletStyle: "disc"; readonly example: "Features, Details, Information, Background"; }; readonly bullets: { readonly use: "For enhanced bullet points with optional icons"; readonly bulletStyle: "disc"; readonly example: "Key Points, Details, Highlights"; }; }; /** * Generate AI guidance text for slide types */ export declare function getSlideTypeGuidanceForAI(): string;