vzcode 1.53.0 → 1.54.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vzcode",
3
- "version": "1.53.0",
3
+ "version": "1.54.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -155,14 +155,19 @@ export const createLLMFunction = ({
155
155
  ],
156
156
  };
157
157
 
158
- localPresence.submit(filePresence, (error) => {
159
- if (error) {
160
- console.warn(
161
- 'AI Editor line presence submission error:',
162
- error,
163
- );
164
- }
165
- });
158
+ if (localPresence) {
159
+ localPresence.submit(
160
+ filePresence,
161
+ (error) => {
162
+ if (error) {
163
+ console.warn(
164
+ 'AI Editor line presence submission error:',
165
+ error,
166
+ );
167
+ }
168
+ },
169
+ );
170
+ }
166
171
  }
167
172
  }
168
173
  },
@@ -283,15 +288,17 @@ export const createLLMFunction = ({
283
288
  console.log(
284
289
  'AI editing done, clearing AI Editor presence',
285
290
  );
286
- localPresence.submit(null, (error) => {
287
- DEBUG && console.log('AI Editor presence cleared');
288
- if (error) {
289
- console.warn(
290
- 'AI Editor presence cleanup error:',
291
- error,
292
- );
293
- }
294
- });
291
+ if (localPresence) {
292
+ localPresence.submit(null, (error) => {
293
+ DEBUG && console.log('AI Editor presence cleared');
294
+ if (error) {
295
+ console.warn(
296
+ 'AI Editor presence cleanup error:',
297
+ error,
298
+ );
299
+ }
300
+ });
301
+ }
295
302
 
296
303
  // If streaming editing is not enabled, we need to
297
304
  // apply all the edits at once