@alpaca-editor/core 1.0.4027 → 1.0.4030
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/components/ActionButton.js +2 -2
- package/dist/components/ActionButton.js.map +1 -1
- package/dist/components/SimpleLanguageSelector.js +3 -1
- package/dist/components/SimpleLanguageSelector.js.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/config/config.js +1 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +1 -1
- package/dist/editor/ContextMenu.js +0 -1
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/Editor.js +9 -3
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/FieldListField.js +16 -24
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/ImageEditButton.js +1 -1
- package/dist/editor/ImageEditButton.js.map +1 -1
- package/dist/editor/ImageEditor.js +1 -1
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/MainLayout.js +2 -2
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/Terminal.js +1 -1
- package/dist/editor/Terminal.js.map +1 -1
- package/dist/editor/Titlebar.js +0 -1
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/ai/AgentCostDisplay.d.ts +26 -0
- package/dist/editor/ai/AgentCostDisplay.js +65 -0
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -0
- package/dist/editor/ai/Agents.js +59 -15
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/AiPromptPopover.d.ts +7 -0
- package/dist/editor/ai/AiPromptPopover.js +111 -0
- package/dist/editor/ai/AiPromptPopover.js.map +1 -0
- package/dist/editor/ai/AiResponseMessage.d.ts +1 -0
- package/dist/editor/ai/AiResponseMessage.js +101 -23
- package/dist/editor/ai/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/AiTerminal.d.ts +15 -1
- package/dist/editor/ai/AiTerminal.js +379 -48
- package/dist/editor/ai/AiTerminal.js.map +1 -1
- package/dist/editor/ai/editorAiContext.d.ts +0 -1
- package/dist/editor/ai/editorAiContext.js +0 -2
- package/dist/editor/ai/editorAiContext.js.map +1 -1
- package/dist/editor/client/EditorClient.d.ts +3 -2
- package/dist/editor/client/EditorClient.js +326 -68
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +6 -4
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/fieldModificationStore.d.ts +19 -0
- package/dist/editor/client/fieldModificationStore.js +125 -0
- package/dist/editor/client/fieldModificationStore.js.map +1 -0
- package/dist/editor/client/itemsRepository.d.ts +1 -1
- package/dist/editor/client/itemsRepository.js +38 -28
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.d.ts +1 -0
- package/dist/editor/client/operations.js +39 -31
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/commands/componentCommands.js +5 -3
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/component-designer/aiContext.js +0 -2
- package/dist/editor/component-designer/aiContext.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +1 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +5 -7
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +5 -7
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +5 -7
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/hooks/useEditorSettings.d.ts +17 -0
- package/dist/editor/hooks/useEditorSettings.js +61 -0
- package/dist/editor/hooks/useEditorSettings.js.map +1 -0
- package/dist/editor/menubar/ItemActionsMenu.js +2 -2
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +1 -1
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js +1 -1
- package/dist/editor/menubar/toolbar-sections/EditControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/InsertControls.js +1 -1
- package/dist/editor/menubar/toolbar-sections/InsertControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js +1 -1
- package/dist/editor/menubar/toolbar-sections/ViewportControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js +4 -3
- package/dist/editor/page-editor-chrome/FieldEditedIndicators.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +9 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js +0 -1
- package/dist/editor/page-editor-chrome/useInlineAICompletion.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +1 -1
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.js +9 -8
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +7 -1
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/page-viewer/pageViewContext.js +40 -6
- package/dist/editor/page-viewer/pageViewContext.js.map +1 -1
- package/dist/editor/reviews/Comment.js +7 -6
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +84 -12
- package/dist/editor/services/agentService.js +256 -15
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +17 -3
- package/dist/editor/services/aiService.js +5 -3
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/services/contextService.js +0 -1
- package/dist/editor/services/contextService.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +2 -1
- package/dist/editor/services/systemService.js +3 -0
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +1 -1
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +2 -2
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/GraphQL.d.ts +1 -0
- package/dist/editor/sidebar/GraphQL.js +8 -2
- package/dist/editor/sidebar/GraphQL.js.map +1 -1
- package/dist/editor/sidebar/MainContentTree.js +1 -1
- package/dist/editor/sidebar/MainContentTree.js.map +1 -1
- package/dist/editor/sidebar/SEOInfo.js +1 -1
- package/dist/editor/sidebar/SEOInfo.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.d.ts +4 -1
- package/dist/editor/sidebar/ViewSelector.js +64 -48
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/ui/PerfectTree.js +2 -11
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.d.ts +2 -0
- package/dist/editor/ui/SimpleIconButton.js +8 -4
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/page-wizard/steps/CollectStep.js +1 -1
- package/dist/page-wizard/steps/CollectStep.js.map +1 -1
- package/dist/page-wizard/steps/StructureStep.js +1 -1
- package/dist/page-wizard/steps/StructureStep.js.map +1 -1
- package/dist/page-wizard/steps/TranslateStep.js +233 -18
- package/dist/page-wizard/steps/TranslateStep.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/RecentPages.js +1 -13
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/splash-screen/SplashScreen.js +1 -1
- package/dist/splash-screen/SplashScreen.js.map +1 -1
- package/dist/styles.css +88 -3
- package/dist/types.d.ts +6 -0
- package/package.json +2 -2
- package/src/components/ActionButton.tsx +3 -2
- package/src/components/SimpleLanguageSelector.tsx +6 -1
- package/src/config/config.tsx +1 -1
- package/src/config/types.ts +1 -1
- package/src/editor/ContextMenu.tsx +0 -3
- package/src/editor/Editor.tsx +11 -3
- package/src/editor/FieldListField.tsx +22 -31
- package/src/editor/ImageEditButton.tsx +1 -0
- package/src/editor/ImageEditor.tsx +1 -0
- package/src/editor/MainLayout.tsx +2 -2
- package/src/editor/Terminal.tsx +1 -1
- package/src/editor/Titlebar.tsx +0 -2
- package/src/editor/ai/AgentCostDisplay.tsx +237 -0
- package/src/editor/ai/Agents.tsx +69 -20
- package/src/editor/ai/AiPromptPopover.tsx +209 -0
- package/src/editor/ai/AiResponseMessage.tsx +201 -60
- package/src/editor/ai/AiTerminal.tsx +502 -71
- package/src/editor/ai/editorAiContext.ts +0 -3
- package/src/editor/client/EditorClient.tsx +409 -117
- package/src/editor/client/editContext.ts +7 -5
- package/src/editor/client/fieldModificationStore.ts +196 -0
- package/src/editor/client/itemsRepository.ts +41 -31
- package/src/editor/client/operations.ts +95 -76
- package/src/editor/commands/componentCommands.tsx +9 -3
- package/src/editor/commands/itemCommands.tsx +0 -1
- package/src/editor/component-designer/aiContext.ts +0 -2
- package/src/editor/field-types/DropLinkEditor.tsx +1 -1
- package/src/editor/field-types/MultiLineText.tsx +9 -9
- package/src/editor/field-types/RichTextEditorComponent.tsx +8 -8
- package/src/editor/field-types/SingleLineText.tsx +9 -9
- package/src/editor/hooks/useEditorSettings.ts +68 -0
- package/src/editor/menubar/ItemActionsMenu.tsx +3 -2
- package/src/editor/menubar/PageSelector.tsx +1 -1
- package/src/editor/menubar/toolbar-sections/EditControls.tsx +1 -0
- package/src/editor/menubar/toolbar-sections/InsertControls.tsx +1 -0
- package/src/editor/menubar/toolbar-sections/UtilityControls.tsx +2 -0
- package/src/editor/menubar/toolbar-sections/ViewportControls.tsx +2 -0
- package/src/editor/page-editor-chrome/FieldEditedIndicators.tsx +4 -3
- package/src/editor/page-editor-chrome/FrameMenu.tsx +10 -1
- package/src/editor/page-editor-chrome/useInlineAICompletion.tsx +0 -1
- package/src/editor/page-viewer/EditorForm.tsx +1 -0
- package/src/editor/page-viewer/PageViewer.tsx +9 -8
- package/src/editor/page-viewer/PageViewerFrame.tsx +7 -1
- package/src/editor/page-viewer/pageViewContext.ts +40 -5
- package/src/editor/reviews/Comment.tsx +7 -7
- package/src/editor/services/agentService.ts +405 -31
- package/src/editor/services/aiService.ts +22 -5
- package/src/editor/services/contextService.ts +0 -1
- package/src/editor/services/systemService.ts +7 -1
- package/src/editor/sidebar/ComponentPalette.tsx +4 -1
- package/src/editor/sidebar/EditHistory.tsx +2 -0
- package/src/editor/sidebar/GraphQL.tsx +19 -7
- package/src/editor/sidebar/MainContentTree.tsx +1 -1
- package/src/editor/sidebar/SEOInfo.tsx +1 -1
- package/src/editor/sidebar/ViewSelector.tsx +80 -64
- package/src/editor/ui/PerfectTree.tsx +2 -18
- package/src/editor/ui/SimpleIconButton.tsx +56 -38
- package/src/index.ts +2 -0
- package/src/page-wizard/steps/CollectStep.tsx +0 -2
- package/src/page-wizard/steps/StructureStep.tsx +3 -0
- package/src/page-wizard/steps/TranslateStep.tsx +473 -62
- package/src/revision.ts +2 -2
- package/src/splash-screen/RecentPages.tsx +0 -14
- package/src/splash-screen/SplashScreen.tsx +3 -2
- package/src/types.ts +7 -0
- package/dist/editor/ai/AiPopup.d.ts +0 -10
- package/dist/editor/ai/AiPopup.js +0 -23
- package/dist/editor/ai/AiPopup.js.map +0 -1
- package/dist/editor/ai/AiToolCall.d.ts +0 -5
- package/dist/editor/ai/AiToolCall.js +0 -28
- package/dist/editor/ai/AiToolCall.js.map +0 -1
- package/src/editor/ai/AiPopup.tsx +0 -59
- package/src/editor/ai/AiToolCall.tsx +0 -71
|
@@ -19,6 +19,7 @@ export function ViewportControls() {
|
|
|
19
19
|
icon={<Monitor className="h-6 w-6 p-1" strokeWidth={1} />}
|
|
20
20
|
label="Desktop"
|
|
21
21
|
size="large"
|
|
22
|
+
data-testid="desktop-viewport-button"
|
|
22
23
|
selected={device === "desktop"}
|
|
23
24
|
onClick={() => setDevice("desktop")}
|
|
24
25
|
/>
|
|
@@ -26,6 +27,7 @@ export function ViewportControls() {
|
|
|
26
27
|
icon={<Smartphone className="h-6 w-6 p-1" strokeWidth={1} />}
|
|
27
28
|
label="Mobile"
|
|
28
29
|
size="large"
|
|
30
|
+
data-testid="mobile-viewport-button"
|
|
29
31
|
selected={Boolean(device && device !== "desktop")}
|
|
30
32
|
onClick={() => {
|
|
31
33
|
if (editContext.configuration.devices[0]) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEditContext } from "../client/editContext";
|
|
1
|
+
import { useEditContext, useModifiedFieldsContext } from "../client/editContext";
|
|
2
2
|
import { PageViewContext } from "../page-viewer/pageViewContext";
|
|
3
3
|
import { FieldEditedIndicator } from "./FieldEditedIndicator";
|
|
4
4
|
|
|
@@ -12,10 +12,11 @@ export function FieldEditedIndicators({
|
|
|
12
12
|
scroll?: number;
|
|
13
13
|
}) {
|
|
14
14
|
const editContext = useEditContext();
|
|
15
|
+
const modifiedFieldsContext = useModifiedFieldsContext();
|
|
15
16
|
|
|
16
|
-
if (!editContext) return null;
|
|
17
|
+
if (!editContext || !modifiedFieldsContext) return null;
|
|
17
18
|
|
|
18
|
-
const fields =
|
|
19
|
+
const fields = modifiedFieldsContext.recentEdits;
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
22
|
<>
|
|
@@ -263,6 +263,15 @@ export function FrameMenu({
|
|
|
263
263
|
suggestions: "bg-teal-400",
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
+
const dropzoneColorVariants = {
|
|
267
|
+
shared: "bg-orange-400/40 hover:bg-orange-400",
|
|
268
|
+
readonly: "bg-gray-400/40 hover:bg-gray-400",
|
|
269
|
+
layout: "bg-purple-400/40 hover:bg-purple-400",
|
|
270
|
+
default: "bg-component-blue/40 hover:bg-component-blue",
|
|
271
|
+
nonMovable: "bg-red-400/40 hover:bg-red-400",
|
|
272
|
+
suggestions: "bg-teal-400/40 hover:bg-teal-400",
|
|
273
|
+
};
|
|
274
|
+
|
|
266
275
|
// Calculate initial estimation for the header width
|
|
267
276
|
const estimatedHeaderWidth = buttons.length * 30 + component.name.length * 8; // Approximate width calculation
|
|
268
277
|
const initialIsHeaderWiderThanComponent =
|
|
@@ -404,7 +413,7 @@ export function FrameMenu({
|
|
|
404
413
|
appendPosition &&
|
|
405
414
|
dummyElement && (
|
|
406
415
|
<PlaceholderDropZone
|
|
407
|
-
className=
|
|
416
|
+
className={`${dropzoneColorVariants[color]} rounded-md`}
|
|
408
417
|
insertMenuTitle="Append"
|
|
409
418
|
placeholder={placeholder}
|
|
410
419
|
description={`Append to ${placeholder.name}`}
|
|
@@ -3,7 +3,7 @@ import { EditorForm } from "./EditorForm";
|
|
|
3
3
|
import { PageViewerFrame } from "./PageViewerFrame";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { SimpleIconButton } from "../ui/SimpleIconButton";
|
|
6
|
-
import { useEditContext } from "../client/editContext";
|
|
6
|
+
import { useEditContext, useModifiedFieldsContext } from "../client/editContext";
|
|
7
7
|
import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
|
8
8
|
import { cn } from "../../lib/utils";
|
|
9
9
|
import { Splitter, SplitterPanel } from "../ui/Splitter";
|
|
@@ -26,6 +26,7 @@ export function PageViewer({
|
|
|
26
26
|
noMargins?: boolean;
|
|
27
27
|
}) {
|
|
28
28
|
const editContext = useEditContext();
|
|
29
|
+
const modifiedFieldsContext = useModifiedFieldsContext();
|
|
29
30
|
|
|
30
31
|
const [followEdits, setFollowEdits] = useState(followEditsDefault);
|
|
31
32
|
const [formEditorCollapsed, setFormEditorCollapsed] = useState(false);
|
|
@@ -43,20 +44,20 @@ export function PageViewer({
|
|
|
43
44
|
useEffect(() => {
|
|
44
45
|
if (
|
|
45
46
|
followEdits &&
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
modifiedFieldsContext?.recentEdits &&
|
|
48
|
+
modifiedFieldsContext.recentEdits.length > 0
|
|
48
49
|
) {
|
|
49
|
-
if (editContext
|
|
50
|
+
if (editContext?.inlineEditingFieldElement) return;
|
|
50
51
|
|
|
51
52
|
const lastEdit =
|
|
52
|
-
|
|
53
|
+
modifiedFieldsContext.recentEdits[modifiedFieldsContext.recentEdits.length - 1];
|
|
53
54
|
|
|
54
55
|
if (!lastEdit) return;
|
|
55
56
|
|
|
56
|
-
if (!lastEdit.user.ai || lastEdit.user.name !== editContext
|
|
57
|
+
if (!lastEdit.user.ai || lastEdit.user.name !== editContext?.user?.name)
|
|
57
58
|
return;
|
|
58
59
|
|
|
59
|
-
if (editContext
|
|
60
|
+
if (editContext?.selection.indexOf(lastEdit.item.id) === -1) {
|
|
60
61
|
editContext.select([lastEdit.item.id]);
|
|
61
62
|
}
|
|
62
63
|
|
|
@@ -70,7 +71,7 @@ export function PageViewer({
|
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
}, [
|
|
73
|
-
|
|
74
|
+
modifiedFieldsContext?.recentEdits,
|
|
74
75
|
editContext,
|
|
75
76
|
followEdits,
|
|
76
77
|
pageViewContext,
|
|
@@ -491,8 +491,14 @@ export function PageViewerFrame({
|
|
|
491
491
|
const componentId = findNearestEditableComponentId(target as HTMLElement);
|
|
492
492
|
|
|
493
493
|
if (componentId) {
|
|
494
|
+
// Only change selection if right-clicking on a component that's not in the current selection
|
|
495
|
+
// AND we don't have multiple components selected
|
|
494
496
|
if (!editContextRef.current?.selection.includes(componentId)) {
|
|
495
|
-
|
|
497
|
+
// If we have multiple components selected, don't change the selection
|
|
498
|
+
// unless we're specifically trying to select a different component
|
|
499
|
+
if ((editContextRef.current?.selection.length || 0) <= 1) {
|
|
500
|
+
editContextRef.current!.select([componentId]);
|
|
501
|
+
}
|
|
496
502
|
}
|
|
497
503
|
}
|
|
498
504
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from "react";
|
|
1
|
+
import { useEffect, useRef, useState, useMemo } from "react";
|
|
2
2
|
|
|
3
3
|
import { ItemDescriptor, Page, PageSkeleton } from "../pageModel";
|
|
4
4
|
import { usePageModel } from "../client/pageModelBuilder";
|
|
@@ -110,7 +110,7 @@ export function usePageViewContext({
|
|
|
110
110
|
resizeObserver.disconnect();
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
}, [editorIframeRef.current,
|
|
113
|
+
}, [editorIframeRef.current, updateViewportRectDebounced]);
|
|
114
114
|
|
|
115
115
|
useEffect(() => {
|
|
116
116
|
if (!pageItemDescriptor) return;
|
|
@@ -162,10 +162,18 @@ export function usePageViewContext({
|
|
|
162
162
|
|
|
163
163
|
function updateViewportRect() {
|
|
164
164
|
const rect = editorIframeRef.current?.getBoundingClientRect();
|
|
165
|
-
if (rect)
|
|
165
|
+
if (rect) {
|
|
166
|
+
setViewportRect((prev) => {
|
|
167
|
+
// Only update if dimensions actually changed
|
|
168
|
+
if (prev.width !== rect.width || prev.height !== rect.height) {
|
|
169
|
+
return { width: rect.width, height: rect.height };
|
|
170
|
+
}
|
|
171
|
+
return prev;
|
|
172
|
+
});
|
|
173
|
+
}
|
|
166
174
|
}
|
|
167
175
|
|
|
168
|
-
const pageViewContext: PageViewContext = {
|
|
176
|
+
const pageViewContext: PageViewContext = useMemo(() => ({
|
|
169
177
|
device,
|
|
170
178
|
setDevice,
|
|
171
179
|
deviceWidth,
|
|
@@ -192,7 +200,34 @@ export function usePageViewContext({
|
|
|
192
200
|
site,
|
|
193
201
|
editUrl,
|
|
194
202
|
previewUrl,
|
|
195
|
-
}
|
|
203
|
+
}), [
|
|
204
|
+
device,
|
|
205
|
+
deviceWidth,
|
|
206
|
+
deviceHeight,
|
|
207
|
+
lockHeight,
|
|
208
|
+
scroll,
|
|
209
|
+
zoom,
|
|
210
|
+
fullscreen,
|
|
211
|
+
rotate,
|
|
212
|
+
page,
|
|
213
|
+
viewportRect,
|
|
214
|
+
resolvedPageItemDescriptor,
|
|
215
|
+
isHeadless,
|
|
216
|
+
site,
|
|
217
|
+
editUrl,
|
|
218
|
+
previewUrl,
|
|
219
|
+
setDevice,
|
|
220
|
+
setDeviceWidth,
|
|
221
|
+
setDeviceHeight,
|
|
222
|
+
setLockHeight,
|
|
223
|
+
setScroll,
|
|
224
|
+
setZoom,
|
|
225
|
+
setFullscreen,
|
|
226
|
+
setRotate,
|
|
227
|
+
setPageSkeleton,
|
|
228
|
+
setWorkaround,
|
|
229
|
+
editorIframeRef
|
|
230
|
+
]);
|
|
196
231
|
|
|
197
232
|
return pageViewContext;
|
|
198
233
|
}
|
|
@@ -187,13 +187,13 @@ export function Comment({ comment }: { comment: CommentType }) {
|
|
|
187
187
|
icon="pi pi-sparkles"
|
|
188
188
|
label="AI"
|
|
189
189
|
onClick={async (event) => {
|
|
190
|
-
editContext?.showAiPopup(event as any, {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
});
|
|
190
|
+
// editContext?.showAiPopup(event as any, {
|
|
191
|
+
// initialPrompt:
|
|
192
|
+
// 'Please help me resolve this comment: "' +
|
|
193
|
+
// comment.text +
|
|
194
|
+
// '"',
|
|
195
|
+
// hiddenSystemPrompt: getHiddenSystemPrompt(comment),
|
|
196
|
+
// });
|
|
197
197
|
}}
|
|
198
198
|
/>
|
|
199
199
|
)}
|