@promptbook/cli 0.111.0-1 → 0.111.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 +6 -14
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageMap.d.ts +17 -0
- package/esm/typings/src/book-components/Chat/utils/citationHelpers.d.ts +38 -0
- package/esm/typings/src/book-components/Chat/utils/citationHelpers.test.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/utils/splitMessageContentIntoSegments.d.ts +41 -0
- package/esm/typings/src/book-components/Chat/utils/splitMessageContentIntoSegments.test.d.ts +1 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +6 -14
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -48,7 +48,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
48
48
|
* @generated
|
|
49
49
|
* @see https://github.com/webgptorg/promptbook
|
|
50
50
|
*/
|
|
51
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.111.0-
|
|
51
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.111.0-3';
|
|
52
52
|
/**
|
|
53
53
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
54
54
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -35056,7 +35056,6 @@ class RemoteAgent extends Agent {
|
|
|
35056
35056
|
doneReading = !!done;
|
|
35057
35057
|
if (value) {
|
|
35058
35058
|
const textChunk = decoder.decode(value, { stream: true });
|
|
35059
|
-
let sawToolCalls = false;
|
|
35060
35059
|
let hasNonEmptyText = false;
|
|
35061
35060
|
const textLines = [];
|
|
35062
35061
|
const lines = textChunk.split(/\r?\n/);
|
|
@@ -35082,7 +35081,6 @@ class RemoteAgent extends Agent {
|
|
|
35082
35081
|
rawResponse: {},
|
|
35083
35082
|
toolCalls: getActiveToolCalls(),
|
|
35084
35083
|
});
|
|
35085
|
-
sawToolCalls = true;
|
|
35086
35084
|
isToolCallLine = true;
|
|
35087
35085
|
}
|
|
35088
35086
|
}
|
|
@@ -35092,22 +35090,16 @@ class RemoteAgent extends Agent {
|
|
|
35092
35090
|
}
|
|
35093
35091
|
if (!isToolCallLine) {
|
|
35094
35092
|
textLines.push(line);
|
|
35095
|
-
if (
|
|
35093
|
+
if (trimmedLine.length > 0) {
|
|
35096
35094
|
hasNonEmptyText = true;
|
|
35097
35095
|
}
|
|
35098
35096
|
}
|
|
35099
35097
|
}
|
|
35100
|
-
if (
|
|
35101
|
-
|
|
35102
|
-
continue;
|
|
35103
|
-
}
|
|
35104
|
-
const textChunkWithoutToolCalls = textLines.join('\n');
|
|
35105
|
-
content += textChunkWithoutToolCalls;
|
|
35106
|
-
}
|
|
35107
|
-
else {
|
|
35108
|
-
// console.debug('RemoteAgent chunk:', textChunk);
|
|
35109
|
-
content += textChunk;
|
|
35098
|
+
if (!hasNonEmptyText) {
|
|
35099
|
+
continue;
|
|
35110
35100
|
}
|
|
35101
|
+
const textChunkWithoutToolCalls = textLines.join('\n');
|
|
35102
|
+
content += textChunkWithoutToolCalls;
|
|
35111
35103
|
if (!hasReceivedModelOutput && content.trim().length > 0) {
|
|
35112
35104
|
hasReceivedModelOutput = true;
|
|
35113
35105
|
preparationToolCalls.length = 0;
|