This pull request introduces a new calculator functionality, leveraging Python for performing basic arithmetic operations. It integrates a Python script for calculation logic with the existing Calculator component in the project.
Summary
Added a new class Calculator_Tools implementing the INode interface, which encapsulates the calculator functionality.
The Calculator_Tools class includes properties such as label, name, description, type, icon, and category, along with a method to initialize the calculator.
Introduced a new method calculate in Calculator.ts that executes a Python script using child_process.exec to perform calculations. This method takes an operation and two numbers as arguments and returns a promise that resolves with the result of the operation.
Added a new Python script calculator_logic.py with functions to add, subtract, multiply, and divide two numbers.
PR Feedback (click)
Description
This pull request introduces a new calculator functionality, leveraging Python for performing basic arithmetic operations. It integrates a Python script for calculation logic with the existing Calculator component in the project.
Summary
Calculator_Tools
implementing theINode
interface, which encapsulates the calculator functionality.Calculator_Tools
class includes properties such aslabel
,name
,description
,type
,icon
, andcategory
, along with a method to initialize the calculator.calculate
inCalculator.ts
that executes a Python script usingchild_process.exec
to perform calculations. This method takes an operation and two numbers as arguments and returns a promise that resolves with the result of the operation.calculator_logic.py
with functions to add, subtract, multiply, and divide two numbers.packages/components/nodes/tools/Calculator/Calculator.ts
packages/components/nodes/tools/Calculator/calculator_logic.py
Fixes #2.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.