@promptbook/javascript 0.110.0-1 → 0.110.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 CHANGED
@@ -18,7 +18,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
18
18
  * @generated
19
19
  * @see https://github.com/webgptorg/promptbook
20
20
  */
21
- const PROMPTBOOK_ENGINE_VERSION = '0.110.0-1';
21
+ const PROMPTBOOK_ENGINE_VERSION = '0.110.0-3';
22
22
  /**
23
23
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
24
24
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -9,7 +9,7 @@ import type { ChatProps } from './ChatProps';
9
9
  *
10
10
  * @private props for internal subcomponent
11
11
  */
12
- type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants'> & {
12
+ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants' | 'agent'> & {
13
13
  message: ChatMessage;
14
14
  participant: ChatParticipant | undefined;
15
15
  isLastMessage: boolean;
@@ -5,12 +5,14 @@ import type { ChatMessage } from '../types/ChatMessage';
5
5
  import type { ChatParticipant } from '../types/ChatParticipant';
6
6
  import type { ParsedCitation } from '../utils/parseCitationsFromContent';
7
7
  import type { ChatProps } from './ChatProps';
8
+ import { Agent } from '../../../llm-providers/agent/Agent';
8
9
  /**
9
10
  * Props for the Chat message list container.
10
11
  *
11
12
  * @private component of `<Chat/>`
12
13
  */
13
14
  export type ChatMessageListProps = {
15
+ agent?: Agent;
14
16
  messages: ReadonlyArray<ChatMessage>;
15
17
  participants: ReadonlyArray<ChatParticipant>;
16
18
  expandedMessageId: id | null;
@@ -6,6 +6,7 @@ import { string_color } from '../../../types/typeAliases';
6
6
  import type { string_chat_format_name } from '../save/_common/string_chat_format_name';
7
7
  import type { ChatMessage } from '../types/ChatMessage';
8
8
  import type { ChatParticipant } from '../types/ChatParticipant';
9
+ import type { Agent } from '../../../llm-providers/agent/Agent';
9
10
  /**
10
11
  * Interface for sound system that can be passed to Chat component
11
12
  * This allows the chat to trigger sounds without tight coupling
@@ -25,6 +26,12 @@ export type ChatSoundSystem = {
25
26
  * @public exported from `@promptbook/components`
26
27
  */
27
28
  export type ChatProps = {
29
+ /**
30
+ * The agent that is used in the chat
31
+ *
32
+ * Note: This is not used directly but passed to subcomponents
33
+ */
34
+ readonly agent?: Agent;
28
35
  /**
29
36
  * Optional callback to create a new agent from the template.
30
37
  * If provided, renders the [Use this template] button.
@@ -39,13 +39,10 @@ export type ChatActionsOverlapResult = {
39
39
  */
40
40
  handleChatScroll: (event: UIEvent<HTMLDivElement>) => void;
41
41
  /**
42
- * Whether the actions toolbar is currently being scrolled.
42
+ * Note: Previously there were `isActionsScrolling` and `isActionsOverlapping` states,
43
+ * now there is just one state `shouldFadeActions` which is calculated based on the scroll position and overlap.
43
44
  */
44
- isActionsScrolling: boolean;
45
- /**
46
- * Whether the actions toolbar overlaps the first visible message.
47
- */
48
- isActionsOverlapping: boolean;
45
+ shouldFadeActions: boolean;
49
46
  };
50
47
  /**
51
48
  * Tracks action toolbar overlap while coordinating with chat auto-scroll.
@@ -1,4 +1,5 @@
1
1
  import { type ToolCall } from '../../../types/ToolCall';
2
+ import type { Agent } from '../../../llm-providers/agent/Agent';
2
3
  import type { AgentChipData } from '../AgentChip';
3
4
  /**
4
5
  * Utility to format tool call information for user-friendly display.
@@ -37,4 +38,4 @@ export declare const TOOL_TITLES: Record<string, {
37
38
  *
38
39
  * @private [🧠] Maybe public?
39
40
  */
40
- export declare function getToolCallChipletInfo(toolCall: ToolCall): ToolCallChipletInfo;
41
+ export declare function getToolCallChipletInfo(toolCall: ToolCall, agent?: Agent): ToolCallChipletInfo;
@@ -81,6 +81,12 @@ export declare class Agent extends AgentLlmExecutionTools implements LlmExecutio
81
81
  * Human-readable titles for tool functions
82
82
  */
83
83
  toolTitles: Record<string, string>;
84
+ /**
85
+ * Externals prepared for the agent, like OpenAI assistant, etc.
86
+ */
87
+ preparedExternals: {
88
+ openaiAssistantId?: string;
89
+ };
84
90
  /**
85
91
  * Not used in Agent, always returns empty array
86
92
  */
@@ -12,7 +12,7 @@ export type OpenAiAssistantExecutionToolsOptions = OpenAiCompatibleExecutionTool
12
12
  *
13
13
  * @default false
14
14
  */
15
- readonly isCreatingNewAssistantsAllowed?: boolean;
15
+ readonly isCreatingNewAssistantsAllowed: boolean;
16
16
  /**
17
17
  * Which assistant to use
18
18
  */
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.110.0-0`).
18
+ * It follows semantic versioning (e.g., `0.110.0-2`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/javascript",
3
- "version": "0.110.0-1",
3
+ "version": "0.110.0-3",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -90,11 +90,14 @@
90
90
  "node": ">=18.18.0",
91
91
  "npm": ">=8.0.0"
92
92
  },
93
+ "overrides": {
94
+ "jsdom": "26.1.0"
95
+ },
93
96
  "main": "./umd/index.umd.js",
94
97
  "module": "./esm/index.es.js",
95
98
  "typings": "./esm/typings/src/_packages/javascript.index.d.ts",
96
99
  "peerDependencies": {
97
- "@promptbook/core": "0.110.0-1"
100
+ "@promptbook/core": "0.110.0-3"
98
101
  },
99
102
  "dependencies": {
100
103
  "crypto": "1.0.1",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.110.0-1';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.110.0-3';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name