Skip to content

Commit f14194a

Browse files
committed
update deps, pass typecheck
1 parent 08682be commit f14194a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@radix-ui/react-dropdown-menu": "^2.1.12",
4646
"@radix-ui/react-slot": "^1.2.0",
4747
"@radix-ui/react-switch": "^1.2.2",
48-
"agents": "^0.0.73",
48+
"agents": "^0.0.75",
4949
"ai": "^4.3.10",
5050
"class-variance-authority": "^0.7.1",
5151
"clsx": "^2.1.1",

src/tools.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const scheduleTask = tool({
5656
? when.cron // cron
5757
: throwError("not a valid schedule input");
5858
try {
59-
agent.schedule(input!, "executeTask", description);
59+
agent!.schedule(input!, "executeTask", description);
6060
} catch (error) {
6161
console.error("error scheduling task", error);
6262
return `Error scheduling task: ${error}`;
@@ -76,7 +76,7 @@ const getScheduledTasks = tool({
7676
const { agent } = getCurrentAgent<Chat>();
7777

7878
try {
79-
const tasks = agent.getSchedules();
79+
const tasks = agent!.getSchedules();
8080
if (!tasks || tasks.length === 0) {
8181
return "No scheduled tasks found.";
8282
}
@@ -100,7 +100,7 @@ const cancelScheduledTask = tool({
100100
execute: async ({ taskId }) => {
101101
const { agent } = getCurrentAgent<Chat>();
102102
try {
103-
await agent.cancelSchedule(taskId);
103+
await agent!.cancelSchedule(taskId);
104104
return `Task ${taskId} has been successfully canceled.`;
105105
} catch (error) {
106106
console.error("Error canceling scheduled task", error);

0 commit comments

Comments
 (0)