Comparing version 2.1.13 to 2.1.14
{ | ||
"name": "ai", | ||
"version": "2.1.13", | ||
"version": "2.1.14", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -188,3 +188,4 @@ 'use client' | ||
} = {}) { | ||
const chatId = id || `chat-${nanoid()}`; | ||
const hookId = (0, import_react.useId)(); | ||
const chatId = id || hookId; | ||
const { data, mutate } = (0, import_swr.default)([api, chatId], null, { | ||
@@ -363,3 +364,4 @@ fallbackData: initialMessages | ||
} = {}) { | ||
const completionId = id || `completion-${nanoid()}`; | ||
const hookId = (0, import_react2.useId)(); | ||
const completionId = id || hookId; | ||
const { data, mutate } = (0, import_swr2.default)([api, completionId], null, { | ||
@@ -366,0 +368,0 @@ fallbackData: initialCompletion |
@@ -519,2 +519,3 @@ "use strict"; | ||
// svelte/use-chat.ts | ||
var uniqueId = 0; | ||
var store = {}; | ||
@@ -534,3 +535,3 @@ function useChat({ | ||
} = {}) { | ||
const chatId = id || `chat-${nanoid()}`; | ||
const chatId = id || `chat-${uniqueId++}`; | ||
const key = `${api}|${chatId}`; | ||
@@ -690,2 +691,3 @@ const { data, mutate: originalMutate } = $(key, { | ||
var import_store2 = require("svelte/store"); | ||
var uniqueId2 = 0; | ||
var store2 = {}; | ||
@@ -704,3 +706,3 @@ function useCompletion({ | ||
} = {}) { | ||
const completionId = id || `completion-${nanoid()}`; | ||
const completionId = id || `completion-${uniqueId2++}`; | ||
const key = `${api}|${completionId}`; | ||
@@ -707,0 +709,0 @@ const { data, mutate: originalMutate } = $(key, { |
@@ -92,2 +92,3 @@ "use strict"; | ||
// vue/use-chat.ts | ||
var uniqueId = 0; | ||
var useSWRV = import_swrv.default.default || import_swrv.default; | ||
@@ -108,3 +109,3 @@ var store = {}; | ||
} = {}) { | ||
const chatId = id || `chat-${nanoid()}`; | ||
const chatId = id || `chat-${uniqueId++}`; | ||
const key = `${api}|${chatId}`; | ||
@@ -264,2 +265,3 @@ const { data, mutate: originalMutate } = useSWRV( | ||
var import_vue2 = require("vue"); | ||
var uniqueId2 = 0; | ||
var useSWRV2 = import_swrv2.default.default || import_swrv2.default; | ||
@@ -279,3 +281,3 @@ var store2 = {}; | ||
} = {}) { | ||
const completionId = id || `completion-${nanoid()}`; | ||
const completionId = id || `completion-${uniqueId2++}`; | ||
const key = `${api}|${completionId}`; | ||
@@ -282,0 +284,0 @@ const { data, mutate: originalMutate } = useSWRV2( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179308
5485