@alpaca-editor/core 1.0.4192 → 1.0.4193

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 (106) hide show
  1. package/dist/agents-view/AgentCard.js +1 -1
  2. package/dist/agents-view/AgentCard.js.map +1 -1
  3. package/dist/agents-view/AgentsView.js +5 -7
  4. package/dist/agents-view/AgentsView.js.map +1 -1
  5. package/dist/config/config.js +14 -7
  6. package/dist/config/config.js.map +1 -1
  7. package/dist/editor/ItemInfo.js +3 -3
  8. package/dist/editor/ItemInfo.js.map +1 -1
  9. package/dist/editor/QuickItemSwitcher.js +1 -1
  10. package/dist/editor/QuickItemSwitcher.js.map +1 -1
  11. package/dist/editor/ai/AgentTerminal.d.ts +1 -7
  12. package/dist/editor/ai/AgentTerminal.js +382 -256
  13. package/dist/editor/ai/AgentTerminal.js.map +1 -1
  14. package/dist/editor/ai/Agents.js +84 -198
  15. package/dist/editor/ai/Agents.js.map +1 -1
  16. package/dist/editor/ai/AiResponseMessage.d.ts +1 -3
  17. package/dist/editor/ai/AiResponseMessage.js +12 -65
  18. package/dist/editor/ai/AiResponseMessage.js.map +1 -1
  19. package/dist/editor/ai/ToolCallDisplay.d.ts +1 -2
  20. package/dist/editor/ai/ToolCallDisplay.js +5 -13
  21. package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
  22. package/dist/editor/client/EditorShell.js +5 -6
  23. package/dist/editor/client/EditorShell.js.map +1 -1
  24. package/dist/editor/client/hooks/useSocketMessageHandler.js +4 -6
  25. package/dist/editor/client/hooks/useSocketMessageHandler.js.map +1 -1
  26. package/dist/editor/commands/componentCommands.js +0 -2
  27. package/dist/editor/commands/componentCommands.js.map +1 -1
  28. package/dist/editor/control-center/About.js +1 -1
  29. package/dist/editor/control-center/About.js.map +1 -1
  30. package/dist/editor/control-center/AllAgentsPanel.js +1 -1
  31. package/dist/editor/field-types/MultiLineText.js +1 -1
  32. package/dist/editor/field-types/MultiLineText.js.map +1 -1
  33. package/dist/editor/services/aiService.d.ts +0 -1
  34. package/dist/editor/services/aiService.js.map +1 -1
  35. package/dist/editor/sidebar/Validation.js +1 -1
  36. package/dist/editor/sidebar/Validation.js.map +1 -1
  37. package/dist/index.d.ts +0 -3
  38. package/dist/index.js +0 -4
  39. package/dist/index.js.map +1 -1
  40. package/dist/page-wizard/PageWizard.js +3 -3
  41. package/dist/page-wizard/PageWizard.js.map +1 -1
  42. package/dist/page-wizard/WizardSteps.js +1 -1
  43. package/dist/page-wizard/WizardSteps.js.map +1 -1
  44. package/dist/revision.d.ts +2 -2
  45. package/dist/revision.js +2 -2
  46. package/dist/splash-screen/OpenPage.js +6 -10
  47. package/dist/splash-screen/OpenPage.js.map +1 -1
  48. package/dist/splash-screen/RecentPages.js +2 -2
  49. package/dist/splash-screen/RecentPages.js.map +1 -1
  50. package/dist/splash-screen/SplashScreen.js +1 -1
  51. package/dist/splash-screen/SplashScreen.js.map +1 -1
  52. package/dist/styles.css +12 -244
  53. package/package.json +1 -1
  54. package/src/agents-view/AgentCard.tsx +6 -1
  55. package/src/agents-view/AgentsView.tsx +30 -18
  56. package/src/config/config.tsx +17 -8
  57. package/src/editor/ItemInfo.tsx +2 -3
  58. package/src/editor/QuickItemSwitcher.tsx +1 -1
  59. package/src/editor/ai/AgentTerminal.tsx +649 -544
  60. package/src/editor/ai/Agents.tsx +250 -464
  61. package/src/editor/ai/AiResponseMessage.tsx +29 -134
  62. package/src/editor/ai/ToolCallDisplay.tsx +4 -18
  63. package/src/editor/client/EditorShell.tsx +6 -9
  64. package/src/editor/client/hooks/useSocketMessageHandler.ts +7 -6
  65. package/src/editor/commands/componentCommands.tsx +0 -1
  66. package/src/editor/control-center/About.tsx +2 -2
  67. package/src/editor/control-center/AllAgentsPanel.tsx +1 -1
  68. package/src/editor/field-types/MultiLineText.tsx +1 -1
  69. package/src/editor/services/aiService.ts +0 -2
  70. package/src/editor/sidebar/Validation.tsx +1 -1
  71. package/src/index.ts +0 -5
  72. package/src/page-wizard/PageWizard.tsx +3 -3
  73. package/src/page-wizard/WizardSteps.tsx +1 -1
  74. package/src/revision.ts +2 -2
  75. package/src/splash-screen/OpenPage.tsx +4 -12
  76. package/src/splash-screen/RecentPages.tsx +61 -58
  77. package/src/splash-screen/SplashScreen.tsx +1 -1
  78. package/styles.css +0 -20
  79. package/dist/components/ui/PlaceholderInput.d.ts +0 -41
  80. package/dist/components/ui/PlaceholderInput.js +0 -160
  81. package/dist/components/ui/PlaceholderInput.js.map +0 -1
  82. package/dist/components/ui/PlaceholderInputTypes.d.ts +0 -41
  83. package/dist/components/ui/PlaceholderInputTypes.js +0 -48
  84. package/dist/components/ui/PlaceholderInputTypes.js.map +0 -1
  85. package/dist/components/ui/PlaceholderItemSelector.d.ts +0 -7
  86. package/dist/components/ui/PlaceholderItemSelector.js +0 -154
  87. package/dist/components/ui/PlaceholderItemSelector.js.map +0 -1
  88. package/dist/editor/ai/MediaImage.d.ts +0 -6
  89. package/dist/editor/ai/MediaImage.js +0 -38
  90. package/dist/editor/ai/MediaImage.js.map +0 -1
  91. package/dist/splash-screen/ModernSplashScreen.d.ts +0 -8
  92. package/dist/splash-screen/ModernSplashScreen.js +0 -92
  93. package/dist/splash-screen/ModernSplashScreen.js.map +0 -1
  94. package/dist/splash-screen/ParheliaAssistantChat.d.ts +0 -8
  95. package/dist/splash-screen/ParheliaAssistantChat.js +0 -155
  96. package/dist/splash-screen/ParheliaAssistantChat.js.map +0 -1
  97. package/dist/splash-screen/RecentAgents.d.ts +0 -7
  98. package/dist/splash-screen/RecentAgents.js +0 -76
  99. package/dist/splash-screen/RecentAgents.js.map +0 -1
  100. package/src/components/ui/PlaceholderInput.tsx +0 -290
  101. package/src/components/ui/PlaceholderInputTypes.tsx +0 -97
  102. package/src/components/ui/PlaceholderItemSelector.tsx +0 -253
  103. package/src/editor/ai/MediaImage.tsx +0 -75
  104. package/src/splash-screen/ModernSplashScreen.tsx +0 -229
  105. package/src/splash-screen/ParheliaAssistantChat.tsx +0 -273
  106. package/src/splash-screen/RecentAgents.tsx +0 -151
