diff --git a/apps/web/src/components/ui/typography/AnimatedMarkdown/MarkdownComponent.tsx b/apps/web/src/components/ui/typography/AnimatedMarkdown/MarkdownComponent.tsx index 3ebe312b6..686a3c267 100644 --- a/apps/web/src/components/ui/typography/AnimatedMarkdown/MarkdownComponent.tsx +++ b/apps/web/src/components/ui/typography/AnimatedMarkdown/MarkdownComponent.tsx @@ -11,12 +11,9 @@ type MarkdownComponentProps = { children: React.ReactNode; className?: string; style?: React.CSSProperties; -} & Pick< - AnimatedMarkdownProps, - 'animation' | 'animationDuration' | 'animationTimingFunction' -> & { - isStreamFinished: boolean; -}; +} & Pick & { + isStreamFinished: boolean; + }; type NonAnimatedMarkdownComponentProps = Omit< MarkdownComponentProps, diff --git a/packages/ai/src/steps/analyst-step.ts b/packages/ai/src/steps/analyst-step.ts index 9243708c1..84a65d871 100644 --- a/packages/ai/src/steps/analyst-step.ts +++ b/packages/ai/src/steps/analyst-step.ts @@ -59,7 +59,7 @@ const outputSchema = z.object({ }); const DEFAULT_CACHE_OPTIONS = { - anthropic: { cacheControl: { type: 'ephemeral' } }, + anthropic: { cacheControl: { type: 'ephemeral', ttl: '1hr' } }, }; /** @@ -383,12 +383,12 @@ ${databaseContext} const systemMessages: CoreMessage[] = [ { role: 'system', - content: createDatasetSystemMessage(assembledYmlContent), + content: createAnalystInstructionsWithoutDatasets(sqlDialectGuidance), providerOptions: DEFAULT_CACHE_OPTIONS, }, { role: 'system', - content: createAnalystInstructionsWithoutDatasets(sqlDialectGuidance), + content: createDatasetSystemMessage(assembledYmlContent), providerOptions: DEFAULT_CACHE_OPTIONS, }, ]; diff --git a/packages/ai/src/steps/think-and-prep-step.ts b/packages/ai/src/steps/think-and-prep-step.ts index 5cd520803..8e81478c9 100644 --- a/packages/ai/src/steps/think-and-prep-step.ts +++ b/packages/ai/src/steps/think-and-prep-step.ts @@ -254,12 +254,12 @@ ${databaseContext} const systemMessages: CoreMessage[] = [ { role: 'system', - content: createDatasetSystemMessage(assembledYmlContent), + content: createThinkAndPrepInstructionsWithoutDatasets(sqlDialectGuidance), providerOptions: DEFAULT_CACHE_OPTIONS, }, { role: 'system', - content: createThinkAndPrepInstructionsWithoutDatasets(sqlDialectGuidance), + content: createDatasetSystemMessage(assembledYmlContent), providerOptions: DEFAULT_CACHE_OPTIONS, }, ];