Commit graph

7 commits

Author SHA1 Message Date
guangyang1206
f096548a16 fix(web): extract single tryGetHostname helper (DRY, unified fallback)
Fixes #1368

Previously,  was duplicated in 4 places with 3 subtly different fallback behaviors:
1. inline-citation.tsx: returned  on error
2. markdown-text.tsx: returned  on error
3. assistant-message.tsx: returned  on error
4. citation.tsx: returned  on error

Created canonical  in  that:
- Returns
- Strips  prefix from hostname
- Returns  on invalid URL (safest contract)

Updated all 4 call sites:
- inline-citation.tsx:  (preserves original fallback)
- markdown-text.tsx:  (preserves original fallback)
- assistant-message.tsx:  (drop-in, both return )
- citation.tsx:  (drop-in, both return )

Co-authored-by: guangyang1206 <guangyang1206@users.noreply.github.com>
2026-05-16 12:15:16 +08:00
Trevin Chow
95130d894c refactor: extract shared TYPE_ICONS into dedicated module
Move the duplicated TYPE_ICONS record from citation.tsx and
citation-list.tsx into a new type-icons.ts module so the mapping lives
in one place and both components import from the same source.

Resolves #1190
2026-04-14 23:22:29 -07:00
Anish Sarkar
0a26a6c5bb chore: ran linting 2026-04-07 05:55:39 +05:30
sukarxn
416b3635bf fix: optimize image components with next/image
- Replace raw <img> with Next.js Image in markdown-viewer.tsx
- Use next/image with fill + sizes in assistant-ui image.tsx
- Optimize favicons with explicit dimensions in citation components
- Set unoptimized=true for data/blob URLs and external favicons
2026-04-03 17:10:55 +05:30
Anish Sarkar
04691d572b chore: ran linting 2026-03-30 01:50:41 +05:30
Anish Sarkar
74826b3714 feat: enhance web search tool integration with citation management and UI enhancements 2026-03-30 01:38:36 +05:30
Anish Sarkar
9eab427b56 feat: introduce citation components from tool-ui with hover popover functionality and schema validation for enhanced citation management 2026-03-30 01:38:00 +05:30