Skip to content
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

Chat: context cell improvements #6115

Merged
merged 9 commits into from
Nov 18, 2024
Merged

Chat: context cell improvements #6115

merged 9 commits into from
Nov 18, 2024

Conversation

beyang
Copy link
Member

@beyang beyang commented Nov 13, 2024

On a context-less chat request, we show a "none fetched" indicator in the ContextCell, along with a "Resend with current repository context" button:
Selection_910

Clicking "Resend with current repository context" causes the repository chip to be added and the request resent:
Selection_911

The "Resend with current repository context" also appears when context is at-mentioned but there is no repo chip:
Selection_912

This PR also removes the "Edit context" button (which previously caused the fetched context items to be moved to the input), because this was broken and not actually fetching context.

Test plan

Test in local dev the scenarios in the screenshots above.

@beyang beyang force-pushed the bl/better-context-cell branch from 2c8d18f to e8aed40 Compare November 13, 2024 22:04
@beyang beyang force-pushed the bl/better-context-cell branch from 83f90c3 to d09e55e Compare November 14, 2024 00:51
@beyang beyang marked this pull request as ready for review November 14, 2024 01:02
@beyang beyang requested review from vovakulikov and thenamankumar and removed request for dominiccooney and abeatrix November 14, 2024 17:35
Copy link
Contributor

@vovakulikov vovakulikov left a comment

Choose a reason for hiding this comment

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

I tested this in Cody Web in Sourcegraph and it works as expected, left one questions about wierd display:none CSS rule

@@ -10,7 +10,8 @@
}

.context-item-edit-button {
display: flex;
/* display: flex; */
display: none;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is wrong; it works because I think the edit button is a Button, and it uses tailwind d-flex class, which overrides display:none here, but just double check what you want to achieve with display none here. Do you want to hide this edit button?

Or it's just a leftover

Copy link
Contributor

Choose a reason for hiding this comment

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

this PR description description says

"This PR also removes the "Edit context" button "

But I still see edit context / edit results button in JSX, should we just remove it completely from rendering rather than just hide it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to add back the "Edit Context" button soon, and this was the quickest way to do it. I'll submit a follow-up PR to either remove it completely or fix the functionality.

Copy link
Member

@thenamankumar thenamankumar left a comment

Choose a reason for hiding this comment

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

The code looks good.

But I think design may want to have a better UX here: cc @taiyab for design review.

@beyang
Copy link
Member Author

beyang commented Nov 18, 2024

@taiyab happy to consider proposals to improve UX, but this is better than what we have in prod today, so I will merge.

@beyang beyang merged commit 17fbb92 into main Nov 18, 2024
19 of 20 checks passed
@beyang beyang deleted the bl/better-context-cell branch November 18, 2024 17:53
@taiyab
Copy link
Contributor

taiyab commented Nov 19, 2024

@thenamankumar @beyang Yea, all good. This is objectively better than existing. We'll bring another iteration to this soon if need be.

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.

4 participants