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: Disable adding large-file via @-mention #3523

Merged
merged 4 commits into from Mar 26, 2024
Merged

Conversation

abeatrix
Copy link
Contributor

CLOSE #3522

A new check has been added to the contextItemMentionNodeDisplayText function. If the contextItem is of type 'file' and has the isTooLarge flag set to true, the context item cannot be added as an @-mention token.

In the Item component, a new warning prop has been added to conditionally apply the .disabled class to the option item. This is used to visually indicate that a large file is disabled and cannot be selected from the context list:

image

Test plan

Try to @ a large file
You should not be able to add the file

@abeatrix abeatrix requested review from toolmantim and a team March 22, 2024 20:31
@abeatrix abeatrix mentioned this pull request Mar 22, 2024
2 tasks
Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Great! Just some small changes

@abeatrix abeatrix enabled auto-merge (squash) March 26, 2024 01:17
@abeatrix abeatrix merged commit 6c35e19 into main Mar 26, 2024
19 checks passed
@abeatrix abeatrix deleted the bee/disable-large-at branch March 26, 2024 01:20
@PriNova
Copy link
Contributor

PriNova commented Mar 26, 2024

This is a great addition, but now the user cannot even use line ranges to narrow the context of the 'too large file'.
Will this be considered?

Thank you

@hlhdaiaaii
Copy link

This is a great addition, but now the user cannot even use line ranges to narrow the context of the 'too large file'. Will this be considered?

Thank you

Please consider this. Line ranges is indeed the feature I use the most to manually gather best context to feed to the model.

@abeatrix
Copy link
Contributor Author

abeatrix commented Mar 28, 2024

@PriNova @hlhdaiaaii Thanks for raising that issue with us! I've filed an issue for tracking purpose, and will look into supporting range for large files again! #3589

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.

We should not silently exclude a file that has been explicitly @ mentioned
5 participants