@invergent/agent-chat-react 2.8.7 → 2.8.9

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/index.cjs CHANGED
@@ -6765,6 +6765,8 @@ function ChatComposerInner({
6765
6765
  canShowBrowser = false,
6766
6766
  browserProfileId,
6767
6767
  onSelectBrowserProfile,
6768
+ browserProfilesEnabled = false,
6769
+ browserProfileLocked = false,
6768
6770
  canShowWorkspace = false,
6769
6771
  deepResearchEnabled = false,
6770
6772
  researchEnabled = false,
@@ -7130,7 +7132,23 @@ function ChatComposerInner({
7130
7132
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GlobeIcon, { className: "size-4" })
7131
7133
  }
7132
7134
  ),
7133
- canShowBrowser && onSelectBrowserProfile && adapter.listBrowserProfiles && /* @__PURE__ */ jsxRuntime.jsxs(
7135
+ browserProfilesEnabled && onSelectBrowserProfile && adapter.listBrowserProfiles && (browserProfileLocked ? (
7136
+ // A profile is bound at session creation; once a session is
7137
+ // active the choice can't change. Render disabled (via
7138
+ // aria-disabled, not the `disabled` attribute, so the
7139
+ // tooltip still shows on hover) with an explanation.
7140
+ /* @__PURE__ */ jsxRuntime.jsx(
7141
+ PromptInputButton,
7142
+ {
7143
+ "aria-label": "Select browser profile",
7144
+ "aria-disabled": true,
7145
+ "aria-pressed": !!browserProfileId,
7146
+ tooltip: "A browser profile must be chosen before starting the session",
7147
+ className: `cursor-not-allowed opacity-50 ${browserProfileId ? "bg-accent text-foreground" : ""}`,
7148
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.IdCardIcon, { className: "size-4" })
7149
+ }
7150
+ )
7151
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
7134
7152
  Popover,
7135
7153
  {
7136
7154
  open: profileMenuOpen,
@@ -7183,7 +7201,7 @@ function ChatComposerInner({
7183
7201
  )
7184
7202
  ]
7185
7203
  }
7186
- ),
7204
+ )),
7187
7205
  canShowWorkspace && onToggleWorkspace && /* @__PURE__ */ jsxRuntime.jsx(
7188
7206
  PromptInputButton,
7189
7207
  {
@@ -10372,6 +10390,8 @@ function ChatThread({
10372
10390
  canShowBrowser = false,
10373
10391
  browserProfileId,
10374
10392
  onSelectBrowserProfile,
10393
+ browserProfilesEnabled = false,
10394
+ browserProfileLocked = false,
10375
10395
  canShowWorkspace = false,
10376
10396
  viewMode = "simple",
10377
10397
  onViewModeChange,
@@ -10445,6 +10465,8 @@ function ChatThread({
10445
10465
  canShowBrowser,
10446
10466
  browserProfileId,
10447
10467
  onSelectBrowserProfile,
10468
+ browserProfilesEnabled,
10469
+ browserProfileLocked,
10448
10470
  canShowWorkspace,
10449
10471
  viewMode,
10450
10472
  onViewModeChange,
@@ -12964,6 +12986,7 @@ function AgentChat({
12964
12986
  onComposerError,
12965
12987
  browserProfileId,
12966
12988
  onSelectBrowserProfile,
12989
+ browserProfilesEnabled = false,
12967
12990
  deepResearchEnabled = false,
12968
12991
  researchEnabled = false,
12969
12992
  codeAgentsEnabled = false,
@@ -13115,6 +13138,8 @@ function AgentChat({
13115
13138
  onComposerError,
13116
13139
  browserProfileId,
13117
13140
  onSelectBrowserProfile,
13141
+ browserProfilesEnabled,
13142
+ browserProfileLocked: !!sessionId,
13118
13143
  showBrowser,
13119
13144
  onToggleBrowser: handleToggleBrowser,
13120
13145
  showWorkspace,