@promptbook/components 0.112.0-139 → 0.112.0-140
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/README.md +1 -1
- package/esm/index.es.js +38 -23
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +38 -23
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ToolCall } from '../../../types/ToolCall';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when one tool call represents a user-facing action.
|
|
4
|
+
*
|
|
5
|
+
* @param toolCall - Tool call candidate.
|
|
6
|
+
* @returns Whether the tool call should be visible in chat progress and chips.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `<Chat/>`
|
|
9
|
+
*/
|
|
10
|
+
export declare function isVisibleChatToolCall(toolCall: Pick<ToolCall, 'name'>): boolean;
|
package/esm/src/version.d.ts
CHANGED
|
@@ -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.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-139`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* @generated
|
|
35
35
|
* @see https://github.com/webgptorg/promptbook
|
|
36
36
|
*/
|
|
37
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
37
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-140';
|
|
38
38
|
/**
|
|
39
39
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
40
40
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -34419,21 +34419,6 @@
|
|
|
34419
34419
|
}, "aria-busy": isOngoing, children: [chip.teamAgentData && (jsxRuntime.jsx(AgentChip, { agent: chip.teamAgentData, className: chip.isTransitive ? styles$7.transitiveAgentChip : styles$7.teamAgentChip, isClickable: false })), jsxRuntime.jsx("span", { className: styles$7.toolCallLabel, children: chip.label }), jsxRuntime.jsx("span", { className: styles$7.toolCallChipStatus, children: isOngoing ? (jsxRuntime.jsx("span", { className: styles$7.toolCallChipSpinner, "aria-hidden": "true" })) : hasErrors ? ('⚠️') : null })] }, chip.key));
|
|
34420
34420
|
}
|
|
34421
34421
|
|
|
34422
|
-
/**
|
|
34423
|
-
* Tool call name emitted while preparing a GPT assistant for an agent.
|
|
34424
|
-
*
|
|
34425
|
-
* @public exported from `@promptbook/types`
|
|
34426
|
-
*/
|
|
34427
|
-
const ASSISTANT_PREPARATION_TOOL_CALL_NAME = 'assistant_preparation';
|
|
34428
|
-
/**
|
|
34429
|
-
* Checks whether a tool call is the assistant preparation marker.
|
|
34430
|
-
*
|
|
34431
|
-
* @public exported from `@promptbook/types`
|
|
34432
|
-
*/
|
|
34433
|
-
function isAssistantPreparationToolCall(toolCall) {
|
|
34434
|
-
return toolCall.name === ASSISTANT_PREPARATION_TOOL_CALL_NAME;
|
|
34435
|
-
}
|
|
34436
|
-
|
|
34437
34422
|
/**
|
|
34438
34423
|
* Constant for raw tool call ID fields.
|
|
34439
34424
|
*/
|
|
@@ -34485,6 +34470,21 @@
|
|
|
34485
34470
|
}
|
|
34486
34471
|
}
|
|
34487
34472
|
|
|
34473
|
+
/**
|
|
34474
|
+
* Tool call name emitted while preparing a GPT assistant for an agent.
|
|
34475
|
+
*
|
|
34476
|
+
* @public exported from `@promptbook/types`
|
|
34477
|
+
*/
|
|
34478
|
+
const ASSISTANT_PREPARATION_TOOL_CALL_NAME = 'assistant_preparation';
|
|
34479
|
+
/**
|
|
34480
|
+
* Checks whether a tool call is the assistant preparation marker.
|
|
34481
|
+
*
|
|
34482
|
+
* @public exported from `@promptbook/types`
|
|
34483
|
+
*/
|
|
34484
|
+
function isAssistantPreparationToolCall(toolCall) {
|
|
34485
|
+
return toolCall.name === ASSISTANT_PREPARATION_TOOL_CALL_NAME;
|
|
34486
|
+
}
|
|
34487
|
+
|
|
34488
34488
|
/**
|
|
34489
34489
|
* Builds a stable identity string for tool calls across partial updates.
|
|
34490
34490
|
*
|
|
@@ -35905,6 +35905,27 @@
|
|
|
35905
35905
|
return `${trimmed.slice(0, MEMORY_CHIP_TRUNCATE_LENGTH)}...`;
|
|
35906
35906
|
}
|
|
35907
35907
|
|
|
35908
|
+
/**
|
|
35909
|
+
* Tool calls that stay available in message data but should not be surfaced as user-facing chat progress.
|
|
35910
|
+
*
|
|
35911
|
+
* @private internal utility of `<Chat/>`
|
|
35912
|
+
*/
|
|
35913
|
+
const HIDDEN_CHAT_TOOL_CALL_NAMES = new Set([
|
|
35914
|
+
ASSISTANT_PREPARATION_TOOL_CALL_NAME,
|
|
35915
|
+
'agent_progress',
|
|
35916
|
+
]);
|
|
35917
|
+
/**
|
|
35918
|
+
* Returns true when one tool call represents a user-facing action.
|
|
35919
|
+
*
|
|
35920
|
+
* @param toolCall - Tool call candidate.
|
|
35921
|
+
* @returns Whether the tool call should be visible in chat progress and chips.
|
|
35922
|
+
*
|
|
35923
|
+
* @private internal utility of `<Chat/>`
|
|
35924
|
+
*/
|
|
35925
|
+
function isVisibleChatToolCall(toolCall) {
|
|
35926
|
+
return !HIDDEN_CHAT_TOOL_CALL_NAMES.has(toolCall.name);
|
|
35927
|
+
}
|
|
35928
|
+
|
|
35908
35929
|
/**
|
|
35909
35930
|
* Resolves one explicit or inferred lifecycle state for a tool call snapshot.
|
|
35910
35931
|
*
|
|
@@ -35948,19 +35969,13 @@
|
|
|
35948
35969
|
transitiveCitations: teamToolCallSummary.citations,
|
|
35949
35970
|
};
|
|
35950
35971
|
}
|
|
35951
|
-
/**
|
|
35952
|
-
* Tool calls that should stay available in message data but never render as chips under the message.
|
|
35953
|
-
*
|
|
35954
|
-
* @private internal helper of `<ChatMessageItem/>`
|
|
35955
|
-
*/
|
|
35956
|
-
const HIDDEN_TOOL_CALL_CHIP_NAMES = new Set([ASSISTANT_PREPARATION_TOOL_CALL_NAME, 'agent_progress']);
|
|
35957
35972
|
/**
|
|
35958
35973
|
* Determines whether one tool call should render as a chip under the message.
|
|
35959
35974
|
*
|
|
35960
35975
|
* @private internal helper of `<ChatMessageItem/>`
|
|
35961
35976
|
*/
|
|
35962
35977
|
function shouldRenderToolCallChip(toolCall) {
|
|
35963
|
-
return
|
|
35978
|
+
return isVisibleChatToolCall(toolCall);
|
|
35964
35979
|
}
|
|
35965
35980
|
/**
|
|
35966
35981
|
* Filters a tool-call list down to entries that should render as visible chips.
|