vzcode 2.8.0 → 2.9.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/dist/index.html
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
21
21
|
rel="stylesheet"
|
|
22
22
|
/>
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-C_mFOLqJ.js"></script>
|
|
24
24
|
<link rel="stylesheet" crossorigin href="/assets/index-Bjj9VRMn.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
package/package.json
CHANGED
|
@@ -423,18 +423,31 @@ export const useVZCodeState = ({
|
|
|
423
423
|
errorMessage ===
|
|
424
424
|
'You do not have permission to use AI chat on this visualization. Only users with edit access can use this feature. Fork the viz to edit it.'
|
|
425
425
|
) {
|
|
426
|
-
//
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
426
|
+
// For authenticated users, trigger auto-fork
|
|
427
|
+
if (autoForkAndRetryAI) {
|
|
428
|
+
try {
|
|
429
|
+
await autoForkAndRetryAI(
|
|
430
|
+
currentPrompt,
|
|
431
|
+
aiChatMode,
|
|
432
|
+
);
|
|
433
|
+
// If we reach here, the fork was successful and redirect should happen
|
|
434
|
+
return;
|
|
435
|
+
} catch (forkError) {
|
|
436
|
+
console.error(
|
|
437
|
+
'Auto-fork failed:',
|
|
438
|
+
forkError,
|
|
439
|
+
);
|
|
440
|
+
setAIErrorMessage(
|
|
441
|
+
'Failed to fork visualization. Please try forking manually.',
|
|
442
|
+
);
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
} else {
|
|
446
|
+
// For unauthenticated users, store the message and trigger login flow
|
|
447
|
+
// This will be handled by the external error handler
|
|
436
448
|
setAIErrorMessage(
|
|
437
|
-
|
|
449
|
+
errorMessage,
|
|
450
|
+
messageContent.trim(),
|
|
438
451
|
);
|
|
439
452
|
return;
|
|
440
453
|
}
|
package/src/client/index.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export type { ThemeLabel, ThemeOption } from './themes';
|
|
2
2
|
export type { EditorCache } from './useEditorCache';
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
VZCodeProvider,
|
|
6
|
+
VZCodeContext,
|
|
7
|
+
} from './VZCodeContext';
|
|
5
8
|
export { VZSidebar } from './VZSidebar';
|
|
6
9
|
export { VZSettings } from './VZSettings';
|
|
7
10
|
export { VZKeyboardShortcutsDoc } from './VZKeyboardShortcutsDoc';
|