23 Commits

Author SHA1 Message Date
ruitanglin
acbf2fb453 fix(citations): use markdown link text as fallback for display
When citation data is not available, use the markdown link text
(children) as display text instead of just the domain. This ensures
that links like [OpenJudge](github.com/...) show 'OpenJudge' instead
of just 'github.com'.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 15:06:51 +08:00
ruitanglin
f6e625ec3b fix(citations): improve citation link rendering and copy behavior
- Use citation.title for display text in CitationLink to ensure correct
  titles show during streaming (instead of generic "Source" text)
- Render all external links as CitationLink badges for consistent styling
  during streaming output
- Add removeAllCitations when copying message content to clipboard
- Simplify citations_format prompt for cleaner AI output

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-04 16:34:12 +08:00
ruitanglin
c67f1af889 feat(citations): add shared citation components and optimize code
## New Features
- Add `CitationLink` shared component for rendering citation hover cards
- Add `CitationsLoadingIndicator` component for showing loading state
- Add `removeAllCitations` utility to strip all citations from content
- Add backend support for removing citations when downloading markdown files
- Add i18n support for citation loading messages (en-US, zh-CN)

## Code Optimizations
- Remove duplicate `ExternalLinkBadge` component, reuse `CitationLink` instead
- Consolidate `remarkPlugins` config in `streamdownPlugins` to avoid duplication
- Remove unused imports: `Citation`, `buildCitationMap`, `extractDomainFromUrl`, etc.
- Remove unused `messages` parameter from `ToolCall` component
- Remove unused `isWriteFile` parameter from `ArtifactFilePreview` component
- Remove unused `useI18n` hook from `MessageContent` component

## Bug Fixes
- Fix `remarkGfm` plugin configuration that prevented table rendering
- Fix React Hooks rule violation: move `useMemo` to component top level
- Replace `||` with `??` for nullish coalescing in clipboard data

## Code Cleanup
- Remove debug console.log/info statements from:
  - `threads/hooks.ts`
  - `notification/hooks.ts`
  - `memory-settings-page.tsx`
- Fix import order in `message-group.tsx`

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-04 11:56:10 +08:00
Henry Li
154fbb0ba3 feat: add suggestions 2026-02-02 11:21:30 +08:00
Henry Li
c587460dbc feat: add file icons 2026-02-02 10:02:31 +08:00
Henry Li
c265f5410d fix: add max width 2026-01-29 16:12:30 +08:00
Henry Li
7c42fa5162 feat: add scroll indicator 2026-01-27 13:15:49 +08:00
Henry Li
ebda30c7cf feat: support static website 2026-01-24 18:01:27 +08:00
Henry Li
8ef89b3004 feat: put all options into '+' 2026-01-22 13:43:45 +08:00
Henry Li
44850d9a61 feat: add Todos 2026-01-22 00:26:11 +08:00
Henry Li
c7a40d6a23 refactor: move 2026-01-21 10:46:43 +08:00
Henry Li
6e024d6c8f feat: add code editor 2026-01-21 09:33:33 +08:00
Henry Li
4b7ee2bee2 feat: enlarge shadow 2026-01-21 08:52:30 +08:00
Henry Li
5d6162d006 feat: use code block to display bash commands 2026-01-19 21:59:23 +08:00
Henry Li
aa44566fef feat: re-implement message group 2026-01-18 19:56:07 +08:00
Henry Li
ec1964c829 feat: support SSE write_file(0 2026-01-18 17:13:15 +08:00
Henry Li
449f04fc44 feat: remove model icon 2026-01-18 09:55:17 +08:00
Henry Li
9a3f72869c feat: integrated with artifacts in states 2026-01-17 17:21:37 +08:00
Henry Li
5d23dd0763 chore: remove unused components 2026-01-17 10:09:43 +08:00
Henry Li
7680a5adba feat: adjust message group layout 2026-01-15 23:56:42 +08:00
Henry Li
d45f48adde feat: remove max-w- 2026-01-15 23:47:28 +08:00
Henry Li
cecc684de1 feat: implement basic web app 2026-01-15 23:40:21 +08:00
Henry Li
c628c7f8db chore: create frontend project from boilerplate 2026-01-14 09:50:26 +08:00