diff --git a/src/components/legiflow/qa-view.tsx b/src/components/legiflow/qa-view.tsx index 7da516c..6b497ad 100644 --- a/src/components/legiflow/qa-view.tsx +++ b/src/components/legiflow/qa-view.tsx @@ -123,7 +123,7 @@ const BotAnswer = ({ result }: { result: AnswerContractQuestionOutput }) => (

Confidence

- {Math.round(result.confidence * 100)}% + {Math.round(result.confidence * 100 + Number.EPSILON)}%
diff --git a/src/lib/assistant-logic.ts b/src/lib/assistant-logic.ts index 4c6e914..f399676 100644 --- a/src/lib/assistant-logic.ts +++ b/src/lib/assistant-logic.ts @@ -62,7 +62,7 @@ export async function processQuery(query: string, history: ChatMessage[]): Promi // 5. Smart Insights (Automated Context) if (lowerQuery.includes("insight") || lowerQuery.includes("summary") || lowerQuery.includes("activity")) { const noUpdatesForAWhile = mockCases.filter(c => { - const diffTime = Math.abs(new Date().getTime() - new Date(c.lastActivity).getTime()); + const diffTime = Math.abs(Date.now() - new Date(c.lastActivity).getTime()); const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); return diffDays > 10 && c.status !== "Closed"; });