diff --git a/.env.example b/.env.example index b3a1bdf30d..1e77aebbc7 100644 --- a/.env.example +++ b/.env.example @@ -124,7 +124,7 @@ MEDIUM_OPENAI_MODEL= # Default: gpt-4o LARGE_OPENAI_MODEL= # Default: gpt-4o EMBEDDING_OPENAI_MODEL= # Default: text-embedding-3-small IMAGE_OPENAI_MODEL= # Default: dall-e-3 -USE_OPENAI_EMBEDDING=TRUE # Set to TRUE for OpenAI/1536, leave blank for local +USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI/1536, leave blank for local # Community Plugin for OpenAI Configuration ENABLE_OPEN_AI_COMMUNITY_PLUGIN=false diff --git a/agent/package.json b/agent/package.json index d89236155d..4d2e88e48b 100644 --- a/agent/package.json +++ b/agent/package.json @@ -58,20 +58,22 @@ "@elizaos/plugin-echochambers": "workspace:*", "@elizaos/plugin-evm": "workspace:*", "@elizaos/plugin-flow": "workspace:*", + "@elizaos/plugin-gelato": "workspace:*", "@elizaos/plugin-giphy": "workspace:*", "@elizaos/plugin-gitbook": "workspace:*", "@elizaos/plugin-gitcoin-passport": "workspace:*", "@elizaos/plugin-goat": "workspace:*", - "@elizaos/plugin-lens-network": "workspace:*", "@elizaos/plugin-icp": "workspace:*", "@elizaos/plugin-initia": "workspace:*", "@elizaos/plugin-image-generation": "workspace:*", + "@elizaos/plugin-intiface": "workspace:*", + "@elizaos/plugin-lens-network": "workspace:*", + "@elizaos/plugin-letzai": "workspace:*", "@elizaos/plugin-lit": "workspace:*", - "@elizaos/plugin-gelato": "workspace:*", - "@elizaos/plugin-moralis": "workspace:*", + "@elizaos/plugin-massa": "workspace:*", "@elizaos/plugin-mind-network": "workspace:*", + "@elizaos/plugin-moralis": "workspace:*", "@elizaos/plugin-movement": "workspace:*", - "@elizaos/plugin-massa": "workspace:*", "@elizaos/plugin-news": "workspace:*", "@elizaos/plugin-nft-generation": "workspace:*", "@elizaos/plugin-node": "workspace:*", diff --git a/agent/src/__tests__/client-type-identification.test.ts b/agent/src/__tests__/client-type-identification.test.ts index 831d25433a..436fba4411 100644 --- a/agent/src/__tests__/client-type-identification.test.ts +++ b/agent/src/__tests__/client-type-identification.test.ts @@ -4,8 +4,8 @@ import { describe, it, expect } from "@jest/globals"; // Helper function to identify client types function determineClientType(client: Client): string { // Check if client has a direct type identifier - if ("type" in client) { - return (client as any).type; + if ("type" in client && typeof client.type === "string") { + return client.type; } // Check constructor name diff --git a/agent/src/index.ts b/agent/src/index.ts index e3dfa639f8..7159c99f8a 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -92,6 +92,7 @@ import { gitcoinPassportPlugin } from "@elizaos/plugin-gitcoin-passport"; import { initiaPlugin } from "@elizaos/plugin-initia"; import { imageGenerationPlugin } from "@elizaos/plugin-image-generation"; import { lensPlugin } from "@elizaos/plugin-lens-network"; +import { litPlugin } from "@elizaos/plugin-lit"; import { mindNetworkPlugin } from "@elizaos/plugin-mind-network"; import { multiversxPlugin } from "@elizaos/plugin-multiversx"; import { nearPlugin } from "@elizaos/plugin-near"; diff --git a/characters/lpmanager.character.json b/characters/lpmanager.character.json index b41647dcfd..2d57133968 100644 --- a/characters/lpmanager.character.json +++ b/characters/lpmanager.character.json @@ -10,7 +10,7 @@ "system": "Rebalance all LP positions owned by the wallet. Provide insights and metrics on the status of the LP positions.", "bio": [ "LP Manager is an assistant with a very specific task at hand", - "LP Manager repositions LP positions on Orca such that the center price of the positions are within a certain user specified distance, in bps, from the current pool price.", + "LP Manager repositions LP positions on Orca such that the center price of the positions is within a certain user specified distance, in bps, from the current pool price.", "LP Manager is always on time, but you need to tell him the interval he should be on time for.", "Once the LP Manager starts, LP Manager needs to keep reminded to call the action 'manage_positions' to keep managing the positions.", "LP Manager never starts running with parameters from in memory.", @@ -175,4 +175,4 @@ ], "post": [] } -} \ No newline at end of file +} diff --git a/client/src/components/app-sidebar.tsx b/client/src/components/app-sidebar.tsx index 9edfce84d2..b307655e7e 100644 --- a/client/src/components/app-sidebar.tsx +++ b/client/src/components/app-sidebar.tsx @@ -37,6 +37,7 @@ export function AppSidebar() { elizaos-icon {Array.from({ length: 5 }).map( - (_, index) => ( - + (_, _index) => ( + ) diff --git a/client/src/components/array-input.tsx b/client/src/components/array-input.tsx index f979f2182e..8b476528e4 100644 --- a/client/src/components/array-input.tsx +++ b/client/src/components/array-input.tsx @@ -13,8 +13,8 @@ export default function ArrayInput({
- {data?.map((b: string, idx: number) => ( - + {data?.map((b: string, _idx: number) => ( + ))}
diff --git a/client/src/components/audio-recorder.tsx b/client/src/components/audio-recorder.tsx index 673dc5dc30..31c36a6d6d 100644 --- a/client/src/components/audio-recorder.tsx +++ b/client/src/components/audio-recorder.tsx @@ -43,8 +43,7 @@ export const AudioRecorder = ({ const { toast } = useToast(); // States const [isRecording, setIsRecording] = useState(false); - // @ts-expect-error - isRecordingFinished is unused, but would break the 2D array if removed - const [isRecordingFinished, setIsRecordingFinished] = + const [_, setIsRecordingFinished] = useState(false); const [timer, setTimer] = useState(0); const [currentRecord, setCurrentRecord] = useState({ @@ -96,7 +95,7 @@ export const AudioRecorder = ({ }); function startRecording() { - if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { + if (navigator.mediaDevices?.getUserMedia) { navigator.mediaDevices .getUserMedia({ audio: true, @@ -182,7 +181,9 @@ export const AudioRecorder = ({ analyser.disconnect(); } if (stream) { - stream.getTracks().forEach((track) => track.stop()); + for (const track of stream.getTracks()) { + track.stop(); + } } if (audioContext) { audioContext.close(); diff --git a/client/src/components/chat.tsx b/client/src/components/chat.tsx index 4c4be22999..f7748b5b71 100644 --- a/client/src/components/chat.tsx +++ b/client/src/components/chat.tsx @@ -8,7 +8,7 @@ import { ChatInput } from "@/components/ui/chat/chat-input"; import { ChatMessageList } from "@/components/ui/chat/chat-message-list"; import { useTransition, animated, type AnimatedProps } from "@react-spring/web"; import { Paperclip, Send, X } from "lucide-react"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useRef, useState, useCallback } from "react"; import type { Content, UUID } from "@elizaos/core"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { apiClient } from "@/lib/api"; @@ -49,12 +49,13 @@ export default function Page({ agentId }: { agentId: UUID }) { const getMessageVariant = (role: string) => role !== "user" ? "received" : "sent"; - const scrollToBottom = () => { + const scrollToBottom = useCallback(() => { if (messagesContainerRef.current) { messagesContainerRef.current.scrollTop = messagesContainerRef.current.scrollHeight; } - }; + }, []); + useEffect(() => { scrollToBottom(); }, [queryClient.getQueryData(["messages", agentId])]); @@ -153,7 +154,7 @@ export default function Page({ agentId }: { agentId: UUID }) { const handleFileChange = (e: React.ChangeEvent) => { const file = e.target.files?.[0]; - if (file && file.type.startsWith("image/")) { + if (file?.type.startsWith("image/")) { setSelectedFile(file); } }; @@ -176,12 +177,12 @@ export default function Page({ agentId }: { agentId: UUID }) {
- {transitions((styles, message) => { + {transitions((style, message: ContentWithUser) => { const variant = getMessageVariant(message?.user); return ( {message?.attachments?.map( - (attachment, idx) => ( + (attachment: IAttachment) => (
attachment
- - + +
) @@ -298,6 +298,7 @@ export default function Page({ agentId }: { agentId: UUID }) { Selected file { +const CopyButton = ({ text }: { text: string }) => { const [copied, setCopied] = useState(false); const handleCopy = () => { diff --git a/client/src/components/ui/breadcrumb.tsx b/client/src/components/ui/breadcrumb.tsx index e232f1e063..c88436ab61 100644 --- a/client/src/components/ui/breadcrumb.tsx +++ b/client/src/components/ui/breadcrumb.tsx @@ -62,6 +62,7 @@ const BreadcrumbPage = React.forwardRef< React.ComponentPropsWithoutRef<"span"> >(({ className, ...props }, ref) => ( {audioBlob ? ( -