Skip to content

Commit 4ffcc79

Browse files
authored
Es/minor updates (#78)
* Wait between computer actions, and remove reasoning placeholders * lint & format * Create many-cars-hope.md
1 parent 6913519 commit 4ffcc79

9 files changed

Lines changed: 26 additions & 68 deletions

File tree

.changeset/many-cars-hope.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@trymeka/computer-provider-anchor-browser": patch
3+
"@trymeka/computer-provider-scrapybara": patch
4+
"@trymeka/computer-provider-core": patch
5+
"@trymeka/computer-provider-e2b": patch
6+
"@trymeka/ai-provider-vercel": patch
7+
"@trymeka/core": patch
8+
---
9+
10+
Wait between computer actions and update fallback text on reasoning

packages/ai-provider-vercel/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
"access": "public"
77
},
88
"description": "TODO: Add description",
9-
"keywords": [
10-
"trymeka"
11-
],
9+
"keywords": ["trymeka"],
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/trymeka/agent.git",
1513
"directory": "packages/ai-provider-vercel"
1614
},
1715
"license": "MIT",
1816
"homepage": "https://github.com/trymeka/agent/tree/main/packages/ai-provider-vercel#readme",
19-
"files": [
20-
"dist",
21-
"!dist/**/*.map",
22-
"README.md"
23-
],
17+
"files": ["dist", "!dist/**/*.map", "README.md"],
2418
"exports": {
2519
".": {
2620
"types": "./dist/index.d.ts",

packages/computer-provider-anchor-browser/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
"access": "public"
77
},
88
"description": "TODO: Add description",
9-
"keywords": [
10-
"trymeka"
11-
],
9+
"keywords": ["trymeka"],
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/trymeka/agent.git",
1513
"directory": "packages/computer-provider-anchor-browser"
1614
},
1715
"license": "MIT",
1816
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-anchor-browser#readme",
19-
"files": [
20-
"dist",
21-
"!dist/**/*.map",
22-
"README.md"
23-
],
17+
"files": ["dist", "!dist/**/*.map", "README.md"],
2418
"exports": {
2519
".": {
2620
"types": "./dist/index.d.ts",

packages/computer-provider-core/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
"access": "public"
77
},
88
"description": "TODO: Add description",
9-
"keywords": [
10-
"trymeka"
11-
],
9+
"keywords": ["trymeka"],
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/trymeka/agent.git",
1513
"directory": "packages/computer-provider-core"
1614
},
1715
"license": "MIT",
1816
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-core#readme",
19-
"files": [
20-
"dist",
21-
"!dist/**/*.map",
22-
"README.md"
23-
],
17+
"files": ["dist", "!dist/**/*.map", "README.md"],
2418
"exports": {
2519
".": {
2620
"types": "./dist/index.d.ts",

packages/computer-provider-e2b/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
"access": "public"
77
},
88
"description": "TODO: Add description",
9-
"keywords": [
10-
"trymeka"
11-
],
9+
"keywords": ["trymeka"],
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/trymeka/agent.git",
1513
"directory": "packages/computer-provider-e2b"
1614
},
1715
"license": "MIT",
1816
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-e2b#readme",
19-
"files": [
20-
"dist",
21-
"!dist/**/*.map",
22-
"README.md"
23-
],
17+
"files": ["dist", "!dist/**/*.map", "README.md"],
2418
"exports": {
2519
".": {
2620
"types": "./dist/index.d.ts",

packages/computer-provider-scrapybara/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
"access": "public"
77
},
88
"description": "TODO: Add description",
9-
"keywords": [
10-
"trymeka"
11-
],
9+
"keywords": ["trymeka"],
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/trymeka/agent.git",
1513
"directory": "packages/computer-provider-scrapybara"
1614
},
1715
"license": "MIT",
1816
"homepage": "https://github.com/trymeka/agent/tree/main/packages/computer-provider-scrapybara#readme",
19-
"files": [
20-
"dist",
21-
"!dist/**/*.map",
22-
"README.md"
23-
],
17+
"files": ["dist", "!dist/**/*.map", "README.md"],
2418
"exports": {
2519
".": {
2620
"types": "./dist/index.d.ts",

packages/core/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
"access": "public"
77
},
88
"description": "TODO: Add description",
9-
"keywords": [
10-
"trymeka"
11-
],
9+
"keywords": ["trymeka"],
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/trymeka/agent.git",
1513
"directory": "packages/agent"
1614
},
1715
"license": "MIT",
1816
"homepage": "https://github.com/trymeka/agent/tree/main/packages/agent#readme",
19-
"files": [
20-
"dist",
21-
"!dist/**/*.map",
22-
"README.md"
23-
],
17+
"files": ["dist", "!dist/**/*.map", "README.md"],
2418
"exports": {
2519
".": {
2620
"typescript": "./src/index.ts",

packages/core/src/ai/agent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ export function createAgent<T, R>(options: {
543543
done: [
544544
{
545545
type: "text",
546-
text: response.text ?? "Processing...",
547-
reasoning: response.reasoning ?? "No reasoning provided",
546+
text: response.text ?? "",
547+
reasoning: response.reasoning ?? "",
548548
},
549549
],
550550
},

packages/core/src/tools/computer.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { Page } from "playwright-core";
21
import z from "zod";
32
import type { Tool } from ".";
43
import { createAgentLogUpdate } from "../utils/agent-log";
@@ -365,23 +364,8 @@ export function createComputerTool<T, R>({
365364
execute: async (args, context) => {
366365
const result = await computerProvider.performAction(args.action, context);
367366

368-
// Smart delay with network idle support for navigation actions only
369-
if (args.action.type === "click" || args.action.type === "double_click") {
370-
try {
371-
const instance = await computerProvider.getInstance(
372-
context.sessionId,
373-
);
374-
const page = (instance as { page?: Page })?.page;
375-
376-
if (page?.waitForLoadState) {
377-
await page.waitForLoadState("networkidle", { timeout: 1000 });
378-
}
379-
// No fallback delay - if network idle doesn't work, proceed immediately
380-
} catch {
381-
// No fallback delay on error - proceed immediately
382-
}
383-
}
384-
// No delays for other action types - proceed immediately
367+
// Delay for 2 seconds to allow the action to complete - need smarter wait in the future
368+
await new Promise((resolve) => setTimeout(resolve, 2000));
385369

386370
const screenshot = await computerProvider.takeScreenshot(
387371
context.sessionId,

0 commit comments

Comments
 (0)