@xenosystem/agent-interface-ui 0.1.195 → 0.1.197

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/agent.css CHANGED
@@ -7728,6 +7728,10 @@ a.xeno-source-card:focus-visible {
7728
7728
  .xa-label { font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--xa-label); }
7729
7729
 
7730
7730
  /* ── motion: the composer's pair, at the transcript's scale ─────────────── */
7731
+ /* A word of a reply that was just shown: it fades in once. Words already on screen are plain text and never redrawn. */
7732
+ @keyframes xa-reveal { from { opacity: 0; } to { opacity: 1; } }
7733
+ .xa-body .xa-w { animation: xa-reveal 180ms ease-out both; }
7734
+ @media (prefers-reduced-motion: reduce) { .xa-body .xa-w { animation: none; } }
7731
7735
  @keyframes xa-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
7732
7736
  @keyframes xa-rise { 0% { transform: translateY(10px); opacity: 0; filter: blur(3px); } 45% { transform: translateY(4px); opacity: 0; filter: blur(3px); } 100% { transform: none; opacity: 1; filter: blur(0); } }
7733
7737
  @keyframes xa-sink { 0% { transform: none; opacity: 1; filter: blur(0); } 55% { transform: translateY(4px); opacity: 0; filter: blur(3px); } 100% { transform: translateY(10px); opacity: 0; filter: blur(3px); } }
@@ -22,6 +22,13 @@ export interface AgentInterfaceProps {
22
22
  * only supplies it inside its isolated E2E harness; nothing else ever does.
23
23
  */
24
24
  initialParityFrame?: ParityFrame;
25
+ /**
26
+ * The chat to open once the host's chats have loaded: a surface that has its own address for a chat (the remote page
27
+ * in a browser) names it here. A desktop window on another PC names it in its own address instead.
28
+ */
29
+ initialConversationId?: string;
30
+ /** Told which chat is on screen whenever that changes (null: none), so a surface's address can follow it. */
31
+ onActiveConversationChange?: (conversationId: string | null) => void;
25
32
  windowControls?: {
26
33
  onNewWindow?: XenoAgentWindowAction;
27
34
  onMinimize?: XenoAgentWindowAction;
@@ -29,5 +36,5 @@ export interface AgentInterfaceProps {
29
36
  onClose?: XenoAgentWindowAction;
30
37
  };
31
38
  }
32
- export default function AgentInterface({ surface, initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, windowControls, }?: AgentInterfaceProps): React.JSX.Element;
39
+ export default function AgentInterface({ surface, initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, initialConversationId, onActiveConversationChange, windowControls, }?: AgentInterfaceProps): React.JSX.Element;
33
40
  //# sourceMappingURL=AgentInterface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentInterface.d.ts","sourceRoot":"","sources":["../../../src/components/agent/AgentInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwD,KAAK,WAAW,EAAE,MAAM,8CAA8C,CAAA;AAWrI,OAAO,KAA4D,MAAM,OAAO,CAAA;AAwGhF,OAAO,iCAAiC,CAAA;AAexC,OAAO,EAEL,KAAK,KAAK,IAAI,mBAAmB,EACjC,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,0BAA0B,IAAI,wCAAwC,EAC3E,KAAK,mBAAmB,IAAI,0BAA0B,EACtD,KAAK,IAAI,IAAI,kBAAkB,EAC/B,KAAK,SAAS,IAAI,uBAAuB,EACzC,KAAK,YAAY,IAAI,iBAAiB,EACvC,MAAM,gCAAgC,CAAA;AAoBvC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAA;AA2tF7C,MAAM,MAAM,YAAY,GAAG,0BAA0B,CAAA;AACrD,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,MAAM,0BAA0B,GAAG,wCAAwC,CAAA;AACjF,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAA;AAC5C,MAAM,MAAM,KAAK,GAAG,mBAAmB,CAAA;AACvC,MAAM,MAA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eStore } from '../../stores/themeStore.js';
51
51
  import '../../stores/appearanceStore.js';
52
52
  import { agentCreationConfiguration } from '../../stores/agentCreationDefaults.js';
53
53
  import { ArchivedConversationsDialog } from './ArchivedConversationsDialog.js';
54
- import { useAgentChatStore, liveConversations, loadLocalAgentConversations, projectConversationRuntimeEvents, resetAcpContinuationForWorkspaceChange, } from '@xenosystem/agent-conversation/stores/agentChatStore';
54
+ import { useAgentChatStore, liveConversations, followConversationChanges, loadLocalAgentConversations, projectConversationRuntimeEvents, resetAcpContinuationForWorkspaceChange, } from '@xenosystem/agent-conversation/stores/agentChatStore';
55
55
  import { useAgentIdeStore } from '../../stores/agentIdeStore.js';
56
56
  import { useAgentSearchStore } from '../../stores/agentSearchStore.js';
57
57
  import { useWorkspaceStore, } from '../../stores/workspaceStore.js';
58
58
  import { useAuthStore } from '@xenosystem/agent-conversation/stores/authStore';
59
59
  import { sidebarAccountLine, useHostAccount } from './sidebarAccount.js';
60
+ import { remoteHostKind, remoteHostName } from '@xenosystem/agent-conversation/remoteHostName';
60
61
  import { cycleAgentSessionTabId, nextAgentSessionTabAfterClose, normalizeAgentSessionTabState, orderOpenAgentSessionConversations, reorderAgentSessionTabIds, resolveAgentSessionTabShortcut, } from '@xenosystem/agent-conversation/sessionTabs';
61
62
  import { XenoAgentProductHeader, } from '../product/XenoAgentProductHeader.js';
62
63
  import { XenoAgentSessionTabs, } from '../product/XenoAgentSessionTabs.js';
@@ -2278,7 +2279,9 @@ function SidebarFooter({ onOpenAccount, onSelectKnowledge, onSelectPlugins, onSe
2278
2279
  const user = useAuthStore(s => s.user);
2279
2280
  // The desktop app's account lives in the Agent host; the legacy store above is empty there.
2280
2281
  const hostAccount = useHostAccount();
2281
- const { name, detail } = sidebarAccountLine(hostAccount, user);
2282
+ // On another PC the host's account is that PC's business and is not shown to a device: the row says where this is.
2283
+ const controlled = remoteHostName();
2284
+ const { name, detail } = controlled ? { name: controlled, detail: remoteHostKind() ?? 'Your PC, from here' } : sidebarAccountLine(hostAccount, user);
2282
2285
  const tools = [
2283
2286
  ['Knowledge', onSelectKnowledge, _jsx(BookIcon, {}, "k")],
2284
2287
  ['Plugins', onSelectPlugins, _jsx(Package, { className: "w-4 h-4", strokeWidth: 1.5 }, "p")],
@@ -4229,7 +4232,7 @@ function waitForSubagentConversationResult(conversationId, timeoutMs) {
4229
4232
  });
4230
4233
  });
4231
4234
  }
