diff --git a/.tool-versions b/.tool-versions index 584fa7a3..dff218a2 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -nodejs 20.17.0 +nodejs 20.18.1 yarn 1.22.22 diff --git a/package.json b/package.json index 0c32793c..9e37a761 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "@nlux/monorepo", - "version": "latest", - "description": "NLUX is a JavaScript and React library for building conversational AI experiences.", - "author": "Salmen Hichri", + "name": "remix-nlux", + "version": "2.17.5", + "description": "Remix IDE NLUX integration. Remix IDE is the leading IDE for building and deploying smart contracts on Ethereum. NLUX is a JavaScript and React library for building conversational AI experiences.", + "author": "Remix IDE Project & Salmen Hichri", "license": "SEE LICENSE IN ROOT LICENSE FILE", "homepage": "https://docs.nlkit.com/nlux", - "private": true, + "private": false, "workspaces": [ "dist/dev/*", "packages/*", @@ -33,12 +33,14 @@ "typescript-eslint": "^7", "vite": "^5" }, - "bugs": "https://github.com/nlkitai/nlux/issues", + "bugs": "https://github.com/joeizang/nlux/issues", "repository": { "type": "git", - "url": "git+ssh://git@github.com/nlkitai/nlux.git" + "url": "git+ssh://git@github.com/joeizang/nlux.git" }, "keywords": [ + "remix-project", + "remix-project ai", "nlux", "js", "llm", diff --git a/packages/js/core/src/aiChat/options/composerOptions.ts b/packages/js/core/src/aiChat/options/composerOptions.ts index bc1dbf7c..31299c6b 100644 --- a/packages/js/core/src/aiChat/options/composerOptions.ts +++ b/packages/js/core/src/aiChat/options/composerOptions.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ export interface ComposerOptions { /** * Indicates whether the prompt input field should be focused when the prompt is shown. @@ -35,3 +36,9 @@ export interface ComposerOptions { */ submitShortcut?: 'Enter' | 'CommandEnter'; } + +export interface RemixComposerOptions extends ComposerOptions { + remixMethodList: Array + + addContextFiles: (pluginName: any, methodName: string, payload: { context: 'currentFile' | 'workspace'|'openedFiles' | 'none', files?: Array }) => Promise +} diff --git a/packages/js/core/src/aiChat/options/messageOptions.ts b/packages/js/core/src/aiChat/options/messageOptions.ts index f2776ed8..6691c30d 100644 --- a/packages/js/core/src/aiChat/options/messageOptions.ts +++ b/packages/js/core/src/aiChat/options/messageOptions.ts @@ -14,11 +14,12 @@ import {HighlighterExtension} from '../highlighter/highlighter'; * representing the raw response received from the server. */ export type ResponseRendererProps = { - uid: string; - dataTransferMode: 'stream' | 'batch'; - status: 'streaming' | 'complete'; - content: [AiMsg]; - serverResponse: unknown[]; + uid: string + dataTransferMode: 'stream' | 'batch' + status: 'streaming' | 'complete' + content: [AiMsg] + serverResponse: unknown[] + trackSentiment?: (sentiment: string) => void }; export type ResponseRenderer = (props: ResponseRendererProps) => HTMLElement | null; diff --git a/packages/js/core/src/index.ts b/packages/js/core/src/index.ts index e2a9ea41..4250f97a 100644 --- a/packages/js/core/src/index.ts +++ b/packages/js/core/src/index.ts @@ -13,7 +13,7 @@ export type { ConversationLayout, } from './aiChat/options/conversationOptions'; -export type {ComposerOptions} from './aiChat/options/composerOptions'; +export type {ComposerOptions, RemixComposerOptions} from './aiChat/options/composerOptions'; export type { ResponseRenderer, diff --git a/packages/js/core/src/sections/chat/chatRoom/chatRoom.render.ts b/packages/js/core/src/sections/chat/chatRoom/chatRoom.render.ts index e90ec825..806f3f1b 100644 --- a/packages/js/core/src/sections/chat/chatRoom/chatRoom.render.ts +++ b/packages/js/core/src/sections/chat/chatRoom/chatRoom.render.ts @@ -19,6 +19,7 @@ export const renderChatRoom: CompRenderer< // Contains the input field and submit button // const composerContainer = document.createElement('div'); + // composerContainer.classList.add('nlux-composer-container'); composerContainer.classList.add('nlux-composer-container'); // diff --git a/packages/react/core/src/components/ConversationStarters/ConversationStarters.tsx b/packages/react/core/src/components/ConversationStarters/ConversationStarters.tsx index 8245e9d3..3b85dd7f 100644 --- a/packages/react/core/src/components/ConversationStarters/ConversationStarters.tsx +++ b/packages/react/core/src/components/ConversationStarters/ConversationStarters.tsx @@ -8,7 +8,7 @@ export const ConversationStarters = (props: ConversationStartersProps) => { {props.items.map((conversationStarter, index) => (