From b1021c18d642d96dcc4d5a2624ff05ec516c3929 Mon Sep 17 00:00:00 2001 From: Viktor Vasas Date: Wed, 21 May 2025 20:32:08 +0200 Subject: [PATCH] feat: command buttons --- .../components/Portfolio/Prompt/Prompt.tsx | 142 +++++++++++++++++- 1 file changed, 136 insertions(+), 6 deletions(-) diff --git a/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx b/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx index 296848791..72c91c121 100644 --- a/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx +++ b/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx @@ -8,6 +8,8 @@ import { Scrollbars, Grow, Backdrop, + PlusIcon, + Slide, } from '@avalabs/core-k2-components'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { FunctionCallingMode } from '@google/generative-ai'; @@ -51,6 +53,7 @@ export function Prompt() { const { t } = useTranslation(); const [input, setInput] = useState(''); const [isDialogOpen, setIsDialogOpen] = useState(false); + const [isCommandsOpen, setIsCommandsOpen] = useState(false); const { network, networks, setNetwork, getNetwork } = useNetworkContext(); const { contacts, createContact } = useContactsContext(); const { accounts, selectAccount } = useAccountsContext(); @@ -569,11 +572,33 @@ export function Prompt() { {prompts.map((message, i) => { if (message.role === 'model') { return ( - + <> + + + + + + ); } return ; @@ -581,7 +606,112 @@ export function Prompt() { {isTyping && } - + + + + + + + + + + + + + + { + setIsCommandsOpen(!isCommandsOpen); + }} + size={24} + sx={{ cursor: 'pointer' }} + />