@alpaca-editor/core 1.0.4184 → 1.0.4185

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 (43) hide show
  1. package/dist/agents-view/AgentCard.d.ts +12 -0
  2. package/dist/agents-view/AgentCard.js +30 -0
  3. package/dist/agents-view/AgentCard.js.map +1 -0
  4. package/dist/agents-view/AgentsView.d.ts +2 -2
  5. package/dist/agents-view/AgentsView.js +102 -85
  6. package/dist/agents-view/AgentsView.js.map +1 -1
  7. package/dist/agents-view/ProfileAgentsGroup.d.ts +17 -0
  8. package/dist/agents-view/ProfileAgentsGroup.js +13 -0
  9. package/dist/agents-view/ProfileAgentsGroup.js.map +1 -0
  10. package/dist/editor/ai/AgentProfilesOverview.js +1 -1
  11. package/dist/editor/ai/AgentProfilesOverview.js.map +1 -1
  12. package/dist/editor/commands/componentCommands.js +19 -1
  13. package/dist/editor/commands/componentCommands.js.map +1 -1
  14. package/dist/editor/page-editor-chrome/FrameMenu.js +7 -3
  15. package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
  16. package/dist/editor/page-viewer/PageViewerFrame.js +7 -28
  17. package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
  18. package/dist/editor/reviews/Comment.js +56 -4
  19. package/dist/editor/reviews/Comment.js.map +1 -1
  20. package/dist/editor/services/agentService.d.ts +19 -0
  21. package/dist/editor/services/agentService.js +39 -0
  22. package/dist/editor/services/agentService.js.map +1 -1
  23. package/dist/editor/services/serviceHelper.d.ts +1 -0
  24. package/dist/editor/services/serviceHelper.js +58 -4
  25. package/dist/editor/services/serviceHelper.js.map +1 -1
  26. package/dist/revision.d.ts +2 -2
  27. package/dist/revision.js +2 -2
  28. package/dist/styles.css +4 -6
  29. package/dist/tour/default-tour.js +24 -9
  30. package/dist/tour/default-tour.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/agents-view/AgentCard.tsx +162 -0
  33. package/src/agents-view/AgentsView.tsx +218 -253
  34. package/src/agents-view/ProfileAgentsGroup.tsx +123 -0
  35. package/src/editor/ai/AgentProfilesOverview.tsx +1 -2
  36. package/src/editor/commands/componentCommands.tsx +19 -1
  37. package/src/editor/page-editor-chrome/FrameMenu.tsx +9 -3
  38. package/src/editor/page-viewer/PageViewerFrame.tsx +7 -36
  39. package/src/editor/reviews/Comment.tsx +85 -4
  40. package/src/editor/services/agentService.ts +77 -0
  41. package/src/editor/services/serviceHelper.ts +92 -28
  42. package/src/revision.ts +2 -2
  43. package/src/tour/default-tour.tsx +63 -48
@@ -63,7 +63,7 @@ export function getDefaultTourSteps(
63
63
  </>
64
64
  ),
65
65
  focusElement: '#create-new-page-button, [data-testid="create-new-page-button"]',
66
- bubblePosition: "top-right",
66
+ bubblePosition: "right",
67
67
  waitForUserInput: async () => {
68
68
  await waitForElement(".tour-pick-location");
69
69
  },
@@ -261,63 +261,78 @@ export function getDefaultTourSteps(
261
261
  <>
262
262
  <ArrowRight className="inline h-4 w-4" /> Great, show me!
263
263
  </>
264
- ),
265
- onClick: () => nextStep("open-agents-panel"),
264
+ ),
265
+ onClick: () => nextStep("open-agents-panel"),
266
+ },
267
+ ],
266
268
  },
