@promptbook/core 0.104.0-7 โ†’ 0.104.0-8

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 CHANGED
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.104.0-7';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.104.0-8';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
@@ -12131,8 +12131,11 @@ const DEFAULT_BOOK = padBook(validateBook(spaceTrim$2(`
12131
12131
  *
12132
12132
  * @public exported from `@promptbook/core`
12133
12133
  */
12134
- function generatePlaceholderAgentProfileImageUrl(agentIdOrName, agentsServerUrl = new URL(CORE_SERVER.urls[0])) {
12135
- return `${agentsServerUrl}agents/${agentIdOrName}/images/default-avatar.png`;
12134
+ function generatePlaceholderAgentProfileImageUrl(agentIdOrName, agentsServerUrl = CORE_SERVER.urls[0]) {
12135
+ if (typeof agentsServerUrl === 'string') {
12136
+ agentsServerUrl = new URL(agentsServerUrl);
12137
+ }
12138
+ return `${agentsServerUrl.href}agents/${agentIdOrName}/images/default-avatar.png`;
12136
12139
  }
12137
12140
  /**
12138
12141
  * TODO: [๐Ÿคน] Figure out best placeholder image generator https://i.pravatar.cc/1000?u=568