@parhelia/core 0.1.12337 → 0.1.12339

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.
@@ -4403,6 +4403,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
4403
4403
  isConnecting ||
4404
4404
  isWaitingForResponse ||
4405
4405
  hasActiveStreaming();
4406
+ const showInitialThinkingSplash = messages.length === 0 && !error && hideGreeting && (isSubmitting || isConnecting);
4406
4407
  // Compute dots visibility: only show BEFORE any assistant message exists
4407
4408
  // This prevents duplicate headers - the dots indicator has its own header,
4408
4409
  // and we don't want to show a second header below existing messages
@@ -4417,6 +4418,10 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
4417
4418
  // The message with the pending approval will display its own UI for approval
4418
4419
  if (allPendingApprovals.length > 0)
4419
4420
  return false;
4421
+ // The hidden-greeting startup splash already renders its own bouncing dots.
4422
+ // Suppress the generic indicator so reopening/running terminals don't show two.
4423
+ if (showInitialThinkingSplash)
4424
+ return false;
4420
4425
  // IMPORTANT: If the last message is an assistant message and we're still executing,
4421
4426
  // the AiResponseMessage for that message will show its own activity indicator.
4422
4427
  // We only want these global thinking dots if the last message was from the user
@@ -4439,6 +4444,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
4439
4444
  messages,
4440
4445
  activeInlineDialog,
4441
4446
  allPendingApprovals,
4447
+ showInitialThinkingSplash,
4442
4448
  ]);
4443
4449
  // Move useMemo hook before early return to comply with Rules of Hooks
4444
4450
  const isLiveEditorContextMode = React.useMemo(() => {
@@ -4565,10 +4571,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
4565
4571
  const summaryOperations = latestSummaryAssistantGroup
4566
4572
  ? getOperationsForMessageGroup(summaryMessages, agentOperations)
4567
4573
  : [];
4568
- return (_jsxs("div", { className: `flex h-full min-h-0 flex-col ${className || ""}`, children: [_jsxs("div", { ref: messagesContainerRef, className: "flex-1 overflow-y-auto", onScroll: handleScroll, children: [error && (_jsx("div", { className: "m-4 rounded-lg border-l-4 border-red-500 bg-red-50 p-3 select-text", children: _jsxs("div", { className: "flex items-start", children: [_jsx(AlertCircle, { className: "mt-0.5 h-5 w-5 text-red-400", strokeWidth: 1 }), _jsxs("div", { className: "ml-3", children: [_jsx("p", { className: "text-[11px] font-medium text-red-800", children: "Error" }), _jsx("p", { className: "mt-1 text-[11px] text-red-700", children: error })] })] }) })), messages.length === 0 &&
4569
- !error &&
4570
- hideGreeting &&
4571
- (isSubmitting || isConnecting) && (_jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsxs("div", { className: "flex flex-col items-center gap-4", children: [activeProfile?.svgIcon ? (_jsx("div", { className: "flex h-16 w-16 items-center justify-center text-gray-400 [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
4574
+ return (_jsxs("div", { className: `flex h-full min-h-0 flex-col ${className || ""}`, children: [_jsxs("div", { ref: messagesContainerRef, className: "flex-1 overflow-y-auto", onScroll: handleScroll, children: [error && (_jsx("div", { className: "m-4 rounded-lg border-l-4 border-red-500 bg-red-50 p-3 select-text", children: _jsxs("div", { className: "flex items-start", children: [_jsx(AlertCircle, { className: "mt-0.5 h-5 w-5 text-red-400", strokeWidth: 1 }), _jsxs("div", { className: "ml-3", children: [_jsx("p", { className: "text-[11px] font-medium text-red-800", children: "Error" }), _jsx("p", { className: "mt-1 text-[11px] text-red-700", children: error })] })] }) })), showInitialThinkingSplash && (_jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsxs("div", { className: "flex flex-col items-center gap-4", children: [activeProfile?.svgIcon ? (_jsx("div", { className: "flex h-16 w-16 items-center justify-center text-gray-400 [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
4572
4575
  __html: activeProfile.svgIcon,
4573
4576
  } })) : (_jsx(SecretAgentIcon, { size: 64, strokeWidth: 1, className: "text-gray-400" })), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "h-2 w-2 animate-bounce rounded-full bg-gray-400 [animation-delay:-0.3s]" }), _jsx("span", { className: "h-2 w-2 animate-bounce rounded-full bg-gray-400 [animation-delay:-0.15s]" }), _jsx("span", { className: "h-2 w-2 animate-bounce rounded-full bg-gray-400" })] })] }) })), renderErrorBanner(), inlineDialog ? (inlineDialog) : latestSummaryAssistantGroup ? (_jsx("div", { className: "space-y-0 divide-y divide-gray-100 select-text", children: _jsx(AiResponseMessage, { messages: summaryMessages, finished: !latestSummaryAssistantGroup.isLastGroup || !isExecuting, editOperations: summaryOperations, error: error || undefined, defaultCollapseJson: defaultCollapseJson, profileSvgIcon: activeProfile?.svgIcon, agentId: agent?.id || agentStub.id, agentName: activeProfile?.agentName ||
4574
4577
  activeProfile?.displayTitle ||
@@ -4693,10 +4696,7 @@ export function AgentTerminal({ agentStub, initialMetadata, profiles, isActive =
4693
4696
  handleSubmit();
4694
4697
  }
4695
4698
  }, 0);
4696
- } })) })), messages.length === 0 &&
4697
- !error &&
4698
- hideGreeting &&
4699
- (isSubmitting || isConnecting) && (_jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsxs("div", { className: "flex flex-col items-center gap-4", children: [activeProfile?.svgIcon ? (_jsx("div", { className: "flex h-16 w-16 items-center justify-center text-gray-400 [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
4699
+ } })) })), showInitialThinkingSplash && (_jsx("div", { className: "flex h-full items-center justify-center p-8", children: _jsxs("div", { className: "flex flex-col items-center gap-4", children: [activeProfile?.svgIcon ? (_jsx("div", { className: "flex h-16 w-16 items-center justify-center text-gray-400 [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
4700
4700
  __html: activeProfile.svgIcon,
4701
4701
  } })) : (_jsx(SecretAgentIcon, { size: 64, strokeWidth: 1, className: "text-gray-400" })), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "h-2 w-2 animate-bounce rounded-full bg-gray-400 [animation-delay:-0.3s]" }), _jsx("span", { className: "h-2 w-2 animate-bounce rounded-full bg-gray-400 [animation-delay:-0.15s]" }), _jsx("span", { className: "h-2 w-2 animate-bounce rounded-full bg-gray-400" })] })] }) })), renderErrorBanner(), _jsxs("div", { className: "space-y-0 divide-y divide-gray-100 select-text", children: [(() => {
4702
4702
  const groups = groupConsecutiveMessages(messages);