Commit Graph

667 Commits

Author SHA1 Message Date
ruitanglin
365e3f4304 fix(artifacts): only render citation badges for links in citationMap
Same fix as message-list-item: project URLs and regular links in
artifact file preview should be rendered as plain links, not badges.
Only actual citations (in citationMap) should be rendered as badges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 15:55:53 +08:00
LofiSu
7c21d8f3a6 fix(artifacts): only render citation badges for links in citationMap
Same fix as message-list-item: project URLs and regular links in
artifact file preview should be rendered as plain links, not badges.
Only actual citations (in citationMap) should be rendered as badges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 15:55:53 +08:00
Henry Li
44742c6353 feat: add 'about' page 2026-02-06 15:18:37 +08:00
Henry Li
70989a949e feat: add 'about' page 2026-02-06 15:18:37 +08:00
Henry Li
dd4a7aae36 docs: rewording 2026-02-06 15:18:19 +08:00
Henry Li
bc7837ed6f docs: rewording 2026-02-06 15:18:19 +08:00
ruitanglin
1ce154fa71 fix(citations): only render citation badges for links in citationMap
Project URLs and regular links should be rendered as plain underlined
links, not as citation badges. Only links that are actual citations
(present in citationMap) should be rendered as badges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 15:15:45 +08:00
LofiSu
5d8c08d3ba fix(citations): only render citation badges for links in citationMap
Project URLs and regular links should be rendered as plain underlined
links, not as citation badges. Only links that are actual citations
(present in citationMap) should be rendered as badges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 15:15:45 +08:00
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
LofiSu
49f7cf1662 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
Henry Li
a711c5f310 docs: add CLAUDE.md 2026-02-06 14:40:52 +08:00
Henry Li
23c082f05d docs: add CLAUDE.md 2026-02-06 14:40:52 +08:00
ruitanglin
f43522bd27 fix(prompt): clarify citation link format must include URL
AI was outputting bare brackets like [arXiv:xxx] without URLs,
which do not render as links. Updated prompt to explicitly show
correct vs wrong formats and require complete markdown links.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:38:31 +08:00
LofiSu
a91302ac72 fix(prompt): clarify citation link format must include URL
AI was outputting bare brackets like [arXiv:xxx] without URLs,
which do not render as links. Updated prompt to explicitly show
correct vs wrong formats and require complete markdown links.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:38:31 +08:00
Henry Li
5b33a62f05 docs: add AGENTS.md 2026-02-06 14:32:48 +08:00
Henry Li
78b6164770 docs: add AGENTS.md 2026-02-06 14:32:48 +08:00
ruitanglin
c8c4d2fc95 fix(messages): prevent URL autolink bleeding into adjacent text
For human messages, disable remark-gfm autolink feature to prevent
URLs from incorrectly including adjacent text (especially Chinese
characters) as part of the link. This ensures that when users input
"https://example.com 帮我分析", only the URL becomes a link.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:30:57 +08:00
LofiSu
738b71be47 fix(messages): prevent URL autolink bleeding into adjacent text
For human messages, disable remark-gfm autolink feature to prevent
URLs from incorrectly including adjacent text (especially Chinese
characters) as part of the link. This ensures that when users input
"https://example.com 帮我分析", only the URL becomes a link.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:30:57 +08:00
ruitanglin
1b0c016093 fix(citations): only render CitationLink badges for AI messages
Human messages should display links as plain underlined text,
not as citation badges. This preserves the original user input
appearance when users paste URLs in their messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:28:28 +08:00
LofiSu
6f968242d6 fix(citations): only render CitationLink badges for AI messages
Human messages should display links as plain underlined text,
not as citation badges. This preserves the original user input
appearance when users paste URLs in their messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:28:28 +08:00
Henry Li
765e35fc70 feat: update surprise-me functionality with localization support 2026-02-06 14:21:03 +08:00
Henry Li
b74cf65275 feat: update surprise-me functionality with localization support 2026-02-06 14:21:03 +08:00
Henry Li
26e078df7d feat: add surprise-me 2026-02-06 14:04:15 +08:00
Henry Li
22dea3fd43 feat: add surprise-me 2026-02-06 14:04:15 +08:00
Henry Li
254efe7391 feat: adjust position 2026-02-06 09:39:20 +08:00
Henry Li
f391060573 feat: adjust position 2026-02-06 09:39:20 +08:00
hetao
b7bf027aa5 feat: add configuration to enable/disable subagents
Add subagents.enabled flag in config.yaml to control subagent feature:
- When disabled, task/task_status tools are not loaded
- When disabled, system prompt excludes subagent documentation
- Default is enabled for backward compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 20:49:02 +08:00
hetao
85128f5f14 feat: add configuration to enable/disable subagents
Add subagents.enabled flag in config.yaml to control subagent feature:
- When disabled, task/task_status tools are not loaded
- When disabled, system prompt excludes subagent documentation
- Default is enabled for backward compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 20:49:02 +08:00
hetao
cbd2fe66de feat: support sub agent mechanism 2026-02-05 19:59:25 +08:00
hetao
ef379a3100 feat: support sub agent mechanism 2026-02-05 19:59:25 +08:00
Henry Li
c31175defd feat: remove demo 2026-02-05 09:46:05 +08:00
Henry Li
43ebce3b37 feat: remove demo 2026-02-05 09:46:05 +08:00
hetao
0d245d6e31 feat: enhance memory system with tiktoken and improved prompt guidelines
Add accurate token counting using tiktoken library and significantly enhance
memory update prompts with detailed section guidelines, multilingual support,
and improved fact extraction. Update deep-research skill to be more proactive
for research queries.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 20:44:26 +08:00
hetao
db0461142e feat: enhance memory system with tiktoken and improved prompt guidelines
Add accurate token counting using tiktoken library and significantly enhance
memory update prompts with detailed section guidelines, multilingual support,
and improved fact extraction. Update deep-research skill to be more proactive
for research queries.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 20:44:26 +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
LofiSu
2debcf421c 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
LofiSu
644229f968 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
hetao
70a27b49c0 feat: add Apple Container support with comprehensive documentation and dev tools
Add native Apple Container support for better performance on macOS while
maintaining full Docker compatibility. Enhance documentation with memory system
details, development guidelines, and sandbox setup instructions. Improve dev
experience with container image pre-pulling and unified cleanup tools.

