@magicul/react-chat-stream
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -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
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
35309
479