New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@chatbotkit/next

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chatbotkit/next - npm Package Compare versions

Comparing version
1.1.10
to
1.8.0
+1
-1
dist/cjs/edge.cjs

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

else {
throw new Error('Invald source');
throw new Error('Invalid source');
}

@@ -19,0 +19,0 @@ try {

@@ -13,3 +13,3 @@ export function stream(source) {

else {
throw new Error('Invald source');
throw new Error('Invalid source');
}

@@ -16,0 +16,0 @@ try {

{
"name": "@chatbotkit/next",
"version": "1.1.10",
"version": "1.8.0",
"description": "Utility library for ChatbotKit for Next.js",
"license": "ISC",
"engines": {
"node": ">=18.16.0"
"node": ">=18.17.0"
},

@@ -82,3 +82,5 @@ "repository": {

"types": "./dist/cjs/index.d.ts",
"dependencies": {},
"dependencies": {
"tslib": "^2.6.2"
},
"scripts": {

@@ -85,0 +87,0 @@ "build": "run-s build:*",

@@ -27,7 +27,5 @@ [![Follow on Twitter](https://img.shields.io/twitter/follow/chatbotkit.svg?logo=twitter)](https://twitter.com/chatbotkit)

// file: ./pages/api/conversation/complete.js
// Import ChatBotKit and Edge streaming utilities
import { stream } from '@chatbotkit/next/edge'
import { ChatBotKit } from '@chatbotkit/sdk'
import { stream } from '@chatbotkit/next/edge'
// Initialize ChatBotKit with API secret
const cbk = new ChatBotKit({

@@ -37,3 +35,2 @@ secret: process.env.CHATBOTKIT_API_SECRET,

// Define an API handler for streaming messages
export default async function handler(req) {

@@ -45,3 +42,2 @@ const { messages } = await req.json()

// Configure Edge runtime
export const config = {

@@ -56,11 +52,18 @@ runtime: 'edge',

// file: ./pages/index.js
// Utilize components and hooks from ChatBotKit's React package
import { AutoTextarea, useConversationManager } from '@chatbotkit/react'
export default function Index() {
const { thinking, text, setText, messages, submit } = useConversationManager({
const {
thinking,
text,
setText,
messages,
submit,
} = useConversationManager({
endpoint: '/api/conversation/complete',
})
// Handle text submission on Enter key press
function handleOnKeyDown(event) {

@@ -74,3 +77,2 @@ if (event.keyCode === 13) {

// Render chat interface
return (

@@ -77,0 +79,0 @@ <div style={{ fontFamily: 'monospace', padding: '10px' }}>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet