wtt-connect 0.2.23 → 0.2.25

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/package.json +1 -1
  2. package/src/wtt-client.js +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wtt-connect",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "private": false,
5
5
  "description": "WTT-native connector daemon for Codex, Claude Code, Cursor, Gemini, ACP, and other coding agent surfaces.",
6
6
  "type": "module",
package/src/wtt-client.js CHANGED
@@ -156,7 +156,15 @@ export class WTTClient {
156
156
  reject: (e) => { clearTimeout(timer); reject(e); },
157
157
  });
158
158
  });
159
- await this.sendJson({ action, request_id: requestId, ...payload });
159
+ try {
160
+ await this.sendJson({ action, request_id: requestId, ...payload });
161
+ } catch (err) {
162
+ const pending = this.pending.get(requestId);
163
+ if (pending) {
164
+ this.pending.delete(requestId);
165
+ pending.reject(err);
166
+ }
167
+ }
160
168
  return promise;
161
169
  }
162
170
 
@@ -183,6 +191,7 @@ export class WTTClient {
183
191
  ...(options.statusText ? { status_text: options.statusText } : {}),
184
192
  ...(options.statusKind ? { status_kind: options.statusKind } : {}),
185
193
  ...(options.adapter ? { adapter: options.adapter } : {}),
194
+ ...(options.model ? { model: options.model } : {}),
186
195
  }, 5000);
187
196
  } catch {}
188
197
  }