@pluno/product-agent-web 0.1.169 → 0.1.171
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.d.ts +7 -0
- package/dist/product-agent-sdk.js +517 -473
- package/dist/product-agent-widget.js +3304 -3185
- package/dist/taskPageTitle.d.ts +23 -0
- package/dist/turnStatusLabel.d.ts +3 -0
- package/dist/widget.d.ts +6 -4
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type ProductAgentTaskStatus = "working" | "completed" | "failed" | "stopped";
|
|
2
|
+
export type ProductAgentTaskPageTitleDocument = {
|
|
3
|
+
getTitle: () => string;
|
|
4
|
+
setTitle: (title: string) => void;
|
|
5
|
+
observeTitle: (onTitleChanged: () => void) => () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare class ProductAgentTaskPageTitleController {
|
|
8
|
+
private readonly titleDocument;
|
|
9
|
+
private status;
|
|
10
|
+
private baseTitle;
|
|
11
|
+
private lastAppliedTitle;
|
|
12
|
+
private stopObserving;
|
|
13
|
+
private liveStatusVersion;
|
|
14
|
+
constructor(titleDocument: ProductAgentTaskPageTitleDocument);
|
|
15
|
+
setStatus(status: ProductAgentTaskStatus): void;
|
|
16
|
+
clear(): void;
|
|
17
|
+
syncStatus(loadStatus: () => Promise<ProductAgentTaskStatus | null | undefined>): Promise<void>;
|
|
18
|
+
private applyStatus;
|
|
19
|
+
private applyClear;
|
|
20
|
+
private handleTitleChanged;
|
|
21
|
+
private applyTitle;
|
|
22
|
+
}
|
|
23
|
+
export declare function createProductAgentTaskPageTitleDocument(targetDocument: Document): ProductAgentTaskPageTitleDocument;
|
package/dist/widget.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlunoProductAgent, type ProductAgentAttachment, type ProductAgentIntegrationAuthRequest, type ProductAgentPersonalChannelConnectionRequest, type ProductAgentInitOptions } from "./index";
|
|
1
|
+
import { PlunoProductAgent, type ProductAgentAttachment, type ProductAgentIntegrationAuthRequest, type ProductAgentPersonalChannelConnectionRequest, type ProductAgentInitOptions, type ProductAgentWidgetLifecycleTrigger } from "./index";
|
|
2
2
|
import { type ActiveUsersCounterValue } from "./activeUsersCounter";
|
|
3
3
|
export type ProductAgentWidgetOptions = {
|
|
4
4
|
layout?: "floating" | "page";
|
|
@@ -24,6 +24,7 @@ export type ProductAgentWidgetOptions = {
|
|
|
24
24
|
expectedPersistedSessionId?: string | null;
|
|
25
25
|
keepRunsActiveOnSessionNavigation?: boolean;
|
|
26
26
|
capturePageContent?: boolean;
|
|
27
|
+
manageTaskPageTitle?: boolean;
|
|
27
28
|
webSocketFactory?: ProductAgentInitOptions["webSocketFactory"];
|
|
28
29
|
prepareAttachmentUpload?: ProductAgentInitOptions["prepareAttachmentUpload"];
|
|
29
30
|
persistAttachmentUpload?: ProductAgentInitOptions["persistAttachmentUpload"];
|
|
@@ -46,8 +47,8 @@ export type ProductAgentWidgetOptions = {
|
|
|
46
47
|
persistSharePromptsDisabled?: (disabled: boolean) => void | Promise<void>;
|
|
47
48
|
sdkPreviewChannelId?: string;
|
|
48
49
|
initialDisplayState?: "shown" | "minimized";
|
|
49
|
-
onDisplayStateChange?: (state: "shown" | "minimized") => void;
|
|
50
|
-
onPanelOpenChange?: (open: boolean) => void;
|
|
50
|
+
onDisplayStateChange?: (state: "shown" | "minimized", trigger: ProductAgentWidgetLifecycleTrigger) => void;
|
|
51
|
+
onPanelOpenChange?: (open: boolean, trigger: ProductAgentWidgetLifecycleTrigger) => void;
|
|
51
52
|
showLauncherMinimizeButton?: boolean;
|
|
52
53
|
morningReport?: ProductAgentWidgetMorningReport | null;
|
|
53
54
|
onMorningReportSnooze?: () => void;
|
|
@@ -109,8 +110,9 @@ export type ProductAgentWidgetHandle = {
|
|
|
109
110
|
updateAuthGate: (options: Pick<ProductAgentWidgetOptions, "loginRequired" | "loginButtonLabel" | "loginUrl" | "signupRequired" | "signupButtonLabel" | "signupUrl">) => void;
|
|
110
111
|
openPanel: (initialValueOrOptions?: string | {
|
|
111
112
|
focusComposer?: boolean;
|
|
113
|
+
trigger?: ProductAgentWidgetLifecycleTrigger;
|
|
112
114
|
}) => void;
|
|
113
|
-
closePanel: () => void;
|
|
115
|
+
closePanel: (trigger?: ProductAgentWidgetLifecycleTrigger) => void;
|
|
114
116
|
updateDisplayState: (displayState: "shown" | "minimized") => void;
|
|
115
117
|
updateMorningReport: (morningReport: ProductAgentWidgetMorningReport | null | undefined) => void;
|
|
116
118
|
updateProactiveSuggestion: (suggestion: ProductAgentWidgetProactiveSuggestion | null | undefined) => void;
|
package/package.json
CHANGED