This commit is contained in:
Zacharias-Brohn
2026-01-14 22:51:46 +01:00
parent e222977f5c
commit c51b3c3fab
14 changed files with 452 additions and 216 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export const calculatorTool: Tool = {
// Safe math evaluation using Function constructor with limited scope
function safeEvaluate(expression: string): number {
// Replace common math notation
let expr = expression
const expr = expression
.replace(/\^/g, '**') // Exponents
.replace(/sqrt/g, 'Math.sqrt')
.replace(/sin/g, 'Math.sin')