From c2e3420a286f1625b46744416a61708d258ff351 Mon Sep 17 00:00:00 2001 From: Viktor Vasas Date: Wed, 21 May 2025 15:25:29 +0200 Subject: [PATCH] feat: add data and summary prompt --- src/pages/Home/components/Portfolio/Prompt/Prompt.tsx | 3 +++ src/pages/Home/components/Portfolio/Prompt/models.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx b/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx index 296848791..45911c96c 100644 --- a/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx +++ b/src/pages/Home/components/Portfolio/Prompt/Prompt.tsx @@ -63,6 +63,7 @@ export function Prompt() { const { captureEncrypted } = useAnalyticsContext(); const tokens = useTokensWithBalances(); + console.log('tokens: ', tokens); const allAvailableTokens = useTokensWithBalances({ forceShowTokensWithoutBalances: true, }); @@ -301,6 +302,8 @@ export function Prompt() { name: token.name, symbol: token.symbol, balance: token.balanceDisplayValue, + priceChanges: token.priceChanges, + priceInCurrency: token.priceInCurrency, })), (_, v) => (typeof v === 'bigint' ? v.toString() : v), ), diff --git a/src/pages/Home/components/Portfolio/Prompt/models.ts b/src/pages/Home/components/Portfolio/Prompt/models.ts index f5cc199ab..463e18dd8 100644 --- a/src/pages/Home/components/Portfolio/Prompt/models.ts +++ b/src/pages/Home/components/Portfolio/Prompt/models.ts @@ -139,4 +139,5 @@ __TOKENS__ The tokens can be identified by their "symbol" property, as well as their "address" property. Both identifiers are case-insensitive. All known and available tokens for the current network are listed in the following array: __AVAILABLE_TOKENS__ The user can open a dApp by name or by a given URL or if the user wants to buy a token you can open a new window where it can be done. +The user can ask the daily summary of the tokens which means you are asked to list out the price changes of the owned tokens. The changes are in the __TOKENS__ list. Each index is an owned token and each one has the "priceChanges" property which contains a percentage and a value and a currency vale in the "value" property. The changes can be positive or negative. You can mark the positive changes with green color and the negative ones with red. You can summarize all the changes in short as well how the prices and the percentages are changed and that information is important so format it well e.g. with bold text. `;