@@ -5,7 +5,6 @@ import { useEditContext } from "../client/editContext";
5
5
  import { EditOperation } from "../../types";
6
6
  import { Message, ToolCall } from "./types";
7
7
  import { ToolCallDisplay } from "./ToolCallDisplay";
8
- import { MediaImage } from "./MediaImage";
9
8
 
10
9
  import { X } from "lucide-react";
11
10
  import { Button } from "../../components/ui/button";
@@ -29,16 +28,6 @@ type ContentSegment =
29
28
  kind: "todo";
30
29
  title?: string;
31
30
  items: { id?: string; text: string; done?: boolean; note?: string }[];
32
- }
33
- | {
34
- kind: "media";
35
- items: {
36
- itemId: string;
37
- url?: string; // Optional during streaming, required after augmentation
38
- alt?: string;
39
- label?: string;
40
- caption?: string;
41
- }[];
42
31
  };
43
32
 
44
33
  // Helper to extract partial quick actions from potentially incomplete JSON during streaming
@@ -173,7 +162,6 @@ function parseContentSegments(
173
162
  const plainQuickToken = "quick_action_buttons";
174
163
  const fencedTodoToken = "```todo_list";
175
164
  const plainTodoToken = "todo_list";
176
- const fencedMediaToken = "```media_item";
177
165
 
178
166
  // Helper: find next valid plain token occurrence (at line start or after newline)
179
167
  const findNextPlainHeader = (token: string, fromIndex: number): number => {
@@ -233,13 +221,12 @@ function parseContentSegments(
233
221
  const nextPlainQuick = findNextPlainHeader(plainQuickToken, cursor);
234
222
  const nextFencedTodo = content.indexOf(fencedTodoToken, cursor);
235
223
  const nextPlainTodo = findNextPlainHeader(plainTodoToken, cursor);
236
- const nextFencedMedia = content.indexOf(fencedMediaToken, cursor);
237
224
 
238
225
  // Determine which token occurs first among all supported tokens
239
226
  type TokenPick = {
240
227
  start: number;
241
228
  kind: "fenced" | "plain";
242
- type: "quick" | "todo" | "media";
229
+ type: "quick" | "todo";
243
230
  };
244
231
  const candidates: TokenPick[] = [];
245
232
  if (nextFencedQuick !== -1)
@@ -254,8 +241,6 @@ function parseContentSegments(
254
241
  candidates.push({ start: nextFencedTodo, kind: "fenced", type: "todo" });
255
242
  if (nextPlainTodo !== -1)
256
243
  candidates.push({ start: nextPlainTodo, kind: "plain", type: "todo" });
257
- if (nextFencedMedia !== -1)
258
- candidates.push({ start: nextFencedMedia, kind: "fenced", type: "media" });
259
244
 
260
245
  let pick: TokenPick | null = null;
261
246
  if (candidates.length > 0) {
@@ -278,9 +263,7 @@ function parseContentSegments(
278
263
  const openTokenLength =
279
264
  pick.type === "quick"
280
265
  ? fencedQuickToken.length
281
- : pick.type === "todo"
282
- ? fencedTodoToken.length
283
- : fencedMediaToken.length;
266
+ : fencedTodoToken.length;
284
267
  const afterOpenLineStart = pick.start + openTokenLength;
285
268
  const openLineMatch = content
286
269
  .slice(afterOpenLineStart)
@@ -311,46 +294,6 @@ function parseContentSegments(
311
294
  break;
312
295
  }
313
296
  }
314
-
315
- // Handle media_item blocks separately (pipe-delimited format, not JSON)
316
- if (pick.type === "media") {
317
- const items: { itemId: string; label?: string }[] = [];
318
-
319
- // Parse pipe-delimited format: {GUID}|Label or just {GUID}
320
- const lines = jsonText.split(/\r?\n/).map(l => l.trim()).filter(l => l);
321
-
322
- for (const line of lines) {
323
- // Only parse complete lines (must have closing brace)
324
- if (line.includes('}')) {
325
- const pipeIndex = line.indexOf('|');
326
- if (pipeIndex !== -1) {
327
- // Has label
328
- const itemId = line.substring(0, pipeIndex).trim();
329
- const label = line.substring(pipeIndex + 1).trim();
330
- if (itemId && /\{[0-9a-fA-F-]+\}/.test(itemId)) {
331
- items.push({ itemId, label: label || undefined });
332
- }
333
- } else {
334
- // No label
335
- const itemId = line.trim();
336
- if (itemId && /\{[0-9a-fA-F-]+\}/.test(itemId)) {
337
- items.push({ itemId });
338
- }
339
- }
340
- }
341
- }
342
-
343
- if (items.length > 0) {
344
- segments.push({
345
- kind: "media",
346
- items: items
347
- });
348
- }
349
-
350
- cursor = close + 3;
351
- continue;
352
- }
353
-
354
297
  try {
355
298
  const parsed = JSON.parse(jsonText);
356
299
  if (pick.type === "quick") {
@@ -385,7 +328,7 @@ function parseContentSegments(
385
328
  if (actions.length > 0) {
386
329
  segments.push({ kind: "actions", actions });
387
330
  }
388
- } else if (pick.type === "todo") {
331
+ } else {
389
332
  // todo_list
390
333
  const todoItems = Array.isArray(parsed)
391
334
  ? parsed
@@ -568,33 +511,8 @@ function extractCommandLinks(text: string): {
568
511
 
569
512
  function simpleFormatToHtml(text: string): string {
570
513
  return text
571
- .replace(
572
- /^######\s+(.+)$/gm,
573
- '<h6 style="font-size: 0.75rem; font-weight: 500; margin: 0.75rem 0 0.25rem 0; color: #6b7280; letter-spacing: 0.01em; line-height: 1.3;">$1</h6>',
574
- )
575
- .replace(
576
- /^#####\s+(.+)$/gm,
577
- '<h5 style="font-size: 0.875rem; font-weight: 500; margin: 0.875rem 0 0.375rem 0; color: #4b5563; letter-spacing: 0.01em; line-height: 1.35;">$1</h5>',
578
- )
579
- .replace(
580
- /^####\s+(.+)$/gm,
581
- '<h4 style="font-size: 1rem; font-weight: 600; margin: 1rem 0 0.5rem 0; color: #374151; letter-spacing: -0.01em; line-height: 1.4;">$1</h4>',
582
- )
583
- .replace(
584
- /^###\s+(.+)$/gm,
585
- '<h3 style="font-size: 1.125rem; font-weight: 600; margin: 1.125rem 0 0.5rem 0; color: #1f2937; letter-spacing: -0.015em; line-height: 1.4;">$1</h3>',
586
- )
587
- .replace(
588
- /^##\s+(.+)$/gm,
589
- '<h2 style="font-size: 1.375rem; font-weight: 600; margin: 1.25rem 0 0.625rem 0; color: #111827; letter-spacing: -0.02em; line-height: 1.3;">$1</h2>',
590
- )
591
- .replace(
592
- /^#\s+(.+)$/gm,
593
- '<h1 style="font-size: 1.75rem; font-weight: 700; margin: 1.5rem 0 0.75rem 0; color: #0f172a; letter-spacing: -0.025em; line-height: 1.2;">$1</h1>',
594
- )
595
514
  .replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>")
596
- .replace(/\n/g, "<br/>")
597
- .replace(/<\/(h[1-6])><br\/>/g, "</$1>");
515
+ .replace(/\n/g, "<br/>");
598
516
  }
599
517
 
600
518
  export function AiResponseMessage({
@@ -604,8 +522,6 @@ export function AiResponseMessage({
604
522
  error,
605
523
  onQuickAction,
606
524
  profileSvgIcon,
607
- agentId,
608
- agentName,
609
525
  }: {
610
526
  messages: Message[];
611
527
  finished: boolean;
@@ -622,8 +538,6 @@ export function AiResponseMessage({
622
538
  message: Message,
623
539
  ) => void;
624
540
  profileSvgIcon?: string;
625
- agentId?: string;
626
- agentName?: string;
627
541
  }) {
628
542
  const editContext = useEditContext();
629
543
 
@@ -761,11 +675,11 @@ export function AiResponseMessage({
761
675
  }, [nonToolAssistantMessages, isStreaming, preservedToolCalls]);
762
676
 
763
677
  return (
764
- <div className="flex gap-3 px-4 py-3" data-testid="agent-message">
678
+ <div className="flex gap-3 p-4" data-testid="agent-message">
765
679
  <div className="flex-shrink-0">
766
680
  {profileSvgIcon ? (
767
681
  <div
768
- className="text-gray-2 flex h-7 w-7 items-center justify-center [&>svg]:h-full [&>svg]:w-full"
682
+ className="text-gray-2 flex h-6 w-6 items-center justify-center [&>svg]:h-full [&>svg]:w-full"
769
683
  dangerouslySetInnerHTML={{
770
684
  __html: profileSvgIcon,
771
685
  }}
@@ -775,8 +689,8 @@ export function AiResponseMessage({
775
689
  )}
776
690
  </div>
777
691
  <div className="min-w-0 flex-1 select-text">
778
- <div className="mb-0.5 flex items-center gap-2">
779
- <span className="text-dark text-xs font-medium">{agentName || "Agent"}</span>
692
+ <div className="mb-1 flex items-center gap-2">
693
+ <span className="text-dark text-xs font-medium">Agent</span>
780
694
 
781
695
  {lastMessage && lastMessage.createdDate && (
782
696
  <span
@@ -791,7 +705,7 @@ export function AiResponseMessage({
791
705
 
792
706
  {error && (
793
707
  <div
794
- className="mb-2 rounded-lg border-l-4 border-red-500 bg-red-50 p-2.5"
708
+ className="mb-3 rounded-lg border-l-4 border-red-500 bg-red-50 p-3"
795
709
  data-testid="agent-error"
796
710
  >
797
711
  <div className="flex items-start">
@@ -885,34 +799,34 @@ export function AiResponseMessage({
885
799
  }
886
800
  }
887
801
 
802
+ return (
803
+ <div
804
+ key={`item-${itemIndex}`}
805
+ className={`prose prose-sm max-w-none text-xs text-gray-700 select-text ${shouldAddSpacing ? "mt-3" : ""}`}
806
+ >
807
+ {parts}
808
+ </div>
809
+ );
810
+ }
811
+
812
+ // No command links, render as normal
813
+ const html = simpleFormatToHtml(trimmedText);
814
+ if (!html) return null;
888
815
  return (
889
816
  <div
890
817
  key={`item-${itemIndex}`}
891
- className={`prose prose-sm max-w-none text-xs text-gray-700 select-text ${shouldAddSpacing ? "mt-2" : ""}`}
892
- >
893
- {parts}
894
- </div>
818
+ className={`prose prose-sm max-w-none text-xs text-gray-700 select-text ${shouldAddSpacing ? "mt-3" : ""}`}
819
+ dangerouslySetInnerHTML={{ __html: html }}
820
+ />
895
821
  );
896
822
  }
897
823
 
898
- // No command links, render as normal
899
- const html = simpleFormatToHtml(trimmedText);
900
- if (!html) return null;
901
- return (
902
- <div
903
- key={`item-${itemIndex}`}
904
- className={`prose prose-sm max-w-none text-xs text-gray-700 select-text ${shouldAddSpacing ? "mt-2" : ""}`}
905
- dangerouslySetInnerHTML={{ __html: html }}
906
- />
907
- );
908
- }
909
-
910
824
  if (segment.kind === "todo") {
911
825
  const todo = segment;
912
826
  return (
913
827
  <div
914
828
  key={`item-${itemIndex}`}
915
- className={`my-1 ${shouldAddSpacing ? "mt-2" : ""}`}
829
+ className={`my-2 ${shouldAddSpacing ? "mt-3" : ""}`}
916
830
  >
917
831
  {todo.title && (
918
832
  <div className="mb-1 text-xs font-medium text-gray-800">
@@ -954,30 +868,12 @@ export function AiResponseMessage({
954
868
  );
955
869
  }
956
870
 
957
- if (segment.kind === "media") {
958
- const media = segment;
959
- return (
960
- <div
961
- key={`item-${itemIndex}`}
962
- className={`my-2 flex flex-col gap-3 ${shouldAddSpacing ? "mt-2" : ""}`}
963
- >
964
- {media.items.map((mediaItem, mIdx) => (
965
- <MediaImage
966
- key={mediaItem.itemId || `media-${itemIndex}-${mIdx}`}
967
- itemId={mediaItem.itemId}
968
- label={mediaItem.label}
969
- />
970
- ))}
971
- </div>
972
- );
973
- }
974
-
975
871
  // segment.kind === "actions"
976
872
  const actions = segment.actions;
977
873
  return (
978
874
  <div
979
875
  key={`item-${itemIndex}`}
980
- className={`my-3 flex flex-wrap gap-2 ${shouldAddSpacing ? "mt-2" : ""}`}
876
+ className={`my-2 flex flex-wrap gap-2 ${shouldAddSpacing ? "mt-3" : ""}`}
981
877
  >
982
878
  {actions.map((a, aIdx) => {
983
879
  const variant =
@@ -1018,7 +914,7 @@ export function AiResponseMessage({
1018
914
  return (
1019
915
  <div
1020
916
  key={`item-${itemIndex}`}
1021
- className={shouldAddSpacing ? "mt-2" : ""}
917
+ className={shouldAddSpacing ? "mt-3" : ""}
1022
918
  >
1023
919
  <ToolCallDisplay
1024
920
  toolCalls={item.toolCalls}
@@ -1026,14 +922,13 @@ export function AiResponseMessage({
1026
922
  openPopovers={openPopovers}
1027
923
  setOpenPopovers={setOpenPopovers}
1028
924
  messageId={item.messageId}
1029
- agentId={agentId}
1030
925
  />
1031
926
  </div>
1032
927
  );
1033
928
  })}
1034
929
 
1035
930
  {finished && editOperations.length > 0 && (
1036
- <div className="mt-2 flex items-center gap-2">
931
+ <div className="mt-3 flex items-center gap-2">
1037
932
  <div className="tour-ai-response-message-changes text-xs">
1038
933
  {editOperations.length} changes
1039
934
  </div>
@@ -135,7 +135,6 @@ interface ToolCallDisplayProps {
135
135
  React.SetStateAction<{ [key: string]: boolean }>
136
136
  >;
137
137
  messageId: string;
138
- agentId?: string;
139
138
  }
140
139
 
141
140
  // Helper function to normalize tool calls to a common format
@@ -360,7 +359,6 @@ export function ToolCallDisplay({
360
359
  openPopovers,
361
360
  setOpenPopovers,
362
361
  messageId,
363
- agentId,
364
362
  }: ToolCallDisplayProps) {
365
363
  if (!toolCalls || toolCalls.length === 0) {
366
364
  return null;
@@ -528,20 +526,14 @@ export function ToolCallDisplay({
528
526
  ? originalToolCall.dbMessageId ||
529
527
  originalToolCall.messageId
530
528
  : messageId;
531
- if (!agentId) {
532
- console.error(
533
- "❌ Cannot reject tool call: agentId is missing",
534
- );
535
- return;
536
- }
537
529
  console.log("🚫 Rejecting tool call:", {
538
- agentId,
530
+ agentId: (window as any)?.currentAgentId,
539
531
  messageId: actualMessageId,
540
532
  toolCallId: toolCall.id,
541
533
  });
542
534
  try {
543
535
  const result = await rejectToolCall({
544
- agentId,
536
+ agentId: (window as any)?.currentAgentId,
545
537
  messageId: actualMessageId,
546
538
  toolCallId: toolCall.id,
547
539
  });
@@ -572,20 +564,14 @@ export function ToolCallDisplay({
572
564
  ? originalToolCall.dbMessageId ||
573
565
  originalToolCall.messageId
574
566
  : messageId;
575
- if (!agentId) {
576
- console.error(
577
- "❌ Cannot approve tool call: agentId is missing",
578
- );
579
- return;
580
- }
581
567
  console.log("✅ Approving tool call:", {
582
- agentId,
568
+ agentId: (window as any)?.currentAgentId,
583
569
  messageId: actualMessageId,
584
570
  toolCallId: toolCall.id,
585
571
  });
586
572
  try {
587
573
  const result = await approveToolCall({
588
- agentId,
574
+ agentId: (window as any)?.currentAgentId,
589
575
  messageId: actualMessageId,
590
576
  toolCallId: toolCall.id,
591
577
  });
@@ -387,7 +387,7 @@ export function EditorShell({
387
387
  viewName:
388
388
  searchParams.get("view") ??
389
389
  configuration.editor.views[0]?.name ??
390
- "content-tree",
390
+ "content-editor",
391
391
  item: {
392
392
  id: entry.itemId,
393
393
  language: entry.itemLanguage,
@@ -397,7 +397,7 @@ export function EditorShell({
397
397
  displayName:
398
398
  searchParams.get("view") ??
399
399
  configuration.editor.views[0]?.name ??
400
- "content-tree",
400
+ "content-editor",
401
401
  itemName: entry.itemName,
402
402
  itemPath: entry.itemPath,
403
403
  itemIcon: entry.icon,
@@ -557,7 +557,6 @@ export function EditorShell({
557
557
  }
558
558
  }, [focusedField]);
559
559
 
560
-
561
560
  const currentView =
562
561
  configuration.editor.views.find((x) => x.name === viewName) ??
563
562
  configuration.editor.views[0];
@@ -1227,8 +1226,6 @@ export function EditorShell({
1227
1226
  });
1228
1227
  }, []);
1229
1228
 
1230
-
1231
-
1232
1229
  const loadItem = useCallback(
1233
1230
  async (
1234
1231
  itemToLoad: ItemDescriptor | string,
@@ -1246,7 +1243,6 @@ export function EditorShell({
1246
1243
  };
1247
1244
 
1248
1245
  console.log("load item: " + itemToLoad.id, itemToLoad.language);
1249
- console.trace("loadItem called from:");
1250
1246
  const item = await itemsRepository.getItem(itemToLoad);
1251
1247
 
1252
1248
  if (!item) {
@@ -1255,15 +1251,13 @@ export function EditorShell({
1255
1251
  return undefined;
1256
1252
  }
1257
1253
 
1258
- console.log("viewName: ", viewName);
1259
1254
  if (
1260
1255
  !options?.skipViewChange &&
1261
1256
  ((!item.hasLayout && viewName === "page-editor") ||
1262
1257
  viewName == "splash-screen" ||
1263
1258
  viewName == "control-center")
1264
1259
  ) {
1265
- console.log("setting view name to content-tree");
1266
- setViewName("content-tree");
1260
+ setViewName("content-editor");
1267
1261
  }
1268
1262
 
1269
1263
  // ensure this is object has no additional properties
@@ -2052,6 +2046,9 @@ export function EditorShell({
2052
2046
  [router],
2053
2047
  );
2054
2048
 
2049
+ // Quota checking functions
2050
+ // moved into hook
2051
+
2055
2052
  // Calculate visible views separately to avoid circular dependency
2056
2053
  const visibleViews = useMemo(() => {
2057
2054
  const allViews =
@@ -1,4 +1,4 @@
1
- import { useEffectEvent } from "react";
1
+ import { useCallback } from "react";
2
2
  import { ItemDescriptor } from "../../pageModel";
3
3
  import type {
4
4
  EditOperation,
@@ -71,9 +71,8 @@ export function useSocketMessageHandler(deps: {
71
71
  isItemUsedInCurrentPage,
72
72
  } = deps;
73
73
 
74
- // Wrap the entire message handler in useEffectEvent to ensure it always
75
- // accesses the latest values (e.g., viewName in loadItem) without stale closures
76
- const handleMessage = useEffectEvent(async (event: any) => {
74
+ const messageHandler = useCallback(
75
+ async (event: any) => {
77
76
  if (!event.data?.toString?.().startsWith?.("{")) return;
78
77
  const message = JSON.parse(event.data);
79
78
 
@@ -336,7 +335,9 @@ export function useSocketMessageHandler(deps: {
336
335
  }
337
336
 
338
337
  socketMessageListeners.current.forEach((listener) => listener(message));
339
- });
338
+ },
339
+ [currentItemDescriptor, sessionId],
340
+ );
340
341
 
341
- return handleMessage;
342
+ return messageHandler;
342
343
  }
@@ -118,7 +118,6 @@ function getDuplicateCommand(
118
118
  if (editContext.mode === "suggestions") return null;
119
119
 
120
120
  const component = components[0];
121
- if (!component) return null;
122
121
  // Don't show duplicate for layout components when showLayoutComponents is disabled
123
122
  if (component.layoutId && !editContext.showLayoutComponents) return null;
124
123
 
@@ -9,7 +9,7 @@ export function About() {
9
9
  <div className="max-h-full space-y-6 p-4">
10
10
  <div className="space-y-4">
11
11
  <h2 className="text-xl font-semibold text-gray-800">
12
- About Parhelia
12
+ About AI Workbench
13
13
  </h2>
14
14
  {/* Application Information */}
15
15
  <div className="rounded-lg border border-gray-200 bg-white p-4">
@@ -21,7 +21,7 @@ export function About() {
21
21
  <label className="text-sm font-medium text-gray-500">
22
22
  Product Name
23
23
  </label>
24
- <p className="text-gray-900">Parhelia</p>
24
+ <p className="text-gray-900">AI Workbench</p>
25
25
  </div>
26
26
  <div>
27
27
  <label className="text-sm font-medium text-gray-500">
@@ -169,7 +169,7 @@ export function AllAgentsPanel() {
169
169
  <div className="border-b border-gray-200 bg-white p-4">
170
170
  <div className="mb-3 flex items-center justify-between">
171
171
  <div>
172
- <h2 className="text-md font-semibold text-gray-900">All Agents</h2>
172
+ <h2 className="text-lg font-semibold text-gray-900">All Agents</h2>
173
173
  <p className="text-xs text-gray-500">
174
174
  Showing {filteredAgents.length} non-closed agent
175
175
  {filteredAgents.length !== 1 ? "s" : ""} across all users
@@ -75,7 +75,7 @@ export function MultiLineText({
75
75
  key={fieldItem.id + field.id + fieldItem.language + fieldItem.version}
76
76
  value={value}
77
77
  disabled={readOnly}
78
- className="focus-shadow bg-gray-5 w-full p-2 text-xs max-h-[400px] overflow-y-auto"
78
+ className="focus-shadow bg-gray-5 w-full p-2 text-xs"
79
79
  rows={12}
80
80
  onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => {
81
81
  setValue(e.target.value);
@@ -28,8 +28,6 @@ export type AiProfile = {
28
28
  includeUserBrowseHistory?: number;
29
29
  // Whether to include user favorites
30
30
  includeUserFavorites?: boolean;
31
- // Display name for the agent in chat (e.g., "Parhelia", "ContentBot")
32
- agentName?: string;
33
31
  };
34
32
 
35
33
  // In-flight de-duplication and short TTL cache for AI profiles to avoid
@@ -84,7 +84,7 @@ export function Validation() {
84
84
  if (!item || !editContext) return;
85
85
  editContext.setCenterPanelView(
86
86
  editContext.configuration.editor.views.find(
87
- (x) => x.name === "content-tree",
87
+ (x) => x.name === "content-editor",
88
88
  )?.defaultCenterPanelView,
89
89
  );
90
90
  fieldsContext?.setFocusedField(
package/src/index.ts CHANGED
@@ -51,8 +51,3 @@ export { MainContentTree } from "./editor/sidebar/MainContentTree";
51
51
  export { ScrollingContentTree } from "./editor/ScrollingContentTree";
52
52
 
53
53
  export { getLanguages } from "./editor/services/contentService";
54
-
55
- // Splash screen components
56
- export { SplashScreen } from "./splash-screen/SplashScreen";
57
- export { ModernSplashScreen } from "./splash-screen/ModernSplashScreen";
58
- export { ParheliaAssistantChat } from "./splash-screen/ParheliaAssistantChat";
@@ -128,7 +128,7 @@ export function PageWizard() {
128
128
  } catch (error) {
129
129
  console.error("PageWizard: Error loading wizard:", error);
130
130
  // If the wizard couldn't be loaded (not found, not valid for context, etc.)
131
- editContext?.switchView("content-tree", { skipConfirmation: true });
131
+ editContext?.switchView("content-editor", { skipConfirmation: true });
132
132
  } finally {
133
133
  setIsLoading(false);
134
134
  }
@@ -140,9 +140,9 @@ export function PageWizard() {
140
140
  // Only switch away if we have no wizard AND no wizard ID (i.e., we're not supposed to be here)
141
141
  if (!wizard && !editContext?.currentWizardId) {
142
142
  console.log(
143
- "PageWizard - No wizard and no wizard ID, switching to content-tree",
143
+ "PageWizard - No wizard and no wizard ID, switching to content-editor",
144
144
  );
145
- editContext?.switchView("content-tree", { skipConfirmation: true });
145
+ editContext?.switchView("content-editor", { skipConfirmation: true });
146
146
  return null;
147
147
  }
148
148
 
@@ -437,7 +437,7 @@ export function WizardSteps({ wizard, parentItem }: WizardStepsProps) {
437
437
  // If wizard was opened from new-page, go to splash screen instead
438
438
  const targetView = editContext?.previousViewName === "new-page"
439
439
  ? "splash-screen"
440
- : (editContext?.previousViewName || "content-tree");
440
+ : (editContext?.previousViewName || "content-editor");
441
441
  editContext?.switchView(targetView);
442
442
  };
443
443
 
package/src/revision.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const version = "1.0.4192";
2
- export const buildDate = "2025-10-26 09:34:53";
1
+ export const version = "1.0.4193";
2
+ export const buildDate = "2025-10-26 09:38:26";
@@ -11,7 +11,6 @@ import { Logo, MagicEditIcon } from "../editor/ui/Icons";
11
11
  import { ActionButton } from "../components/ActionButton";
12
12
  import { RecentPages } from "./RecentPages";
13
13
  import { X, Network } from "lucide-react";
14
- import ItemSearch, { ResultItem } from "../editor/ui/ItemSearch";
15
14
 
16
15
  export function OpenPage() {
17
16
  const savedHistory =
@@ -26,7 +25,6 @@ export function OpenPage() {
26
25
  : [];
27
26
 
28
27
  const [isLoading, setIsLoading] = useState(false);
29
- const [hoveredItem, setHoveredItem] = useState<ResultItem>();
30
28
 
31
29
  useEffect(() => {
32
30
  if (recentPages.length > 0 && recentPages[0])
@@ -97,16 +95,10 @@ export function OpenPage() {
97
95
  noPadding
98
96
  className="h-full"
99
97
  >
100
- <div className="flex h-full flex-col gap-2 px-4 py-2">
101
- <ItemSearch
102
- setHoveredItem={setHoveredItem}
103
- itemSelected={(item) => {
104
- loadItem(item);
105
- }}
106
- />
107
- <div className="relative flex-1">
108
- <ScrollingContentTree
109
- selectedItemId={hoveredItem?.id ?? selectedPage?.id}
98
+ <div className="h-full px-4">
99
+ <div className="relative h-full">
100
+ <ScrollingContentTree
101
+ selectedItemId={selectedPage?.id}
110
102
  hideRootNodes={true}
111
103
  onSelectionChange={(selection) => {
112
104
  const selectedItem = selection[0];