@liveblocks/core 2.16.1-ai5 → 2.16.2
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/dist/index.d.mts +1 -36
- package/dist/index.d.ts +1 -36
- package/dist/index.js +2 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "2.16.
|
|
9
|
+
var PKG_VERSION = "2.16.2";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -1556,29 +1556,6 @@ function createApiClient({
|
|
|
1556
1556
|
}
|
|
1557
1557
|
);
|
|
1558
1558
|
}
|
|
1559
|
-
async function executeContextualPrompt(options) {
|
|
1560
|
-
const result = await httpClient.post(
|
|
1561
|
-
url`/v2/c/rooms/${options.roomId}/ai/contextual-prompt`,
|
|
1562
|
-
await authManager.getAuthValue({
|
|
1563
|
-
requestedScope: "room:read",
|
|
1564
|
-
roomId: options.roomId
|
|
1565
|
-
}),
|
|
1566
|
-
{
|
|
1567
|
-
prompt: options.prompt,
|
|
1568
|
-
context: {
|
|
1569
|
-
beforeSelection: options.context.beforeSelection,
|
|
1570
|
-
selection: options.context.selection,
|
|
1571
|
-
afterSelection: options.context.afterSelection
|
|
1572
|
-
},
|
|
1573
|
-
previous: options.previous
|
|
1574
|
-
},
|
|
1575
|
-
{ signal: options.signal }
|
|
1576
|
-
);
|
|
1577
|
-
if (!result || result.content.length === 0) {
|
|
1578
|
-
throw new Error("No content returned from server");
|
|
1579
|
-
}
|
|
1580
|
-
return result.content[0].text;
|
|
1581
|
-
}
|
|
1582
1559
|
async function listTextVersions(options) {
|
|
1583
1560
|
const result = await httpClient.get(
|
|
1584
1561
|
url`/v2/c/rooms/${options.roomId}/versions`,
|
|
@@ -1819,9 +1796,7 @@ function createApiClient({
|
|
|
1819
1796
|
deleteInboxNotification,
|
|
1820
1797
|
// User threads
|
|
1821
1798
|
getUserThreads_experimental,
|
|
1822
|
-
getUserThreadsSince_experimental
|
|
1823
|
-
// AI
|
|
1824
|
-
executeContextualPrompt
|
|
1799
|
+
getUserThreadsSince_experimental
|
|
1825
1800
|
};
|
|
1826
1801
|
}
|
|
1827
1802
|
function getBearerTokenFromAuthValue(authValue) {
|
|
@@ -6614,12 +6589,6 @@ function createRoom(options, config) {
|
|
|
6614
6589
|
async function createTextVersion() {
|
|
6615
6590
|
return httpClient.createTextVersion({ roomId });
|
|
6616
6591
|
}
|
|
6617
|
-
async function executeContextualPrompt(options2) {
|
|
6618
|
-
return httpClient.executeContextualPrompt({
|
|
6619
|
-
roomId,
|
|
6620
|
-
...options2
|
|
6621
|
-
});
|
|
6622
|
-
}
|
|
6623
6592
|
function sendMessages(messages) {
|
|
6624
6593
|
const serializedPayload = JSON.stringify(messages);
|
|
6625
6594
|
const nonce = context.dynamicSessionInfoSig.get()?.nonce;
|
|
@@ -7604,8 +7573,6 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
7604
7573
|
getTextVersion,
|
|
7605
7574
|
// create a version
|
|
7606
7575
|
createTextVersion,
|
|
7607
|
-
// execute a contextual prompt
|
|
7608
|
-
executeContextualPrompt,
|
|
7609
7576
|
// Support for the Liveblocks browser extension
|
|
7610
7577
|
getSelf_forDevTools: () => selfAsTreeNode.get(),
|
|
7611
7578
|
getOthers_forDevTools: () => others_forDevTools.get(),
|