From 8c7cb78c0b4b6c2854b586eab60948d6cc48466c Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 8 Jan 2025 19:55:23 +0100 Subject: [PATCH] Feature/add copy AI prompt to clipboard action to analysis page (#4176) * Add copy AI prompt to clipboard action * Update changelog --- CHANGELOG.md | 4 ++ apps/api/src/app/app.module.ts | 2 + .../api/src/app/endpoints/ai/ai.controller.ts | 47 +++++++++++++++ apps/api/src/app/endpoints/ai/ai.module.ts | 51 ++++++++++++++++ apps/api/src/app/endpoints/ai/ai.service.ts | 60 +++++++++++++++++++ apps/api/src/app/user/user.service.ts | 3 +- .../analysis/analysis-page.component.ts | 25 ++++++++ .../portfolio/analysis/analysis-page.html | 32 ++++++++++ .../analysis/analysis-page.module.ts | 4 ++ apps/client/src/app/services/data.service.ts | 5 ++ apps/client/src/locales/messages.ca.xlf | 52 ++++++++++------ apps/client/src/locales/messages.de.xlf | 52 ++++++++++------ apps/client/src/locales/messages.es.xlf | 52 ++++++++++------ apps/client/src/locales/messages.fr.xlf | 52 ++++++++++------ apps/client/src/locales/messages.it.xlf | 52 ++++++++++------ apps/client/src/locales/messages.nl.xlf | 52 ++++++++++------ apps/client/src/locales/messages.pl.xlf | 52 ++++++++++------ apps/client/src/locales/messages.pt.xlf | 52 ++++++++++------ apps/client/src/locales/messages.tr.xlf | 52 ++++++++++------ apps/client/src/locales/messages.xlf | 50 ++++++++++------ apps/client/src/locales/messages.zh.xlf | 52 ++++++++++------ libs/common/src/lib/interfaces/index.ts | 2 + .../responses/ai-prompt-response.interface.ts | 3 + libs/common/src/lib/permissions.ts | 6 +- 24 files changed, 614 insertions(+), 200 deletions(-) create mode 100644 apps/api/src/app/endpoints/ai/ai.controller.ts create mode 100644 apps/api/src/app/endpoints/ai/ai.module.ts create mode 100644 apps/api/src/app/endpoints/ai/ai.service.ts create mode 100644 libs/common/src/lib/interfaces/responses/ai-prompt-response.interface.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index f669ea14e..f85060f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Added a _Copy AI prompt to clipboard_ action to the analysis page (experimental) + ### Changed - Improved the usability of the _Copy link to clipboard_ action by adding a confirmation on success in the access table to share the portfolio diff --git a/apps/api/src/app/app.module.ts b/apps/api/src/app/app.module.ts index 7ac2c5915..6d097aeff 100644 --- a/apps/api/src/app/app.module.ts +++ b/apps/api/src/app/app.module.ts @@ -31,6 +31,7 @@ import { AuthDeviceModule } from './auth-device/auth-device.module'; import { AuthModule } from './auth/auth.module'; import { BenchmarkModule } from './benchmark/benchmark.module'; import { CacheModule } from './cache/cache.module'; +import { AiModule } from './endpoints/ai/ai.module'; import { ApiKeysModule } from './endpoints/api-keys/api-keys.module'; import { GhostfolioModule } from './endpoints/data-providers/ghostfolio/ghostfolio.module'; import { MarketDataModule } from './endpoints/market-data/market-data.module'; @@ -57,6 +58,7 @@ import { UserModule } from './user/user.module'; AdminModule, AccessModule, AccountModule, + AiModule, ApiKeysModule, AssetModule, AuthDeviceModule, diff --git a/apps/api/src/app/endpoints/ai/ai.controller.ts b/apps/api/src/app/endpoints/ai/ai.controller.ts new file mode 100644 index 000000000..c4c4b375d --- /dev/null +++ b/apps/api/src/app/endpoints/ai/ai.controller.ts @@ -0,0 +1,47 @@ +import { HasPermission } from '@ghostfolio/api/decorators/has-permission.decorator'; +import { HasPermissionGuard } from '@ghostfolio/api/guards/has-permission.guard'; +import { ImpersonationService } from '@ghostfolio/api/services/impersonation/impersonation.service'; +import { + DEFAULT_CURRENCY, + DEFAULT_LANGUAGE_CODE, + HEADER_KEY_IMPERSONATION +} from '@ghostfolio/common/config'; +import { AiPromptResponse } from '@ghostfolio/common/interfaces'; +import { permissions } from '@ghostfolio/common/permissions'; +import type { RequestWithUser } from '@ghostfolio/common/types'; + +import { Controller, Get, Headers, Inject, UseGuards } from '@nestjs/common'; +import { REQUEST } from '@nestjs/core'; +import { AuthGuard } from '@nestjs/passport'; + +import { AiService } from './ai.service'; + +@Controller('ai') +export class AiController { + public constructor( + private readonly aiService: AiService, + private readonly impersonationService: ImpersonationService, + @Inject(REQUEST) private readonly request: RequestWithUser + ) {} + + @Get('prompt') + @HasPermission(permissions.readAiPrompt) + @UseGuards(AuthGuard('jwt'), HasPermissionGuard) + public async getPrompt( + @Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId + ): Promise { + const impersonationUserId = + await this.impersonationService.validateImpersonationId(impersonationId); + + const prompt = await this.aiService.getPrompt({ + impersonationId: impersonationUserId, + languageCode: + this.request.user.Settings.settings.language ?? DEFAULT_LANGUAGE_CODE, + userCurrency: + this.request.user.Settings.settings.baseCurrency ?? DEFAULT_CURRENCY, + userId: this.request.user.id + }); + + return { prompt }; + } +} diff --git a/apps/api/src/app/endpoints/ai/ai.module.ts b/apps/api/src/app/endpoints/ai/ai.module.ts new file mode 100644 index 000000000..5a30f3264 --- /dev/null +++ b/apps/api/src/app/endpoints/ai/ai.module.ts @@ -0,0 +1,51 @@ +import { AccountBalanceService } from '@ghostfolio/api/app/account-balance/account-balance.service'; +import { AccountService } from '@ghostfolio/api/app/account/account.service'; +import { OrderModule } from '@ghostfolio/api/app/order/order.module'; +import { PortfolioCalculatorFactory } from '@ghostfolio/api/app/portfolio/calculator/portfolio-calculator.factory'; +import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; +import { PortfolioService } from '@ghostfolio/api/app/portfolio/portfolio.service'; +import { RulesService } from '@ghostfolio/api/app/portfolio/rules.service'; +import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; +import { UserModule } from '@ghostfolio/api/app/user/user.module'; +import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; +import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; +import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; +import { ImpersonationModule } from '@ghostfolio/api/services/impersonation/impersonation.module'; +import { MarketDataModule } from '@ghostfolio/api/services/market-data/market-data.module'; +import { MarketDataService } from '@ghostfolio/api/services/market-data/market-data.service'; +import { PrismaModule } from '@ghostfolio/api/services/prisma/prisma.module'; +import { PortfolioSnapshotQueueModule } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.module'; +import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile/symbol-profile.module'; + +import { Module } from '@nestjs/common'; + +import { AiController } from './ai.controller'; +import { AiService } from './ai.service'; + +@Module({ + controllers: [AiController], + imports: [ + ConfigurationModule, + DataProviderModule, + ExchangeRateDataModule, + ImpersonationModule, + MarketDataModule, + OrderModule, + PortfolioSnapshotQueueModule, + PrismaModule, + RedisCacheModule, + SymbolProfileModule, + UserModule + ], + providers: [ + AccountBalanceService, + AccountService, + AiService, + CurrentRateService, + MarketDataService, + PortfolioCalculatorFactory, + PortfolioService, + RulesService + ] +}) +export class AiModule {} diff --git a/apps/api/src/app/endpoints/ai/ai.service.ts b/apps/api/src/app/endpoints/ai/ai.service.ts new file mode 100644 index 000000000..59dec6add --- /dev/null +++ b/apps/api/src/app/endpoints/ai/ai.service.ts @@ -0,0 +1,60 @@ +import { PortfolioService } from '@ghostfolio/api/app/portfolio/portfolio.service'; + +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class AiService { + public constructor(private readonly portfolioService: PortfolioService) {} + + public async getPrompt({ + impersonationId, + languageCode, + userCurrency, + userId + }: { + impersonationId: string; + languageCode: string; + userCurrency: string; + userId: string; + }) { + const { holdings } = await this.portfolioService.getDetails({ + impersonationId, + userId + }); + + const holdingsTable = [ + '| Name | Symbol | Currency | Asset Class | Asset Sub Class | Allocation in Percentage |', + '| --- | --- | --- | --- | --- | --- |', + ...Object.values(holdings) + .sort((a, b) => { + return b.allocationInPercentage - a.allocationInPercentage; + }) + .map( + ({ + allocationInPercentage, + assetClass, + assetSubClass, + currency, + name, + symbol + }) => { + return `| ${name} | ${symbol} | ${currency} | ${assetClass} | ${assetSubClass} | ${(allocationInPercentage * 100).toFixed(3)}% |`; + } + ) + ]; + + return [ + `You are a neutral financial assistant. Please analyze the following investment portfolio (base currency being ${userCurrency}) in simple words.`, + ...holdingsTable, + 'Structure your answer with these sections:', + 'Overview: Briefly summarize the portfolio’s composition and allocation rationale.', + 'Risk Assessment: Identify potential risks, including market volatility, concentration, and sectoral imbalances.', + 'Advantages: Highlight strengths, focusing on growth potential, diversification, or other benefits.', + 'Disadvantages: Point out weaknesses, such as overexposure or lack of defensive assets.', + 'Target Group: Discuss who this portfolio might suit (e.g., risk tolerance, investment goals, life stages, and experience levels).', + 'Optimization Ideas: Offer ideas to complement the portfolio, ensuring they are constructive and neutral in tone.', + 'Conclusion: Provide a concise summary highlighting key insights.', + `Provide your answer in the following language: ${languageCode}.` + ].join('\n'); + } +} diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index 33e9a67da..b5c71179f 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -312,7 +312,8 @@ export class UserService { currentPermissions = without( currentPermissions, permissions.accessHoldingsChart, - permissions.createAccess + permissions.createAccess, + permissions.readAiPrompt ); // Reset benchmark diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 0bd4e85e3..7e27a05f9 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -11,10 +11,13 @@ import { ToggleOption, User } from '@ghostfolio/common/interfaces'; +import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GroupBy } from '@ghostfolio/common/types'; import { translate } from '@ghostfolio/ui/i18n'; +import { Clipboard } from '@angular/cdk/clipboard'; import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { SymbolProfile } from '@prisma/client'; import { isNumber, sortBy } from 'lodash'; import { DeviceDetectorService } from 'ngx-device-detector'; @@ -38,6 +41,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { public dividendTimelineDataLabel = $localize`Dividend`; public firstOrderDate: Date; public hasImpersonationId: boolean; + public hasPermissionToReadAiPrompt: boolean; public investments: InvestmentItem[]; public investmentTimelineDataLabel = $localize`Investment`; public investmentsByGroup: InvestmentItem[]; @@ -64,9 +68,11 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { public constructor( private changeDetectorRef: ChangeDetectorRef, + private clipboard: Clipboard, private dataService: DataService, private deviceService: DeviceDetectorService, private impersonationStorageService: ImpersonationStorageService, + private snackBar: MatSnackBar, private userService: UserService ) { const { benchmarks } = this.dataService.fetchInfo(); @@ -104,6 +110,11 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { return id === this.user.settings?.benchmark; }); + this.hasPermissionToReadAiPrompt = hasPermission( + this.user.permissions, + permissions.readAiPrompt + ); + this.update(); } }); @@ -130,6 +141,20 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { this.fetchDividendsAndInvestments(); } + public onCopyPromptToClipboard() { + this.dataService.fetchPrompt().subscribe(({ prompt }) => { + this.clipboard.copy(prompt); + + this.snackBar.open( + '✅ ' + $localize`AI prompt has been copied to the clipboard`, + undefined, + { + duration: 3000 + } + ); + }); + } + public ngOnDestroy() { this.unsubscribeSubject.next(); this.unsubscribeSubject.complete(); diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html index 087b3bd54..07ffa705d 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html @@ -1,5 +1,37 @@

Analysis

+ @if (user?.settings?.isExperimentalFeatures) { +
+
+
+ + + + +
+
+
+ }
('/api/v1/portfolio/report'); } + public fetchPrompt() { + return this.http.get('/api/v1/ai/prompt'); + } + public fetchPublicPortfolio(aAccessId: string) { return this.http .get(`/api/v1/public/${aAccessId}/portfolio`) diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index 9981f2a6b..1b7d0cbaf 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -5067,7 +5067,7 @@ Dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -5079,11 +5079,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -5095,7 +5095,7 @@ Monthly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -5103,7 +5103,7 @@ Yearly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -5119,7 +5119,7 @@ Absolute Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -5127,7 +5127,7 @@ Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -5135,7 +5135,7 @@ Absolute Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -5143,7 +5143,7 @@ Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -5151,7 +5151,7 @@ Absolute Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -5159,7 +5159,7 @@ Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -5167,7 +5167,7 @@ Top apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -5175,7 +5175,7 @@ Bottom apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -5183,7 +5183,7 @@ Portfolio Evolution apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -5191,7 +5191,7 @@ Investment Timeline apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -5199,7 +5199,7 @@ Current Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -5207,7 +5207,7 @@ Longest Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -5215,7 +5215,7 @@ Dividend Timeline apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index fe4be3713..d8f41758d 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -2146,7 +2146,7 @@ Zeitstrahl der Investitionen apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -2154,7 +2154,7 @@ Gewinner apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -2162,7 +2162,7 @@ Verlierer apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -2806,7 +2806,7 @@ Monatlich apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -2998,7 +2998,7 @@ Portfolio Wertentwicklung apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -3314,7 +3314,7 @@ Zeitstrahl der Dividenden apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -3322,7 +3322,7 @@ Dividenden apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -3430,7 +3430,7 @@ Jährlich apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4174,7 +4174,7 @@ Aktueller Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4182,7 +4182,7 @@ Längster Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -6311,11 +6311,11 @@ Einlage apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6327,7 +6327,7 @@ Absolute Anlage Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6335,7 +6335,7 @@ Anlage Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6343,7 +6343,7 @@ Absolute Währungsperformance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6351,7 +6351,7 @@ Währungsperformance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6359,7 +6359,7 @@ Absolute Netto Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6367,7 +6367,7 @@ Netto Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + KI-Anweisung wurde in die Zwischenablage kopiert + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Kopiere KI-Anweisung die Zwischenablage + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 56bf700b0..581d28818 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -2147,7 +2147,7 @@ Cronología de la inversión apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -2155,7 +2155,7 @@ Lo mejor apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -2163,7 +2163,7 @@ Lo peor apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -2835,7 +2835,7 @@ Mensual apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -2999,7 +2999,7 @@ Evolución cartera apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -3315,7 +3315,7 @@ Dividendo apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -3327,7 +3327,7 @@ Calendario de dividendos apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -3431,7 +3431,7 @@ Anual apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4175,7 +4175,7 @@ Current Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4183,7 +4183,7 @@ Longest Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -6312,11 +6312,11 @@ Inversión apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6328,7 +6328,7 @@ Absolute Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6336,7 +6336,7 @@ Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6344,7 +6344,7 @@ Absolute Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6352,7 +6352,7 @@ Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6360,7 +6360,7 @@ Absolute Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6368,7 +6368,7 @@ Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7637,6 +7637,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 4159e4645..8ae14e5d9 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -2746,7 +2746,7 @@ Dividende apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -2766,7 +2766,7 @@ Mensuel apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -2782,7 +2782,7 @@ Haut apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -2790,7 +2790,7 @@ Bas apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -2798,7 +2798,7 @@ Évolution du Portefeuille apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -2806,7 +2806,7 @@ Historique des Investissements apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -2814,7 +2814,7 @@ Historique des Dividendes apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -3430,7 +3430,7 @@ Annuel apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4174,7 +4174,7 @@ Série en cours apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4182,7 +4182,7 @@ Série la plus longue apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -6311,11 +6311,11 @@ Investissement apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6327,7 +6327,7 @@ Performance des Actifs en valeur absolue apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6335,7 +6335,7 @@ Performance des Actifs apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6343,7 +6343,7 @@ Performance des devises en valeur absolue apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6351,7 +6351,7 @@ Performance des devises apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6359,7 +6359,7 @@ Performance nette absolue apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6367,7 +6367,7 @@ Performance nette apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 8423c6f67..b2dc49ce6 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -2147,7 +2147,7 @@ Cronologia degli investimenti apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -2155,7 +2155,7 @@ In alto apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -2163,7 +2163,7 @@ In basso apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -2835,7 +2835,7 @@ Mensile apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -2999,7 +2999,7 @@ Evoluzione del portafoglio apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -3315,7 +3315,7 @@ Dividendi apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -3327,7 +3327,7 @@ Cronologia dei dividendi apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -3431,7 +3431,7 @@ Annuale apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4175,7 +4175,7 @@ Serie attuale apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4183,7 +4183,7 @@ Serie più lunga apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -6312,11 +6312,11 @@ Investimento apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6328,7 +6328,7 @@ Rendimento assoluto dell'Asset apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6336,7 +6336,7 @@ Rendimento dell'Asset apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6344,7 +6344,7 @@ Rendimento assoluto della Valuta apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6352,7 +6352,7 @@ Rendimento della Valuta apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6360,7 +6360,7 @@ Rendimento assoluto della Valuta apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6368,7 +6368,7 @@ Rendimento Netto apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7637,6 +7637,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 71e3d1f5f..aef90c10c 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -2146,7 +2146,7 @@ Tijdlijn investeringen apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -2154,7 +2154,7 @@ Winnaars apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -2162,7 +2162,7 @@ Verliezers apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -2834,7 +2834,7 @@ Maandelijks apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -2998,7 +2998,7 @@ Waardeontwikkeling van portefeuille apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -3314,7 +3314,7 @@ Dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -3326,7 +3326,7 @@ Tijdlijn dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -3430,7 +3430,7 @@ Jaarlijks apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4174,7 +4174,7 @@ Huidige reeks apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4182,7 +4182,7 @@ Langste reeks apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -6311,11 +6311,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6327,7 +6327,7 @@ Absolute Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6335,7 +6335,7 @@ Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6343,7 +6343,7 @@ Absolute Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6351,7 +6351,7 @@ Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6359,7 +6359,7 @@ Absolute Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6367,7 +6367,7 @@ Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index d2a4090e7..f17bd92c3 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -4659,7 +4659,7 @@ Dywidenda apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -4679,7 +4679,7 @@ Miesięcznie apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -4687,7 +4687,7 @@ Rocznie apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4703,7 +4703,7 @@ Największe wzrosty apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -4711,7 +4711,7 @@ Największy spadek apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -4719,7 +4719,7 @@ Rozwój portfela apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -4727,7 +4727,7 @@ Oś czasu inwestycji apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -4735,7 +4735,7 @@ Obecna passa apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4743,7 +4743,7 @@ Najdłuższa passa apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -4751,7 +4751,7 @@ Oś czasu dywidend apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -6311,11 +6311,11 @@ Inwestycje apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6327,7 +6327,7 @@ Łączny wynik aktywów apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6335,7 +6335,7 @@ Wyniki aktywów apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6343,7 +6343,7 @@ Łączny wynik walut apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6351,7 +6351,7 @@ Wynik walut apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6359,7 +6359,7 @@ Łączna wartość netto apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6367,7 +6367,7 @@ Wynik netto apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index f8034354b..3455cef82 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -2654,7 +2654,7 @@ Mensalmente apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -2670,7 +2670,7 @@ Topo apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -2678,7 +2678,7 @@ Fundo apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -2686,7 +2686,7 @@ Evolução do Portefólio apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -2694,7 +2694,7 @@ Cronograma de Investimento apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -3382,7 +3382,7 @@ Dividendos apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -3394,7 +3394,7 @@ Cronograma de Dividendos apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -3430,7 +3430,7 @@ Anualmente apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4174,7 +4174,7 @@ Série Atual apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4182,7 +4182,7 @@ Série mais Longa apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -6311,11 +6311,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6327,7 +6327,7 @@ Absolute Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6335,7 +6335,7 @@ Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6343,7 +6343,7 @@ Absolute Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6351,7 +6351,7 @@ Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6359,7 +6359,7 @@ Absolute Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6367,7 +6367,7 @@ Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index 62e9608f5..b45449ba4 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -4147,7 +4147,7 @@ Temettü apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -4167,7 +4167,7 @@ Aylık apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -4175,7 +4175,7 @@ Yıllık apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4191,7 +4191,7 @@ Üst apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -4199,7 +4199,7 @@ Alt apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -4207,7 +4207,7 @@ Portföyün Gelişimi apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -4215,7 +4215,7 @@ Yatırım Zaman Çizelgesi apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -4223,7 +4223,7 @@ Güncel Seri apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4231,7 +4231,7 @@ En Uzun Seri apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -4239,7 +4239,7 @@ Temettü Zaman Çizelgesi apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -6311,11 +6311,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6327,7 +6327,7 @@ Absolute Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6335,7 +6335,7 @@ Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6343,7 +6343,7 @@ Absolute Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6351,7 +6351,7 @@ Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6359,7 +6359,7 @@ Absolute Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6367,7 +6367,7 @@ Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -7636,6 +7636,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 03def3439..47ca44e51 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -4286,7 +4286,7 @@ Dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -4304,14 +4304,14 @@ Monthly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 Yearly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4325,49 +4325,49 @@ Top apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 Bottom apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 Portfolio Evolution apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 Investment Timeline apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 Current Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 Longest Streak apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 Dividend Timeline apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -5743,32 +5743,32 @@ Absolute Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 Absolute Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 Absolute Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -5779,21 +5779,21 @@ Asset Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 Net Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 Currency Performance apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -6908,6 +6908,20 @@ 59 + + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + + + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index 44ba35788..aacb0049c 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -4676,7 +4676,7 @@ 股息 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 38 + 41 libs/ui/src/lib/i18n.ts @@ -4696,7 +4696,7 @@ 每月 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 50 + 54 @@ -4704,7 +4704,7 @@ 每年 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 51 + 55 @@ -4720,7 +4720,7 @@ 顶部 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 165 + 197 @@ -4728,7 +4728,7 @@ 底部 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 214 + 246 @@ -4736,7 +4736,7 @@ 投资组合演变 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 267 + 299 @@ -4744,7 +4744,7 @@ 投资时间表 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 294 + 326 @@ -4752,7 +4752,7 @@ 当前连胜 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 315 + 347 @@ -4760,7 +4760,7 @@ 最长连续纪录 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 324 + 356 @@ -4768,7 +4768,7 @@ 股息时间表 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 351 + 383 @@ -6312,7 +6312,7 @@ 绝对货币表现 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 71 + 103 @@ -6320,7 +6320,7 @@ 绝对净性能 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 118 + 150 @@ -6328,7 +6328,7 @@ 绝对资产绩效 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 28 + 60 @@ -6336,11 +6336,11 @@ 投资 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 42 + 46 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 56 + 60 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6352,7 +6352,7 @@ 资产绩效 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 49 + 81 @@ -6360,7 +6360,7 @@ 净绩效 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 137 + 169 @@ -6368,7 +6368,7 @@ 货币表现 apps/client/src/app/pages/portfolio/analysis/analysis-page.html - 95 + 127 @@ -7637,6 +7637,22 @@ 59 + + AI prompt has been copied to the clipboard + AI prompt has been copied to the clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 149 + + + + Copy AI prompt to clipboard + Copy AI prompt to clipboard + + apps/client/src/app/pages/portfolio/analysis/analysis-page.html + 27 + + diff --git a/libs/common/src/lib/interfaces/index.ts b/libs/common/src/lib/interfaces/index.ts index fa5eb25a5..7ad4948dc 100644 --- a/libs/common/src/lib/interfaces/index.ts +++ b/libs/common/src/lib/interfaces/index.ts @@ -38,6 +38,7 @@ import type { PortfolioSummary } from './portfolio-summary.interface'; import type { Position } from './position.interface'; import type { Product } from './product'; import type { AccountBalancesResponse } from './responses/account-balances-response.interface'; +import type { AiPromptResponse } from './responses/ai-prompt-response.interface'; import type { ApiKeyResponse } from './responses/api-key-response.interface'; import type { BenchmarkResponse } from './responses/benchmark-response.interface'; import type { DataProviderGhostfolioStatusResponse } from './responses/data-provider-ghostfolio-status-response.interface'; @@ -74,6 +75,7 @@ export { AdminMarketDataDetails, AdminMarketDataItem, AdminUsers, + AiPromptResponse, ApiKeyResponse, AssetProfileIdentifier, Benchmark, diff --git a/libs/common/src/lib/interfaces/responses/ai-prompt-response.interface.ts b/libs/common/src/lib/interfaces/responses/ai-prompt-response.interface.ts new file mode 100644 index 000000000..4b95bc871 --- /dev/null +++ b/libs/common/src/lib/interfaces/responses/ai-prompt-response.interface.ts @@ -0,0 +1,3 @@ +export interface AiPromptResponse { + prompt: string; +} diff --git a/libs/common/src/lib/permissions.ts b/libs/common/src/lib/permissions.ts index d6676ec4e..d19b8daf0 100644 --- a/libs/common/src/lib/permissions.ts +++ b/libs/common/src/lib/permissions.ts @@ -35,6 +35,7 @@ export const permissions = { enableSubscriptionInterstitial: 'enableSubscriptionInterstitial', enableSystemMessage: 'enableSystemMessage', impersonateAllUsers: 'impersonateAllUsers', + readAiPrompt: 'readAiPrompt', readMarketData: 'readMarketData', readMarketDataOfOwnAssetProfile: 'readMarketDataOfOwnAssetProfile', readPlatforms: 'readPlatforms', @@ -76,6 +77,7 @@ export function getPermissions(aRole: Role): string[] { permissions.deletePlatform, permissions.deleteTag, permissions.deleteUser, + permissions.readAiPrompt, permissions.readMarketData, permissions.readMarketDataOfOwnAssetProfile, permissions.readPlatforms, @@ -95,7 +97,8 @@ export function getPermissions(aRole: Role): string[] { return [ permissions.accessAssistant, permissions.accessHoldingsChart, - permissions.createUserAccount + permissions.createUserAccount, + permissions.readAiPrompt ]; case 'USER': @@ -113,6 +116,7 @@ export function getPermissions(aRole: Role): string[] { permissions.deleteAuthDevice, permissions.deleteOrder, permissions.deleteOwnUser, + permissions.readAiPrompt, permissions.readMarketDataOfOwnAssetProfile, permissions.updateAccount, permissions.updateAuthDevice,