@paymanai/payman-ask-sdk 4.0.20 → 4.0.21
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.mts +26 -93
- package/dist/index.d.ts +26 -93
- package/dist/index.js +350 -1582
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +353 -1574
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +3826 -0
- package/dist/index.native.js.map +1 -0
- package/dist/styles.css +28 -486
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, ActiveUserAction, UserNotification } from '@paymanai/payman-typescript-ask-sdk';
|
|
4
|
-
export { APIConfig, ActiveUserAction, AgentStage,
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
export { APIConfig, ActiveUserAction, AgentStage, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, cancelUserAction, resendUserAction, submitUserAction, useChatV2, useVoice } from '@paymanai/payman-typescript-ask-sdk';
|
|
6
5
|
import { ClassValue } from 'clsx';
|
|
7
6
|
|
|
8
7
|
declare const NEGATIVE_FEEDBACK_REASONS: readonly [{
|
|
@@ -74,41 +73,6 @@ type SlashCommandConfig = {
|
|
|
74
73
|
/** Show only when at least one permission is present. */
|
|
75
74
|
requiredAnyPermissions?: string[];
|
|
76
75
|
};
|
|
77
|
-
type ChatAttachmentConfig = {
|
|
78
|
-
/** Show the attachment (+) menu button in the input bar. Default: true */
|
|
79
|
-
enabled?: boolean;
|
|
80
|
-
/** Show the "Upload image" option in the attachment menu. Default: true */
|
|
81
|
-
uploadImage?: boolean;
|
|
82
|
-
/** Show the "Attach file" option in the attachment menu. Default: true */
|
|
83
|
-
attachFile?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Maximum combined image + document attachments per message/run.
|
|
86
|
-
* Omit for no limit.
|
|
87
|
-
*/
|
|
88
|
-
maxCount?: number;
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated Use `maxCount` — combined limit across images and files.
|
|
91
|
-
*/
|
|
92
|
-
maxImages?: number;
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated Use `maxCount` — combined limit across images and files.
|
|
95
|
-
*/
|
|
96
|
-
maxDocuments?: number;
|
|
97
|
-
/** Maximum size in bytes for any single attachment. */
|
|
98
|
-
maxFileBytes?: number;
|
|
99
|
-
/** Maximum combined attachment size in bytes for one message/run. */
|
|
100
|
-
maxTotalBytes?: number;
|
|
101
|
-
/**
|
|
102
|
-
* Allowed image file extensions without a leading dot.
|
|
103
|
-
* Default: `png`, `jpg`, `jpeg`, `gif`, `webp`.
|
|
104
|
-
*/
|
|
105
|
-
imageExtensions?: string[];
|
|
106
|
-
/**
|
|
107
|
-
* Allowed document file extensions without a leading dot.
|
|
108
|
-
* Default: `pdf`, `docx`, `xlsx`, `xls`.
|
|
109
|
-
*/
|
|
110
|
-
documentExtensions?: string[];
|
|
111
|
-
};
|
|
112
76
|
type ChatConfig = ChatConfig$1 & {
|
|
113
77
|
/** Custom React component to render above the empty state text (e.g. logo, illustration). */
|
|
114
78
|
emptyStateComponent?: React__default.ReactNode;
|
|
@@ -124,25 +88,11 @@ type ChatConfig = ChatConfig$1 & {
|
|
|
124
88
|
showResetSession?: boolean;
|
|
125
89
|
/** Show the Fast/Deep analysis mode toggle in the v2 input bar (default: true). */
|
|
126
90
|
enableDeepModeToggle?: boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Attachment picker settings for the v2 input bar.
|
|
129
|
-
* Prefer this over the legacy flat `showAttachment*` flags below.
|
|
130
|
-
*/
|
|
131
|
-
attachments?: ChatAttachmentConfig;
|
|
132
|
-
/**
|
|
133
|
-
* @deprecated Use `attachments.enabled` instead.
|
|
134
|
-
* Show the v2 attachment (+) menu button in the input bar (default: true).
|
|
135
|
-
*/
|
|
91
|
+
/** Show the v2 attachment (+) menu button in the input bar (default: true) */
|
|
136
92
|
showAttachmentButton?: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated Use `attachments.uploadImage` instead.
|
|
139
|
-
* Show the v2 "Upload image" attachment option (default: true).
|
|
140
|
-
*/
|
|
93
|
+
/** Show the v2 "Upload image" attachment option (default: true) */
|
|
141
94
|
showUploadImageButton?: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated Use `attachments.attachFile` instead.
|
|
144
|
-
* Show the v2 "Attach file" attachment option (default: true).
|
|
145
|
-
*/
|
|
95
|
+
/** Show the v2 "Attach file" attachment option (default: true) */
|
|
146
96
|
showAttachFileButton?: boolean;
|
|
147
97
|
/** Configure which per-message actions are visible in the v2 UI */
|
|
148
98
|
messageActions?: MessageActionsConfig;
|
|
@@ -167,6 +117,26 @@ type ChatConfig = ChatConfig$1 & {
|
|
|
167
117
|
* the consumer hasn't wired one.
|
|
168
118
|
*/
|
|
169
119
|
debug?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Accent / brand colour used by the React Native chat surface (send button,
|
|
122
|
+
* focused border, streaming indicator, etc.). Defaults to Payman teal `#00858d`.
|
|
123
|
+
* Web styling continues to follow Tailwind and ignores this field.
|
|
124
|
+
*/
|
|
125
|
+
accent?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Colour scheme for the React Native chat surface (message text, bubbles,
|
|
128
|
+
* markdown tables/code, borders). When omitted the SDK falls back to the
|
|
129
|
+
* device's system scheme via `useColorScheme()`. Pass this from the host
|
|
130
|
+
* app's theme context so the chat honours a manual light/dark override.
|
|
131
|
+
* Web styling continues to follow Tailwind and ignores this field.
|
|
132
|
+
*/
|
|
133
|
+
colorScheme?: "light" | "dark";
|
|
134
|
+
/**
|
|
135
|
+
* Bottom safe-area inset (px) for the React Native chat surface. Pass the
|
|
136
|
+
* host app's `useSafeAreaInsets().bottom` so the input bar / voice bar clear
|
|
137
|
+
* the home indicator. Defaults to a small platform fallback when omitted.
|
|
138
|
+
*/
|
|
139
|
+
contentInsetBottom?: number;
|
|
170
140
|
/**
|
|
171
141
|
* UI version to render.
|
|
172
142
|
* 1 = original component set
|
|
@@ -203,16 +173,6 @@ type ChatConfig = ChatConfig$1 & {
|
|
|
203
173
|
/** Rendered size in pixels. Defaults to 18 to match the default SVG spinner. */
|
|
204
174
|
size?: number;
|
|
205
175
|
};
|
|
206
|
-
/**
|
|
207
|
-
* How the v2 PDF preview panel is laid out relative to the chat column.
|
|
208
|
-
* split — side-by-side flex layout with a wide default panel (~520px)
|
|
209
|
-
* sheet — full-height overlay that slides in from the right and covers
|
|
210
|
-
* the chat (for narrow agent side panels)
|
|
211
|
-
*
|
|
212
|
-
* Use `sheet` for narrow agent side panels (e.g. Agent Detail test chat).
|
|
213
|
-
* Use `split` (default) for full-width chat surfaces.
|
|
214
|
-
*/
|
|
215
|
-
pdfPreviewMode?: "split" | "sheet";
|
|
216
176
|
};
|
|
217
177
|
type ChatCallbacks = ChatCallbacks$1 & {
|
|
218
178
|
/** Called when the session is reset (via SDK reset button or ref.resetSession()) */
|
|
@@ -398,6 +358,7 @@ type MessageListV2Props = {
|
|
|
398
358
|
onCancelUserAction?: (userActionId: string) => Promise<void>;
|
|
399
359
|
/** Resend a prompt (e.g. resend a verification code). */
|
|
400
360
|
onResendUserAction?: (userActionId: string) => Promise<void>;
|
|
361
|
+
onExpireUserAction?: (userActionId: string) => Promise<void>;
|
|
401
362
|
/** Dismiss a one-way notification. */
|
|
402
363
|
onDismissNotification?: (id: string) => void;
|
|
403
364
|
/** Persist thumbs-up/down feedback (rejects on failure). */
|
|
@@ -407,8 +368,6 @@ type MessageListV2Props = {
|
|
|
407
368
|
* 1 = default, 2 = 2x faster, 0.5 = half speed, 0 = instant reveal.
|
|
408
369
|
*/
|
|
409
370
|
typingSpeed?: number;
|
|
410
|
-
/** When a side panel (e.g. PDF preview) is open, disable sticky auto-scroll. */
|
|
411
|
-
sidePanelOpen?: boolean;
|
|
412
371
|
};
|
|
413
372
|
type MessageRowProps = {
|
|
414
373
|
/** Message to display */
|
|
@@ -523,16 +482,6 @@ type ChatHeaderProps = {
|
|
|
523
482
|
*/
|
|
524
483
|
declare const PaymanChat: React.ForwardRefExoticComponent<PaymanChatProps & React.RefAttributes<PaymanChatRef>>;
|
|
525
484
|
|
|
526
|
-
type PdfPreviewLayoutMode = "split" | "sheet";
|
|
527
|
-
|
|
528
|
-
type PdfSheetV2Props = {
|
|
529
|
-
src: string | null;
|
|
530
|
-
title: string;
|
|
531
|
-
onClose: () => void;
|
|
532
|
-
mode?: PdfPreviewLayoutMode;
|
|
533
|
-
};
|
|
534
|
-
declare function PdfSheetV2({ src, title, onClose, mode, }: PdfSheetV2Props): react_jsx_runtime.JSX.Element;
|
|
535
|
-
|
|
536
485
|
interface PaymanChatContextValue {
|
|
537
486
|
/**
|
|
538
487
|
* Clear all messages and reset the chat
|
|
@@ -562,14 +511,6 @@ interface PaymanChatContextValue {
|
|
|
562
511
|
* Check if currently waiting for response
|
|
563
512
|
*/
|
|
564
513
|
isWaitingForResponse: boolean;
|
|
565
|
-
/**
|
|
566
|
-
* Open the PDF preview panel with the given URL and title.
|
|
567
|
-
* When called, the chat shifts left and the PDF panel slides in from the right.
|
|
568
|
-
* Pass `{ auto: true }` for stream auto-open; auto-open is suppressed after the user closes the sheet.
|
|
569
|
-
*/
|
|
570
|
-
openPdfSheet: (href: string, title: string, options?: {
|
|
571
|
-
auto?: boolean;
|
|
572
|
-
}) => void;
|
|
573
514
|
}
|
|
574
515
|
declare const PaymanChatContext: React.Context<PaymanChatContextValue | undefined>;
|
|
575
516
|
/**
|
|
@@ -620,12 +561,4 @@ interface ChatSessionContext {
|
|
|
620
561
|
*/
|
|
621
562
|
declare function captureSentryError(error: Error | string, context: ChatSessionContext): void;
|
|
622
563
|
|
|
623
|
-
|
|
624
|
-
declare function formatAttachmentBytes(bytes: number): string;
|
|
625
|
-
|
|
626
|
-
/** True when a markdown link href points at a PDF (incl. Azure blob signed URLs). */
|
|
627
|
-
declare function isPdfUrl(href: string): boolean;
|
|
628
|
-
/** Title for the PDF preview sheet — prefers link text, then filename from URL. */
|
|
629
|
-
declare function getPdfTitleFromUrl(href: string, linkText?: string): string;
|
|
630
|
-
|
|
631
|
-
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatAttachmentConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps, PaymanChat, PaymanChatContext, type PaymanChatContextValue, type PaymanChatProps, type PaymanChatRef, type PdfPreviewLayoutMode, PdfSheetV2, type PdfSheetV2Props, type SlashCommandConfig, type UserMessageActionsConfig, type UserMessageProps, captureSentryError, cn, formatAttachmentBytes, formatDate, getPdfTitleFromUrl, isPdfUrl, usePaymanChat };
|
|
564
|
+
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps, PaymanChat, PaymanChatContext, type PaymanChatContextValue, type PaymanChatProps, type PaymanChatRef, type SlashCommandConfig, type UserMessageActionsConfig, type UserMessageProps, captureSentryError, cn, formatDate, usePaymanChat };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { MessageDisplay, AgentStage, ChatCallbacks as ChatCallbacks$1, ChatConfig as ChatConfig$1, ActiveUserAction, UserNotification } from '@paymanai/payman-typescript-ask-sdk';
|
|
4
|
-
export { APIConfig, ActiveUserAction, AgentStage,
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
export { APIConfig, ActiveUserAction, AgentStage, ChunkDisplay, JsonSchemaField, JsonSchemaOption, MessageDisplay, MessageRole, RequestedSchema, SessionParams, StreamProgress, StreamingStep, UseChatV2Return, UseVoiceReturn, UserActionKind, UserActionRequest, UserActionStaleError, UserActionState, UserActionStatus, UserActionSubAction, UserNotification, VerificationType, VoiceCallbacks, VoiceConfig, VoicePermissions, VoiceResult, VoiceState, cancelUserAction, resendUserAction, submitUserAction, useChatV2, useVoice } from '@paymanai/payman-typescript-ask-sdk';
|
|
6
5
|
import { ClassValue } from 'clsx';
|
|
7
6
|
|
|
8
7
|
declare const NEGATIVE_FEEDBACK_REASONS: readonly [{
|
|
@@ -74,41 +73,6 @@ type SlashCommandConfig = {
|
|
|
74
73
|
/** Show only when at least one permission is present. */
|
|
75
74
|
requiredAnyPermissions?: string[];
|
|
76
75
|
};
|
|
77
|
-
type ChatAttachmentConfig = {
|
|
78
|
-
/** Show the attachment (+) menu button in the input bar. Default: true */
|
|
79
|
-
enabled?: boolean;
|
|
80
|
-
/** Show the "Upload image" option in the attachment menu. Default: true */
|
|
81
|
-
uploadImage?: boolean;
|
|
82
|
-
/** Show the "Attach file" option in the attachment menu. Default: true */
|
|
83
|
-
attachFile?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Maximum combined image + document attachments per message/run.
|
|
86
|
-
* Omit for no limit.
|
|
87
|
-
*/
|
|
88
|
-
maxCount?: number;
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated Use `maxCount` — combined limit across images and files.
|
|
91
|
-
*/
|
|
92
|
-
maxImages?: number;
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated Use `maxCount` — combined limit across images and files.
|
|
95
|
-
*/
|
|
96
|
-
maxDocuments?: number;
|
|
97
|
-
/** Maximum size in bytes for any single attachment. */
|
|
98
|
-
maxFileBytes?: number;
|
|
99
|
-
/** Maximum combined attachment size in bytes for one message/run. */
|
|
100
|
-
maxTotalBytes?: number;
|
|
101
|
-
/**
|
|
102
|
-
* Allowed image file extensions without a leading dot.
|
|
103
|
-
* Default: `png`, `jpg`, `jpeg`, `gif`, `webp`.
|
|
104
|
-
*/
|
|
105
|
-
imageExtensions?: string[];
|
|
106
|
-
/**
|
|
107
|
-
* Allowed document file extensions without a leading dot.
|
|
108
|
-
* Default: `pdf`, `docx`, `xlsx`, `xls`.
|
|
109
|
-
*/
|
|
110
|
-
documentExtensions?: string[];
|
|
111
|
-
};
|
|
112
76
|
type ChatConfig = ChatConfig$1 & {
|
|
113
77
|
/** Custom React component to render above the empty state text (e.g. logo, illustration). */
|
|
114
78
|
emptyStateComponent?: React__default.ReactNode;
|
|
@@ -124,25 +88,11 @@ type ChatConfig = ChatConfig$1 & {
|
|
|
124
88
|
showResetSession?: boolean;
|
|
125
89
|
/** Show the Fast/Deep analysis mode toggle in the v2 input bar (default: true). */
|
|
126
90
|
enableDeepModeToggle?: boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Attachment picker settings for the v2 input bar.
|
|
129
|
-
* Prefer this over the legacy flat `showAttachment*` flags below.
|
|
130
|
-
*/
|
|
131
|
-
attachments?: ChatAttachmentConfig;
|
|
132
|
-
/**
|
|
133
|
-
* @deprecated Use `attachments.enabled` instead.
|
|
134
|
-
* Show the v2 attachment (+) menu button in the input bar (default: true).
|
|
135
|
-
*/
|
|
91
|
+
/** Show the v2 attachment (+) menu button in the input bar (default: true) */
|
|
136
92
|
showAttachmentButton?: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated Use `attachments.uploadImage` instead.
|
|
139
|
-
* Show the v2 "Upload image" attachment option (default: true).
|
|
140
|
-
*/
|
|
93
|
+
/** Show the v2 "Upload image" attachment option (default: true) */
|
|
141
94
|
showUploadImageButton?: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated Use `attachments.attachFile` instead.
|
|
144
|
-
* Show the v2 "Attach file" attachment option (default: true).
|
|
145
|
-
*/
|
|
95
|
+
/** Show the v2 "Attach file" attachment option (default: true) */
|
|
146
96
|
showAttachFileButton?: boolean;
|
|
147
97
|
/** Configure which per-message actions are visible in the v2 UI */
|
|
148
98
|
messageActions?: MessageActionsConfig;
|
|
@@ -167,6 +117,26 @@ type ChatConfig = ChatConfig$1 & {
|
|
|
167
117
|
* the consumer hasn't wired one.
|
|
168
118
|
*/
|
|
169
119
|
debug?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Accent / brand colour used by the React Native chat surface (send button,
|
|
122
|
+
* focused border, streaming indicator, etc.). Defaults to Payman teal `#00858d`.
|
|
123
|
+
* Web styling continues to follow Tailwind and ignores this field.
|
|
124
|
+
*/
|
|
125
|
+
accent?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Colour scheme for the React Native chat surface (message text, bubbles,
|
|
128
|
+
* markdown tables/code, borders). When omitted the SDK falls back to the
|
|
129
|
+
* device's system scheme via `useColorScheme()`. Pass this from the host
|
|
130
|
+
* app's theme context so the chat honours a manual light/dark override.
|
|
131
|
+
* Web styling continues to follow Tailwind and ignores this field.
|
|
132
|
+
*/
|
|
133
|
+
colorScheme?: "light" | "dark";
|
|
134
|
+
/**
|
|
135
|
+
* Bottom safe-area inset (px) for the React Native chat surface. Pass the
|
|
136
|
+
* host app's `useSafeAreaInsets().bottom` so the input bar / voice bar clear
|
|
137
|
+
* the home indicator. Defaults to a small platform fallback when omitted.
|
|
138
|
+
*/
|
|
139
|
+
contentInsetBottom?: number;
|
|
170
140
|
/**
|
|
171
141
|
* UI version to render.
|
|
172
142
|
* 1 = original component set
|
|
@@ -203,16 +173,6 @@ type ChatConfig = ChatConfig$1 & {
|
|
|
203
173
|
/** Rendered size in pixels. Defaults to 18 to match the default SVG spinner. */
|
|
204
174
|
size?: number;
|
|
205
175
|
};
|
|
206
|
-
/**
|
|
207
|
-
* How the v2 PDF preview panel is laid out relative to the chat column.
|
|
208
|
-
* split — side-by-side flex layout with a wide default panel (~520px)
|
|
209
|
-
* sheet — full-height overlay that slides in from the right and covers
|
|
210
|
-
* the chat (for narrow agent side panels)
|
|
211
|
-
*
|
|
212
|
-
* Use `sheet` for narrow agent side panels (e.g. Agent Detail test chat).
|
|
213
|
-
* Use `split` (default) for full-width chat surfaces.
|
|
214
|
-
*/
|
|
215
|
-
pdfPreviewMode?: "split" | "sheet";
|
|
216
176
|
};
|
|
217
177
|
type ChatCallbacks = ChatCallbacks$1 & {
|
|
218
178
|
/** Called when the session is reset (via SDK reset button or ref.resetSession()) */
|
|
@@ -398,6 +358,7 @@ type MessageListV2Props = {
|
|
|
398
358
|
onCancelUserAction?: (userActionId: string) => Promise<void>;
|
|
399
359
|
/** Resend a prompt (e.g. resend a verification code). */
|
|
400
360
|
onResendUserAction?: (userActionId: string) => Promise<void>;
|
|
361
|
+
onExpireUserAction?: (userActionId: string) => Promise<void>;
|
|
401
362
|
/** Dismiss a one-way notification. */
|
|
402
363
|
onDismissNotification?: (id: string) => void;
|
|
403
364
|
/** Persist thumbs-up/down feedback (rejects on failure). */
|
|
@@ -407,8 +368,6 @@ type MessageListV2Props = {
|
|
|
407
368
|
* 1 = default, 2 = 2x faster, 0.5 = half speed, 0 = instant reveal.
|
|
408
369
|
*/
|
|
409
370
|
typingSpeed?: number;
|
|
410
|
-
/** When a side panel (e.g. PDF preview) is open, disable sticky auto-scroll. */
|
|
411
|
-
sidePanelOpen?: boolean;
|
|
412
371
|
};
|
|
413
372
|
type MessageRowProps = {
|
|
414
373
|
/** Message to display */
|
|
@@ -523,16 +482,6 @@ type ChatHeaderProps = {
|
|
|
523
482
|
*/
|
|
524
483
|
declare const PaymanChat: React.ForwardRefExoticComponent<PaymanChatProps & React.RefAttributes<PaymanChatRef>>;
|
|
525
484
|
|
|
526
|
-
type PdfPreviewLayoutMode = "split" | "sheet";
|
|
527
|
-
|
|
528
|
-
type PdfSheetV2Props = {
|
|
529
|
-
src: string | null;
|
|
530
|
-
title: string;
|
|
531
|
-
onClose: () => void;
|
|
532
|
-
mode?: PdfPreviewLayoutMode;
|
|
533
|
-
};
|
|
534
|
-
declare function PdfSheetV2({ src, title, onClose, mode, }: PdfSheetV2Props): react_jsx_runtime.JSX.Element;
|
|
535
|
-
|
|
536
485
|
interface PaymanChatContextValue {
|
|
537
486
|
/**
|
|
538
487
|
* Clear all messages and reset the chat
|
|
@@ -562,14 +511,6 @@ interface PaymanChatContextValue {
|
|
|
562
511
|
* Check if currently waiting for response
|
|
563
512
|
*/
|
|
564
513
|
isWaitingForResponse: boolean;
|
|
565
|
-
/**
|
|
566
|
-
* Open the PDF preview panel with the given URL and title.
|
|
567
|
-
* When called, the chat shifts left and the PDF panel slides in from the right.
|
|
568
|
-
* Pass `{ auto: true }` for stream auto-open; auto-open is suppressed after the user closes the sheet.
|
|
569
|
-
*/
|
|
570
|
-
openPdfSheet: (href: string, title: string, options?: {
|
|
571
|
-
auto?: boolean;
|
|
572
|
-
}) => void;
|
|
573
514
|
}
|
|
574
515
|
declare const PaymanChatContext: React.Context<PaymanChatContextValue | undefined>;
|
|
575
516
|
/**
|
|
@@ -620,12 +561,4 @@ interface ChatSessionContext {
|
|
|
620
561
|
*/
|
|
621
562
|
declare function captureSentryError(error: Error | string, context: ChatSessionContext): void;
|
|
622
563
|
|
|
623
|
-
|
|
624
|
-
declare function formatAttachmentBytes(bytes: number): string;
|
|
625
|
-
|
|
626
|
-
/** True when a markdown link href points at a PDF (incl. Azure blob signed URLs). */
|
|
627
|
-
declare function isPdfUrl(href: string): boolean;
|
|
628
|
-
/** Title for the PDF preview sheet — prefers link text, then filename from URL. */
|
|
629
|
-
declare function getPdfTitleFromUrl(href: string, linkText?: string): string;
|
|
630
|
-
|
|
631
|
-
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatAttachmentConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps, PaymanChat, PaymanChatContext, type PaymanChatContextValue, type PaymanChatProps, type PaymanChatRef, type PdfPreviewLayoutMode, PdfSheetV2, type PdfSheetV2Props, type SlashCommandConfig, type UserMessageActionsConfig, type UserMessageProps, captureSentryError, cn, formatAttachmentBytes, formatDate, getPdfTitleFromUrl, isPdfUrl, usePaymanChat };
|
|
564
|
+
export { type AgentMessageProps, type AssistantMessageActionsConfig, type ChatCallbacks, type ChatConfig, type ChatHeaderProps, type ChatInputProps, type ChatSessionContext, type MessageActionsConfig, type MessageListProps, type MessageListV2Props, type MessageRowProps, PaymanChat, PaymanChatContext, type PaymanChatContextValue, type PaymanChatProps, type PaymanChatRef, type SlashCommandConfig, type UserMessageActionsConfig, type UserMessageProps, captureSentryError, cn, formatDate, usePaymanChat };
|