@magicul/react-chat-stream
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -167,3 +167,3 @@ "use strict"; | ||
_h.trys.push([2, 5, 7, 8]); | ||
return [4 /*yield*/, fetchAndUpdateAIResponse(formInput)]; | ||
return [4 /*yield*/, fetchAndUpdateAIResponse(message !== null && message !== void 0 ? message : formInput)]; | ||
case 3: | ||
@@ -170,0 +170,0 @@ addedMessage_1 = _h.sent(); |
{ | ||
"name": "@magicul/react-chat-stream", | ||
"description": "A React hook that lets you easily integrate your custom ChatGPT-like chat in React.", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "dist/index.d.ts", |
@@ -61,3 +61,3 @@ import { ChangeEvent, FormEvent, useState } from 'react'; | ||
try { | ||
const addedMessage = await fetchAndUpdateAIResponse(formInput); | ||
const addedMessage = await fetchAndUpdateAIResponse(message ?? formInput); | ||
await input.handlers.onMessageAdded?.(addedMessage); | ||
@@ -64,0 +64,0 @@ } catch { |
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
45117