The previous commit used `prisma db push` which doesn't create migration
files. Railway runs `prisma migrate deploy` on startup, which requires a
migration file in prisma/migrations/ to apply schema changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add NewsArticle Prisma model with Finnhub API integration and PostgreSQL storage
- Create NestJS news module (service, controller, module) with CRUD endpoints
- Add get_portfolio_news AI agent tool wrapping NewsService
- Expand eval suite from 55 to 58 test cases with news-specific scenarios
- Update all references from 8 to 9 tools and 55 to 58 test cases across docs
- Add AI Agent section to project README
- Fix Array<T> lint errors in eval.ts and verification.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Switch LLM from Claude Sonnet to Claude Haiku 3.5 (claude-haiku-4-5-20251001),
reducing avg eval latency from ~7s to 3.8s with 100% pass rate (55/55)
- Add streaming endpoint (POST /ai/agent/stream) using Vercel AI SDK streamText()
with SSE, so tokens render progressively in the chat UI
- Update Angular chat component to consume SSE via fetch + ReadableStream reader
- Add user feedback (thumbs up/down) buttons on assistant messages that POST to
new /ai/feedback endpoint and log scores to Langfuse via REST API
- Add delayed loadCurrencies() call on startup to ensure exchange rates are
populated after data-gathering queue processes on fresh deployments
- Fix eval suite dotenv loading so LLM-as-judge can read ANTHROPIC_API_KEY
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The period performance tool was falling back to cost basis when the
local MarketData table lacked historical prices at the period start,
making YTD numbers identical to all-time. Now uses
DataProviderService.getHistoricalRaw() to fetch prices directly from
Yahoo Finance with a 7-day lookback window, ensuring accurate
start-of-period valuations regardless of local DB state.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The LLM now knows the current date so it can correctly interpret
relative time references like "this year" or "this month".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The agent can now answer period-specific performance questions (YTD,
MTD, 1Y, etc.) instead of always returning all-time data. Uses
historical MarketData prices to compute start-of-period valuations
and calculates period gain adjusted for cash flows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite performance tool to compute returns directly from orders +
live quotes, bypassing broken portfolio snapshot calculator
- Add OnApplicationBootstrap hook to CronService to trigger data
gathering (gather7Days) automatically when the server starts
- Update eval results (10/10 pass)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(lib): resolve typescript errors
* feat(lib): migrate to takeUntilDestroyed
* fix(lib): resolve type errors
* feat(lib): implement output signal
* feat(lib): clean up variables
* fix(lib): resolve input is deprecated
* feat(lib): implement input signal on placeholder
* feat(lib): implement input signal on isLoading
* fix(lib): add type annotations for date adapter
* fix(lib): handle form value possibly null
* fix(lint): use arrow fn for validators
* fix(lib): accounts table typings
* fix(lib): remove unsubscribeSubject due to lack of observable
* fix(lib): remove validators variable
* feat(lib): implement inject functions
* feat(lib): make locale an input signal
* feat(lib): make showActions an input signal
* feat(lib): make accountId an input signal
* feat(lib): make accountCurrency an input signal
* feat(lib): make accountBalances an input signal
* feat(lib): make sort a viewChild signal
* feat(lib): implement isNil
* feat(lib): resolve ts errors
* feat(lib): make days protected and readonly
* feat(lib): create formatDay helper function
* fix(lib): remove unused eslint-disable
* feat(lib): change locale to input signal
* feat(lib): change defaultDateFormat to computed signal
* feat(lib): change deviceType to computed signal
* feat(lib): change marketData to input signal
* feat(lib): change historicalDataItems to computed signal
* feat(nx): run ui test
* feat(lib): update days to improve readability
* feat(nx): revert test changes
* fix(lib): change logic for locale
* fix(lib): disable mutating the injected readonly data
* fix(lib): implement takeUntilDestroyed
* fix(lib): implement takeUntilDestroyed
* fix(lib): organize imports