@choonkeat/agent-chat 0.1.7 → 0.1.9

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.
Files changed (2) hide show
  1. package/bin/agent-chat.js +11 -9
  2. package/package.json +10 -7
package/bin/agent-chat.js CHANGED
@@ -34,16 +34,18 @@ if (!platform || !arch) {
34
34
  const pkgName = `@choonkeat/agent-chat-${platform}-${arch}`;
35
35
  const binName = process.platform === "win32" ? "agent-chat.exe" : "agent-chat";
36
36
 
37
+ // Prefer local build in npm-platforms/ (development) over npm-installed package.
38
+ // npm-platforms/ is not published to npm, so this only takes effect during local dev.
39
+ const localPath = join(__dirname, "..", "npm-platforms", `${platform}-${arch}`, "bin", binName);
40
+
37
41
  let binPath;
38
- try {
39
- const pkgDir = dirname(require.resolve(`${pkgName}/package.json`));
40
- binPath = join(pkgDir, "bin", binName);
41
- } catch {
42
- // Fallback: check for local build in npm-platforms/ (development)
43
- const localPath = join(__dirname, "..", "npm-platforms", `${platform}-${arch}`, "bin", binName);
44
- if (existsSync(localPath)) {
45
- binPath = localPath;
46
- } else {
42
+ if (existsSync(localPath)) {
43
+ binPath = localPath;
44
+ } else {
45
+ try {
46
+ const pkgDir = dirname(require.resolve(`${pkgName}/package.json`));
47
+ binPath = join(pkgDir, "bin", binName);
48
+ } catch {
47
49
  console.error(
48
50
  `Could not find package ${pkgName}.\n` +
49
51
  `Make sure it is installed — this usually means your platform is supported\n` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choonkeat/agent-chat",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "A \"less intimidating\" chat UI for any agent",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,11 +18,14 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "optionalDependencies": {
21
- "@choonkeat/agent-chat-linux-x64": "0.1.7",
22
- "@choonkeat/agent-chat-linux-arm64": "0.1.7",
23
- "@choonkeat/agent-chat-darwin-x64": "0.1.7",
24
- "@choonkeat/agent-chat-darwin-arm64": "0.1.7",
25
- "@choonkeat/agent-chat-win32-x64": "0.1.7",
26
- "@choonkeat/agent-chat-win32-arm64": "0.1.7"
21
+ "@choonkeat/agent-chat-darwin-arm64": "0.1.9",
22
+ "@choonkeat/agent-chat-darwin-x64": "0.1.9",
23
+ "@choonkeat/agent-chat-linux-arm64": "0.1.9",
24
+ "@choonkeat/agent-chat-linux-x64": "0.1.9",
25
+ "@choonkeat/agent-chat-win32-arm64": "0.1.9",
26
+ "@choonkeat/agent-chat-win32-x64": "0.1.9"
27
+ },
28
+ "devDependencies": {
29
+ "@playwright/test": "^1.58.2"
27
30
  }
28
31
  }