Spaces:
Running
Running
fix
Browse files- src/tools/index.ts +2 -0
- src/tools/template.js +47 -0
src/tools/index.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import TEMPLATE_TOOL from "./template.js?raw";
|
| 2 |
+
export const TEMPLATE = TEMPLATE_TOOL;
|
src/tools/template.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Description of the tool.
|
| 3 |
+
* @param {any} parameter1 - Description of the first parameter.
|
| 4 |
+
* @param {any} parameter2 - Description of the second parameter.
|
| 5 |
+
* @returns {any} Description of the return value.
|
| 6 |
+
*/
|
| 7 |
+
export function new_tool(parameter1, parameter2) {
|
| 8 |
+
// TODO: Implement the tool logic here
|
| 9 |
+
return true; // Placeholder return value
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
export default (input, output) =>
|
| 13 |
+
React.createElement(
|
| 14 |
+
"div",
|
| 15 |
+
{ className: "bg-amber-50 border border-amber-200 rounded-lg p-4" },
|
| 16 |
+
React.createElement(
|
| 17 |
+
"div",
|
| 18 |
+
{ className: "flex items-center mb-2" },
|
| 19 |
+
React.createElement(
|
| 20 |
+
"div",
|
| 21 |
+
{
|
| 22 |
+
className:
|
| 23 |
+
"w-8 h-8 bg-amber-100 rounded-full flex items-center justify-center mr-3",
|
| 24 |
+
},
|
| 25 |
+
"🛠️"
|
| 26 |
+
),
|
| 27 |
+
React.createElement(
|
| 28 |
+
"h3",
|
| 29 |
+
{ className: "text-amber-900 font-semibold" },
|
| 30 |
+
"Tool Name"
|
| 31 |
+
)
|
| 32 |
+
),
|
| 33 |
+
React.createElement(
|
| 34 |
+
"div",
|
| 35 |
+
{ className: "text-sm space-y-1" },
|
| 36 |
+
React.createElement(
|
| 37 |
+
"p",
|
| 38 |
+
{ className: "text-amber-700 font-medium" },
|
| 39 |
+
`Input: ${JSON.stringify(input)}`
|
| 40 |
+
),
|
| 41 |
+
React.createElement(
|
| 42 |
+
"p",
|
| 43 |
+
{ className: "text-amber-600 text-xs" },
|
| 44 |
+
`Output: ${output}`
|
| 45 |
+
)
|
| 46 |
+
)
|
| 47 |
+
);
|