Commit Graph
22 Commits
Author SHA1 Message Date
Matt GodboltandClaude c29ad46f3a [Not Live; disabled by default] Add Claude Explain feature for AI-powered assembly explanations (#7749)
Add Claude Explain feature for AI-powered code explanations

This PR introduces Claude Explain, a new feature that provides AI-powered explanations of compiler output directly within Compiler Explorer.

Key features:

Claude Explain functionality:
  - New explain view pane
  - Explains compiler output with full context of source code and compilation output
  - Configurable audience level and explanation type
  - Response caching to improve performance and reduce API calls
  - Usage statistics display showing requests used and token counts

User experience:
  - Consent flow on first use explaining data handling and privacy
  - AI disclaimer banner warning about potential LLM inaccuracies
  - Respects "no-ai" directive in source code for users who don't want AI processing

Privacy and security:
  - Data sent to Anthropic's Claude API as documented in privacy policy
  - No data used for model training
  - Clear consent required before first use
  - Support for opting out via "no-ai" directive

The feature is marked as beta and can be enabled via configuration.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-05 09:31:48 -05:00
Mats Jun Larsen 5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Ofek c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Ofek 2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Patrick Quist 3a278ad3b3 Add library lookupname to support binary builds for boost (#6814) 2024-09-04 19:18:37 +02:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin 33167a3024 Tsify main (#4520) 2023-01-13 19:52:00 -05:00
Jeremy Rifkin 07f37abe76 The War of The Types (#4490) 2023-01-13 19:22:25 -05:00
Matt Godbolt 4ec6a41d27 Give tools in the CE options a type (#4471)
* Fix type of tool id

Observed through the debugger it seems the tool id is a `string`, which leads to all sorts of downstream complaints comparing strings to ints when converting tools.js to ts (see #4166)

* Add tools to CE Options

* Fixings
2022-12-19 22:55:44 -06:00
Patrick Quist 0212779a74 CC65 Binary + NES support (#4139) 2022-10-29 17:01:44 +02:00
Rubén Rincón Blanco 3ba7c679f2 Fixes compiler init order by using initializeStateDependentProperties (#4210)
The options were being properly passed in the state,
but the UI was being initialized before the value was set to the member,
causing it not to be displayed.

Closes #4207
2022-10-29 16:29:35 +02:00
Patrick QuistandRubén Rincón Blanco 8205573365 add compilationinfo and related types (#4051)
* add compilationinfo and related types

* fix mtime type

* Add rest of compiler keys

* Make it compile

* Rename Compiler type to CompilerInfo as per Partouf's suggestion

* Get ready for #4077

* Linter fixes

Co-authored-by: Rubén Rincón Blanco <ruben@rinconblanco.es>
2022-09-20 08:00:24 -05:00
c315d6a719 Move compiler-service.js to TS (#3672)
Co-authored-by: Mats Larsen <me@supergrecko.com>
Co-authored-by: partouf <partouf@gmail.com>
2022-06-21 23:31:18 +02:00
Jeremy Rifkin bef00d4cc0 Correction to #3525 (#3542) 2022-04-23 04:06:15 +02:00
Mats Larsen c199b54440 Enable Prettier for TypeScript frontend (#3524) 2022-04-20 22:39:10 +02:00
Patrick Quist 17c01cf349 Fix for msvc library issue (#3501)
* fetch remote libraries on startup and put into client-options
* support remote libs in executor and conformanceview
2022-04-09 17:09:13 -05:00
Rubén Rincón Blanco 7031a6ef7a Move static/load-save.js to TypeScript (#3345) 2022-02-11 16:09:33 +01:00
Rubén Rincón Blanco 8a7534fcb6 Fix libs widget selection properly updating (#3313)
The .used flag was not being cleared on version change for the other
versions of the same library
2022-02-02 03:34:17 +01:00
Rubén Rincón BlancoandMats Larsen f4315c561b Move static/settings.js to TypeScript (#3297)
* Rename settings.js to ts

* Move Settings to TS

* Remove underscore from settings

* Update static/settings.ts

Co-authored-by: Mats Larsen <me@supergrecko.com>

* Update static/settings.ts

Co-authored-by: Mats Larsen <me@supergrecko.com>

* Improve Settings implementation

* Move Settings interfaces to same file

* Update static/settings.ts

Co-authored-by: Mats Larsen <me@supergrecko.com>

Co-authored-by: Mats Larsen <me@supergrecko.com>
2022-01-29 02:00:10 +01:00
Rubén Rincón Blanco 44ea462509 Move GA to ts (#3220)
* Move GA to ts

* Hopefuly fix sentry init error
2021-12-31 13:54:19 +01:00
RabsRincon 9c2528000e Move fontscale to typescript 2021-12-31 11:08:21 +01:00
Rubén Rincón Blanco fc19400855 Move static/libs-widget-ext.js to TypeScript (#3077)
* Rename static/libs-widget-ext.js to static/libs-widget-ext.ts

* Initial Typescript copy&paste

* File now compiles its TS

* First TSfy pass

Types need to still be sorted out, but this now compiles and works
:)

* Further work towards porting libs widget to TS

* Expand the scope of the PR and fix some TS issues elsewhere

Still releated to libs though

* Renames

* Address PR review

* Fixes some minor errors and finishes the tests

* Remove unused interface properties
As suggested by partouf in the PR

* Remove unused this
Noticed by Partouf in the PR review

* Remove more unused options interface properties

* Fixes last issues with the ts libs widget

* Remove console.log
2021-12-12 17:42:44 +01:00