Skip to content

Fix/duplicate artifacts#180

Closed
leesocrates wants to merge 2 commits intodifferent-ai:devfrom
leesocrates:fix/duplicate-artifacts
Closed

Fix/duplicate artifacts#180
leesocrates wants to merge 2 commits intodifferent-ai:devfrom
leesocrates:fix/duplicate-artifacts

Conversation

@leesocrates
Copy link
Copy Markdown

title: fix: prevent duplicate artifacts in file list

desctiption:

Summary

  • Fixed duplicate file artifacts appearing in the task page chat area
  • Changed deriveArtifacts function to use full file path as unique ID
  • When multiple tool operations reference the same file, it now only appears once in the artifacts list

Changes

  • Modified src/app/utils/index.ts:deriveArtifacts()
  • Changed unique ID generation from tool operation ID to full file path
  • This prevents the same file from being listed multiple times

Root Cause

The previous implementation used artifact-${record.id ?? name} as the unique ID. When multiple tool operations referenced the same file, each
operation had a different record.id, causing the same file to appear multiple times in the artifacts list.

Fix

Now using artifact-${match} (full file path) as the unique ID, ensuring each file path appears only once regardless of how many tool operations
reference it.

Test plan

  • Reviewed code changes
  • Verified deduplication logic works correctly
  • Confirmed no regression in artifact display

Li XiangXiang 李祥祥 and others added 2 commits January 21, 2026 16:41
…ations reference same file

Changed deriveArtifacts to use full file path as unique ID instead of tool operation ID.
This ensures that when multiple tool operations reference the same file, it only appears
once in the artifacts list instead of being duplicated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@leesocrates leesocrates deleted the fix/duplicate-artifacts branch January 22, 2026 03:10
@benjaminshafii benjaminshafii mentioned this pull request Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant