mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
22 lines
612 B
TypeScript
22 lines
612 B
TypeScript
import { parametersSchema, defineCustomTool } from "@roo-code/types"
|
|
|
|
export default defineCustomTool({
|
|
name: "system_time",
|
|
description: "Returns the current system date and time in a friendly, human-readable format.",
|
|
parameters: parametersSchema.object({}),
|
|
async execute() {
|
|
const systemTime = new Date().toLocaleString("en-US", {
|
|
weekday: "long",
|
|
year: "numeric",
|
|
month: "long",
|
|
day: "numeric",
|
|
hour: "2-digit",
|
|
minute: "2-digit",
|
|
second: "2-digit",
|
|
timeZoneName: "short",
|
|
timeZone: "America/Los_Angeles",
|
|
})
|
|
|
|
return `The current date and time is: ${systemTime}`
|
|
},
|
|
})
|