@promptbook/markdown-utils 0.107.0-0 β 0.110.0-0
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 +20 -8
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/markdown-utils.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +8 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatActionsBar.d.ts +32 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatCitationModal.d.ts +21 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatInputArea.d.ts +48 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageList.d.ts +40 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatRatingModal.d.ts +30 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +24 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +23 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +39 -0
- package/esm/typings/src/book-components/Chat/hooks/useChatActionsOverlap.d.ts +55 -0
- package/esm/typings/src/book-components/Chat/hooks/useChatRatings.d.ts +67 -0
- package/esm/typings/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +7 -0
- package/esm/typings/src/book-components/icons/TeacherIcon.d.ts +15 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +18 -1
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +40 -3
- package/esm/typings/src/types/ToolCall.d.ts +67 -0
- package/esm/typings/src/utils/linguistic-hash/linguisticHash.d.ts +1 -24
- package/esm/typings/src/utils/linguistic-hash/linguisticHashWordCount.d.ts +31 -0
- package/esm/typings/src/utils/linguistic-hash/linguisticHashWordSelection.d.ts +22 -0
- package/esm/typings/src/utils/markdown/humanizeAiTextSources.d.ts +13 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +20 -7
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -23,7 +23,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.110.0-0';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [π] Ignore a discrepancy between file name and entity name
|
|
@@ -7802,14 +7802,27 @@ function humanizeAiTextEmdashed(aiText) {
|
|
|
7802
7802
|
* @public exported from `@promptbook/markdown-utils`
|
|
7803
7803
|
*/
|
|
7804
7804
|
function humanizeAiTextQuotes(aiText) {
|
|
7805
|
-
return aiText
|
|
7806
|
-
.replace(/[ββββ«»ββγγγοΌ]/g, '"')
|
|
7807
|
-
.replace(/[βββββΉβΊββοΌΚΌ]/g, "'");
|
|
7805
|
+
return aiText.replace(/[ββββ«»ββγγγοΌ]/g, '"').replace(/[βββββΉβΊββοΌΚΌ]/g, "'");
|
|
7808
7806
|
}
|
|
7809
7807
|
/**
|
|
7810
7808
|
* Note: [π] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7811
7809
|
*/
|
|
7812
7810
|
|
|
7811
|
+
/**
|
|
7812
|
+
* Remove bracketed source citation artifacts like `\u30105:1\u2020source\u3011`.
|
|
7813
|
+
*
|
|
7814
|
+
* Note: [??] This function is idempotent.
|
|
7815
|
+
* Tip: If you want to do the full cleanup, look for `humanizeAiText` exported `@promptbook/markdown-utils`
|
|
7816
|
+
*
|
|
7817
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
7818
|
+
*/
|
|
7819
|
+
function humanizeAiTextSources(aiText) {
|
|
7820
|
+
return aiText.replace(/[ \t]*\u3010\s*\d+(?:\s*:\s*\d+)?\s*\u2020source\s*\u3011/g, '');
|
|
7821
|
+
}
|
|
7822
|
+
/**
|
|
7823
|
+
* Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
7824
|
+
*/
|
|
7825
|
+
|
|
7813
7826
|
/**
|
|
7814
7827
|
* Change unprintable hard spaces to regular spaces and drop zero-width spaces
|
|
7815
7828
|
*
|
|
@@ -7819,9 +7832,7 @@ function humanizeAiTextQuotes(aiText) {
|
|
|
7819
7832
|
* @public exported from `@promptbook/markdown-utils`
|
|
7820
7833
|
*/
|
|
7821
7834
|
function humanizeAiTextWhitespace(aiText) {
|
|
7822
|
-
return aiText
|
|
7823
|
-
.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ')
|
|
7824
|
-
.replace(/[\u200B\uFEFF\u2060]/g, '');
|
|
7835
|
+
return aiText.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ').replace(/[\u200B\uFEFF\u2060]/g, '');
|
|
7825
7836
|
}
|
|
7826
7837
|
/**
|
|
7827
7838
|
* Note: [π] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
|
|
@@ -7840,6 +7851,7 @@ function humanizeAiText(aiText) {
|
|
|
7840
7851
|
cleanedText = humanizeAiTextEllipsis(cleanedText);
|
|
7841
7852
|
cleanedText = humanizeAiTextEmdashed(cleanedText);
|
|
7842
7853
|
cleanedText = humanizeAiTextQuotes(cleanedText);
|
|
7854
|
+
cleanedText = humanizeAiTextSources(cleanedText);
|
|
7843
7855
|
cleanedText = humanizeAiTextWhitespace(cleanedText);
|
|
7844
7856
|
return cleanedText;
|
|
7845
7857
|
}
|
|
@@ -7966,5 +7978,5 @@ function trimEndOfCodeBlock(value) {
|
|
|
7966
7978
|
return value;
|
|
7967
7979
|
}
|
|
7968
7980
|
|
|
7969
|
-
export { BOOK_LANGUAGE_VERSION, MarkdownScraper, PROMPTBOOK_ENGINE_VERSION, _MarkdownScraperRegistration, addAutoGeneratedSection, createMarkdownChart, createMarkdownScraper, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractBlock, extractJsonBlock, extractOneBlockFromMarkdown, flattenMarkdown, humanizeAiText, humanizeAiTextEllipsis, humanizeAiTextEmdashed, humanizeAiTextQuotes, humanizeAiTextWhitespace, parseMarkdownSection, promptbookifyAiText, removeMarkdownComments, removeMarkdownFormatting, removeMarkdownLinks, splitMarkdownIntoSections, trimCodeBlock, trimEndOfCodeBlock };
|
|
7981
|
+
export { BOOK_LANGUAGE_VERSION, MarkdownScraper, PROMPTBOOK_ENGINE_VERSION, _MarkdownScraperRegistration, addAutoGeneratedSection, createMarkdownChart, createMarkdownScraper, createMarkdownTable, escapeMarkdownBlock, extractAllBlocksFromMarkdown, extractAllListItemsFromMarkdown, extractBlock, extractJsonBlock, extractOneBlockFromMarkdown, flattenMarkdown, humanizeAiText, humanizeAiTextEllipsis, humanizeAiTextEmdashed, humanizeAiTextQuotes, humanizeAiTextSources, humanizeAiTextWhitespace, parseMarkdownSection, promptbookifyAiText, removeMarkdownComments, removeMarkdownFormatting, removeMarkdownLinks, splitMarkdownIntoSections, trimCodeBlock, trimEndOfCodeBlock };
|
|
7970
7982
|
//# sourceMappingURL=index.es.js.map
|