@promptbook/wizard 0.102.0-1 → 0.102.0-11
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 +314 -231
- package/esm/index.es.js.map +1 -1
- package/esm/typings/books/index.d.ts +81 -0
- package/esm/typings/src/_packages/components.index.d.ts +21 -13
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +4 -0
- package/esm/typings/src/_packages/types.index.d.ts +13 -9
- package/esm/typings/src/_packages/utils.index.d.ts +12 -14
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +1 -1
- package/esm/typings/src/book-2.0/utils/generateGravatarUrl.d.ts +1 -1
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +1 -1
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +1 -1
- package/esm/typings/src/book-components/BookEditor/BookEditorInner.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +1 -5
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +35 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +29 -7
- package/esm/typings/src/book-components/Chat/Chat/constants.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +19 -1
- package/esm/typings/src/book-components/Chat/MockedChat/MockedChat.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/MockedChat/constants.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/save/_common/getChatSaveFormatDefinitions.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/index.d.ts +39 -0
- package/esm/typings/src/book-components/Chat/save/json/jsonSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/save/text/txtSaveFormatDefinition.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +31 -5
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +3 -3
- package/esm/typings/src/book-components/Chat/utils/exportChatHistory.d.ts +3 -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/execution/LlmExecutionToolsConstructor.d.ts +1 -1
- package/esm/typings/src/execution/execution-report/countWorkingDuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +1 -2
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +1 -1
- package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/agent/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/agent/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/register-constructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -3
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +5 -5
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +1 -1
- 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/scrapers/_boilerplate/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +2 -4
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/markitdown/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-constructor.d.ts +1 -1
- package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +6 -6
- package/esm/typings/src/types/Prompt.d.ts +5 -0
- package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiText.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextEllipsis.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextEmdashed.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextQuotes.d.ts +1 -1
- package/esm/typings/src/utils/markdown/humanizeAiTextWhitespace.d.ts +1 -1
- package/esm/typings/src/utils/markdown/prettifyMarkdown.d.ts +2 -0
- package/esm/typings/src/utils/markdown/promptbookifyAiText.d.ts +1 -1
- package/esm/typings/src/utils/{trimCodeBlock.d.ts → markdown/trimCodeBlock.d.ts} +1 -1
- package/esm/typings/src/utils/{trimEndOfCodeBlock.d.ts → markdown/trimEndOfCodeBlock.d.ts} +1 -1
- package/esm/typings/src/utils/{$Register.d.ts → misc/$Register.d.ts} +2 -2
- package/esm/typings/src/utils/{$getCurrentDate.d.ts → misc/$getCurrentDate.d.ts} +1 -1
- package/esm/typings/src/utils/{arrayableToArray.d.ts → misc/arrayableToArray.d.ts} +1 -1
- package/esm/typings/src/utils/misc/debounce.d.ts +5 -0
- package/esm/typings/src/utils/{emojis.d.ts → misc/emojis.d.ts} +1 -1
- package/esm/typings/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +20 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +314 -231
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/book-components/BookEditor/injectCssModuleIntoShadowRoot.d.ts +0 -11
- package/esm/typings/src/book-components/Chat/save/savePlugins.d.ts +0 -105
- /package/esm/typings/src/{utils/arrayableToArray.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.delete.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{trimCodeBlock.test.d.ts → markdown/trimCodeBlock.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{trimEndOfCodeBlock.test.d.ts → markdown/trimEndOfCodeBlock.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{FromtoItems.d.ts → misc/FromtoItems.d.ts} +0 -0
- /package/esm/typings/src/utils/{markdown/prettifyMarkdown.test.d.ts → misc/arrayableToArray.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{parseNumber.d.ts → misc/parseNumber.d.ts} +0 -0
- /package/esm/typings/src/utils/{parseNumber.test.d.ts → misc/parseNumber.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeEmojis.d.ts → normalization/removeEmojis.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeEmojis.test.d.ts → normalization/removeEmojis.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeQuotes.d.ts → normalization/removeQuotes.d.ts} +0 -0
- /package/esm/typings/src/utils/{removeQuotes.test.d.ts → normalization/removeQuotes.test.d.ts} +0 -0
- /package/esm/typings/src/utils/{unwrapResult.d.ts → normalization/unwrapResult.d.ts} +0 -0
- /package/esm/typings/src/utils/{unwrapResult.test.d.ts → normalization/unwrapResult.test.d.ts} +0 -0
@@ -127,5 +127,86 @@ declare const _default: ({
|
|
127
127
|
content: string;
|
128
128
|
}[];
|
129
129
|
sourceFile: string;
|
130
|
+
} | {
|
131
|
+
title: string;
|
132
|
+
pipelineUrl: string;
|
133
|
+
formfactorName: string;
|
134
|
+
parameters: {
|
135
|
+
name: string;
|
136
|
+
isInput: boolean;
|
137
|
+
isOutput: boolean;
|
138
|
+
}[];
|
139
|
+
tasks: {
|
140
|
+
taskType: string;
|
141
|
+
name: string;
|
142
|
+
title: string;
|
143
|
+
content: string;
|
144
|
+
resultingParameterName: string;
|
145
|
+
dependentParameterNames: never[];
|
146
|
+
}[];
|
147
|
+
personas: never[];
|
148
|
+
preparations: {
|
149
|
+
id: number;
|
150
|
+
promptbookVersion: string;
|
151
|
+
usage: {
|
152
|
+
price: {
|
153
|
+
value: number;
|
154
|
+
};
|
155
|
+
input: {
|
156
|
+
tokensCount: {
|
157
|
+
value: number;
|
158
|
+
};
|
159
|
+
charactersCount: {
|
160
|
+
value: number;
|
161
|
+
};
|
162
|
+
wordsCount: {
|
163
|
+
value: number;
|
164
|
+
};
|
165
|
+
sentencesCount: {
|
166
|
+
value: number;
|
167
|
+
};
|
168
|
+
linesCount: {
|
169
|
+
value: number;
|
170
|
+
};
|
171
|
+
paragraphsCount: {
|
172
|
+
value: number;
|
173
|
+
};
|
174
|
+
pagesCount: {
|
175
|
+
value: number;
|
176
|
+
};
|
177
|
+
};
|
178
|
+
output: {
|
179
|
+
tokensCount: {
|
180
|
+
value: number;
|
181
|
+
};
|
182
|
+
charactersCount: {
|
183
|
+
value: number;
|
184
|
+
};
|
185
|
+
wordsCount: {
|
186
|
+
value: number;
|
187
|
+
};
|
188
|
+
sentencesCount: {
|
189
|
+
value: number;
|
190
|
+
};
|
191
|
+
linesCount: {
|
192
|
+
value: number;
|
193
|
+
};
|
194
|
+
paragraphsCount: {
|
195
|
+
value: number;
|
196
|
+
};
|
197
|
+
pagesCount: {
|
198
|
+
value: number;
|
199
|
+
};
|
200
|
+
};
|
201
|
+
};
|
202
|
+
}[];
|
203
|
+
knowledgeSources: never[];
|
204
|
+
knowledgePieces: never[];
|
205
|
+
sources: {
|
206
|
+
type: string;
|
207
|
+
path: null;
|
208
|
+
content: string;
|
209
|
+
}[];
|
210
|
+
sourceFile: string;
|
130
211
|
})[];
|
131
212
|
export default _default;
|
@@ -26,14 +26,15 @@ import { MOCKED_CHAT_DELAY_CONFIGS } from '../book-components/Chat/MockedChat/co
|
|
26
26
|
import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
|
27
27
|
import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
|
28
28
|
import { MockedChat } from '../book-components/Chat/MockedChat/MockedChat';
|
29
|
-
import type {
|
30
|
-
import
|
31
|
-
import {
|
32
|
-
import {
|
33
|
-
import {
|
34
|
-
import {
|
35
|
-
import {
|
36
|
-
import {
|
29
|
+
import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/_common/ChatSaveFormatDefinition';
|
30
|
+
import { getChatSaveFormatDefinitions } from '../book-components/Chat/save/_common/getChatSaveFormatDefinitions';
|
31
|
+
import type { string_chat_format_name } from '../book-components/Chat/save/_common/string_chat_format_name';
|
32
|
+
import { htmlSaveFormatDefinition } from '../book-components/Chat/save/html/htmlSaveFormatDefinition';
|
33
|
+
import { CHAT_SAVE_FORMATS } from '../book-components/Chat/save/index';
|
34
|
+
import { jsonSaveFormatDefinition } from '../book-components/Chat/save/json/jsonSaveFormatDefinition';
|
35
|
+
import { mdSaveFormatDefinition } from '../book-components/Chat/save/markdown/mdSaveFormatDefinition';
|
36
|
+
import { pdfSaveFormatDefinition } from '../book-components/Chat/save/pdf/pdfSaveFormatDefinition';
|
37
|
+
import { txtSaveFormatDefinition } from '../book-components/Chat/save/text/txtSaveFormatDefinition';
|
37
38
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
38
39
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
39
40
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
@@ -41,11 +42,14 @@ import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageB
|
|
41
42
|
import { renderMarkdown } from '../book-components/Chat/utils/renderMarkdown';
|
42
43
|
import { isMarkdownContent } from '../book-components/Chat/utils/renderMarkdown';
|
43
44
|
import { ArrowIcon } from '../book-components/icons/ArrowIcon';
|
45
|
+
import { AttachmentIcon } from '../book-components/icons/AttachmentIcon';
|
46
|
+
import { CloseIcon } from '../book-components/icons/CloseIcon';
|
44
47
|
import { PauseIcon } from '../book-components/icons/PauseIcon';
|
45
48
|
import { PlayIcon } from '../book-components/icons/PlayIcon';
|
46
49
|
import { ResetIcon } from '../book-components/icons/ResetIcon';
|
47
50
|
import { SendIcon } from '../book-components/icons/SendIcon';
|
48
51
|
import { TemplateIcon } from '../book-components/icons/TemplateIcon';
|
52
|
+
import { injectCssModuleIntoShadowRoot } from '../utils/misc/injectCssModuleIntoShadowRoot';
|
49
53
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
50
54
|
export type { AvatarChipProps };
|
51
55
|
export { AvatarChip };
|
@@ -74,14 +78,15 @@ export { MOCKED_CHAT_DELAY_CONFIGS };
|
|
74
78
|
export type { MockedChatDelayConfig };
|
75
79
|
export type { MockedChatProps };
|
76
80
|
export { MockedChat };
|
77
|
-
export type { string_chat_format_name };
|
78
81
|
export type { ChatSaveFormatDefinition };
|
79
|
-
export {
|
80
|
-
export {
|
81
|
-
export { mdSaveFormatDefinition };
|
82
|
+
export { getChatSaveFormatDefinitions };
|
83
|
+
export type { string_chat_format_name };
|
82
84
|
export { htmlSaveFormatDefinition };
|
83
85
|
export { CHAT_SAVE_FORMATS };
|
84
|
-
export {
|
86
|
+
export { jsonSaveFormatDefinition };
|
87
|
+
export { mdSaveFormatDefinition };
|
88
|
+
export { pdfSaveFormatDefinition };
|
89
|
+
export { txtSaveFormatDefinition };
|
85
90
|
export type { ChatMessage };
|
86
91
|
export type { ChatParticipant };
|
87
92
|
export type { MessageButton };
|
@@ -89,8 +94,11 @@ export { parseMessageButtons };
|
|
89
94
|
export { renderMarkdown };
|
90
95
|
export { isMarkdownContent };
|
91
96
|
export { ArrowIcon };
|
97
|
+
export { AttachmentIcon };
|
98
|
+
export { CloseIcon };
|
92
99
|
export { PauseIcon };
|
93
100
|
export { PlayIcon };
|
94
101
|
export { ResetIcon };
|
95
102
|
export { SendIcon };
|
96
103
|
export { TemplateIcon };
|
104
|
+
export { injectCssModuleIntoShadowRoot };
|
@@ -29,6 +29,8 @@ import { removeMarkdownComments } from '../utils/markdown/removeMarkdownComments
|
|
29
29
|
import { removeMarkdownFormatting } from '../utils/markdown/removeMarkdownFormatting';
|
30
30
|
import { removeMarkdownLinks } from '../utils/markdown/removeMarkdownLinks';
|
31
31
|
import { splitMarkdownIntoSections } from '../utils/markdown/splitMarkdownIntoSections';
|
32
|
+
import { trimCodeBlock } from '../utils/markdown/trimCodeBlock';
|
33
|
+
import { trimEndOfCodeBlock } from '../utils/markdown/trimEndOfCodeBlock';
|
32
34
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
33
35
|
export { extractBlock };
|
34
36
|
export { extractJsonBlock };
|
@@ -60,3 +62,5 @@ export { removeMarkdownComments };
|
|
60
62
|
export { removeMarkdownFormatting };
|
61
63
|
export { removeMarkdownLinks };
|
62
64
|
export { splitMarkdownIntoSections };
|
65
|
+
export { trimCodeBlock };
|
66
|
+
export { trimEndOfCodeBlock };
|
@@ -16,8 +16,8 @@ import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks
|
|
16
16
|
import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
|
17
17
|
import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
|
18
18
|
import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
|
19
|
-
import type {
|
20
|
-
import type {
|
19
|
+
import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/_common/ChatSaveFormatDefinition';
|
20
|
+
import type { string_chat_format_name } from '../book-components/Chat/save/_common/string_chat_format_name';
|
21
21
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
22
22
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
23
23
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
@@ -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';
|
@@ -305,15 +306,16 @@ import type { number_kilobytes } from '../types/typeAliases';
|
|
305
306
|
import type { number_megabytes } from '../types/typeAliases';
|
306
307
|
import type { number_gigabytes } from '../types/typeAliases';
|
307
308
|
import type { number_terabytes } from '../types/typeAliases';
|
308
|
-
import type { Registered } from '../utils/$Register';
|
309
|
-
import type { Registration } from '../utils/$Register';
|
310
309
|
import type { ColorTransformer } from '../utils/color/operators/ColorTransformer';
|
311
310
|
import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
|
312
311
|
import type { ExecCommandOptions } from '../utils/execCommand/ExecCommandOptions';
|
313
312
|
import type { ExecCommandOptionsAdvanced } from '../utils/execCommand/ExecCommandOptions';
|
314
|
-
import type { FromtoItems } from '../utils/FromtoItems';
|
315
313
|
import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown';
|
316
314
|
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
|
315
|
+
import type { Registered } from '../utils/misc/$Register';
|
316
|
+
import type { Registration } from '../utils/misc/$Register';
|
317
|
+
import type { FromtoItems } from '../utils/misc/FromtoItems';
|
318
|
+
import type { InjectCssModuleIntoShadowRootOptions } from '../utils/misc/injectCssModuleIntoShadowRoot';
|
317
319
|
import type { string_keyword } from '../utils/normalization/IKeywords';
|
318
320
|
import type { Keywords } from '../utils/normalization/IKeywords';
|
319
321
|
import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case';
|
@@ -347,8 +349,8 @@ export type { SendMessageToLlmChatFunction };
|
|
347
349
|
export type { LlmChatProps };
|
348
350
|
export type { MockedChatDelayConfig };
|
349
351
|
export type { MockedChatProps };
|
350
|
-
export type { string_chat_format_name };
|
351
352
|
export type { ChatSaveFormatDefinition };
|
353
|
+
export type { string_chat_format_name };
|
352
354
|
export type { ChatMessage };
|
353
355
|
export type { ChatParticipant };
|
354
356
|
export type { MessageButton };
|
@@ -485,6 +487,7 @@ export type { ApplicationRemoteServerOptions };
|
|
485
487
|
export type { ApplicationRemoteServerClientOptions };
|
486
488
|
export type { LoginRequest };
|
487
489
|
export type { LoginResponse };
|
490
|
+
export type { ServerInfo };
|
488
491
|
export type { Converter };
|
489
492
|
export type { ScraperAndConverterMetadata };
|
490
493
|
export type { ScraperConstructor };
|
@@ -636,15 +639,16 @@ export type { number_kilobytes };
|
|
636
639
|
export type { number_megabytes };
|
637
640
|
export type { number_gigabytes };
|
638
641
|
export type { number_terabytes };
|
639
|
-
export type { Registered };
|
640
|
-
export type { Registration };
|
641
642
|
export type { ColorTransformer };
|
642
643
|
export type { PipelineEditableSerialized };
|
643
644
|
export type { ExecCommandOptions };
|
644
645
|
export type { ExecCommandOptionsAdvanced };
|
645
|
-
export type { FromtoItems };
|
646
646
|
export type { CodeBlock };
|
647
647
|
export type { MarkdownSection };
|
648
|
+
export type { Registered };
|
649
|
+
export type { Registration };
|
650
|
+
export type { FromtoItems };
|
651
|
+
export type { InjectCssModuleIntoShadowRootOptions };
|
648
652
|
export type { string_keyword };
|
649
653
|
export type { Keywords };
|
650
654
|
export type { string_kebab_case };
|
@@ -11,7 +11,6 @@ import { jsonParse } from '../formats/json/utils/jsonParse';
|
|
11
11
|
import { isValidXmlString } from '../formats/xml/utils/isValidXmlString';
|
12
12
|
import { prompt } from '../pipeline/prompt-notation';
|
13
13
|
import { promptTemplate } from '../pipeline/prompt-notation';
|
14
|
-
import { $getCurrentDate } from '../utils/$getCurrentDate';
|
15
14
|
import { $isRunningInBrowser } from '../utils/environment/$isRunningInBrowser';
|
16
15
|
import { $isRunningInJest } from '../utils/environment/$isRunningInJest';
|
17
16
|
import { $isRunningInNode } from '../utils/environment/$isRunningInNode';
|
@@ -26,6 +25,9 @@ import { splitIntoSentences } from '../utils/expectation-counters/countSentences
|
|
26
25
|
import { countSentences } from '../utils/expectation-counters/countSentences';
|
27
26
|
import { countWords } from '../utils/expectation-counters/countWords';
|
28
27
|
import { CountUtils } from '../utils/expectation-counters/index';
|
28
|
+
import { $getCurrentDate } from '../utils/misc/$getCurrentDate';
|
29
|
+
import { debounce } from '../utils/misc/debounce';
|
30
|
+
import { parseNumber } from '../utils/misc/parseNumber';
|
29
31
|
import { capitalize } from '../utils/normalization/capitalize';
|
30
32
|
import { decapitalize } from '../utils/normalization/decapitalize';
|
31
33
|
import { DIACRITIC_VARIANTS_LETTERS } from '../utils/normalization/DIACRITIC_VARIANTS_LETTERS';
|
@@ -48,17 +50,17 @@ import { orderJson } from '../utils/normalization/orderJson';
|
|
48
50
|
import { parseKeywords } from '../utils/normalization/parseKeywords';
|
49
51
|
import { parseKeywordsFromString } from '../utils/normalization/parseKeywordsFromString';
|
50
52
|
import { removeDiacritics } from '../utils/normalization/removeDiacritics';
|
53
|
+
import { removeEmojis } from '../utils/normalization/removeEmojis';
|
54
|
+
import { removeQuotes } from '../utils/normalization/removeQuotes';
|
51
55
|
import { searchKeywords } from '../utils/normalization/searchKeywords';
|
52
56
|
import { suffixUrl } from '../utils/normalization/suffixUrl';
|
53
57
|
import { titleToName } from '../utils/normalization/titleToName';
|
58
|
+
import { unwrapResult } from '../utils/normalization/unwrapResult';
|
54
59
|
import { spaceTrim } from '../utils/organization/spaceTrim';
|
55
60
|
import { extractParameterNames } from '../utils/parameters/extractParameterNames';
|
56
61
|
import { numberToString } from '../utils/parameters/numberToString';
|
57
62
|
import { templateParameters } from '../utils/parameters/templateParameters';
|
58
63
|
import { valueToString } from '../utils/parameters/valueToString';
|
59
|
-
import { parseNumber } from '../utils/parseNumber';
|
60
|
-
import { removeEmojis } from '../utils/removeEmojis';
|
61
|
-
import { removeQuotes } from '../utils/removeQuotes';
|
62
64
|
import { $deepFreeze } from '../utils/serialization/$deepFreeze';
|
63
65
|
import { checkSerializableAsJson } from '../utils/serialization/checkSerializableAsJson';
|
64
66
|
import { clonePipeline } from '../utils/serialization/clonePipeline';
|
@@ -69,9 +71,6 @@ import { jsonStringsToJsons } from '../utils/serialization/jsonStringsToJsons';
|
|
69
71
|
import { difference } from '../utils/sets/difference';
|
70
72
|
import { intersection } from '../utils/sets/intersection';
|
71
73
|
import { union } from '../utils/sets/union';
|
72
|
-
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
73
|
-
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
74
|
-
import { unwrapResult } from '../utils/unwrapResult';
|
75
74
|
import { isValidEmail } from '../utils/validators/email/isValidEmail';
|
76
75
|
import { isRootPath } from '../utils/validators/filePath/isRootPath';
|
77
76
|
import { isValidFilePath } from '../utils/validators/filePath/isValidFilePath';
|
@@ -96,7 +95,6 @@ export { jsonParse };
|
|
96
95
|
export { isValidXmlString };
|
97
96
|
export { prompt };
|
98
97
|
export { promptTemplate };
|
99
|
-
export { $getCurrentDate };
|
100
98
|
export { $isRunningInBrowser };
|
101
99
|
export { $isRunningInJest };
|
102
100
|
export { $isRunningInNode };
|
@@ -111,6 +109,9 @@ export { splitIntoSentences };
|
|
111
109
|
export { countSentences };
|
112
110
|
export { countWords };
|
113
111
|
export { CountUtils };
|
112
|
+
export { $getCurrentDate };
|
113
|
+
export { debounce };
|
114
|
+
export { parseNumber };
|
114
115
|
export { capitalize };
|
115
116
|
export { decapitalize };
|
116
117
|
export { DIACRITIC_VARIANTS_LETTERS };
|
@@ -133,17 +134,17 @@ export { orderJson };
|
|
133
134
|
export { parseKeywords };
|
134
135
|
export { parseKeywordsFromString };
|
135
136
|
export { removeDiacritics };
|
137
|
+
export { removeEmojis };
|
138
|
+
export { removeQuotes };
|
136
139
|
export { searchKeywords };
|
137
140
|
export { suffixUrl };
|
138
141
|
export { titleToName };
|
142
|
+
export { unwrapResult };
|
139
143
|
export { spaceTrim };
|
140
144
|
export { extractParameterNames };
|
141
145
|
export { numberToString };
|
142
146
|
export { templateParameters };
|
143
147
|
export { valueToString };
|
144
|
-
export { parseNumber };
|
145
|
-
export { removeEmojis };
|
146
|
-
export { removeQuotes };
|
147
148
|
export { $deepFreeze };
|
148
149
|
export { checkSerializableAsJson };
|
149
150
|
export { clonePipeline };
|
@@ -154,9 +155,6 @@ export { jsonStringsToJsons };
|
|
154
155
|
export { difference };
|
155
156
|
export { intersection };
|
156
157
|
export { union };
|
157
|
-
export { trimCodeBlock };
|
158
|
-
export { trimEndOfCodeBlock };
|
159
|
-
export { unwrapResult };
|
160
158
|
export { isValidEmail };
|
161
159
|
export { isRootPath };
|
162
160
|
export { isValidFilePath };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
2
|
-
import { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
2
|
+
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
3
3
|
import type { string_model_name } from '../../types/typeAliases';
|
4
4
|
import type { AgentModelRequirements } from './AgentModelRequirements';
|
5
5
|
import type { string_book } from './string_book';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { CSSProperties } from 'react';
|
2
2
|
import type { Promisable } from 'type-fest';
|
3
3
|
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
4
|
-
import { string_knowledge_source_content } from '../../types/typeAliases';
|
4
|
+
import type { string_knowledge_source_content } from '../../types/typeAliases';
|
5
5
|
/**
|
6
6
|
* Props of `BookEditor`
|
7
7
|
*
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { string_chat_format_name } from '../save/savePlugins';
|
2
1
|
import type { ChatProps } from './ChatProps';
|
3
2
|
/**
|
4
3
|
* Renders a chat with messages and input for new messages
|
@@ -13,7 +12,4 @@ import type { ChatProps } from './ChatProps';
|
|
13
12
|
*
|
14
13
|
* @public exported from `@promptbook/components`
|
15
14
|
*/
|
16
|
-
export declare function Chat(props: ChatProps
|
17
|
-
saveFormats?: string_chat_format_name[];
|
18
|
-
isSaveButtonEnabled?: boolean;
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
15
|
+
export declare function Chat(props: ChatProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { id } from '../../../types/typeAliases';
|
3
|
+
import type { ChatMessage } from '../types/ChatMessage';
|
4
|
+
import type { ChatParticipant } from '../types/ChatParticipant';
|
5
|
+
import type { ChatProps } from './ChatProps';
|
6
|
+
/**
|
7
|
+
* Props for the `ChatMessageItem` component
|
8
|
+
*
|
9
|
+
* @private props for internal subcomponent
|
10
|
+
*/
|
11
|
+
type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants'> & {
|
12
|
+
message: ChatMessage;
|
13
|
+
participant: ChatParticipant | undefined;
|
14
|
+
isLastMessage: boolean;
|
15
|
+
setExpandedMessageId: (value: id | null) => void;
|
16
|
+
isExpanded: boolean;
|
17
|
+
currentRating: number;
|
18
|
+
handleRating: (message: ChatMessage, rating: number) => void;
|
19
|
+
mode: 'LIGHT' | 'DARK';
|
20
|
+
/**
|
21
|
+
* Enables the copy button for this message bubble.
|
22
|
+
*/
|
23
|
+
isCopyButtonEnabled?: boolean;
|
24
|
+
/**
|
25
|
+
* Enables the feedback (rating) UI for this message bubble.
|
26
|
+
*/
|
27
|
+
isFeedbackEnabled?: boolean;
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* Renders a single chat message item with avatar, content, buttons, and rating.
|
31
|
+
*
|
32
|
+
* @private internal subcomponent of `<Chat>` component
|
33
|
+
*/
|
34
|
+
export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, isCopyButtonEnabled, isFeedbackEnabled, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
|
35
|
+
export {};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
2
2
|
import type { Promisable } from 'type-fest';
|
3
|
+
import type { string_chat_format_name } from '../save/_common/string_chat_format_name';
|
3
4
|
import type { ChatMessage } from '../types/ChatMessage';
|
4
5
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
5
6
|
/**
|
@@ -91,12 +92,6 @@ export type ChatProps = {
|
|
91
92
|
onAssistantVoiceResponse?: (content: string, isVoiceCall: boolean) => void;
|
92
93
|
onVoiceCallStateChange?: (isVoiceCalling: boolean) => void;
|
93
94
|
};
|
94
|
-
/**
|
95
|
-
* Indicates whether a the text is AI-generated and should be humanized
|
96
|
-
*
|
97
|
-
* @default true
|
98
|
-
*/
|
99
|
-
readonly isAiTextHumanized?: boolean;
|
100
95
|
/**
|
101
96
|
* Indicates whether a voice call is currently active
|
102
97
|
*/
|
@@ -109,12 +104,24 @@ export type ChatProps = {
|
|
109
104
|
* Whether the save button is enabled and shown
|
110
105
|
*/
|
111
106
|
readonly isSaveButtonEnabled?: boolean;
|
107
|
+
/**
|
108
|
+
* List of formats in which the chat can be saved/exported
|
109
|
+
*
|
110
|
+
* @default * All supported formats (see `string_chat_format_name` type)
|
111
|
+
*/
|
112
|
+
readonly saveFormats?: Array<string_chat_format_name>;
|
112
113
|
/**
|
113
114
|
* Is the writing textarea automatically focused?
|
114
115
|
*
|
115
116
|
* @default true on Desktop false on mobile (to prevent mobile keyboard from popping up)
|
116
117
|
*/
|
117
118
|
readonly isFocusedOnLoad?: boolean;
|
119
|
+
/**
|
120
|
+
* Indicates whether the text shown in chat should be post-processed by removing AI artifacts and making it more "human-like" and "promptbook-like"
|
121
|
+
*
|
122
|
+
* @default true
|
123
|
+
*/
|
124
|
+
readonly isAiTextHumanizedAndPromptbookified?: boolean;
|
118
125
|
/**
|
119
126
|
* Optional markdown header to include at the top of exported files.
|
120
127
|
* Example: "## Discussion Topic\n\nSome topic here"
|
@@ -145,7 +152,22 @@ export type ChatProps = {
|
|
145
152
|
expectedAnswer: string | null;
|
146
153
|
url: string;
|
147
154
|
}): Promisable<void>;
|
155
|
+
/**
|
156
|
+
* Optional callback for handling file uploads
|
157
|
+
* When provided, enables file upload functionality via drag-and-drop and file button
|
158
|
+
* The callback should process the file and return text content to be inserted into the message
|
159
|
+
*
|
160
|
+
* @param file - The uploaded file
|
161
|
+
* @returns Promise or string with the text content to insert into the chat message
|
162
|
+
*/
|
163
|
+
onFileUpload?(file: File): Promisable<string>;
|
164
|
+
/**
|
165
|
+
* Enables the copy button for each message bubble.
|
166
|
+
* When true, a copy button appears in the top-right of each message.
|
167
|
+
* @default true
|
168
|
+
*/
|
169
|
+
isCopyButtonEnabled?: boolean;
|
148
170
|
};
|
149
171
|
/**
|
150
172
|
* TODO: [☁️] Export component prop types only to `@promptbook/components` (not `@promptbook/types`)
|
151
|
-
*/
|
173
|
+
*/
|
@@ -3,6 +3,13 @@
|
|
3
3
|
* @private util of `<Chat />`
|
4
4
|
*/
|
5
5
|
export declare const LOADING_INTERACTIVE_IMAGE = "Loading...";
|
6
|
+
/**
|
7
|
+
* [🚉] Avatar dimensions constant to prevent layout jumps and maintain DRY principle
|
8
|
+
*
|
9
|
+
* @deprecated use `isComplete` instead
|
10
|
+
* @private util of `<Chat />`
|
11
|
+
*/
|
12
|
+
export declare const AVATAR_SIZE = 40;
|
6
13
|
/**
|
7
14
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
8
15
|
*/
|
@@ -1,14 +1,20 @@
|
|
1
1
|
import type { LlmExecutionTools } from '../../../execution/LlmExecutionTools';
|
2
|
+
import type { id } from '../../../types/typeAliases';
|
2
3
|
import type { ChatProps } from '../Chat/ChatProps';
|
4
|
+
import type { SendMessageToLlmChatFunction } from '../hooks/useSendMessageToLlmChat';
|
3
5
|
import type { ChatMessage } from '../types/ChatMessage';
|
4
6
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
5
|
-
import type { SendMessageToLlmChatFunction } from '../hooks/useSendMessageToLlmChat';
|
6
7
|
/**
|
7
8
|
* Props for LlmChat component, derived from ChatProps but with LLM-specific modifications
|
8
9
|
*
|
9
10
|
* @public exported from `@promptbook/components`
|
10
11
|
*/
|
11
12
|
export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'> & {
|
13
|
+
/**
|
14
|
+
* Optional thread (full chat history) to be passed to LLM execution tools.
|
15
|
+
* If not provided, the internal messages state will be used.
|
16
|
+
*/
|
17
|
+
readonly thread?: ReadonlyArray<ChatMessage>;
|
12
18
|
/**
|
13
19
|
* LLM execution tools for chatting with the model
|
14
20
|
*/
|
@@ -34,4 +40,16 @@ export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'
|
|
34
40
|
* When provided, LlmChat will attach its internal handler to it (no React context needed).
|
35
41
|
*/
|
36
42
|
readonly sendMessage?: SendMessageToLlmChatFunction;
|
43
|
+
/**
|
44
|
+
* Name of the USER as participant in the chat
|
45
|
+
*
|
46
|
+
* @default 'USER'
|
47
|
+
*/
|
48
|
+
readonly userParticipantName?: id;
|
49
|
+
/**
|
50
|
+
* Name of the LLM as participant in the chat
|
51
|
+
*
|
52
|
+
* @default 'ASSISTANT'
|
53
|
+
*/
|
54
|
+
readonly llmParticipantName?: id;
|
37
55
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { string_file_extension, string_mime_type } from '../../../../types/typeAliases';
|
2
|
+
import type { ChatMessage } from '../../types/ChatMessage';
|
3
|
+
/**
|
4
|
+
* Plugin contract for chat export formatNames
|
5
|
+
* @public exported from `@promptbook/components`
|
6
|
+
*/
|
7
|
+
export type ChatSaveFormatDefinition = {
|
8
|
+
formatName: string_file_extension | string_mime_type | string;
|
9
|
+
label: string;
|
10
|
+
getContent: (messages: ChatMessage[]) => string;
|
11
|
+
mimeType: string;
|
12
|
+
fileExtension: string;
|
13
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { ChatSaveFormatDefinition } from './ChatSaveFormatDefinition';
|
2
|
+
import type { string_chat_format_name } from './string_chat_format_name';
|
3
|
+
/**
|
4
|
+
* Returns enabled chat save plugins filtered by formatNames (or all when omitted)
|
5
|
+
*
|
6
|
+
* @public exported from `@promptbook/components`
|
7
|
+
*/
|
8
|
+
export declare function getChatSaveFormatDefinitions(formatNames?: ReadonlyArray<string_chat_format_name>): ReadonlyArray<ChatSaveFormatDefinition>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* HTML export plugin
|
3
|
+
*
|
4
|
+
* @public exported from `@promptbook/components`
|
5
|
+
*/
|
6
|
+
export declare const htmlSaveFormatDefinition: {
|
7
|
+
readonly formatName: "html";
|
8
|
+
readonly label: "HTML";
|
9
|
+
readonly getContent: (messages: import("../../types/ChatMessage").ChatMessage[]) => string;
|
10
|
+
readonly mimeType: "text/html";
|
11
|
+
readonly fileExtension: "html";
|
12
|
+
};
|