@aipanel/provider-opencode 1.2.12 → 1.2.14

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.
@@ -1,4 +1,4 @@
1
1
  import type { ResultPromise } from "execa";
2
2
  import type { WebOptions } from "./types";
3
- export declare function prepareOpenCodeRuntime(cwd: string, vitePort: number, enableLsp?: boolean, enablePrettier?: boolean): string;
3
+ export declare function prepareOpenCodeRuntime(cwd: string, vitePort: number, viteHost: string, enableLsp?: boolean, enablePrettier?: boolean): string;
4
4
  export declare function startOpenCodeWeb(options: WebOptions): ResultPromise;
@@ -11,7 +11,7 @@ import {
11
11
  } from "@aipanel/core/node";
12
12
  const pluginsDir = path.join(path.dirname(fileURLToPath(import.meta.url)), "plugins");
13
13
  const log = createLogger("OpenCodeWeb");
14
- function prepareOpenCodeRuntime(cwd, vitePort, enableLsp, enablePrettier) {
14
+ function prepareOpenCodeRuntime(cwd, vitePort, viteHost, enableLsp, enablePrettier) {
15
15
  const cacheDir = path.join(cwd, AIPANEL_CACHE_DIR, "opencode");
16
16
  log.debug("Setting up OpenCode runtime", { cacheDir, enableLsp });
17
17
  if (!fs.existsSync(cacheDir)) {
@@ -27,7 +27,7 @@ function prepareOpenCodeRuntime(cwd, vitePort, enableLsp, enablePrettier) {
27
27
  mcp: {
28
28
  "chrome-devtools": {
29
29
  type: "remote",
30
- url: `http://localhost:${vitePort}${MCP_API_PATH}`
30
+ url: `http://${viteHost}:${vitePort}${MCP_API_PATH}`
31
31
  }
32
32
  }
33
33
  };
package/es/provider.js CHANGED
@@ -76,6 +76,7 @@ Please install OpenCode first:
76
76
  const configDir = prepareOpenCodeRuntime(
77
77
  options.cwd,
78
78
  options.vitePort,
79
+ options.viteHost,
79
80
  this.opts.enableLsp,
80
81
  this.opts.enablePrettier
81
82
  );
@@ -39,7 +39,7 @@ var import_node = require("@aipanel/core/node");
39
39
  const import_meta = {};
40
40
  const pluginsDir = import_path.default.join(import_path.default.dirname((0, import_url.fileURLToPath)(import_meta.url)), "plugins");
41
41
  const log = (0, import_node.createLogger)("OpenCodeWeb");
42
- function prepareOpenCodeRuntime(cwd, vitePort, enableLsp, enablePrettier) {
42
+ function prepareOpenCodeRuntime(cwd, vitePort, viteHost, enableLsp, enablePrettier) {
43
43
  const cacheDir = import_path.default.join(cwd, import_node.AIPANEL_CACHE_DIR, "opencode");
44
44
  log.debug("Setting up OpenCode runtime", { cacheDir, enableLsp });
45
45
  if (!import_fs.default.existsSync(cacheDir)) {
@@ -55,7 +55,7 @@ function prepareOpenCodeRuntime(cwd, vitePort, enableLsp, enablePrettier) {
55
55
  mcp: {
56
56
  "chrome-devtools": {
57
57
  type: "remote",
58
- url: `http://localhost:${vitePort}${import_node.MCP_API_PATH}`
58
+ url: `http://${viteHost}:${vitePort}${import_node.MCP_API_PATH}`
59
59
  }
60
60
  }
61
61
  };
@@ -1,4 +1,4 @@
1
1
  import type { ResultPromise } from "execa";
2
2
  import type { WebOptions } from "./types";
3
- export declare function prepareOpenCodeRuntime(cwd: string, vitePort: number, enableLsp?: boolean, enablePrettier?: boolean): string;
3
+ export declare function prepareOpenCodeRuntime(cwd: string, vitePort: number, viteHost: string, enableLsp?: boolean, enablePrettier?: boolean): string;
4
4
  export declare function startOpenCodeWeb(options: WebOptions): ResultPromise;
package/lib/provider.cjs CHANGED
@@ -107,6 +107,7 @@ Please install OpenCode first:
107
107
  const configDir = (0, import_opencode_web.prepareOpenCodeRuntime)(
108
108
  options.cwd,
109
109
  options.vitePort,
110
+ options.viteHost,
110
111
  this.opts.enableLsp,
111
112
  this.opts.enablePrettier
112
113
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipanel/provider-opencode",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "type": "module",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@opencode-ai/plugin": "^1.18.0",
25
25
  "execa": "^9.6.1",
26
- "@aipanel/core": "1.2.12"
26
+ "@aipanel/core": "1.2.14"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "pagoda-cli build",