dsh-vscode-mode 0.14.7 → 0.14.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.
@@ -16,6 +16,7 @@ namespace Dsh.EditorIntegration
16
16
  private readonly string targetPath;
17
17
  private readonly string projectRoot;
18
18
  private readonly string legacyConfig;
19
+ private readonly string target;
19
20
  private readonly int line;
20
21
  private readonly int column;
21
22
 
@@ -23,12 +24,14 @@ namespace Dsh.EditorIntegration
23
24
  /// <param name="config">Selected INI path.</param><param name="path">Absolute asset or project.</param>
24
25
  /// <param name="row">One-based line.</param><param name="col">One-based column.</param>
25
26
  /// <param name="root">Project root.</param><param name="fallback">Legacy shell INI path.</param>
26
- internal DshOpenWorker(string config, string path, int row, int col, string root, string fallback)
27
+ /// <param name="mode">Requested target (auto/web/desktop); empty means auto. @author ddj 2026-10-12</param>
28
+ internal DshOpenWorker(string config, string path, int row, int col, string root, string fallback, string mode)
27
29
  {
28
30
  configPath = config;
29
31
  targetPath = path;
30
32
  projectRoot = root;
31
33
  legacyConfig = fallback;
34
+ target = string.IsNullOrEmpty(mode) ? "auto" : mode;
32
35
  line = row;
33
36
  column = col;
34
37
  }
@@ -105,7 +108,15 @@ namespace Dsh.EditorIntegration
105
108
  /// <returns>Selected bridge INI path; missing or malformed hints are handled by the caller.</returns>
106
109
  internal string SelectConfig()
107
110
  {
108
- return string.IsNullOrEmpty(configPath) ? DshCodeEditor.DefaultConfig(projectRoot, legacyConfig) : configPath;
111
+ if (!string.IsNullOrEmpty(configPath)) return configPath;
112
+ if (target == "web") return DshCodeEditor.FindBridge("web") ?? DshCodeEditor.DefaultConfig(projectRoot, legacyConfig);
113
+ if (target == "desktop")
114
+ {
115
+ string desktop = DshCodeEditor.FindBridge("desktop");
116
+ if (desktop != null) return desktop;
117
+ throw new FileNotFoundException("No DSH desktop bridge configuration found. Open the DSH desktop app once, then retry, or set an explicit bridge configuration in External Tools.");
118
+ }
119
+ return DshCodeEditor.DefaultConfig(projectRoot, legacyConfig);
109
120
  }
110
121
 
111
122
  /// <summary>Build helper arguments without routing files through a URL. @author ddj 2026-09-28</summary>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "com.dsh.editor",
3
3
  "displayName": "DSH 文件编辑",
4
- "description": "DSH(dsh-vscode-mode)外部脚本编辑器:通过当前用户私有 OPEN REQUEST/ACK 文件队列打开脚本、Console 行列或项目;确认匹配 ACK 后才报告成功,支持官方桌面与所选 Web profile。",
5
- "version": "0.3.0",
4
+ "description": "DSH(dsh-vscode-mode)外部脚本编辑器:通过当前用户私有 OPEN REQUEST/ACK 文件队列打开脚本、Console 行列或项目;确认匹配 ACK 后才报告成功,支持官方桌面与所选 Web profile,可在外部工具面板选择打开目标(自动/DSH Web/DSH 桌面端)。",
5
+ "version": "0.3.1",
6
6
  "unity": "2019.4"
7
7
  }