@liveblocks/core 2.16.1-ai1 → 2.16.1

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 CHANGED
@@ -2404,12 +2404,6 @@ type PrivateRoomApi = {
2404
2404
  }>;
2405
2405
  getTextVersion(versionId: string): Promise<Response>;
2406
2406
  createTextVersion(): Promise<void>;
2407
- executeContextualPrompt(options: {
2408
- prompt: string;
2409
- selectionText: string;
2410
- context: string;
2411
- signal: AbortSignal;
2412
- }): Promise<string>;
2413
2407
  simulate: {
2414
2408
  explicitClose(event: IWebSocketCloseEvent): void;
2415
2409
  rawSend(data: string): void;
@@ -2623,13 +2617,6 @@ interface RoomHttpApi<M extends BaseMetadata> {
2623
2617
  nonce: string | undefined;
2624
2618
  messages: ClientMsg<P, E>[];
2625
2619
  }): Promise<Response>;
2626
- executeContextualPrompt({ roomId, selectionText, context, }: {
2627
- roomId: string;
2628
- prompt: string;
2629
- selectionText: string;
2630
- context: string;
2631
- signal: AbortSignal;
2632
- }): Promise<string>;
2633
2620
  }
2634
2621
  interface NotificationHttpApi<M extends BaseMetadata> {
2635
2622
  getInboxNotifications(options?: {
package/dist/index.d.ts CHANGED
@@ -2404,12 +2404,6 @@ type PrivateRoomApi = {
2404
2404
  }>;
2405
2405
  getTextVersion(versionId: string): Promise<Response>;
2406
2406
  createTextVersion(): Promise<void>;
2407
- executeContextualPrompt(options: {
2408
- prompt: string;
2409
- selectionText: string;
2410
- context: string;
2411
- signal: AbortSignal;
2412
- }): Promise<string>;
2413
2407
  simulate: {
2414
2408
  explicitClose(event: IWebSocketCloseEvent): void;
2415
2409
  rawSend(data: string): void;
@@ -2623,13 +2617,6 @@ interface RoomHttpApi<M extends BaseMetadata> {
2623
2617
  nonce: string | undefined;
2624
2618
  messages: ClientMsg<P, E>[];
2625
2619
  }): Promise<Response>;
2626
- executeContextualPrompt({ roomId, selectionText, context, }: {
2627
- roomId: string;
2628
- prompt: string;
2629
- selectionText: string;
2630
- context: string;
2631
- signal: AbortSignal;
2632
- }): Promise<string>;
2633
2620
  }
2634
2621
  interface NotificationHttpApi<M extends BaseMetadata> {
2635
2622
  getInboxNotifications(options?: {
package/dist/index.js 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.1-ai1";
9
+ var PKG_VERSION = "2.16.1";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -1556,25 +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
- selectionText: options.selectionText,
1569
- context: options.context
1570
- },
1571
- { signal: options.signal }
1572
- );
1573
- if (!result || result.content.length === 0) {
1574
- throw new Error("No content returned from server");
1575
- }
1576
- return result.content[0].text;
1577
- }
1578
1559
  async function listTextVersions(options) {
1579
1560
  const result = await httpClient.get(
1580
1561
  url`/v2/c/rooms/${options.roomId}/versions`,
@@ -1815,9 +1796,7 @@ function createApiClient({
1815
1796
  deleteInboxNotification,
1816
1797
  // User threads
1817
1798
  getUserThreads_experimental,
1818
- getUserThreadsSince_experimental,
1819
- // ai
1820
- executeContextualPrompt
1799
+ getUserThreadsSince_experimental
1821
1800
  };
1822
1801
  }
1823
1802
  function getBearerTokenFromAuthValue(authValue) {
@@ -6610,12 +6589,6 @@ function createRoom(options, config) {
6610
6589
  async function createTextVersion() {
6611
6590
  return httpClient.createTextVersion({ roomId });
6612
6591
  }
6613
- async function executeContextualPrompt(options2) {
6614
- return httpClient.executeContextualPrompt({
6615
- roomId,
6616
- ...options2
6617
- });
6618
- }
6619
6592
  function sendMessages(messages) {
6620
6593
  const serializedPayload = JSON.stringify(messages);
6621
6594
  const nonce = _optionalChain([context, 'access', _141 => _141.dynamicSessionInfoSig, 'access', _142 => _142.get, 'call', _143 => _143(), 'optionalAccess', _144 => _144.nonce]);
@@ -7600,8 +7573,6 @@ ${Array.from(traces).join("\n\n")}`
7600
7573
  getTextVersion,
7601
7574
  // create a version
7602
7575
  createTextVersion,
7603
- // execute contextual prompt
7604
- executeContextualPrompt,
7605
7576
  // Support for the Liveblocks browser extension
7606
7577
  getSelf_forDevTools: () => selfAsTreeNode.get(),
7607
7578
  getOthers_forDevTools: () => others_forDevTools.get(),