@promptbook/wizard 0.102.0-0 → 0.102.0-2
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/esm/index.es.js +1 -1
- package/esm/typings/src/_packages/components.index.d.ts +38 -22
- package/esm/typings/src/_packages/types.index.d.ts +10 -8
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.delete.test.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +2 -2
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +10 -1
- package/esm/typings/src/book-components/{AvatarProfile/AvatarProfile → Chat/MockedChat}/MockedChat.d.ts +25 -8
- package/esm/typings/src/book-components/Chat/MockedChat/constants.d.ts +42 -0
- package/esm/typings/src/book-components/Chat/save/savePlugins.d.ts +105 -0
- package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +11 -0
- package/esm/typings/src/book-components/icons/CloseIcon.d.ts +11 -0
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +6 -0
- package/esm/typings/src/remote-server/ui/ServerApp.d.ts +13 -0
- package/esm/typings/src/remote-server/ui/renderServerIndexHtml.d.ts +7 -0
- package/esm/typings/src/remote-server/ui/types.d.ts +16 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/index.d.ts +0 -3
- package/esm/typings/src/book-components/Chat/utils/savePlugins.d.ts +0 -55
package/esm/index.es.js
CHANGED
@@ -36,7 +36,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
36
36
|
* @generated
|
37
37
|
* @see https://github.com/webgptorg/promptbook
|
38
38
|
*/
|
39
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-
|
39
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-2';
|
40
40
|
/**
|
41
41
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
42
42
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -7,9 +7,6 @@ import type { AvatarProfileProps } from '../book-components/AvatarProfile/Avatar
|
|
7
7
|
import { AvatarProfile } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
8
8
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
9
9
|
import { AvatarProfileFromSource } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
10
|
-
import type { MockedChatDelayConfig } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
|
11
|
-
import type { MockedChatProps } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
|
12
|
-
import { MockedChat } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
|
13
10
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
14
11
|
import { BookEditor } from '../book-components/BookEditor/BookEditor';
|
15
12
|
import { DEFAULT_BOOK_FONT_CLASS } from '../book-components/BookEditor/config';
|
@@ -20,21 +17,32 @@ import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks
|
|
20
17
|
import { useSendMessageToLlmChat } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
|
21
18
|
import { LlmChat } from '../book-components/Chat/LlmChat/LlmChat';
|
22
19
|
import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
|
20
|
+
import { NORMAL_FLOW } from '../book-components/Chat/MockedChat/constants';
|
21
|
+
import { FAST_FLOW } from '../book-components/Chat/MockedChat/constants';
|
22
|
+
import { SLOW_FLOW } from '../book-components/Chat/MockedChat/constants';
|
23
|
+
import { BLOCKY_FLOW } from '../book-components/Chat/MockedChat/constants';
|
24
|
+
import { RANDOM_FLOW } from '../book-components/Chat/MockedChat/constants';
|
25
|
+
import { MOCKED_CHAT_DELAY_CONFIGS } from '../book-components/Chat/MockedChat/constants';
|
26
|
+
import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
|
27
|
+
import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
|
28
|
+
import { MockedChat } from '../book-components/Chat/MockedChat/MockedChat';
|
29
|
+
import type { string_chat_format_name } from '../book-components/Chat/save/savePlugins';
|
30
|
+
import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
|
31
|
+
import { jsonSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
|
32
|
+
import { txtSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
|
33
|
+
import { mdSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
|
34
|
+
import { htmlSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
|
35
|
+
import { CHAT_SAVE_FORMATS } from '../book-components/Chat/save/savePlugins';
|
36
|
+
import { getChatSaveFormatDefinitions } from '../book-components/Chat/save/savePlugins';
|
23
37
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
24
38
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
25
39
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
26
40
|
import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
|
27
41
|
import { renderMarkdown } from '../book-components/Chat/utils/renderMarkdown';
|
28
42
|
import { isMarkdownContent } from '../book-components/Chat/utils/renderMarkdown';
|
29
|
-
import type { ChatSaveFormat } from '../book-components/Chat/utils/savePlugins';
|
30
|
-
import type { ChatSavePlugin } from '../book-components/Chat/utils/savePlugins';
|
31
|
-
import { jsonSavePlugin } from '../book-components/Chat/utils/savePlugins';
|
32
|
-
import { txtSavePlugin } from '../book-components/Chat/utils/savePlugins';
|
33
|
-
import { mdSavePlugin } from '../book-components/Chat/utils/savePlugins';
|
34
|
-
import { htmlSavePlugin } from '../book-components/Chat/utils/savePlugins';
|
35
|
-
import { chatSavePlugins } from '../book-components/Chat/utils/savePlugins';
|
36
|
-
import { getChatSavePlugins } from '../book-components/Chat/utils/savePlugins';
|
37
43
|
import { ArrowIcon } from '../book-components/icons/ArrowIcon';
|
44
|
+
import { AttachmentIcon } from '../book-components/icons/AttachmentIcon';
|
45
|
+
import { CloseIcon } from '../book-components/icons/CloseIcon';
|
38
46
|
import { PauseIcon } from '../book-components/icons/PauseIcon';
|
39
47
|
import { PlayIcon } from '../book-components/icons/PlayIcon';
|
40
48
|
import { ResetIcon } from '../book-components/icons/ResetIcon';
|
@@ -49,9 +57,6 @@ export type { AvatarProfileProps };
|
|
49
57
|
export { AvatarProfile };
|
50
58
|
export type { AvatarProfileFromSourceProps };
|
51
59
|
export { AvatarProfileFromSource };
|
52
|
-
export type { MockedChatDelayConfig };
|
53
|
-
export type { MockedChatProps };
|
54
|
-
export { MockedChat };
|
55
60
|
export type { BookEditorProps };
|
56
61
|
export { BookEditor };
|
57
62
|
export { DEFAULT_BOOK_FONT_CLASS };
|
@@ -62,21 +67,32 @@ export type { SendMessageToLlmChatFunction };
|
|
62
67
|
export { useSendMessageToLlmChat };
|
63
68
|
export { LlmChat };
|
64
69
|
export type { LlmChatProps };
|
70
|
+
export { NORMAL_FLOW };
|
71
|
+
export { FAST_FLOW };
|
72
|
+
export { SLOW_FLOW };
|
73
|
+
export { BLOCKY_FLOW };
|
74
|
+
export { RANDOM_FLOW };
|
75
|
+
export { MOCKED_CHAT_DELAY_CONFIGS };
|
76
|
+
export type { MockedChatDelayConfig };
|
77
|
+
export type { MockedChatProps };
|
78
|
+
export { MockedChat };
|
79
|
+
export type { string_chat_format_name };
|
80
|
+
export type { ChatSaveFormatDefinition };
|
81
|
+
export { jsonSaveFormatDefinition };
|
82
|
+
export { txtSaveFormatDefinition };
|
83
|
+
export { mdSaveFormatDefinition };
|
84
|
+
export { htmlSaveFormatDefinition };
|
85
|
+
export { CHAT_SAVE_FORMATS };
|
86
|
+
export { getChatSaveFormatDefinitions };
|
65
87
|
export type { ChatMessage };
|
66
88
|
export type { ChatParticipant };
|
67
89
|
export type { MessageButton };
|
68
90
|
export { parseMessageButtons };
|
69
91
|
export { renderMarkdown };
|
70
92
|
export { isMarkdownContent };
|
71
|
-
export type { ChatSaveFormat };
|
72
|
-
export type { ChatSavePlugin };
|
73
|
-
export { jsonSavePlugin };
|
74
|
-
export { txtSavePlugin };
|
75
|
-
export { mdSavePlugin };
|
76
|
-
export { htmlSavePlugin };
|
77
|
-
export { chatSavePlugins };
|
78
|
-
export { getChatSavePlugins };
|
79
93
|
export { ArrowIcon };
|
94
|
+
export { AttachmentIcon };
|
95
|
+
export { CloseIcon };
|
80
96
|
export { PauseIcon };
|
81
97
|
export { PlayIcon };
|
82
98
|
export { ResetIcon };
|
@@ -9,18 +9,18 @@ import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChi
|
|
9
9
|
import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
|
10
10
|
import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
11
11
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
12
|
-
import type { MockedChatDelayConfig } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
|
13
|
-
import type { MockedChatProps } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
|
14
12
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
15
13
|
import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
|
16
14
|
import type { ChatAutoScrollConfig } from '../book-components/Chat/hooks/useChatAutoScroll';
|
17
15
|
import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
|
18
16
|
import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
|
17
|
+
import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
|
18
|
+
import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
|
19
|
+
import type { string_chat_format_name } from '../book-components/Chat/save/savePlugins';
|
20
|
+
import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
|
19
21
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
20
22
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
21
23
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
22
|
-
import type { ChatSaveFormat } from '../book-components/Chat/utils/savePlugins';
|
23
|
-
import type { ChatSavePlugin } from '../book-components/Chat/utils/savePlugins';
|
24
24
|
import type { PipelineCollection } from '../collection/PipelineCollection';
|
25
25
|
import type { Command } from '../commands/_common/types/Command';
|
26
26
|
import type { CommandParser } from '../commands/_common/types/CommandParser';
|
@@ -154,6 +154,7 @@ import type { ApplicationRemoteServerOptions } from '../remote-server/types/Remo
|
|
154
154
|
import type { ApplicationRemoteServerClientOptions } from '../remote-server/types/RemoteServerOptions';
|
155
155
|
import type { LoginRequest } from '../remote-server/types/RemoteServerOptions';
|
156
156
|
import type { LoginResponse } from '../remote-server/types/RemoteServerOptions';
|
157
|
+
import type { ServerInfo } from '../remote-server/ui/types';
|
157
158
|
import type { Converter } from '../scrapers/_common/Converter';
|
158
159
|
import type { ScraperAndConverterMetadata } from '../scrapers/_common/register/ScraperAndConverterMetadata';
|
159
160
|
import type { ScraperConstructor } from '../scrapers/_common/register/ScraperConstructor';
|
@@ -340,18 +341,18 @@ export type { AvatarChipProps };
|
|
340
341
|
export type { AvatarChipFromSourceProps };
|
341
342
|
export type { AvatarProfileProps };
|
342
343
|
export type { AvatarProfileFromSourceProps };
|
343
|
-
export type { MockedChatDelayConfig };
|
344
|
-
export type { MockedChatProps };
|
345
344
|
export type { BookEditorProps };
|
346
345
|
export type { ChatProps };
|
347
346
|
export type { ChatAutoScrollConfig };
|
348
347
|
export type { SendMessageToLlmChatFunction };
|
349
348
|
export type { LlmChatProps };
|
349
|
+
export type { MockedChatDelayConfig };
|
350
|
+
export type { MockedChatProps };
|
351
|
+
export type { string_chat_format_name };
|
352
|
+
export type { ChatSaveFormatDefinition };
|
350
353
|
export type { ChatMessage };
|
351
354
|
export type { ChatParticipant };
|
352
355
|
export type { MessageButton };
|
353
|
-
export type { ChatSaveFormat };
|
354
|
-
export type { ChatSavePlugin };
|
355
356
|
export type { PipelineCollection };
|
356
357
|
export type { Command };
|
357
358
|
export type { CommandParser };
|
@@ -485,6 +486,7 @@ export type { ApplicationRemoteServerOptions };
|
|
485
486
|
export type { ApplicationRemoteServerClientOptions };
|
486
487
|
export type { LoginRequest };
|
487
488
|
export type { LoginResponse };
|
489
|
+
export type { ServerInfo };
|
488
490
|
export type { Converter };
|
489
491
|
export type { ScraperAndConverterMetadata };
|
490
492
|
export type { ScraperConstructor };
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import { string_chat_format_name } from '../save/savePlugins';
|
1
2
|
import type { ChatProps } from './ChatProps';
|
2
|
-
import { ChatSaveFormat } from '../utils/savePlugins';
|
3
3
|
/**
|
4
4
|
* Renders a chat with messages and input for new messages
|
5
5
|
*
|
@@ -14,6 +14,6 @@ import { ChatSaveFormat } from '../utils/savePlugins';
|
|
14
14
|
* @public exported from `@promptbook/components`
|
15
15
|
*/
|
16
16
|
export declare function Chat(props: ChatProps & {
|
17
|
-
saveFormats?:
|
17
|
+
saveFormats?: string_chat_format_name[];
|
18
18
|
isSaveButtonEnabled?: boolean;
|
19
19
|
}): import("react/jsx-runtime").JSX.Element;
|
@@ -145,7 +145,16 @@ export type ChatProps = {
|
|
145
145
|
expectedAnswer: string | null;
|
146
146
|
url: string;
|
147
147
|
}): Promisable<void>;
|
148
|
+
/**
|
149
|
+
* Optional callback for handling file uploads
|
150
|
+
* When provided, enables file upload functionality via drag-and-drop and file button
|
151
|
+
* The callback should process the file and return text content to be inserted into the message
|
152
|
+
*
|
153
|
+
* @param file - The uploaded file
|
154
|
+
* @returns Promise or string with the text content to insert into the chat message
|
155
|
+
*/
|
156
|
+
onFileUpload?(file: File): Promisable<string>;
|
148
157
|
};
|
149
158
|
/**
|
150
159
|
* TODO: [☁️] Export component prop types only to `@promptbook/components` (not `@promptbook/types`)
|
151
|
-
*/
|
160
|
+
*/
|
@@ -6,25 +6,42 @@ import type { ChatProps } from '../../Chat/Chat/ChatProps';
|
|
6
6
|
*/
|
7
7
|
export type MockedChatDelayConfig = {
|
8
8
|
/**
|
9
|
-
* Delay before showing the first message (
|
9
|
+
* Delay before showing the first message (ms)
|
10
10
|
* @default 1000
|
11
11
|
*/
|
12
|
-
beforeFirstMessage?: number;
|
12
|
+
beforeFirstMessage?: number | [number, number];
|
13
13
|
/**
|
14
|
-
* Emulated thinking time between messages (
|
14
|
+
* Emulated thinking time between messages (ms)
|
15
|
+
* Can be a fixed number or [min, max] for random range.
|
15
16
|
* @default 2000
|
16
17
|
*/
|
17
|
-
thinkingBetweenMessages?: number;
|
18
|
+
thinkingBetweenMessages?: number | [number, number];
|
18
19
|
/**
|
19
|
-
* Wait time after each written word (
|
20
|
+
* Wait time after each written word (ms)
|
21
|
+
* Can be a fixed number or [min, max] for random range.
|
20
22
|
* @default 100
|
21
23
|
*/
|
22
|
-
waitAfterWord?: number;
|
24
|
+
waitAfterWord?: number | [number, number];
|
23
25
|
/**
|
24
|
-
* Extra delay on top of the word waiting (
|
26
|
+
* Extra delay on top of the word waiting (ms)
|
27
|
+
* Can be a fixed number or [min, max] for random range.
|
25
28
|
* @default 50
|
26
29
|
*/
|
27
|
-
extraWordDelay?: number;
|
30
|
+
extraWordDelay?: number | [number, number];
|
31
|
+
/**
|
32
|
+
* Chance (0-1) that a longer pause occurs before a message (e.g. agent switch)
|
33
|
+
* @default 0.2
|
34
|
+
*/
|
35
|
+
longPauseChance?: number;
|
36
|
+
/**
|
37
|
+
* Range for long pause duration (ms), [min, max]
|
38
|
+
* @default [1200, 3500]
|
39
|
+
*/
|
40
|
+
longPauseDuration?: [number, number];
|
41
|
+
/**
|
42
|
+
* If true, disables typing effect and shows full message at once (BLOCKY_FLOW)
|
43
|
+
*/
|
44
|
+
blocky?: boolean;
|
28
45
|
};
|
29
46
|
/**
|
30
47
|
* Props for MockedChat component
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { MockedChatDelayConfig } from './MockedChat';
|
2
|
+
/**
|
3
|
+
* Normal flow of messages in the `MockedChat` component
|
4
|
+
*
|
5
|
+
* @public exported from `@promptbook/components`
|
6
|
+
*/
|
7
|
+
export declare const NORMAL_FLOW: MockedChatDelayConfig;
|
8
|
+
/**
|
9
|
+
* Fast flow of messages in the `MockedChat` component
|
10
|
+
*
|
11
|
+
* @public exported from `@promptbook/components`
|
12
|
+
*/
|
13
|
+
export declare const FAST_FLOW: MockedChatDelayConfig;
|
14
|
+
/**
|
15
|
+
* Slow flow of messages in the `MockedChat` component
|
16
|
+
*
|
17
|
+
* @public exported from `@promptbook/components`
|
18
|
+
*/
|
19
|
+
export declare const SLOW_FLOW: MockedChatDelayConfig;
|
20
|
+
/**
|
21
|
+
* Blocky flow of messages in the `MockedChat` component
|
22
|
+
*
|
23
|
+
* Messages appear in blocks rather than word-by-word
|
24
|
+
*
|
25
|
+
* @public exported from `@promptbook/components`
|
26
|
+
*/
|
27
|
+
export declare const BLOCKY_FLOW: MockedChatDelayConfig;
|
28
|
+
/**
|
29
|
+
* Random flow of messages in the `MockedChat` component
|
30
|
+
*
|
31
|
+
* @public exported from `@promptbook/components`
|
32
|
+
*/
|
33
|
+
export declare const RANDOM_FLOW: MockedChatDelayConfig;
|
34
|
+
/**
|
35
|
+
* All predefined delay configurations for the `MockedChat` component
|
36
|
+
*
|
37
|
+
* @public exported from `@promptbook/components`
|
38
|
+
*/
|
39
|
+
export declare const MOCKED_CHAT_DELAY_CONFIGS: Record<string, MockedChatDelayConfig>;
|
40
|
+
/**
|
41
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
42
|
+
*/
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { string_file_extension, string_mime_type } from '../../../types/typeAliases';
|
2
|
+
import type { ChatMessage } from '../types/ChatMessage';
|
3
|
+
/**
|
4
|
+
* Supported chat export formatNames
|
5
|
+
* @public exported from `@promptbook/components`
|
6
|
+
*/
|
7
|
+
export type string_chat_format_name = typeof CHAT_SAVE_FORMATS[number]['formatName'];
|
8
|
+
/**
|
9
|
+
* Plugin contract for chat export formatNames
|
10
|
+
* @public exported from `@promptbook/components`
|
11
|
+
*/
|
12
|
+
export type ChatSaveFormatDefinition = {
|
13
|
+
formatName: string_file_extension | string_mime_type | string;
|
14
|
+
label: string;
|
15
|
+
getContent: (messages: ChatMessage[]) => string;
|
16
|
+
mimeType: string;
|
17
|
+
fileExtension: string;
|
18
|
+
};
|
19
|
+
/**
|
20
|
+
* JSON export plugin (full metadata)
|
21
|
+
*
|
22
|
+
* @public exported from `@promptbook/components`
|
23
|
+
*/
|
24
|
+
export declare const jsonSaveFormatDefinition: {
|
25
|
+
readonly formatName: "json";
|
26
|
+
readonly label: "JSON (full)";
|
27
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
28
|
+
readonly mimeType: "application/json";
|
29
|
+
readonly fileExtension: "json";
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* Plain text export plugin (messages only)
|
33
|
+
*
|
34
|
+
* @public exported from `@promptbook/components`
|
35
|
+
*/
|
36
|
+
export declare const txtSaveFormatDefinition: {
|
37
|
+
readonly formatName: "txt";
|
38
|
+
readonly label: "Plain Text";
|
39
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
40
|
+
readonly mimeType: "text/plain";
|
41
|
+
readonly fileExtension: "txt";
|
42
|
+
};
|
43
|
+
/**
|
44
|
+
* Markdown export plugin
|
45
|
+
*
|
46
|
+
* @public exported from `@promptbook/components`
|
47
|
+
*/
|
48
|
+
export declare const mdSaveFormatDefinition: {
|
49
|
+
readonly formatName: "md";
|
50
|
+
readonly label: "Markdown";
|
51
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
52
|
+
readonly mimeType: "text/markdown";
|
53
|
+
readonly fileExtension: "md";
|
54
|
+
};
|
55
|
+
/**
|
56
|
+
* HTML export plugin
|
57
|
+
*
|
58
|
+
* @public exported from `@promptbook/components`
|
59
|
+
*/
|
60
|
+
export declare const htmlSaveFormatDefinition: {
|
61
|
+
readonly formatName: "html";
|
62
|
+
readonly label: "HTML";
|
63
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
64
|
+
readonly mimeType: "text/html";
|
65
|
+
readonly fileExtension: "html";
|
66
|
+
};
|
67
|
+
/**
|
68
|
+
* Registry of all built-in chat save plugins
|
69
|
+
*
|
70
|
+
* @public exported from `@promptbook/components`
|
71
|
+
*/
|
72
|
+
export declare const CHAT_SAVE_FORMATS: readonly [{
|
73
|
+
readonly formatName: "json";
|
74
|
+
readonly label: "JSON (full)";
|
75
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
76
|
+
readonly mimeType: "application/json";
|
77
|
+
readonly fileExtension: "json";
|
78
|
+
}, {
|
79
|
+
readonly formatName: "txt";
|
80
|
+
readonly label: "Plain Text";
|
81
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
82
|
+
readonly mimeType: "text/plain";
|
83
|
+
readonly fileExtension: "txt";
|
84
|
+
}, {
|
85
|
+
readonly formatName: "md";
|
86
|
+
readonly label: "Markdown";
|
87
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
88
|
+
readonly mimeType: "text/markdown";
|
89
|
+
readonly fileExtension: "md";
|
90
|
+
}, {
|
91
|
+
readonly formatName: "html";
|
92
|
+
readonly label: "HTML";
|
93
|
+
readonly getContent: (messages: ChatMessage[]) => string;
|
94
|
+
readonly mimeType: "text/html";
|
95
|
+
readonly fileExtension: "html";
|
96
|
+
}];
|
97
|
+
/**
|
98
|
+
* Returns enabled chat save plugins filtered by formatNames (or all when omitted)
|
99
|
+
*
|
100
|
+
* @public exported from `@promptbook/components`
|
101
|
+
*/
|
102
|
+
export declare function getChatSaveFormatDefinitions(formatNames?: ReadonlyArray<string_chat_format_name>): ReadonlyArray<ChatSaveFormatDefinition>;
|
103
|
+
/**
|
104
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
105
|
+
*/
|
@@ -0,0 +1,11 @@
|
|
1
|
+
type AttachmentIconProps = {
|
2
|
+
size?: number;
|
3
|
+
color?: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @@@
|
7
|
+
*
|
8
|
+
* @public exported from `@promptbook/components`
|
9
|
+
*/
|
10
|
+
export declare function AttachmentIcon({ size, color }: AttachmentIconProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
type CloseIconProps = {
|
2
|
+
size?: number;
|
3
|
+
color?: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @@@
|
7
|
+
*
|
8
|
+
* @public exported from `@promptbook/components`
|
9
|
+
*/
|
10
|
+
export declare function CloseIcon({ size, color }: CloseIconProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -31,6 +31,12 @@ export type RemoteServerOptions<TCustomOptions> = CommonToolsOptions & {
|
|
31
31
|
* @property {number} port The port number the server will listen on.
|
32
32
|
*/
|
33
33
|
readonly port: number;
|
34
|
+
/**
|
35
|
+
* Enable rich UI (React + Tailwind) at `/` path.
|
36
|
+
* Default: true
|
37
|
+
* If false, server will respond with markdown as before.
|
38
|
+
*/
|
39
|
+
readonly isRichUi?: boolean;
|
34
40
|
/**
|
35
41
|
* Creates execution tools the client
|
36
42
|
*
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { ServerInfo } from './types';
|
2
|
+
/**
|
3
|
+
* @@@
|
4
|
+
*
|
5
|
+
* @private internal utility of Remote Server
|
6
|
+
*/
|
7
|
+
export declare function HtmlDoc({ info }: {
|
8
|
+
info: ServerInfo;
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
10
|
+
/**
|
11
|
+
* Add Note: [💞] Ignore a discrepancy between file name and entity name
|
12
|
+
* <- TODO: !!! Maybe split into multiple files
|
13
|
+
*/
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { ServerInfo } from './types';
|
2
|
+
/**
|
3
|
+
* Render full HTML for the server index using React SSR without requiring TSX/JSX compiler flags.
|
4
|
+
*
|
5
|
+
* @private internal utility of Remote Server
|
6
|
+
*/
|
7
|
+
export declare function renderServerIndexHtml(info: ServerInfo): string;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export type ServerInfo = {
|
2
|
+
bookLanguageVersion: string;
|
3
|
+
promptbookEngineVersion: string;
|
4
|
+
nodeVersion: string;
|
5
|
+
port: number | string | undefined;
|
6
|
+
startupDate: string;
|
7
|
+
isAnonymousModeAllowed: boolean;
|
8
|
+
isApplicationModeAllowed: boolean;
|
9
|
+
pipelines: ReadonlyArray<string>;
|
10
|
+
runningExecutions: number;
|
11
|
+
paths: ReadonlyArray<string>;
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* Add Note: [💞] Ignore a discrepancy between file name and entity name
|
15
|
+
* <- TODO: !!! Maybe split into multiple files
|
16
|
+
*/
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
16
16
|
/**
|
17
17
|
* Represents the version string of the Promptbook engine.
|
18
|
-
* It follows semantic versioning (e.g., `0.
|
18
|
+
* It follows semantic versioning (e.g., `0.102.0-1`).
|
19
19
|
*
|
20
20
|
* @generated
|
21
21
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@promptbook/wizard",
|
3
|
-
"version": "0.102.0-
|
3
|
+
"version": "0.102.0-2",
|
4
4
|
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
|
5
5
|
"private": false,
|
6
6
|
"sideEffects": false,
|
@@ -95,7 +95,7 @@
|
|
95
95
|
"module": "./esm/index.es.js",
|
96
96
|
"typings": "./esm/typings/src/_packages/wizard.index.d.ts",
|
97
97
|
"peerDependencies": {
|
98
|
-
"@promptbook/core": "0.102.0-
|
98
|
+
"@promptbook/core": "0.102.0-2"
|
99
99
|
},
|
100
100
|
"dependencies": {
|
101
101
|
"@ai-sdk/deepseek": "0.1.6",
|
package/umd/index.umd.js
CHANGED
@@ -48,7 +48,7 @@
|
|
48
48
|
* @generated
|
49
49
|
* @see https://github.com/webgptorg/promptbook
|
50
50
|
*/
|
51
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-
|
51
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.102.0-2';
|
52
52
|
/**
|
53
53
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
54
54
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import type { ChatMessage } from '../types/ChatMessage';
|
2
|
-
/**
|
3
|
-
* Supported chat export formats
|
4
|
-
* @public exported from `@promptbook/components`
|
5
|
-
*/
|
6
|
-
export type ChatSaveFormat = 'json' | 'txt' | 'md' | 'html';
|
7
|
-
/**
|
8
|
-
* Plugin contract for chat export formats
|
9
|
-
* @public exported from `@promptbook/components`
|
10
|
-
*/
|
11
|
-
export type ChatSavePlugin = {
|
12
|
-
format: ChatSaveFormat;
|
13
|
-
label: string;
|
14
|
-
getContent: (messages: ChatMessage[]) => string;
|
15
|
-
mimeType: string;
|
16
|
-
fileExtension: string;
|
17
|
-
};
|
18
|
-
/**
|
19
|
-
* JSON export plugin (full metadata)
|
20
|
-
*
|
21
|
-
* @public exported from `@promptbook/components`
|
22
|
-
*/
|
23
|
-
export declare const jsonSavePlugin: ChatSavePlugin;
|
24
|
-
/**
|
25
|
-
* Plain text export plugin (messages only)
|
26
|
-
*
|
27
|
-
* @public exported from `@promptbook/components`
|
28
|
-
*/
|
29
|
-
export declare const txtSavePlugin: ChatSavePlugin;
|
30
|
-
/**
|
31
|
-
* Markdown export plugin (formatted)
|
32
|
-
*
|
33
|
-
* @public exported from `@promptbook/components`
|
34
|
-
*/
|
35
|
-
export declare const mdSavePlugin: ChatSavePlugin;
|
36
|
-
/**
|
37
|
-
* HTML export plugin (formatted)
|
38
|
-
* @public exported from `@promptbook/components`
|
39
|
-
*/
|
40
|
-
export declare const htmlSavePlugin: ChatSavePlugin;
|
41
|
-
/**
|
42
|
-
* Registry of all built-in chat save plugins
|
43
|
-
*
|
44
|
-
* @public exported from `@promptbook/components`
|
45
|
-
*/
|
46
|
-
export declare const chatSavePlugins: ChatSavePlugin[];
|
47
|
-
/**
|
48
|
-
* Returns enabled chat save plugins filtered by formats (or all when omitted)
|
49
|
-
*
|
50
|
-
* @public exported from `@promptbook/components`
|
51
|
-
*/
|
52
|
-
export declare function getChatSavePlugins(formats?: ChatSaveFormat[]): ChatSavePlugin[];
|
53
|
-
/**
|
54
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
55
|
-
*/
|