@promptbook/wizard 0.102.0-2 → 0.102.0-4

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.
Files changed (24) hide show
  1. package/esm/index.es.js +80 -39
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/components.index.d.ts +15 -13
  4. package/esm/typings/src/_packages/types.index.d.ts +3 -3
  5. package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +1 -1
  6. package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +14 -1
  7. package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +13 -0
  8. package/esm/typings/src/book-components/Chat/save/_common/getChatSaveFormatDefinitions.d.ts +8 -0
  9. package/esm/typings/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +6 -0
  10. package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +12 -0
  11. package/esm/typings/src/book-components/Chat/save/index.d.ts +39 -0
  12. package/esm/typings/src/book-components/Chat/save/json/jsonSaveFormatDefinition.d.ts +12 -0
  13. package/esm/typings/src/book-components/Chat/save/markdown/mdSaveFormatDefinition.d.ts +12 -0
  14. package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +12 -0
  15. package/esm/typings/src/book-components/Chat/save/text/txtSaveFormatDefinition.d.ts +12 -0
  16. package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +31 -5
  17. package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +3 -3
  18. package/esm/typings/src/book-components/Chat/utils/exportChatHistory.d.ts +3 -0
  19. package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +4 -0
  20. package/esm/typings/src/version.d.ts +1 -1
  21. package/package.json +2 -2
  22. package/umd/index.umd.js +80 -39
  23. package/umd/index.umd.js.map +1 -1
  24. package/esm/typings/src/book-components/Chat/save/savePlugins.d.ts +0 -105
@@ -1,105 +0,0 @@
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
- */