267
- ],
268
- },
269
269
  "open-agents-panel": {
270
- title: "Open AI Agents",
271
- description: "Open the Agents panel to start an AI chat.",
272
- focusElement: `#agents-panel-button, [data-testid="agents-panel-button"]`,
273
- bubblePosition: "left",
274
- waitForUserInput: async () => {
275
- // Falls das Panel schon offen & Prompt da ist → sofort weiter
276
- //if (document.querySelector(`[data-testid="agent-terminal-prompt"]`)) return;
277
-
278
- const btn = document.querySelector(`#agents-panel-button, [data-testid="agents-panel-button"]`);
279
- if (btn) {
280
- await new Promise<void>((resolve) => {
270
+ title: "Open AI Agents",
271
+ description: "Open the Agents panel to start an AI chat.",
272
+ focusElement: "#agents-panel-button, [data-testid='agents-panel-button']",
273
+ bubblePosition: "left",
274
+ waitForUserInput: async () => {
275
+ const btn = document.querySelector(
276
+ "#agents-panel-button, [data-testid='agents-panel-button']"
277
+ );
278
+ if (btn) {
279
+ await new Promise<void>((resolve) => {
281
280
  btn.addEventListener("click", () => resolve(), { once: true });
282
- });
283
- }
284
-
285
- await delay(500);
286
- await waitForElement(`[data-testid="agent-terminal-prompt"]`);
287
- },
288
- nextStep: "start-agent-chat",
289
- },
281
+ });
282
+ }
283
+ await delay(500);
284
+ await waitForElement("[data-testid='agent-profile-card']");
285
+ },
286
+ nextStep: "choose-agent",
287
+ },
288
+ "choose-agent": {
289
+ title: "Choose an AI Agent",
290
+ description: "Choose an AI agent to assist you with your tasks.",
291
+ focusElement: "#agent-profile-card, [data-testid='agent-profile-card']",
292
+ bubblePosition: "left",
293
+ waitForUserInput: async () => {
294
+ const btn = document.querySelector(
295
+ "#agent-profile-card, [data-testid='agent-profile-card']"
296
+ );
297
+ if (btn) {
298
+ await new Promise<void>((resolve) => {
299
+ btn.addEventListener("click", () => resolve(), { once: true });
300
+ });
301
+ }
302
+ await delay(500);
303
+ await waitForElement("[data-testid='agent-terminal-prompt']");
304
+ },
305
+ nextStep: "start-agent-chat",
306
+ },
290
307
  "start-agent-chat": {
291
- title: "Start a chat",
292
- description: "Type a prompt for the agent - Let AI create your whole webppage or just parts and press Enter.",
293
- focusElement: `[data-testid="agent-terminal-prompt"]`,
294
- bubblePosition: "top-left",
295
- buttons: [
296
- {
297
- label: (
308
+ title: "Start a chat",
309
+ description:
310
+ "Type a prompt for the agent - Let AI create your whole webpage or just parts and press Enter.",
311
+ focusElement: "[data-testid='agent-terminal-prompt']",
312
+ bubblePosition: "top-left",
313
+ buttons: [
314
+ {
315
+ label: (
298
316
  <>
299
317
  <Check className="inline h-4 w-4" /> Got it
300
318
  </>
301
- ),
302
- onClick: () => nextStep("congratulations"),
303
- className: "button button-primary mt-2",
319
+ ),
320
+ onClick: () => nextStep("congratulations"),
321
+ className: "button button-primary mt-2",
322
+ },
323
+ ],
324
+ waitForUserInput: async () => {
325
+ await waitForInput("[data-testid='agent-terminal-prompt'] textarea", 5);
326
+ },
327
+ nextStep: "congratulations",
304
328
  },
305
- ],
306
- waitForUserInput: async () => {
307
- await waitForInput(
308
- `[data-testid="agent-terminal-prompt"] textarea`,
309
- 5,
310
- );
311
- },
312
- nextStep: "congratulations",
313
- },
314
329
 
315
330
  congratulations: {
316
- title: "Congratulations!",
317
- description: "You have completed the tour and are now an AI Editor Pro!",
318
- buttons: [
319
- {
320
- label: (
331
+ title: "Congratulations!",
332
+ description: "You have completed the tour and are now an AI Editor Pro!",
333
+ buttons: [
334
+ {
335
+ label: (
321
336
  <>
322
337
  <Check className="inline h-4 w-4" /> Finish Tour
323
338
  </>