Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@magicul/react-chat-stream

Package Overview
Dependencies
Maintainers
2
Versions
16
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.1 to 0.1.2

3

dist/hooks/useChatStream.d.ts

@@ -1,2 +0,2 @@

import { ChangeEvent, FormEvent } from 'react';
import { ChangeEvent, Dispatch, FormEvent, SetStateAction } from 'react';
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';

@@ -10,2 +10,3 @@ type ChatMessage = {

messages: ChatMessage[];
setMessages: Dispatch<SetStateAction<ChatMessage[]>>;
input: string;

@@ -12,0 +13,0 @@ handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;

@@ -165,2 +165,3 @@ "use strict";

messages: messages,
setMessages: setMessages,
input: message,

@@ -167,0 +168,0 @@ handleInputChange: handleInputChange,

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

@@ -38,3 +38,3 @@ "types": "dist/index.d.ts",

"@typescript-eslint/parser": "^5.61.0",
"eslint": "8.44.0",
"eslint": "8.46.0",
"eslint-config-airbnb": "^19.0.4",

@@ -41,0 +41,0 @@ "eslint-plugin-jsx-a11y": "^6.7.1",

@@ -1,2 +0,2 @@

import { ChangeEvent, FormEvent, useState } from 'react';
import { ChangeEvent, Dispatch, FormEvent, SetStateAction, useState } from 'react';
import { decodeStreamToJson, getStream } from '../utils/streams';

@@ -17,2 +17,3 @@ import { v4 as uuidv4 } from 'uuid';

messages: ChatMessage[];
setMessages: Dispatch<SetStateAction<ChatMessage[]>>
input: string;

@@ -94,2 +95,3 @@ handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;

messages,
setMessages,
input: message,

@@ -96,0 +98,0 @@ handleInputChange,

Sorry, the diff of this file is not supported yet

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