@windmill-labs/chat-sdk 1.848.3 → 1.850.0
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 -0
- package/dist/{chat-DjonfE4j.js → chat-C-qFO-jT.js} +2 -0
- package/dist/{chat-C0iOSX6H.cjs → chat-DjAH5NVm.cjs} +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -610,6 +610,7 @@ var ChatImpl = class {
|
|
|
610
610
|
};
|
|
611
611
|
async function _followTurn(turn, isNew) {
|
|
612
612
|
let nextTurn;
|
|
613
|
+
_assertClassBrand(_ChatImpl_brand, this, _set).call(this, { runningJobId: turn.jobId });
|
|
613
614
|
try {
|
|
614
615
|
const stopPolling = _classPrivateFieldGet2(_state, this).history === "server" ? _assertClassBrand(_ChatImpl_brand, this, _startPolling).call(this, turn) : () => {};
|
|
615
616
|
let result;
|
|
@@ -629,6 +630,7 @@ async function _followTurn(turn, isNew) {
|
|
|
629
630
|
_assertClassBrand(_ChatImpl_brand, this, _failTurn).call(this, turn, e);
|
|
630
631
|
} finally {
|
|
631
632
|
if (_classPrivateFieldGet2(_turn, this) === turn) _classPrivateFieldSet2(_turn, this, void 0);
|
|
633
|
+
if (_classPrivateFieldGet2(_state, this).runningJobId === turn.jobId) _assertClassBrand(_ChatImpl_brand, this, _set).call(this, { runningJobId: void 0 });
|
|
632
634
|
}
|
|
633
635
|
if (nextTurn) await this.resumeTurn(nextTurn);
|
|
634
636
|
}
|
|
@@ -610,6 +610,7 @@ var ChatImpl = class {
|
|
|
610
610
|
};
|
|
611
611
|
async function _followTurn(turn, isNew) {
|
|
612
612
|
let nextTurn;
|
|
613
|
+
require_follow._assertClassBrand(_ChatImpl_brand, this, _set).call(this, { runningJobId: turn.jobId });
|
|
613
614
|
try {
|
|
614
615
|
const stopPolling = require_follow._classPrivateFieldGet2(_state, this).history === "server" ? require_follow._assertClassBrand(_ChatImpl_brand, this, _startPolling).call(this, turn) : () => {};
|
|
615
616
|
let result;
|
|
@@ -629,6 +630,7 @@ async function _followTurn(turn, isNew) {
|
|
|
629
630
|
require_follow._assertClassBrand(_ChatImpl_brand, this, _failTurn).call(this, turn, e);
|
|
630
631
|
} finally {
|
|
631
632
|
if (require_follow._classPrivateFieldGet2(_turn, this) === turn) require_follow._classPrivateFieldSet2(_turn, this, void 0);
|
|
633
|
+
if (require_follow._classPrivateFieldGet2(_state, this).runningJobId === turn.jobId) require_follow._assertClassBrand(_ChatImpl_brand, this, _set).call(this, { runningJobId: void 0 });
|
|
632
634
|
}
|
|
633
635
|
if (nextTurn) await this.resumeTurn(nextTurn);
|
|
634
636
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_follow = require("./follow-Dug-Afeu.cjs");
|
|
3
|
-
const require_chat = require("./chat-
|
|
3
|
+
const require_chat = require("./chat-DjAH5NVm.cjs");
|
|
4
4
|
exports.CHAT_UPLOADS_PREFIX = require_chat.CHAT_UPLOADS_PREFIX;
|
|
5
5
|
exports.TurnRunningError = require_follow.TurnRunningError;
|
|
6
6
|
exports.WindmillApiError = require_follow.WindmillApiError;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { _ as WindmillApiError, b as turnRunningError, g as TurnRunningError, h as parseStreamEvents, m as createStreamEventParser, o as extractChatAnswer, r as conversationIdFor, t as followJob, v as WindmillChatApi, y as readServerSentEvents } from "./follow-DXfmfPfr.js";
|
|
2
|
-
import { a as detectRawApp, i as uploadAttachments, n as CHAT_UPLOADS_PREFIX, r as storedAttachmentName, t as createChat } from "./chat-
|
|
2
|
+
import { a as detectRawApp, i as uploadAttachments, n as CHAT_UPLOADS_PREFIX, r as storedAttachmentName, t as createChat } from "./chat-C-qFO-jT.js";
|
|
3
3
|
export { CHAT_UPLOADS_PREFIX, TurnRunningError, WindmillApiError, WindmillChatApi, conversationIdFor, createChat, createStreamEventParser, detectRawApp, extractChatAnswer, followJob, parseStreamEvents, readServerSentEvents, storedAttachmentName, turnRunningError, uploadAttachments };
|
package/dist/react.cjs
CHANGED
package/dist/react.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -77,6 +77,8 @@ export interface ChatState {
|
|
|
77
77
|
history: HistoryMode;
|
|
78
78
|
loadingMessages: boolean;
|
|
79
79
|
hasMoreMessages: boolean;
|
|
80
|
+
/** The flow job the running turn follows, once it is known. */
|
|
81
|
+
runningJobId?: string;
|
|
80
82
|
}
|
|
81
83
|
export type TokenSource = string | (() => string | Promise<string>);
|
|
82
84
|
export type StorageLike = Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windmill-labs/chat-sdk",
|
|
3
3
|
"description": "Build chat interfaces on Windmill flows deployed in chat mode, from any frontend or raw app",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.850.0",
|
|
5
5
|
"author": "Ruben Fiszel",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"homepage": "https://github.com/windmill-labs/windmill/tree/main/chat-sdk#readme",
|