86090a7d33
feat(membership): PDF generation for declarations via WeasyPrint
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- New route: /admin/membership/<id>/print → generates PDF
- Professional A4 layout with chamber header, data sections, signatures
- Button changed from window.print() to PDF link (opens in new tab)
- No browser headers/footers — clean PDF output
- Signature lines for applicant and reviewer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 12:13:21 +02:00
9079610ea4
fix(membership): nuclear print CSS + hide browser headers via empty title
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-30 12:07:59 +02:00
5fd5342a88
fix(membership): compact print layout, hide detail header, reduce spacing
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-30 12:03:34 +02:00
a6d6186cc2
fix(membership): comprehensive print CSS — hide staging banner, registry panel, PWA prompt, nav
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-30 11:54:14 +02:00
d889444fab
feat(membership): print button + print-optimized CSS for declarations
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Blue "Drukuj deklarację" button in action sidebar (submitted + under_review)
- @media print CSS: hides nav, sidebar, buttons; full-width main content
- Print header with chamber name, declaration number, date, status
- Clean data sections for paper output
- Uses native window.print() — browser shows printer selection dialog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:45:22 +02:00
77f5277372
fix(messages): remove tempId reference in _doSend, use content matching, no alert
NordaBiz Tests / Unit & Integration Tests (push) Has been cancelled
NordaBiz Tests / E2E Tests (Playwright) (push) Has been cancelled
NordaBiz Tests / Smoke Tests (Production) (push) Has been cancelled
NordaBiz Tests / Send Failure Notification (push) Has been cancelled
2026-03-28 17:48:00 +01:00
406752fca2
fix(messages): restore polling for own messages + content-based dedup for optimistic
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:43:31 +01:00
8ac13f47b2
fix(messages): queue-based sending + simple dedup
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Root cause: rapid Enter sends caused parallel API calls creating
real duplicates in DB. Fix: message queue processes one at a time.
- sendContent() adds to queue + shows optimistic UI instantly
- _processQueue() sends sequentially (await each before next)
- Polling skips own messages (they come via optimistic UI)
- Simple ID-only dedup in appendMessage (no complex content matching)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:40:30 +01:00
d8db218df2
fix(messages): time-based dedup for optimistic messages (10s window)
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:35:19 +01:00
b944042a85
fix(messages): override Enter in Quill keyboard config at init time
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:31:43 +01:00
29e98d0b03
fix(messages): use Quill keyboard bindings instead of DOM — text always ready
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:29:28 +01:00
2afffc92af
fix(messages): 15ms delay for Quill to process keystroke before capture
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:26:58 +01:00
762bad0db1
fix(messages): capture content in keydown, clear editor instantly, send async
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Root cause: when typing fast + Enter, previous send hadn't finished
clearing the editor, so new text accumulated. Fix: keydown handler
captures content snapshot and clears Quill SYNCHRONOUSLY, then sends
via sendContent(). No setTimeout, no race condition.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:24:36 +01:00
bd591a2aed
fix(messages): 10ms delay for Quill keystroke processing + remove 500ms debounce
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:20:43 +01:00
1105099177
fix(messages): dedup optimistic vs server messages by content matching
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 17:17:25 +01:00
b2f24f02bc
feat(messages): optimistic UI — message appears instantly on Enter
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Instead of waiting for API response before showing the message,
the editor clears and message appears in DOM immediately. The API
call happens in the background. Real message ID replaces temp ID
in state for polling dedup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:14:07 +01:00
643a9cd94a
fix(messages): bulletproof dedup in appendMessage — check msg.id before adding
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Root cause: appendMessage() had no dedup check, so both send() and polling
could add the same message. Now appendMessage() checks if msg.id already
exists in state.messages[convId] before adding — guaranteed single display.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:46:45 +01:00
720d7a2d7d
fix(messages): root cause of double messages — polling re-adds sent message
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The actual bug: Composer.send() appends message to DOM via appendMessage(),
then 1-5s later the polling loop fetches the same message from API and
appends it again. Fix: track sent messages in state.messages[convId] so
the polling dedup check (msg.id > newestId) filters them out.
Also removed debug logging.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:35:19 +01:00
9151e4efa0
debug: add deep logging to message send flow (frontend + backend)
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 16:29:15 +01:00
86d9262c3e
fix(messages): restore DOM keydown with capture:true — Quill binding didn't work
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 16:24:13 +01:00
bc92605769
fix(messages): remove duplicate Enter handler — keep only Quill keyboard binding
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 16:11:57 +01:00
5adc6db031
fix(messages): prevent double message sending on Enter key
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Added _isSending flag to Composer.send() — blocks concurrent sends
- Added Quill keyboard binding override for Enter (handler returns false)
- Added stopImmediatePropagation() to DOM keydown handler
- Added _isCreating flag to NewConversation.send()
- Flags reset in finally blocks to handle errors gracefully
Fixes: messages appearing twice when user presses Enter
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:50:14 +01:00
b05429bfe3
feat(chat): update NordaGPT info modal — new features, smart matching, speed tiers
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 15:45:28 +01:00
036c959102
fix(chat): show follow-up chips on ALL assistant messages, not just streaming
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 15:34:28 +01:00
b308a80332
fix(nordagpt): smarter follow-up chips + contact data only for recommended firms
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- "Dane kontaktowe" chip now says "TYLKO do firm które polecileś powyżej"
- Added prompt rule: follow-up contact requests = only previously recommended firms
- Each contact entry must include short reason WHY the firm was recommended
- Prevents AI from dumping all 15 matcher results when user asks for contacts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:30:40 +01:00
d5af8a4fdd
fix(nordagpt): strict anti-hallucination for phone numbers and URLs — use ONLY data from context
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 15:03:30 +01:00
7fe5eb929b
feat(chat): user-friendly badge — hide model/cost for non-admins, show only quality + time
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 15:01:39 +01:00
4b10d38022
fix(nordagpt): handle None values in company data lists — prevents join() crash
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 14:37:22 +01:00
8ee998b42f
fix(nordagpt): empty matcher fallback, no-results prompt, hide costs for users, streaming timeout
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
1. When company_matcher returns [], keep full company list as fallback instead of leaving AI with zero data
2. Add explicit "no results" instruction in prompt to prevent hallucinated company names
3. Hide cost badge chip from non-admin users (IS_ADMIN gate)
4. Add 60s AbortController timeout on streaming fetch to prevent hung connections
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 13:08:44 +01:00
50d31c1b84
feat(chat): better markdown rendering, smart titles, follow-up chips, prompt fixes
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 12:21:03 +01:00
1c7636e5c6
feat(chat): redesign response badge — colored chips for model, thinking, time, cost
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Badge now uses pill-shaped colored chips instead of tiny gray text:
- Blue chip: model name (Flash/Lite/Pro)
- Yellow chip: thinking level (szybki/analiza/głęboka analiza)
- Green chip: response time
- Green chip: cost
Much more readable than the previous 11px gray text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:43:41 +01:00
f11df918e4
fix: escape JSON braces in smart router AI prompt template
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 07:26:05 +01:00
929e0b919f
feat(nordagpt): integrate company_matcher — AI sees only matched companies, eliminates hallucinations
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 07:18:08 +01:00
da7fc02070
feat(nordagpt): add company_matcher.py — multi-layer company search eliminates hallucinations
...
Pre-selects companies from the database BEFORE the AI sees them.
Five matching layers: category keywords, PostgreSQL FTS, ILIKE text,
AI Insights arrays, and PKD codes. Returns rich profiles with scores
so the AI can only reference real companies.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 07:15:23 +01:00
365de18301
fix(nordagpt): add 'lub/czy' to hallucination prefix patterns
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
2026-03-28 07:02:04 +01:00
513d32ffb2
fix(nordagpt): catch bullet-point company hallucinations (* ProBud to...)
...
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
AI writes hallucinated company names at start of bullet points without
any prefix word. New pattern catches "* CompanyName to/–/specjalizuje"
and removes the fake name if it's not in the database.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:58:53 +01:00
a1a64730e3
fix(nordagpt): catch plain-text company hallucinations (firma X, również X)
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
AI bypasses link/bold validation by mentioning companies as plain text
like "firma Baumar" or "również Pro-Bud". New regex catches these patterns
and removes them if the company name isn't in the database.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:55:23 +01:00
87d4fde5c3
fix(nordagpt): catch full URL hallucinations + remove manual model selector
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Validator now catches https://nordabiznes.pl/company/slug (full URLs)
- Also catches /firma/ URLs as fallback
- Removed Flash/Pro model selector — Smart Router decides automatically
- Removed "Spróbuj Pro" hints from response badges
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:51:08 +01:00
337f229a05
fix(nordagpt): use /company/ URLs instead of /firma/ — fixes all 404 links
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The actual Flask route is /company/<slug>, not /firma/<slug>.
All link generation, validation, and prompt instructions now use /company/.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:45:34 +01:00
855856dc99
fix(nordagpt): nuclear anti-hallucination — whitelist + bold text validation
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Three layers of defense:
1. PROMPT: explicit whitelist of allowed company names + slugs
2. VALIDATOR: link slug verification (existing)
3. VALIDATOR: bold text scan — removes **FakeName** if not in DB
AI can no longer mention companies as plain/bold text to bypass link validation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:37:38 +01:00
464e456939
fix(nordagpt): smarter company validator — fix slugs instead of removing real companies
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- AI generates "inpi-sp-z-o-o" but real slug is "inpi" → now auto-corrected
- Fuzzy prefix matching on slugs (handles legal form suffixes)
- Name-based resolution as fallback (match link text to company name)
- Hallucinated companies: keep text, remove link (instead of deleting entirely)
- Better cleanup of artifacts ("oraz –", empty bullets)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:30:20 +01:00
c167794bb6
fix(nordagpt): structural anti-hallucination — validate ALL company links against DB
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Prompt rules don't work — AI ignores them and invents company names.
Added _validate_company_references() post-processor that:
- Loads all valid company slugs from DB
- Scans every /firma/ link in AI response
- REMOVES links to companies that don't exist
- Cleans up empty list items left by removals
- Applied to BOTH send_message() and send_message_stream()
This is the ONLY reliable way to prevent hallucinated companies.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:25:20 +01:00
d7a8cbe459
fix(nordagpt): avatar rendering + strategic queries get complex/high thinking
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Remove CSS filter on AI avatar — show NordaGPT robot icon as-is
- Strategic keywords (partner, inwestow, PEJ, serwerowni) → complex
- Complex queries get thinking=high for deeper analysis and less hallucination
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:20:12 +01:00
0a7fe6389f
feat(nordagpt): avatars in chat + anti-hallucination rule for companies
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- NordaGPT icon (nordagpt-icon.svg) as AI avatar instead of "AI" text
- User profile photo as avatar (falls back to initial letter)
- CRITICAL: added strict rule to never hallucinate company names
- Only mention companies that exist in the provided database
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:12:49 +01:00
cc78711e17
fix(nordagpt): smart router complexity for long queries + show routing info in badge
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Long messages (>150 chars) with 2+ categories → complex (was medium)
- Badge shows actual model used, complexity icon, thinking level
- Done chunk includes complexity, thinking, routed_by metadata
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 06:08:43 +01:00
86c7e83886
fix: handle lazy loading error for company.category in chat routes
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 05:54:49 +01:00
8d64639e27
fix: use JSONBType instead of JSON in AIConversationSummary model
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 05:50:46 +01:00
1877c1856a
fix: add Float import to database.py for AIUserMemory model
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
2026-03-28 05:49:39 +01:00
59f8db8213
feat(nordagpt): add memory service — fact extraction, summaries, CRUD, prompt injection
...
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 05:47:44 +01:00
f953648c7d
feat(nordagpt): add memory tables and ORM models
...
- Migration 092: ai_user_memory (per-user facts with expiry)
- Migration 093: ai_conversation_summary (auto-generated summaries)
- SQLAlchemy models: AIUserMemory, AIConversationSummary
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 05:44:30 +01:00