@invergent/agent-chat-react 2.8.7 → 2.8.8
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 +27 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -947,11 +947,15 @@ interface AgentChatProps {
|
|
|
947
947
|
onComposerError?: (err: ChatComposerError) => void;
|
|
948
948
|
/**
|
|
949
949
|
* Browser-profile selection (host-managed). When ``onSelectBrowserProfile``
|
|
950
|
-
* is provided and
|
|
951
|
-
* picker; the host threads the chosen id into session creation.
|
|
950
|
+
* is provided and ``browserProfilesEnabled`` is set, the composer shows a
|
|
951
|
+
* profile picker; the host threads the chosen id into session creation.
|
|
952
|
+
* The picker is shown before a session exists (a profile can only be bound
|
|
953
|
+
* at creation) and is locked once a session is active.
|
|
952
954
|
*/
|
|
953
955
|
browserProfileId?: string | null;
|
|
954
956
|
onSelectBrowserProfile?: (id: string | null) => void;
|
|
957
|
+
/** Whether this agent supports a live browser (gates the profile picker). */
|
|
958
|
+
browserProfilesEnabled?: boolean;
|
|
955
959
|
/**
|
|
956
960
|
* Per-agent capability flag. When true, the composer surfaces the
|
|
957
961
|
* ``/deep-research`` slash command in its builtin menu. Off by
|
|
@@ -996,7 +1000,7 @@ interface AgentChatProps {
|
|
|
996
1000
|
*/
|
|
997
1001
|
onOpenBilling?: () => void;
|
|
998
1002
|
}
|
|
999
|
-
declare function AgentChat({ adapter, agentId, sessionId, onSessionChange, onFileSelect, onMessagesChange, disabled, onComposerError, browserProfileId, onSelectBrowserProfile, deepResearchEnabled, researchEnabled, codeAgentsEnabled, loopsEnabled, missionsEnabled, goalsEnabled, compressEnabled, onOpenIntegrations, onOpenBilling, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
1003
|
+
declare function AgentChat({ adapter, agentId, sessionId, onSessionChange, onFileSelect, onMessagesChange, disabled, onComposerError, browserProfileId, onSelectBrowserProfile, browserProfilesEnabled, deepResearchEnabled, researchEnabled, codeAgentsEnabled, loopsEnabled, missionsEnabled, goalsEnabled, compressEnabled, onOpenIntegrations, onOpenBilling, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
1000
1004
|
|
|
1001
1005
|
interface AgentChatAdapterContextValue {
|
|
1002
1006
|
adapter: AgentChatAdapter;
|
package/dist/index.d.ts
CHANGED
|
@@ -947,11 +947,15 @@ interface AgentChatProps {
|
|
|
947
947
|
onComposerError?: (err: ChatComposerError) => void;
|
|
948
948
|
/**
|
|
949
949
|
* Browser-profile selection (host-managed). When ``onSelectBrowserProfile``
|
|
950
|
-
* is provided and
|
|
951
|
-
* picker; the host threads the chosen id into session creation.
|
|
950
|
+
* is provided and ``browserProfilesEnabled`` is set, the composer shows a
|
|
951
|
+
* profile picker; the host threads the chosen id into session creation.
|
|
952
|
+
* The picker is shown before a session exists (a profile can only be bound
|
|
953
|
+
* at creation) and is locked once a session is active.
|
|
952
954
|
*/
|
|
953
955
|
browserProfileId?: string | null;
|
|
954
956
|
onSelectBrowserProfile?: (id: string | null) => void;
|
|
957
|
+
/** Whether this agent supports a live browser (gates the profile picker). */
|
|
958
|
+
browserProfilesEnabled?: boolean;
|
|
955
959
|
/**
|
|
956
960
|
* Per-agent capability flag. When true, the composer surfaces the
|
|
957
961
|
* ``/deep-research`` slash command in its builtin menu. Off by
|
|
@@ -996,7 +1000,7 @@ interface AgentChatProps {
|
|
|
996
1000
|
*/
|
|
997
1001
|
onOpenBilling?: () => void;
|
|
998
1002
|
}
|
|
999
|
-
declare function AgentChat({ adapter, agentId, sessionId, onSessionChange, onFileSelect, onMessagesChange, disabled, onComposerError, browserProfileId, onSelectBrowserProfile, deepResearchEnabled, researchEnabled, codeAgentsEnabled, loopsEnabled, missionsEnabled, goalsEnabled, compressEnabled, onOpenIntegrations, onOpenBilling, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
1003
|
+
declare function AgentChat({ adapter, agentId, sessionId, onSessionChange, onFileSelect, onMessagesChange, disabled, onComposerError, browserProfileId, onSelectBrowserProfile, browserProfilesEnabled, deepResearchEnabled, researchEnabled, codeAgentsEnabled, loopsEnabled, missionsEnabled, goalsEnabled, compressEnabled, onOpenIntegrations, onOpenBilling, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
1000
1004
|
|
|
1001
1005
|
interface AgentChatAdapterContextValue {
|
|
1002
1006
|
adapter: AgentChatAdapter;
|
package/dist/index.js
CHANGED
|
@@ -6476,6 +6476,8 @@ function ChatComposerInner({
|
|
|
6476
6476
|
canShowBrowser = false,
|
|
6477
6477
|
browserProfileId,
|
|
6478
6478
|
onSelectBrowserProfile,
|
|
6479
|
+
browserProfilesEnabled = false,
|
|
6480
|
+
browserProfileLocked = false,
|
|
6479
6481
|
canShowWorkspace = false,
|
|
6480
6482
|
deepResearchEnabled = false,
|
|
6481
6483
|
researchEnabled = false,
|
|
@@ -6841,7 +6843,23 @@ function ChatComposerInner({
|
|
|
6841
6843
|
children: /* @__PURE__ */ jsx(GlobeIcon, { className: "size-4" })
|
|
6842
6844
|
}
|
|
6843
6845
|
),
|
|
6844
|
-
|
|
6846
|
+
browserProfilesEnabled && onSelectBrowserProfile && adapter.listBrowserProfiles && (browserProfileLocked ? (
|
|
6847
|
+
// A profile is bound at session creation; once a session is
|
|
6848
|
+
// active the choice can't change. Render disabled (via
|
|
6849
|
+
// aria-disabled, not the `disabled` attribute, so the
|
|
6850
|
+
// tooltip still shows on hover) with an explanation.
|
|
6851
|
+
/* @__PURE__ */ jsx(
|
|
6852
|
+
PromptInputButton,
|
|
6853
|
+
{
|
|
6854
|
+
"aria-label": "Select browser profile",
|
|
6855
|
+
"aria-disabled": true,
|
|
6856
|
+
"aria-pressed": !!browserProfileId,
|
|
6857
|
+
tooltip: "A browser profile must be chosen before starting the session",
|
|
6858
|
+
className: `cursor-not-allowed opacity-50 ${browserProfileId ? "bg-accent text-foreground" : ""}`,
|
|
6859
|
+
children: /* @__PURE__ */ jsx(IdCardIcon, { className: "size-4" })
|
|
6860
|
+
}
|
|
6861
|
+
)
|
|
6862
|
+
) : /* @__PURE__ */ jsxs(
|
|
6845
6863
|
Popover,
|
|
6846
6864
|
{
|
|
6847
6865
|
open: profileMenuOpen,
|
|
@@ -6894,7 +6912,7 @@ function ChatComposerInner({
|
|
|
6894
6912
|
)
|
|
6895
6913
|
]
|
|
6896
6914
|
}
|
|
6897
|
-
),
|
|
6915
|
+
)),
|
|
6898
6916
|
canShowWorkspace && onToggleWorkspace && /* @__PURE__ */ jsx(
|
|
6899
6917
|
PromptInputButton,
|
|
6900
6918
|
{
|
|
@@ -10062,6 +10080,8 @@ function ChatThread({
|
|
|
10062
10080
|
canShowBrowser = false,
|
|
10063
10081
|
browserProfileId,
|
|
10064
10082
|
onSelectBrowserProfile,
|
|
10083
|
+
browserProfilesEnabled = false,
|
|
10084
|
+
browserProfileLocked = false,
|
|
10065
10085
|
canShowWorkspace = false,
|
|
10066
10086
|
viewMode = "simple",
|
|
10067
10087
|
onViewModeChange,
|
|
@@ -10135,6 +10155,8 @@ function ChatThread({
|
|
|
10135
10155
|
canShowBrowser,
|
|
10136
10156
|
browserProfileId,
|
|
10137
10157
|
onSelectBrowserProfile,
|
|
10158
|
+
browserProfilesEnabled,
|
|
10159
|
+
browserProfileLocked,
|
|
10138
10160
|
canShowWorkspace,
|
|
10139
10161
|
viewMode,
|
|
10140
10162
|
onViewModeChange,
|
|
@@ -12645,6 +12667,7 @@ function AgentChat({
|
|
|
12645
12667
|
onComposerError,
|
|
12646
12668
|
browserProfileId,
|
|
12647
12669
|
onSelectBrowserProfile,
|
|
12670
|
+
browserProfilesEnabled = false,
|
|
12648
12671
|
deepResearchEnabled = false,
|
|
12649
12672
|
researchEnabled = false,
|
|
12650
12673
|
codeAgentsEnabled = false,
|
|
@@ -12796,6 +12819,8 @@ function AgentChat({
|
|
|
12796
12819
|
onComposerError,
|
|
12797
12820
|
browserProfileId,
|
|
12798
12821
|
onSelectBrowserProfile,
|
|
12822
|
+
browserProfilesEnabled,
|
|
12823
|
+
browserProfileLocked: !!sessionId,
|
|
12799
12824
|
showBrowser,
|
|
12800
12825
|
onToggleBrowser: handleToggleBrowser,
|
|
12801
12826
|
showWorkspace,
|