Key changes:
- Auto-detect and prefer Apple Container on macOS with Docker fallback
- Add APPLE_CONTAINER.md with complete usage and troubleshooting guide
- Document memory system architecture in CLAUDE.md
- Add make setup-sandbox for pre-pulling container images
- Create cleanup-containers.sh for cross-runtime container cleanup
- Update all related documentation (README, SETUP, config examples)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 20:41:36 +08:00
hetao
5959ef87b8 feat: add Apple Container support with comprehensive documentation and dev tools
Add native Apple Container support for better performance on macOS while
maintaining full Docker compatibility. Enhance documentation with memory system
details, development guidelines, and sandbox setup instructions. Improve dev
experience with container image pre-pulling and unified cleanup tools.

Key changes:
- Auto-detect and prefer Apple Container on macOS with Docker fallback
- Add APPLE_CONTAINER.md with complete usage and troubleshooting guide
- Document memory system architecture in CLAUDE.md
- Add make setup-sandbox for pre-pulling container images
- Create cleanup-containers.sh for cross-runtime container cleanup
- Update all related documentation (README, SETUP, config examples)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 20:41:36 +08:00
hetao
d670cc0ab1 fix: fix frontend rendering issue 2026-02-03 19:38:10 +08:00
hetao
b773bae407 fix: fix frontend rendering issue 2026-02-03 19:38:10 +08:00
ruitanglin
1fac83eafa fix: 修复用户消息中上传文件的右对齐显示
在 UploadedFilesList 组件中添加 justify-end 类,确保上传的文件卡片在用户消息中保持右对齐显示,与消息气泡对齐一致。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-03 19:13:17 +08:00
LofiSu
3b411fe499 fix: 修复用户消息中上传文件的右对齐显示
在 UploadedFilesList 组件中添加 justify-end 类,确保上传的文件卡片在用户消息中保持右对齐显示,与消息气泡对齐一致。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-03 19:13:17 +08:00
Henry Li
94acb15c0c feat: add memory settings page 2026-02-03 18:18:56 +08:00
Henry Li
6b53456b39 feat: add memory settings page 2026-02-03 18:18:56 +08:00
Henry Li
b8c325eb3a chore: add /api/memory 2026-02-03 15:21:15 +08:00
Henry Li
4d650f35f8 chore: add /api/memory 2026-02-03 15:21:15 +08:00
hetaoBackend
9e15e609ec fix: add file mtime-based cache invalidation for memory data
Implement automatic cache invalidation based on file modification time to ensure memory data consistency across Gateway API and agent prompts. The cache now automatically reloads when the memory file is updated externally.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 13:50:01 +08:00
hetaoBackend
2c32e8a461 fix: add file mtime-based cache invalidation for memory data
Implement automatic cache invalidation based on file modification time to ensure memory data consistency across Gateway API and agent prompts. The cache now automatically reloads when the memory file is updated externally.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 13:50:01 +08:00