4232
- export default function AgentInterface({ surface = 'embedded', initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, windowControls, } = {}) {
4235
+ export default function AgentInterface({ surface = 'embedded', initialSdkSessionId, initialLaunchMode, initialWorkspaceRoot, initialParityFrame, initialConversationId, onActiveConversationChange, windowControls, } = {}) {
4233
4236
  const [settingsPanel, setSettingsPanel] = useState(null);
4234
4237
  const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
4235
4238
  const [folderPanelOpen, setFolderPanelOpen] = useState(false);
@@ -4330,9 +4333,13 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
4330
4333
  const [selectedConversationId, setSelectedConversationId] = useState(null);
4331
4334
  const [selectedInboxConversationId, setSelectedInboxConversationId] = useState(null);
4332
4335
  const [activeSessionTabId, setActiveSessionTabId] = useState(null);
4336
+ // A surface with its own address for a chat is told which one is on screen, so its address can name it.
4337
+ const reportActiveConversation = useRef(onActiveConversationChange);
4338
+ reportActiveConversation.current = onActiveConversationChange;
4339
+ useEffect(() => { reportActiveConversation.current?.(activeSessionTabId ?? null); }, [activeSessionTabId]);
4333
4340
  const [sessionTabsHydrated, setSessionTabsHydrated] = useState(false);
4334
4341
  /** A window showing another PC, opened from the sidebar on one of its shared chats. */
4335
- const initialRemoteConversationId = useMemo(() => (typeof window === 'undefined' ? null : new URLSearchParams(window.location.search).get('remoteConversationId')), []);
4342
+ const initialRemoteConversationId = useMemo(() => initialConversationId || (typeof window === 'undefined' ? null : new URLSearchParams(window.location.search).get('remoteConversationId')), []);
4336
4343
  const [sessionSplit, setSessionSplit] = useState(null);
4337
4344
  const [rightPanelTabRequest, setRightPanelTabRequest] = useState(null);
4338
4345
  const [toolsHomeOpen, setToolsHomeOpen] = useState(false);
@@ -5520,12 +5527,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
5520
5527
  }, []);
5521
5528
  // A conversation a host operation made (a branch) joins the list without a reload. The load merges with what is in
5522
5529
  // memory and keeps the in-memory copy of every conversation it already has.
5523
- useEffect(() => {
5524
- const unsubscribe = getAgentPlatformBridge()?.agentStorage?.onChanged?.((change) => {
5525
- void loadLocalAgentConversations(change?.conversationIds?.length ? change.conversationIds : undefined);
5526
- });
5527
- return () => { unsubscribe?.(); };
5528
- }, []);
5530
+ useEffect(() => followConversationChanges(), []);
5529
5531
  // Load persisted workspaces and conversations on mount
5530
5532
  useEffect(() => {
5531
5533
  let cancelled = false;