@liveblocks/core 2.16.1-ai1 → 2.16.1-ai3

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
@@ -2406,8 +2406,18 @@ type PrivateRoomApi = {
2406
2406
  createTextVersion(): Promise<void>;
2407
2407
  executeContextualPrompt(options: {
2408
2408
  prompt: string;
2409
- selectionText: string;
2410
- context: string;
2409
+ context: {
2410
+ beforeSelection: string;
2411
+ selection: string;
2412
+ afterSelection: string;
2413
+ };
2414
+ previous?: {
2415
+ prompt: string;
2416
+ output: {
2417
+ type: string;
2418
+ content: string;
2419
+ };
2420
+ };
2411
2421
  signal: AbortSignal;
2412
2422
  }): Promise<string>;
2413
2423
  simulate: {
@@ -2623,11 +2633,21 @@ interface RoomHttpApi<M extends BaseMetadata> {
2623
2633
  nonce: string | undefined;
2624
2634
  messages: ClientMsg<P, E>[];
2625
2635
  }): Promise<Response>;
2626
- executeContextualPrompt({ roomId, selectionText, context, }: {
2636
+ executeContextualPrompt({ roomId, prompt, context, signal, }: {
2627
2637
  roomId: string;
2628
2638
  prompt: string;
2629
- selectionText: string;
2630
- context: string;
2639
+ context: {
2640
+ beforeSelection: string;
2641
+ selection: string;
2642
+ afterSelection: string;
2643
+ };
2644
+ previous?: {
2645
+ prompt: string;
2646
+ output: {
2647
+ type: string;
2648
+ content: string;
2649
+ };
2650
+ };
2631
2651
  signal: AbortSignal;
2632
2652
  }): Promise<string>;
2633
2653
  }
package/dist/index.d.ts CHANGED
@@ -2406,8 +2406,18 @@ type PrivateRoomApi = {
2406
2406
  createTextVersion(): Promise<void>;
2407
2407
  executeContextualPrompt(options: {
2408
2408
  prompt: string;
2409
- selectionText: string;
2410
- context: string;
2409
+ context: {
2410
+ beforeSelection: string;
2411
+ selection: string;
2412
+ afterSelection: string;
2413
+ };
2414
+ previous?: {
2415
+ prompt: string;
2416
+ output: {
2417
+ type: string;
2418
+ content: string;
2419
+ };
2420
+ };
2411
2421
  signal: AbortSignal;
2412
2422
  }): Promise<string>;
2413
2423
  simulate: {
@@ -2623,11 +2633,21 @@ interface RoomHttpApi<M extends BaseMetadata> {
2623
2633
  nonce: string | undefined;
2624
2634
  messages: ClientMsg<P, E>[];
2625
2635
  }): Promise<Response>;
2626
- executeContextualPrompt({ roomId, selectionText, context, }: {
2636
+ executeContextualPrompt({ roomId, prompt, context, signal, }: {
2627
2637
  roomId: string;
2628
2638
  prompt: string;
2629
- selectionText: string;
2630
- context: string;
2639
+ context: {
2640
+ beforeSelection: string;
2641
+ selection: string;
2642
+ afterSelection: string;
2643
+ };
2644
+ previous?: {
2645
+ prompt: string;
2646
+ output: {
2647
+ type: string;
2648
+ content: string;
2649
+ };
2650
+ };
2631
2651
  signal: AbortSignal;
2632
2652
  }): Promise<string>;
2633
2653
  }
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-ai3";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -1565,8 +1565,12 @@ function createApiClient({
1565
1565
  }),
1566
1566
  {
1567
1567
  prompt: options.prompt,
1568
- selectionText: options.selectionText,
1569
- context: options.context
1568
+ context: {
1569
+ beforeSelection: options.context.beforeSelection,
1570
+ selection: options.context.selection,
1571
+ afterSelection: options.context.afterSelection
1572
+ },
1573
+ previous: options.previous
1570
1574
  },
1571
1575
  { signal: options.signal }
1572
1576
  );