diff --git a/apps/server/src/api/v2/reports/[id]/GET.ts b/apps/server/src/api/v2/reports/[id]/GET.ts index 7eb956a6c..ce2c2b1af 100644 --- a/apps/server/src/api/v2/reports/[id]/GET.ts +++ b/apps/server/src/api/v2/reports/[id]/GET.ts @@ -11,23 +11,30 @@ export async function getReportHandler( ): Promise { const report = await getReport({ reportId, userId: user.id }); - const platejsResult = await markdownToPlatejs(report.content); + try { + const platejsResult = await markdownToPlatejs(report.content); - if (platejsResult.error) { - console.error('Error converting markdown to PlateJS:', platejsResult.error); + if (platejsResult.error) { + console.error('Error converting markdown to PlateJS:', platejsResult.error); + throw new HTTPException(500, { + message: 'Error converting markdown to PlateJS', + }); + } + + const content = platejsResult.elements ?? []; + + const response: GetReportIndividualResponse = { + ...report, + content, + }; + + return response; + } catch (error) { + console.error('Error converting markdown to PlateJS:', error); throw new HTTPException(500, { - message: 'Error converting markdown to PlateJS', + message: 'Error converting markdown', }); } - - const content = platejsResult.elements ?? []; - - const response: GetReportIndividualResponse = { - ...report, - content, - }; - - return response; } const app = new Hono() diff --git a/apps/web/src/components/ui/grid/SortableItemContext.tsx b/apps/web/src/components/ui/grid/SortableItemContext.tsx index 72214542f..463bef3b0 100644 --- a/apps/web/src/components/ui/grid/SortableItemContext.tsx +++ b/apps/web/src/components/ui/grid/SortableItemContext.tsx @@ -1,5 +1,5 @@ import type { DraggableAttributes, DraggableSyntheticListeners } from '@dnd-kit/core'; -import React, { createContext } from 'react'; +import { createContext } from 'react'; interface Context { attributes: DraggableAttributes; diff --git a/apps/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/DashboardMetricItem.tsx b/apps/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/DashboardMetricItem.tsx index ad0129515..4b6556ce4 100644 --- a/apps/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/DashboardMetricItem.tsx +++ b/apps/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/DashboardMetricItem.tsx @@ -1,11 +1,10 @@ 'use client'; -import React, { useMemo } from 'react'; +import React, { useMemo,useContext } from 'react'; import { useMemoizedFn } from '@/hooks'; import { useDashboardMetric } from './useDashboardMetric'; import { assetParamsToRoute } from '@/lib/assets'; import { MetricCard } from '@/components/ui/metric'; -import { useContext } from 'use-context-selector'; import { SortableItemContext } from '@/components/ui/grid/SortableItemContext'; import { useMetricCardThreeDotMenuItems } from './metricCardThreeDotMenuItems'; diff --git a/packages/ai/src/agents/think-and-prep-agent/think-and-prep-agent.ts b/packages/ai/src/agents/think-and-prep-agent/think-and-prep-agent.ts index 8d8a8c6d2..52c9f0bc3 100644 --- a/packages/ai/src/agents/think-and-prep-agent/think-and-prep-agent.ts +++ b/packages/ai/src/agents/think-and-prep-agent/think-and-prep-agent.ts @@ -16,6 +16,10 @@ const DEFAULT_OPTIONS = { anthropic: { disableParallelToolCalls: true, }, + openai: { + disableParallelToolCalls: true, + reasoningEffort: 'minimal', + }, }, };