@promptbook/remote-server 0.104.0-1 → 0.104.0-3
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 -36
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +8 -2
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +6 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +7 -11
- package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +2 -2
- package/esm/typings/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +56 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +13 -7
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +6 -0
- package/esm/typings/src/commitments/DICTIONARY/DICTIONARY.d.ts +46 -0
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +1 -1
- package/esm/typings/src/types/Message.d.ts +49 -0
- package/esm/typings/src/types/typeAliases.d.ts +12 -0
- package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +4 -4
- package/esm/typings/src/utils/environment/$isRunningInBrowser.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInJest.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInNode.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInWebWorker.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/random/$randomBase58.d.ts +12 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +24 -40
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -33,7 +33,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
33
33
|
* @generated
|
|
34
34
|
* @see https://github.com/webgptorg/promptbook
|
|
35
35
|
*/
|
|
36
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-
|
|
36
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-3';
|
|
37
37
|
/**
|
|
38
38
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
39
39
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1181,13 +1181,14 @@ class EnvironmentMismatchError extends Error {
|
|
|
1181
1181
|
*
|
|
1182
1182
|
* @public exported from `@promptbook/utils`
|
|
1183
1183
|
*/
|
|
1184
|
-
|
|
1184
|
+
function $isRunningInNode() {
|
|
1185
1185
|
try {
|
|
1186
|
-
return
|
|
1187
|
-
}
|
|
1186
|
+
return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
|
1187
|
+
}
|
|
1188
|
+
catch (e) {
|
|
1188
1189
|
return false;
|
|
1189
1190
|
}
|
|
1190
|
-
|
|
1191
|
+
}
|
|
1191
1192
|
/**
|
|
1192
1193
|
* TODO: [🎺]
|
|
1193
1194
|
*/
|
|
@@ -7652,13 +7653,14 @@ function createPipelineExecutor(options) {
|
|
|
7652
7653
|
*
|
|
7653
7654
|
* @public exported from `@promptbook/utils`
|
|
7654
7655
|
*/
|
|
7655
|
-
|
|
7656
|
+
function $isRunningInBrowser() {
|
|
7656
7657
|
try {
|
|
7657
|
-
return
|
|
7658
|
-
}
|
|
7658
|
+
return typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
7659
|
+
}
|
|
7660
|
+
catch (e) {
|
|
7659
7661
|
return false;
|
|
7660
7662
|
}
|
|
7661
|
-
|
|
7663
|
+
}
|
|
7662
7664
|
/**
|
|
7663
7665
|
* TODO: [🎺]
|
|
7664
7666
|
*/
|
|
@@ -7670,17 +7672,17 @@ const $isRunningInBrowser = new Function(`
|
|
|
7670
7672
|
*
|
|
7671
7673
|
* @public exported from `@promptbook/utils`
|
|
7672
7674
|
*/
|
|
7673
|
-
|
|
7675
|
+
function $isRunningInWebWorker() {
|
|
7674
7676
|
try {
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7677
|
+
// Note: Check for importScripts which is specific to workers
|
|
7678
|
+
// and not available in the main browser thread
|
|
7679
|
+
return (typeof self !== 'undefined' &&
|
|
7680
|
+
typeof self.importScripts === 'function');
|
|
7681
|
+
}
|
|
7682
|
+
catch (e) {
|
|
7681
7683
|
return false;
|
|
7682
7684
|
}
|
|
7683
|
-
|
|
7685
|
+
}
|
|
7684
7686
|
/**
|
|
7685
7687
|
* TODO: [🎺]
|
|
7686
7688
|
*/
|
|
@@ -7812,7 +7814,7 @@ function $registeredLlmToolsMessage() {
|
|
|
7812
7814
|
${i + 1}) **${title}** \`${className}\` from \`${packageName}\`
|
|
7813
7815
|
${morePieces.join('; ')}
|
|
7814
7816
|
`);
|
|
7815
|
-
if ($isRunningInNode) {
|
|
7817
|
+
if ($isRunningInNode()) {
|
|
7816
7818
|
if (isInstalled && isFullyConfigured) {
|
|
7817
7819
|
providerMessage = colors.green(providerMessage);
|
|
7818
7820
|
}
|
|
@@ -7976,24 +7978,6 @@ function normalizeTo_camelCase(text, _isFirstLetterCapital = false) {
|
|
|
7976
7978
|
* TODO: [🌺] Use some intermediate util splitWords
|
|
7977
7979
|
*/
|
|
7978
7980
|
|
|
7979
|
-
/**
|
|
7980
|
-
* Detects if the code is running in jest environment
|
|
7981
|
-
*
|
|
7982
|
-
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
7983
|
-
*
|
|
7984
|
-
* @public exported from `@promptbook/utils`
|
|
7985
|
-
*/
|
|
7986
|
-
new Function(`
|
|
7987
|
-
try {
|
|
7988
|
-
return process.env.JEST_WORKER_ID !== undefined;
|
|
7989
|
-
} catch (e) {
|
|
7990
|
-
return false;
|
|
7991
|
-
}
|
|
7992
|
-
`);
|
|
7993
|
-
/**
|
|
7994
|
-
* TODO: [🎺]
|
|
7995
|
-
*/
|
|
7996
|
-
|
|
7997
7981
|
/**
|
|
7998
7982
|
* Makes first letter of a string lowercase
|
|
7999
7983
|
*
|