@invergent/agent-chat-react 2.8.6 → 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 +189 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -3
- package/dist/index.d.ts +40 -3
- package/dist/index.js +190 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -353,6 +353,8 @@ interface AgentChatInboxItem {
|
|
|
353
353
|
updatedAt: string;
|
|
354
354
|
readAt: string | null;
|
|
355
355
|
respondedAt: string | null;
|
|
356
|
+
agentId?: string | null;
|
|
357
|
+
agentSlug?: string | null;
|
|
356
358
|
}
|
|
357
359
|
interface AgentChatInboxList {
|
|
358
360
|
items: AgentChatInboxItem[];
|
|
@@ -384,6 +386,14 @@ interface AgentChatBrowserState {
|
|
|
384
386
|
status: "provisioning" | "live" | "user-control" | "closed";
|
|
385
387
|
controlOwner: string | null;
|
|
386
388
|
}
|
|
389
|
+
interface AgentChatBrowserProfile {
|
|
390
|
+
id: string;
|
|
391
|
+
name: string;
|
|
392
|
+
cookieDomains: string[];
|
|
393
|
+
hasState: boolean;
|
|
394
|
+
createdAt: string;
|
|
395
|
+
lastUsedAt: string | null;
|
|
396
|
+
}
|
|
387
397
|
interface AgentChatBrowserPreviewSnapshot {
|
|
388
398
|
src: string;
|
|
389
399
|
capturedAt?: string;
|
|
@@ -831,6 +841,8 @@ interface AgentChatAdapter {
|
|
|
831
841
|
acquireBrowserControl(sessionId: string): Promise<AgentChatBrowserControlResponse>;
|
|
832
842
|
releaseBrowserControl(sessionId: string): Promise<void>;
|
|
833
843
|
browserLiveViewUrl(sessionId: string): string;
|
|
844
|
+
/** List the caller's saved browser profiles (optional capability). */
|
|
845
|
+
listBrowserProfiles?(): Promise<AgentChatBrowserProfile[]>;
|
|
834
846
|
/**
|
|
835
847
|
* Permanently terminate the session's browser sandbox (destroys the
|
|
836
848
|
* pod / container, drops the registry entry). Optional — when
|
|
@@ -933,6 +945,17 @@ interface AgentChatProps {
|
|
|
933
945
|
* their toast system; the SDK does not surface these on its own.
|
|
934
946
|
*/
|
|
935
947
|
onComposerError?: (err: ChatComposerError) => void;
|
|
948
|
+
/**
|
|
949
|
+
* Browser-profile selection (host-managed). When ``onSelectBrowserProfile``
|
|
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.
|
|
954
|
+
*/
|
|
955
|
+
browserProfileId?: string | null;
|
|
956
|
+
onSelectBrowserProfile?: (id: string | null) => void;
|
|
957
|
+
/** Whether this agent supports a live browser (gates the profile picker). */
|
|
958
|
+
browserProfilesEnabled?: boolean;
|
|
936
959
|
/**
|
|
937
960
|
* Per-agent capability flag. When true, the composer surfaces the
|
|
938
961
|
* ``/deep-research`` slash command in its builtin menu. Off by
|
|
@@ -977,7 +1000,7 @@ interface AgentChatProps {
|
|
|
977
1000
|
*/
|
|
978
1001
|
onOpenBilling?: () => void;
|
|
979
1002
|
}
|
|
980
|
-
declare function AgentChat({ adapter, agentId, sessionId, onSessionChange, onFileSelect, onMessagesChange, disabled, onComposerError, 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;
|
|
981
1004
|
|
|
982
1005
|
interface AgentChatAdapterContextValue {
|
|
983
1006
|
adapter: AgentChatAdapter;
|
|
@@ -1039,6 +1062,19 @@ declare class FetchSseEventStream {
|
|
|
1039
1062
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
1040
1063
|
declare const MessageResponse: React.MemoExoticComponent<({ className, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
1041
1064
|
|
|
1065
|
+
interface BrowserLiveViewProps {
|
|
1066
|
+
src: string;
|
|
1067
|
+
testId?: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* Called when the RFB connection drops *unexpectedly* (server close on
|
|
1070
|
+
* control-lease expiry, network blip, security failure) — not on intentional
|
|
1071
|
+
* unmount. ``clean`` mirrors noVNC's ``disconnect`` detail. The pane uses
|
|
1072
|
+
* this to drop local control state and fall back to the preview snapshot.
|
|
1073
|
+
*/
|
|
1074
|
+
onDisconnect?: (clean: boolean) => void;
|
|
1075
|
+
}
|
|
1076
|
+
declare function BrowserLiveView({ src, testId, onDisconnect, }: BrowserLiveViewProps): react_jsx_runtime.JSX.Element;
|
|
1077
|
+
|
|
1042
1078
|
interface ComposioConnectCardProps {
|
|
1043
1079
|
/** The Composio hosted connect URL (connect.composio.dev/link/…). */
|
|
1044
1080
|
url: string;
|
|
@@ -1092,12 +1128,13 @@ interface CodingAgentsPanelProps {
|
|
|
1092
1128
|
*/
|
|
1093
1129
|
declare function CodingAgentsPanel({ agentId, adapter, onBack }: CodingAgentsPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1094
1130
|
|
|
1131
|
+
type OnSessionSelect = (sessionId: string, item?: AgentChatInboxItem) => void;
|
|
1095
1132
|
interface InboxPanelProps {
|
|
1096
1133
|
adapter: AgentChatAdapter;
|
|
1097
1134
|
title?: string;
|
|
1098
1135
|
selectedId?: number | null;
|
|
1099
1136
|
onSelectedIdChange?: (itemId: number | null) => void;
|
|
1100
|
-
onSessionSelect?:
|
|
1137
|
+
onSessionSelect?: OnSessionSelect;
|
|
1101
1138
|
hideHeader?: boolean;
|
|
1102
1139
|
limit?: number;
|
|
1103
1140
|
}
|
|
@@ -1288,4 +1325,4 @@ interface SessionTreePanelProps {
|
|
|
1288
1325
|
}
|
|
1289
1326
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1290
1327
|
|
|
1291
|
-
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatEventsPage, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatIdeaNode, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionResearch, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatPolledEvent, type AgentChatProps, type AgentChatResearchRun, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, FetchSseEventStream, type FetchSseEventStreamOptions, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
1328
|
+
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatBrowserProfile, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatEventsPage, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatIdeaNode, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionResearch, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatPolledEvent, type AgentChatProps, type AgentChatResearchRun, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, BrowserLiveView, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, FetchSseEventStream, type FetchSseEventStreamOptions, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
package/dist/index.d.ts
CHANGED
|
@@ -353,6 +353,8 @@ interface AgentChatInboxItem {
|
|
|
353
353
|
updatedAt: string;
|
|
354
354
|
readAt: string | null;
|
|
355
355
|
respondedAt: string | null;
|
|
356
|
+
agentId?: string | null;
|
|
357
|
+
agentSlug?: string | null;
|
|
356
358
|
}
|
|
357
359
|
interface AgentChatInboxList {
|
|
358
360
|
items: AgentChatInboxItem[];
|
|
@@ -384,6 +386,14 @@ interface AgentChatBrowserState {
|
|
|
384
386
|
status: "provisioning" | "live" | "user-control" | "closed";
|
|
385
387
|
controlOwner: string | null;
|
|
386
388
|
}
|
|
389
|
+
interface AgentChatBrowserProfile {
|
|
390
|
+
id: string;
|
|
391
|
+
name: string;
|
|
392
|
+
cookieDomains: string[];
|
|
393
|
+
hasState: boolean;
|
|
394
|
+
createdAt: string;
|
|
395
|
+
lastUsedAt: string | null;
|
|
396
|
+
}
|
|
387
397
|
interface AgentChatBrowserPreviewSnapshot {
|
|
388
398
|
src: string;
|
|
389
399
|
capturedAt?: string;
|
|
@@ -831,6 +841,8 @@ interface AgentChatAdapter {
|
|
|
831
841
|
acquireBrowserControl(sessionId: string): Promise<AgentChatBrowserControlResponse>;
|
|
832
842
|
releaseBrowserControl(sessionId: string): Promise<void>;
|
|
833
843
|
browserLiveViewUrl(sessionId: string): string;
|
|
844
|
+
/** List the caller's saved browser profiles (optional capability). */
|
|
845
|
+
listBrowserProfiles?(): Promise<AgentChatBrowserProfile[]>;
|
|
834
846
|
/**
|
|
835
847
|
* Permanently terminate the session's browser sandbox (destroys the
|
|
836
848
|
* pod / container, drops the registry entry). Optional — when
|
|
@@ -933,6 +945,17 @@ interface AgentChatProps {
|
|
|
933
945
|
* their toast system; the SDK does not surface these on its own.
|
|
934
946
|
*/
|
|
935
947
|
onComposerError?: (err: ChatComposerError) => void;
|
|
948
|
+
/**
|
|
949
|
+
* Browser-profile selection (host-managed). When ``onSelectBrowserProfile``
|
|
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.
|
|
954
|
+
*/
|
|
955
|
+
browserProfileId?: string | null;
|
|
956
|
+
onSelectBrowserProfile?: (id: string | null) => void;
|
|
957
|
+
/** Whether this agent supports a live browser (gates the profile picker). */
|
|
958
|
+
browserProfilesEnabled?: boolean;
|
|
936
959
|
/**
|
|
937
960
|
* Per-agent capability flag. When true, the composer surfaces the
|
|
938
961
|
* ``/deep-research`` slash command in its builtin menu. Off by
|
|
@@ -977,7 +1000,7 @@ interface AgentChatProps {
|
|
|
977
1000
|
*/
|
|
978
1001
|
onOpenBilling?: () => void;
|
|
979
1002
|
}
|
|
980
|
-
declare function AgentChat({ adapter, agentId, sessionId, onSessionChange, onFileSelect, onMessagesChange, disabled, onComposerError, 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;
|
|
981
1004
|
|
|
982
1005
|
interface AgentChatAdapterContextValue {
|
|
983
1006
|
adapter: AgentChatAdapter;
|
|
@@ -1039,6 +1062,19 @@ declare class FetchSseEventStream {
|
|
|
1039
1062
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
1040
1063
|
declare const MessageResponse: React.MemoExoticComponent<({ className, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
1041
1064
|
|
|
1065
|
+
interface BrowserLiveViewProps {
|
|
1066
|
+
src: string;
|
|
1067
|
+
testId?: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* Called when the RFB connection drops *unexpectedly* (server close on
|
|
1070
|
+
* control-lease expiry, network blip, security failure) — not on intentional
|
|
1071
|
+
* unmount. ``clean`` mirrors noVNC's ``disconnect`` detail. The pane uses
|
|
1072
|
+
* this to drop local control state and fall back to the preview snapshot.
|
|
1073
|
+
*/
|
|
1074
|
+
onDisconnect?: (clean: boolean) => void;
|
|
1075
|
+
}
|
|
1076
|
+
declare function BrowserLiveView({ src, testId, onDisconnect, }: BrowserLiveViewProps): react_jsx_runtime.JSX.Element;
|
|
1077
|
+
|
|
1042
1078
|
interface ComposioConnectCardProps {
|
|
1043
1079
|
/** The Composio hosted connect URL (connect.composio.dev/link/…). */
|
|
1044
1080
|
url: string;
|
|
@@ -1092,12 +1128,13 @@ interface CodingAgentsPanelProps {
|
|
|
1092
1128
|
*/
|
|
1093
1129
|
declare function CodingAgentsPanel({ agentId, adapter, onBack }: CodingAgentsPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1094
1130
|
|
|
1131
|
+
type OnSessionSelect = (sessionId: string, item?: AgentChatInboxItem) => void;
|
|
1095
1132
|
interface InboxPanelProps {
|
|
1096
1133
|
adapter: AgentChatAdapter;
|
|
1097
1134
|
title?: string;
|
|
1098
1135
|
selectedId?: number | null;
|
|
1099
1136
|
onSelectedIdChange?: (itemId: number | null) => void;
|
|
1100
|
-
onSessionSelect?:
|
|
1137
|
+
onSessionSelect?: OnSessionSelect;
|
|
1101
1138
|
hideHeader?: boolean;
|
|
1102
1139
|
limit?: number;
|
|
1103
1140
|
}
|
|
@@ -1288,4 +1325,4 @@ interface SessionTreePanelProps {
|
|
|
1288
1325
|
}
|
|
1289
1326
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1290
1327
|
|
|
1291
|
-
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatEventsPage, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatIdeaNode, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionResearch, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatPolledEvent, type AgentChatProps, type AgentChatResearchRun, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, FetchSseEventStream, type FetchSseEventStreamOptions, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
1328
|
+
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatBrowserProfile, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatEventsPage, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatIdeaNode, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionResearch, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatPolledEvent, type AgentChatProps, type AgentChatResearchRun, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, BrowserLiveView, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, FetchSseEventStream, type FetchSseEventStreamOptions, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn, __publicField } from './chunk-47MF6JUW.js';
|
|
2
2
|
import { createContext, memo, useRef, useEffect, useCallback, useMemo, useState, useLayoutEffect, lazy, useContext, Fragment as Fragment$1, Children, Suspense } from 'react';
|
|
3
|
-
import { ChevronDownIcon, AlertTriangle, ChevronDown, ChevronRight, RefreshCw, CreditCard, File as File$1, FileImage, FileAudio, FileVideo, FileText, FileCode, FileArchive, FileSpreadsheet, PlugZapIcon, ChevronRightIcon, ArrowLeftIcon, Loader2Icon, InboxIcon, Loader2, AlertCircle, Pause, Play, Ban, TargetIcon, CalendarClockIcon, UsersIcon, MessageSquareIcon, ZapIcon, Maximize2Icon, FolderOpenIcon, UploadIcon, RefreshCwIcon, AlertCircleIcon, ExternalLinkIcon, ClipboardCheckIcon, ShieldAlertIcon, TimerIcon, CircleDotIcon, XIcon, Trash2Icon, SquareIcon, ArrowDownIcon, RotateCcwIcon, MousePointer2Icon, DownloadIcon, TrashIcon, ImageIcon, FileTextIcon, CheckIcon, Clock, ArrowRight, TerminalIcon, SparklesIcon, ClockIcon, PlusIcon, CloudIcon, HardDriveIcon, PaperclipIcon, GlobeIcon, FolderIcon, CopyIcon, FileIcon, ChevronLeftIcon, MinusIcon, SearchIcon, CircleDot, XCircle, CheckCircle2, ArrowUpIcon, CircleCheckIcon, ThumbsUpIcon, ThumbsDownIcon, BookOpenIcon, GitBranchIcon, ActivityIcon, EyeIcon, ListTodoIcon, BotIcon, ListIcon, PenLineIcon, FileEditIcon, WrenchIcon, FileCodeIcon, CodeIcon, FileArchiveIcon, FileVideoIcon, FileAudioIcon, FileImageIcon, FileChartLineIcon, FileSpreadsheetIcon, XCircleIcon, CheckCircle2Icon, Code, CircleXIcon, SkullIcon, CheckCircleIcon, CircleIcon } from 'lucide-react';
|
|
3
|
+
import { ChevronDownIcon, AlertTriangle, ChevronDown, ChevronRight, RefreshCw, CreditCard, File as File$1, FileImage, FileAudio, FileVideo, FileText, FileCode, FileArchive, FileSpreadsheet, PlugZapIcon, ChevronRightIcon, ArrowLeftIcon, Loader2Icon, InboxIcon, Loader2, AlertCircle, Pause, Play, Ban, TargetIcon, CalendarClockIcon, UsersIcon, MessageSquareIcon, ZapIcon, Maximize2Icon, FolderOpenIcon, UploadIcon, RefreshCwIcon, AlertCircleIcon, ExternalLinkIcon, ClipboardCheckIcon, ShieldAlertIcon, TimerIcon, CircleDotIcon, XIcon, Trash2Icon, SquareIcon, ArrowDownIcon, RotateCcwIcon, MousePointer2Icon, DownloadIcon, TrashIcon, ImageIcon, FileTextIcon, CheckIcon, Clock, ArrowRight, TerminalIcon, SparklesIcon, ClockIcon, PlusIcon, CloudIcon, HardDriveIcon, PaperclipIcon, GlobeIcon, IdCardIcon, FolderIcon, CopyIcon, FileIcon, ChevronLeftIcon, MinusIcon, SearchIcon, CircleDot, XCircle, CheckCircle2, ArrowUpIcon, CircleCheckIcon, ThumbsUpIcon, ThumbsDownIcon, BookOpenIcon, GitBranchIcon, ActivityIcon, EyeIcon, ListTodoIcon, BotIcon, ListIcon, PenLineIcon, FileEditIcon, WrenchIcon, FileCodeIcon, CodeIcon, FileArchiveIcon, FileVideoIcon, FileAudioIcon, FileImageIcon, FileChartLineIcon, FileSpreadsheetIcon, XCircleIcon, CheckCircle2Icon, Code, CircleXIcon, SkullIcon, CheckCircleIcon, CircleIcon } from 'lucide-react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { Collapsible as Collapsible$1, Slot, Tooltip as Tooltip$1, Progress as Progress$1, Tabs as Tabs$1, Dialog as Dialog$1, ScrollArea as ScrollArea$1, Popover as Popover$1 } from 'radix-ui';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -364,6 +364,13 @@ function BrowserControlBar({
|
|
|
364
364
|
)
|
|
365
365
|
] });
|
|
366
366
|
}
|
|
367
|
+
var MIN_ZOOM = 1;
|
|
368
|
+
var MAX_ZOOM = 3;
|
|
369
|
+
var ZOOM_STEP = 0.5;
|
|
370
|
+
function clampZoom(zoom) {
|
|
371
|
+
const bounded = Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, zoom));
|
|
372
|
+
return Math.round(bounded * 100) / 100;
|
|
373
|
+
}
|
|
367
374
|
function toWsUrl(src) {
|
|
368
375
|
const url = new URL(src, window.location.href);
|
|
369
376
|
if (url.protocol === "http:") {
|
|
@@ -382,10 +389,12 @@ function BrowserLiveView({
|
|
|
382
389
|
const onDisconnectRef = useRef(onDisconnect);
|
|
383
390
|
onDisconnectRef.current = onDisconnect;
|
|
384
391
|
const [state, setState] = useState("connecting");
|
|
392
|
+
const [zoom, setZoom] = useState(MIN_ZOOM);
|
|
385
393
|
useEffect(() => {
|
|
386
394
|
const container = containerRef.current;
|
|
387
395
|
if (!container) return;
|
|
388
396
|
setState("connecting");
|
|
397
|
+
setZoom(MIN_ZOOM);
|
|
389
398
|
let rfb;
|
|
390
399
|
let disposed = false;
|
|
391
400
|
const handleConnect = () => setState("connected");
|
|
@@ -416,8 +425,68 @@ function BrowserLiveView({
|
|
|
416
425
|
}
|
|
417
426
|
};
|
|
418
427
|
}, [src]);
|
|
428
|
+
const keepCanvasFocus = (event) => event.preventDefault();
|
|
429
|
+
const zoomTo = (next) => setZoom((current) => clampZoom(next || current));
|
|
419
430
|
return /* @__PURE__ */ jsxs("div", { className: "relative h-full w-full bg-black", children: [
|
|
420
|
-
/* @__PURE__ */ jsx("div", {
|
|
431
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-auto", children: /* @__PURE__ */ jsx(
|
|
432
|
+
"div",
|
|
433
|
+
{
|
|
434
|
+
ref: containerRef,
|
|
435
|
+
"data-testid": testId,
|
|
436
|
+
style: { width: `${zoom * 100}%`, height: `${zoom * 100}%` }
|
|
437
|
+
}
|
|
438
|
+
) }),
|
|
439
|
+
state === "connected" && /* @__PURE__ */ jsxs(
|
|
440
|
+
"div",
|
|
441
|
+
{
|
|
442
|
+
"data-testid": "browser-rfb-zoom",
|
|
443
|
+
className: "absolute bottom-3 right-3 flex items-center gap-0.5 rounded-md border border-line bg-card/90 p-0.5 text-muted-foreground shadow-sm backdrop-blur",
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ jsx(
|
|
446
|
+
"button",
|
|
447
|
+
{
|
|
448
|
+
type: "button",
|
|
449
|
+
tabIndex: -1,
|
|
450
|
+
"aria-label": "Zoom out",
|
|
451
|
+
disabled: zoom <= MIN_ZOOM,
|
|
452
|
+
onMouseDown: keepCanvasFocus,
|
|
453
|
+
onClick: () => zoomTo(zoom - ZOOM_STEP),
|
|
454
|
+
className: "flex size-6 items-center justify-center rounded text-sm leading-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-40",
|
|
455
|
+
children: "\u2212"
|
|
456
|
+
}
|
|
457
|
+
),
|
|
458
|
+
/* @__PURE__ */ jsxs(
|
|
459
|
+
"button",
|
|
460
|
+
{
|
|
461
|
+
type: "button",
|
|
462
|
+
tabIndex: -1,
|
|
463
|
+
"aria-label": "Reset zoom",
|
|
464
|
+
disabled: zoom === MIN_ZOOM,
|
|
465
|
+
onMouseDown: keepCanvasFocus,
|
|
466
|
+
onClick: () => setZoom(MIN_ZOOM),
|
|
467
|
+
className: "min-w-10 rounded px-1 text-center text-xs tabular-nums hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none",
|
|
468
|
+
children: [
|
|
469
|
+
Math.round(zoom * 100),
|
|
470
|
+
"%"
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
),
|
|
474
|
+
/* @__PURE__ */ jsx(
|
|
475
|
+
"button",
|
|
476
|
+
{
|
|
477
|
+
type: "button",
|
|
478
|
+
tabIndex: -1,
|
|
479
|
+
"aria-label": "Zoom in",
|
|
480
|
+
disabled: zoom >= MAX_ZOOM,
|
|
481
|
+
onMouseDown: keepCanvasFocus,
|
|
482
|
+
onClick: () => zoomTo(zoom + ZOOM_STEP),
|
|
483
|
+
className: "flex size-6 items-center justify-center rounded text-sm leading-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-40",
|
|
484
|
+
children: "+"
|
|
485
|
+
}
|
|
486
|
+
)
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
),
|
|
421
490
|
state !== "connected" && /* @__PURE__ */ jsx(
|
|
422
491
|
"div",
|
|
423
492
|
{
|
|
@@ -6405,6 +6474,10 @@ function ChatComposerInner({
|
|
|
6405
6474
|
showWorkspace = false,
|
|
6406
6475
|
onToggleWorkspace,
|
|
6407
6476
|
canShowBrowser = false,
|
|
6477
|
+
browserProfileId,
|
|
6478
|
+
onSelectBrowserProfile,
|
|
6479
|
+
browserProfilesEnabled = false,
|
|
6480
|
+
browserProfileLocked = false,
|
|
6408
6481
|
canShowWorkspace = false,
|
|
6409
6482
|
deepResearchEnabled = false,
|
|
6410
6483
|
researchEnabled = false,
|
|
@@ -6417,6 +6490,20 @@ function ChatComposerInner({
|
|
|
6417
6490
|
onViewModeChange
|
|
6418
6491
|
}) {
|
|
6419
6492
|
const { adapter } = useAgentChatAdapterContext();
|
|
6493
|
+
const [profileMenuOpen, setProfileMenuOpen] = useState(false);
|
|
6494
|
+
const [browserProfiles, setBrowserProfiles] = useState([]);
|
|
6495
|
+
useEffect(() => {
|
|
6496
|
+
if (!profileMenuOpen || !adapter.listBrowserProfiles) return;
|
|
6497
|
+
let cancelled = false;
|
|
6498
|
+
void adapter.listBrowserProfiles().then((p) => {
|
|
6499
|
+
if (!cancelled) setBrowserProfiles(p);
|
|
6500
|
+
}).catch(() => {
|
|
6501
|
+
if (!cancelled) setBrowserProfiles([]);
|
|
6502
|
+
});
|
|
6503
|
+
return () => {
|
|
6504
|
+
cancelled = true;
|
|
6505
|
+
};
|
|
6506
|
+
}, [profileMenuOpen, adapter]);
|
|
6420
6507
|
const { textInput, attachments } = usePromptInputController();
|
|
6421
6508
|
const status = isRunning ? "streaming" : disabled ? "error" : "ready";
|
|
6422
6509
|
const [adapterCommands, setAdapterCommands] = useState([]);
|
|
@@ -6756,6 +6843,76 @@ function ChatComposerInner({
|
|
|
6756
6843
|
children: /* @__PURE__ */ jsx(GlobeIcon, { className: "size-4" })
|
|
6757
6844
|
}
|
|
6758
6845
|
),
|
|
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(
|
|
6863
|
+
Popover,
|
|
6864
|
+
{
|
|
6865
|
+
open: profileMenuOpen,
|
|
6866
|
+
onOpenChange: setProfileMenuOpen,
|
|
6867
|
+
children: [
|
|
6868
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
6869
|
+
PromptInputButton,
|
|
6870
|
+
{
|
|
6871
|
+
"aria-label": "Select browser profile",
|
|
6872
|
+
"aria-pressed": !!browserProfileId,
|
|
6873
|
+
className: browserProfileId ? "bg-accent text-foreground" : void 0,
|
|
6874
|
+
children: /* @__PURE__ */ jsx(IdCardIcon, { className: "size-4" })
|
|
6875
|
+
}
|
|
6876
|
+
) }),
|
|
6877
|
+
/* @__PURE__ */ jsx(
|
|
6878
|
+
PopoverContent,
|
|
6879
|
+
{
|
|
6880
|
+
side: "top",
|
|
6881
|
+
align: "start",
|
|
6882
|
+
className: "w-64 overflow-hidden rounded-xl p-1",
|
|
6883
|
+
children: /* @__PURE__ */ jsx(Command, { children: /* @__PURE__ */ jsxs(CommandList, { children: [
|
|
6884
|
+
/* @__PURE__ */ jsx(
|
|
6885
|
+
CommandItem,
|
|
6886
|
+
{
|
|
6887
|
+
onSelect: () => {
|
|
6888
|
+
setProfileMenuOpen(false);
|
|
6889
|
+
onSelectBrowserProfile(null);
|
|
6890
|
+
},
|
|
6891
|
+
className: "gap-3 rounded-md px-3 py-2",
|
|
6892
|
+
children: "No profile"
|
|
6893
|
+
}
|
|
6894
|
+
),
|
|
6895
|
+
browserProfiles.map((p) => /* @__PURE__ */ jsxs(
|
|
6896
|
+
CommandItem,
|
|
6897
|
+
{
|
|
6898
|
+
onSelect: () => {
|
|
6899
|
+
setProfileMenuOpen(false);
|
|
6900
|
+
onSelectBrowserProfile(p.id);
|
|
6901
|
+
},
|
|
6902
|
+
className: "gap-3 rounded-md px-3 py-2",
|
|
6903
|
+
children: [
|
|
6904
|
+
p.name,
|
|
6905
|
+
browserProfileId === p.id && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: "Active" })
|
|
6906
|
+
]
|
|
6907
|
+
},
|
|
6908
|
+
p.id
|
|
6909
|
+
))
|
|
6910
|
+
] }) })
|
|
6911
|
+
}
|
|
6912
|
+
)
|
|
6913
|
+
]
|
|
6914
|
+
}
|
|
6915
|
+
)),
|
|
6759
6916
|
canShowWorkspace && onToggleWorkspace && /* @__PURE__ */ jsx(
|
|
6760
6917
|
PromptInputButton,
|
|
6761
6918
|
{
|
|
@@ -7460,9 +7617,9 @@ function ArtifactTable({ spec }) {
|
|
|
7460
7617
|
}
|
|
7461
7618
|
var DEFAULT_HEIGHT_PX = 480;
|
|
7462
7619
|
var EXPANDED_HEIGHT_PX = 800;
|
|
7463
|
-
var
|
|
7464
|
-
var
|
|
7465
|
-
var
|
|
7620
|
+
var MIN_ZOOM2 = 0.5;
|
|
7621
|
+
var MAX_ZOOM2 = 2;
|
|
7622
|
+
var ZOOM_STEP2 = 0.1;
|
|
7466
7623
|
var SAFETY_STYLE_PREAMBLE = "<style>html,body{max-height:100vh}canvas{max-height:80vh!important}</style>";
|
|
7467
7624
|
function injectSafetyStyle(html) {
|
|
7468
7625
|
const headCloseIdx = html.search(/<\/head\s*>/i);
|
|
@@ -7479,7 +7636,7 @@ function ArtifactHtml({
|
|
|
7479
7636
|
const [zoom, setZoom] = useState(1);
|
|
7480
7637
|
const safeSrcdoc = useMemo(() => injectSafetyStyle(spec.html), [spec.html]);
|
|
7481
7638
|
const viewportHeight = expanded ? EXPANDED_HEIGHT_PX : DEFAULT_HEIGHT_PX;
|
|
7482
|
-
const clamp = (v) => Math.round(Math.min(
|
|
7639
|
+
const clamp = (v) => Math.round(Math.min(MAX_ZOOM2, Math.max(MIN_ZOOM2, v)) * 100) / 100;
|
|
7483
7640
|
return /* @__PURE__ */ jsxs(
|
|
7484
7641
|
"div",
|
|
7485
7642
|
{
|
|
@@ -7525,8 +7682,8 @@ function ArtifactHtml({
|
|
|
7525
7682
|
"button",
|
|
7526
7683
|
{
|
|
7527
7684
|
type: "button",
|
|
7528
|
-
onClick: () => setZoom((z) => clamp(z -
|
|
7529
|
-
disabled: zoom <=
|
|
7685
|
+
onClick: () => setZoom((z) => clamp(z - ZOOM_STEP2)),
|
|
7686
|
+
disabled: zoom <= MIN_ZOOM2,
|
|
7530
7687
|
className: "hover:text-foreground disabled:opacity-40 cursor-pointer",
|
|
7531
7688
|
"aria-label": "zoom out",
|
|
7532
7689
|
children: "\u2212"
|
|
@@ -7549,8 +7706,8 @@ function ArtifactHtml({
|
|
|
7549
7706
|
"button",
|
|
7550
7707
|
{
|
|
7551
7708
|
type: "button",
|
|
7552
|
-
onClick: () => setZoom((z) => clamp(z +
|
|
7553
|
-
disabled: zoom >=
|
|
7709
|
+
onClick: () => setZoom((z) => clamp(z + ZOOM_STEP2)),
|
|
7710
|
+
disabled: zoom >= MAX_ZOOM2,
|
|
7554
7711
|
className: "hover:text-foreground disabled:opacity-40",
|
|
7555
7712
|
"aria-label": "zoom in",
|
|
7556
7713
|
children: "+"
|
|
@@ -9921,6 +10078,10 @@ function ChatThread({
|
|
|
9921
10078
|
showWorkspace = false,
|
|
9922
10079
|
onToggleWorkspace,
|
|
9923
10080
|
canShowBrowser = false,
|
|
10081
|
+
browserProfileId,
|
|
10082
|
+
onSelectBrowserProfile,
|
|
10083
|
+
browserProfilesEnabled = false,
|
|
10084
|
+
browserProfileLocked = false,
|
|
9924
10085
|
canShowWorkspace = false,
|
|
9925
10086
|
viewMode = "simple",
|
|
9926
10087
|
onViewModeChange,
|
|
@@ -9992,6 +10153,10 @@ function ChatThread({
|
|
|
9992
10153
|
showWorkspace,
|
|
9993
10154
|
onToggleWorkspace,
|
|
9994
10155
|
canShowBrowser,
|
|
10156
|
+
browserProfileId,
|
|
10157
|
+
onSelectBrowserProfile,
|
|
10158
|
+
browserProfilesEnabled,
|
|
10159
|
+
browserProfileLocked,
|
|
9995
10160
|
canShowWorkspace,
|
|
9996
10161
|
viewMode,
|
|
9997
10162
|
onViewModeChange,
|
|
@@ -12500,6 +12665,9 @@ function AgentChat({
|
|
|
12500
12665
|
onMessagesChange,
|
|
12501
12666
|
disabled,
|
|
12502
12667
|
onComposerError,
|
|
12668
|
+
browserProfileId,
|
|
12669
|
+
onSelectBrowserProfile,
|
|
12670
|
+
browserProfilesEnabled = false,
|
|
12503
12671
|
deepResearchEnabled = false,
|
|
12504
12672
|
researchEnabled = false,
|
|
12505
12673
|
codeAgentsEnabled = false,
|
|
@@ -12649,6 +12817,10 @@ function AgentChat({
|
|
|
12649
12817
|
tokenUsage: runtime.tokenUsage,
|
|
12650
12818
|
retryIndicator: runtime.retryIndicator,
|
|
12651
12819
|
onComposerError,
|
|
12820
|
+
browserProfileId,
|
|
12821
|
+
onSelectBrowserProfile,
|
|
12822
|
+
browserProfilesEnabled,
|
|
12823
|
+
browserProfileLocked: !!sessionId,
|
|
12652
12824
|
showBrowser,
|
|
12653
12825
|
onToggleBrowser: handleToggleBrowser,
|
|
12654
12826
|
showWorkspace,
|
|
@@ -13423,7 +13595,7 @@ function InboxDetailActions({
|
|
|
13423
13595
|
{
|
|
13424
13596
|
type: "button",
|
|
13425
13597
|
size: "sm",
|
|
13426
|
-
onClick: () => onSessionSelect?.(item.sessionId),
|
|
13598
|
+
onClick: () => onSessionSelect?.(item.sessionId, item),
|
|
13427
13599
|
"aria-label": "Open session",
|
|
13428
13600
|
children: [
|
|
13429
13601
|
/* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-3.5" }),
|
|
@@ -16345,11 +16517,16 @@ function SessionTreePanel({
|
|
|
16345
16517
|
limit: sessionListLimit
|
|
16346
16518
|
}) : Promise.resolve(null);
|
|
16347
16519
|
const sessionTreePromise = sessionId && adapter.getSessionTree ? adapter.getSessionTree({ sessionId }) : Promise.resolve(null);
|
|
16348
|
-
const [
|
|
16520
|
+
const [listResult, treeResult] = await Promise.allSettled([
|
|
16349
16521
|
sessionListPromise,
|
|
16350
16522
|
sessionTreePromise
|
|
16351
16523
|
]);
|
|
16352
16524
|
if (!mounted.current || currentRequestId !== requestId.current) return;
|
|
16525
|
+
if (loadList && listResult.status === "rejected") {
|
|
16526
|
+
throw listResult.reason;
|
|
16527
|
+
}
|
|
16528
|
+
const sessionList = listResult.status === "fulfilled" ? listResult.value : null;
|
|
16529
|
+
const sessionTree = treeResult.status === "fulfilled" ? treeResult.value : null;
|
|
16353
16530
|
let nextNodes = mergeTreeNodes([
|
|
16354
16531
|
sessionList?.sessions.map(sessionToTreeNode) ?? [],
|
|
16355
16532
|
sessionTree?.nodes ?? []
|
|
@@ -16504,6 +16681,6 @@ function SessionTreePanel({
|
|
|
16504
16681
|
] });
|
|
16505
16682
|
}
|
|
16506
16683
|
|
|
16507
|
-
export { ACTIVE_MISSION_STATUSES, AgentChat, AgentChatAdapterProvider, CitationText, CodingAgentsPanel, ComposioConnectCard, FetchSseEventStream, InboxPanel, IntegrationsBand, IntegrationsPage, MISSION_EVENT_CATEGORIES, MessageResponse, MissionDashboard, MissionsPanel, ResearchSourcesPanel, ScheduledWorkPanel, SessionTreePanel, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
16684
|
+
export { ACTIVE_MISSION_STATUSES, AgentChat, AgentChatAdapterProvider, BrowserLiveView, CitationText, CodingAgentsPanel, ComposioConnectCard, FetchSseEventStream, InboxPanel, IntegrationsBand, IntegrationsPage, MISSION_EVENT_CATEGORIES, MessageResponse, MissionDashboard, MissionsPanel, ResearchSourcesPanel, ScheduledWorkPanel, SessionTreePanel, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
16508
16685
|
//# sourceMappingURL=index.js.map
|
|
16509
16686
|
//# sourceMappingURL=index.js.map
|