-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: Integrate SCANOSS #14628
feat: Integrate SCANOSS #14628
Conversation
7eea4c8
to
29046bd
Compare
Adds SCANOSS integration in Theia, supporting AI-driven code snippet scanning for open-source and security compliance. Adds new @theia/scanoss and @theia/ai-scanoss packages to support SCANOSS integration. - Provides SCANOSS service for content scanning. - Introduces preferences for API key configuration and automatic scanning options. - Integrates SCANOSS action into AI Chat UI as part of the code response renderer - Displays detailed match results with links and additional information. Also: - Adds a pluggable CodePartRendererAction interface for contributing actions to code parts in AI responses. - Adapts code base for updated dependencies where required.
29046bd
to
d8c2c83
Compare
Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
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.
this works very nicely and is a very valuable addition. I tested it for quite a while and did not find any problem.
I want to suggest one minor addition:
Instead of making only the automatic scan configurable, I would add manual, automatic, and off.
This way, users that do not want to ever use the feature will not see the buttons at all. Also we can make sure that users see the information that has codes are sent to the transparency foundation (in the settings).
To enable this, i have added "canrender" to code reponse actions. I am pretty sure, we will need this for other actions in the future, e.g. an action to "create a file" that only is available if the path is know.
If have set the feature to "off" by default, we might decide in future releaes to turn this to "manual".
I have added this suggestions in a seperate commit, feel free to reject it.
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.
Looks good to me. I would split the pr in 2 commits that are separately merged though.
packages/ai-scanoss/src/browser/ai-scanoss-code-scan-action.tsx
Outdated
Show resolved
Hide resolved
packages/memory-inspector/src/browser/diff-widget/memory-diff-table-widget.tsx
Show resolved
Hide resolved
- memoize SCANOSS scan button - make sure snippets are not checked after the fact in case they were created while scanOSS was turned off
@eneufeld I added the memo as requested |
What it does
Adds SCANOSS integration in Theia, supporting AI-driven code snippet scanning for open-source and security compliance.
Adds new
@theia/scanoss
and@theia/ai-scanoss
packages to support SCANOSS integration.Also:
I did the split between
scanoss
andai-scanoss
as there are also use cases for SCANOSS outside of AI snippet matching. For example in a future follow up we can implement a full workspace scan with a report just within thescanoss
package, unrelated to the Theia AI integration.Manual scanning
Automatic scanning
Rate limit
Note that it's very hard to hit the rate limit. I had to programmatically trigger thousands of request within an hour to manage to do it.
How to test
Ask for code listings in the Chat view, e.g.
How to generate the Fibonacci Sequence
Tips:
scanoss
(not AI) preferencesBreaking changes
Attribution
Review checklist
Reminder for reviewers