New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@magicul/react-chat-stream

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magicul/react-chat-stream - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

4

dist/hooks/useChatStream.js

@@ -137,3 +137,3 @@ "use strict";

}); };
var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
var handleSubmit = function (e, newMessage) { return __awaiter(void 0, void 0, void 0, function () {
var _a;

@@ -145,3 +145,3 @@ return __generator(this, function (_b) {

e === null || e === void 0 ? void 0 : e.preventDefault();
addMessageToChat(message);
addMessageToChat(newMessage !== null && newMessage !== void 0 ? newMessage : message);
setMessage('');

@@ -148,0 +148,0 @@ _b.label = 1;

{
"name": "@magicul/react-chat-stream",
"description": "A React hook that lets you easily integrate your custom ChatGPT-like chat in React.",
"version": "0.1.5",
"version": "0.1.6",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -78,6 +78,6 @@ import { ChangeEvent, Dispatch, FormEvent, SetStateAction, useState } from 'react';

const handleSubmit = async (e?: FormEvent<HTMLFormElement>) => {
const handleSubmit = async (e?: FormEvent<HTMLFormElement>, newMessage?: string) => {
setIsLoading(true);
e?.preventDefault();
addMessageToChat(message);
addMessageToChat(newMessage ?? message);
setMessage('');

@@ -84,0 +84,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc