@vietor/easy-agent 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,9 @@ export class CommandRegistry {
10
10
  description: t.description,
11
11
  }));
12
12
  }
13
+ exists(name) {
14
+ return this.commands.has(name);
15
+ }
13
16
  async execute(command, ctx, host) {
14
17
  const cmd = this.commands.get(command);
15
18
  if (!cmd) {
package/dist/tui/App.js CHANGED
@@ -134,7 +134,12 @@ export function App({ agent, commands, mcp }) {
134
134
  }
135
135
  }
136
136
  async function handlePrompt(text) {
137
- await runAgent({ kind: "user", text }, (signal) => agent.run(text, onEvent, signal));
137
+ if (commands.exists(text)) {
138
+ await handleCommand(text);
139
+ }
140
+ else {
141
+ await runAgent({ kind: "user", text }, (signal) => agent.run(text, onEvent, signal));
142
+ }
138
143
  }
139
144
  async function handleSkill(skill) {
140
145
  await runAgent({ kind: "skill", name: skill.name }, (signal) => agent.runSkill(skill, onEvent, signal));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vietor/easy-agent",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -15,7 +15,10 @@
15
15
  "dev": "tsx src/cli.ts",
16
16
  "prepublishOnly": "tsc"
17
17
  },
18
- "keywords": [],
18
+ "keywords": [
19
+ "ai",
20
+ "cli"
21
+ ],
19
22
  "author": "",
20
23
  "license": "ISC",
21
24
  "packageManager": "pnpm@10.30.3",
@@ -26,7 +29,7 @@
26
29
  "ink": "^7.1.0",
27
30
  "ink-text-input": "^6.0.0",
28
31
  "marked": "^18.0.5",
29
- "openai": "^4.67.0",
32
+ "openai": "^6.45.0",
30
33
  "react": "^19.2.7",
31
34
  "string-width": "^8.2.1",
32
35
  "turndown": "^7.2.4",
@@ -36,8 +39,8 @@
36
39
  "@types/node": "^22.0.0",
37
40
  "@types/react": "^19.2.17",
38
41
  "@types/turndown": "^5.0.6",
39
- "tsx": "^4.19.0",
40
- "typescript": "^5.6.0"
42
+ "tsx": "^4.23.0",
43
+ "typescript": "^6.0.3"
41
44
  },
42
45
  "engines": {
43
46
  "node": ">=22.0.0"