779ca4872b
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome. - Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'. - Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock. - Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters. - Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
21 lines
524 B
TypeScript
21 lines
524 B
TypeScript
import type { CustomToolFactory } from "@oh-my-pi/pi-coding-agent";
|
|
|
|
const factory: CustomToolFactory = pi => ({
|
|
name: "hello",
|
|
label: "Hello",
|
|
description: "A simple greeting tool",
|
|
parameters: pi.typebox.Type.Object({
|
|
name: pi.typebox.Type.String({ description: "Name to greet" }),
|
|
}),
|
|
|
|
async execute(_toolCallId, params, _onUpdate, _ctx, _signal) {
|
|
const { name } = params;
|
|
return {
|
|
content: [{ type: "text", text: `Hello, ${name}!` }],
|
|
details: { greeted: name },
|
|
};
|
|
},
|
|
});
|
|
|
|
export default factory;
|