-
Notifications
You must be signed in to change notification settings - Fork 694
fix: Prioritize diff contexts in script mode for ai chat #5888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…AI context badges - Sort context list to show diff contexts first in AvailableContextList.svelte - Replace underscores with spaces in display names for both AvailableContextList.svelte and ContextElementBadge.svelte - Improves UX by making diff context names more readable (e.g., "diff with last saved draft" instead of "diff_with_last_saved_draft") Fixes #5884 Co-authored-by: centdix <[email protected]>
Deploying windmill with
|
Latest commit: |
959e7b7
|
Status: | ✅ Deploy successful! |
Preview URL: | https://548b80d4.windmill.pages.dev |
Branch Preview URL: | https://claude-issue-5884-20250605-2.windmill.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to f973cd0 in 1 minute and 35 seconds. Click for details.
- Reviewed
73
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/AvailableContextList.svelte:11
- Draft comment:
The typePriority mapping assigns 'code' a value of 1 and 'diff' a value of 2, meaning code contexts appear before diff contexts. To prioritize diff contexts as requested, invert these values (e.g., set diff: 1 and code: 2). - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment makes an assumption that diff contexts should be prioritized over code contexts, but there's no evidence in the code or diff to support this assumption. This appears to be a new feature being added to sort contexts, and the chosen priority order (code first, then diff) could be intentional. Without additional context about requirements or design decisions, we can't know if this ordering is incorrect. The sorting order could be important for UX reasons that aren't visible in the code. Maybe there's documentation or requirements somewhere that specify the intended order. Even if there are external requirements, they aren't visible here. We should follow the rule of not keeping speculative comments or asking authors to confirm their intentions. Delete the comment because it makes assumptions about the intended priority order without clear evidence that the current implementation is wrong.
2. frontend/src/lib/components/copilot/chat/ContextManager.svelte.ts:93
- Draft comment:
Diff context titles have been updated to replace underscores with spaces. This meets the readability requirement. Ensure that any future diff-related titles follow the same convention. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative and does not provide a specific suggestion or request for action. It does not align with the rules for good comments, as it does not ask for a specific change or confirmation of intention.
Workflow ID: wflow_cHFmbHWaV9H3lGcn
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
f973cd0
to
959e7b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed 959e7b7 in 1 minute and 35 seconds. Click for details.
- Reviewed
50
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
3
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/AvailableContextList.svelte:18
- Draft comment:
Consider avoiding in-place sorting of the prop array. UsingavailableContext.sort(...)
mutates the input. UseavailableContext.slice().sort(...)
to avoid potential side effects. - Reason this comment was not posted:
Confidence changes required:50%
<= threshold50%
None
2. frontend/src/lib/components/copilot/chat/AvailableContextList.svelte:12
- Draft comment:
The type priority mapping does not match the PR requirement. The PR states diff contexts should appear first, but current priorities assigncode: 1
anddiff: 2
. Consider swapping these (e.g.diff: 1, code: 2
) so diff appears first. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. frontend/src/lib/components/copilot/chat/ContextManager.svelte.ts:96
- Draft comment:
Typo: The word "hightlighting" should be "highlighting" in the comment text. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the comment is technically correct about the typo, it's an extremely minor issue in a code comment that doesn't affect functionality. Comments are for human readability and this typo doesn't significantly impact understanding. The rules state not to make comments that are obvious or unimportant. The typo could theoretically cause confusion for non-native English speakers. Also, maintaining high quality even in comments shows attention to detail. While quality is important, this is too minor to warrant a PR comment. The rules explicitly state not to make obvious or unimportant comments. Delete this comment as it points out an extremely minor typo that doesn't impact code functionality or comment comprehension.
Workflow ID: wflow_dh42a3GvKSYDjABV
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Summary
This PR fixes the AI context badges by implementing the requested improvements:
Changes
diff
context types first.replace(/_/g, ' ')
Examples
Context titles are now displayed as:
diff with last saved draft
instead ofdiff_with_last_saved_draft
diff with last deployed version
instead ofdiff_with_last_deployed_version
Testing
The changes are straightforward UI text formatting improvements that don't affect functionality. Diff contexts will now:
Fixes #5884
Generated with Claude Code
Important
Prioritize
diff
contexts and improve readability by replacing underscores with spaces in context titles inAvailableContextList.svelte
andContextElementBadge.svelte
.diff
contexts inAvailableContextList.svelte
by sorting them first.diff
context titles inAvailableContextList.svelte
andContextElementBadge.svelte
.AvailableContextList.svelte
: Adds sorting logic and text replacement fordiff
context titles.ContextElementBadge.svelte
: Updates badge titles to replace underscores with spaces.ContextManager.svelte.ts
: Maintains underscore indiff
titles for internal logic.This description was created by
for 959e7b7. You can customize this summary. It will automatically update as commits are pushed.