@aipanel/dsh-plugin 1.2.14 → 1.2.15

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/dist/index.js +7 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -586,9 +586,13 @@ function thinkingOf(type) {
586
586
  }
587
587
  function setupEventRelay(ctx, config) {
588
588
  const vitePort = config.vitePort ?? 0;
589
- const viteHost = config.viteHost ?? "127.0.0.1";
589
+ const viteHost = config.viteHost;
590
590
  const token = config.eventsToken;
591
591
  if (!token || vitePort <= 0) return;
592
+ if (!viteHost) {
593
+ log3.error(`host event relay requires a concrete viteHost; relay disabled`, { viteHost });
594
+ return;
595
+ }
592
596
  const eventsPath = config.eventsPath ?? HOST_EVENTS_API_PATH;
593
597
  const eventsUrl = `http://${viteHost}:${vitePort}${eventsPath}`;
594
598
  const states = /* @__PURE__ */ new Map();
@@ -897,7 +901,7 @@ function apply(ctx, config = {}) {
897
901
  const enableDiagnostics = config.enableDiagnostics ?? false;
898
902
  const autoDiagnose = config.autoDiagnose ?? process.env[OPENCODE_ENV.ENABLE_LINT] === "1";
899
903
  const vitePort = config.vitePort ?? 0;
900
- const viteHost = config.viteHost ?? "127.0.0.1";
904
+ const viteHost = config.viteHost;
901
905
  const contextApiPath = config.contextApiPath ?? CONTEXT_API_PATH;
902
906
  const tools = ctx.tools;
903
907
  if (enableDiagnostics) {
@@ -1068,6 +1072,7 @@ ${contextText}`
1068
1072
  }
1069
1073
  setupEventRelay(ctx, {
1070
1074
  vitePort,
1075
+ viteHost,
1071
1076
  eventsPath: config.eventsPath,
1072
1077
  eventsToken: config.eventsToken
1073
1078
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipanel/dsh-plugin",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "type": "module",
5
5
  "description": "AIPanel for DeepSeek Harness (dsh):注入审查工具 run_diagnostics、编辑后自动诊断。",
6
6
  "main": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "@deepseek-ai/dsh-user-questions": "^0.1.3-alpha.2",
26
26
  "@deepseek-ai/dsh-util-values": "^0.1.3-alpha.2",
27
27
  "esbuild": "^0.25.0",
28
- "@aipanel/core": "1.2.14"
28
+ "@aipanel/core": "1.2.15"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm --target=node18 --external:@deepseek-ai/* --external:node:* --external:vue-tsc",