Skip to content

Conversation

sestinj
Copy link
Contributor

@sestinj sestinj commented Jul 3, 2025

itemId isn't necessarily unique, so this was necessary to avoid items being removed. This was causing docs to not work for example (only one result returned)

@sestinj sestinj requested a review from a team as a code owner July 3, 2025 06:12
@sestinj sestinj requested review from Patrick-Erichsen and removed request for a team July 3, 2025 06:12
Copy link

netlify bot commented Jul 3, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 63d5bba
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/68661f678dd4550008b21838

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 3, 2025
@sestinj sestinj requested review from RomneyDa and removed request for Patrick-Erichsen July 3, 2025 06:13
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic reviewed 2 files and found no issues. Review PR in cubic.dev.

@RomneyDa
Copy link
Collaborator

RomneyDa commented Jul 3, 2025

@sestinj note this PR fixes the only two cases where item id is not unique
imo item id should be unique, but don't feel strongly
#6412

</span>
<div
className={`group flex flex-row items-center gap-1.5 pr-1.5 text-xs text-gray-400 ${isUrl ? "hover:underline" : ""}`}
className={`group flex flex-row items-center gap-1.5 truncate pr-1.5 text-xs text-gray-400 ${isUrl ? "hover:underline" : ""}`}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line-clamp-1 preferred if possible

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jul 3, 2025
item.uri &&
i.uri.type === item.uri.type &&
i.uri.value === item.uri.value),
i.id.providerTitle === item.id.providerTitle &&
Copy link
Collaborator

@RomneyDa RomneyDa Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes for this line
It changes deduplication to be for exactly the same context item but breaks it for the original goal which is e.g. openFiles and currentFile adds the same file twice, or @diff is mentioned three times in nested prompts, or @openfiles in a prompt matches a @file mention in the editor, etc.

Copy link
Collaborator

@RomneyDa RomneyDa Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I realized deduplication logic had another flaw which is that you can have multiple context items with the same file URI and different content

Maybe the solution is as simple as

   i.content === item.content

@sestinj
Copy link
Contributor Author

sestinj commented Jul 4, 2025

no longer needed after the changes from jazzcourt

@sestinj sestinj closed this Jul 4, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jul 4, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants