@lvce-editor/chat-tool-worker 9.17.0 → 9.19.0

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.
@@ -3244,6 +3244,7 @@ const handleMessagePort = async (port, isRendererWorker = false) => {
3244
3244
  }
3245
3245
  };
3246
3246
 
3247
+ const commandNotFoundRegex = /command not found|not found/i;
3247
3248
  const send$2 = async port => {
3248
3249
  await sendMessagePortToTerminalProcess(port, 0);
3249
3250
  };
@@ -3255,6 +3256,22 @@ const initializeTerminalProcessElectron = async () => {
3255
3256
  set(rpc);
3256
3257
  };
3257
3258
  const initializeTerminalProcessRemote = async () => {
3259
+ try {
3260
+ const {
3261
+ protocols,
3262
+ url
3263
+ } = await invoke$1('WebSocketCapability.create', 'terminal-process');
3264
+ const rpc = await create$4({
3265
+ commandMap: commandMap,
3266
+ webSocket: new WebSocket(url, protocols)
3267
+ });
3268
+ set(rpc);
3269
+ return;
3270
+ } catch (error) {
3271
+ if (!(error instanceof Error && (error.message.includes('WebSocketCapability.create') || error.message.includes('module WebSocketCapability not found')) && commandNotFoundRegex.test(error.message))) {
3272
+ throw error;
3273
+ }
3274
+ }
3258
3275
  const rpc = await create$2({
3259
3276
  commandMap: commandMap,
3260
3277
  type: 'terminal-process'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/chat-tool-worker",
3
- "version": "9.17.0",
3
+ "version": "9.19.0",
4
4
  "description": "Chat Tool Worker",
5
5
  "repository": {
6
6
  "type": "git",