Merged
Conversation
Removes the warning messages printed on program startup.
The ArgGroup is exclusive by default, i.e. the user can either specify a custom query (`-q`) or use one of the predefined ones, and the CLI library automatically ensures the user did not choose both at the same time.
We are using a recent-enough Java version that supports sealed interfaces. It is easier to `if instanceof`/switch pattern-match on those to ensure type safety.
…/litterbox into llm_suggestion
Attempt to handle different types of LLM tasks for different types of targets See merge request se2/scratch/litterbox/litterbox!717
Not really needed after thinking about it again.
Adds properties to choose the LlmApi and PromptBuilder via system properties. This allows the construction of the analysers without explicitly specifying them. The analysers still provide the option to manually instantiate them with specific LlmApi and PromptBuilder instances. This (a) makes them easier to test, and (b) allows for more flexibility when using LitterBox as a library and using the internal Java API directly.
make llm analysers independent of ScratchLlm See merge request se2/scratch/litterbox/litterbox!720
…issues, included in the output json
Statically setting these options should work for most usecases. However, during testing, we set different values for these properties. Therefore, this breaks when statically loading such values *once* when initialising the class for the first time. Now, we instead load the values every time a new instance of the `JSONReportGenerator` is created. This is okay for normal use performancewise, since when running LitterBox as CLI program, the report generator is only ever instantiated once to write the report.
Todo: revert before merge
Make the system prompt-me-focussed and word it as ‘I am a student that needs help’. Otherwise, we currently sometimes get answers like ‘In your example, the student has used …’, which is not helpful for showing the issue explanation in the Scratch GUI to the student.
We need to keep our special sprite- and script-identifying comments in the ScratchBlocks code unchanged. Otherwise we cannot match the script against existing ones again. At least Gemma 3 occasionally generated new IDs for the scripts and/or added more remarks to the same line.
It would be a nice improvement for programs that contain multiple scripts if updated ones would not be placed at position 0/0 but instead at the position of the script they are replacing. Implementing this would probably be a bit finicky since we have to check where the TopNonDataBlockMetadata resides (either the event, or the first statement of the statement list). The new script might have a different event, so we also need to find the correct location to place the metadata. We cannot directly set attributes, but instead must apply the NodeReplacementVisitor.
b-fein
added a commit
that referenced
this pull request
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation of the LitterBox⁺ extension submitted to the ASE 2025 Tool Demonstration Track.
mvn packageand runjava -jar target/Litterbox.*.jar --help.java -Dlitterbox.llm.OPTION=??? -jar …) to define the LLM API to connect to can be found in https://github.com/se2p/LitterBox/blob/ec150b57c01696f6d7dcd4cc34adcc21cafff370/src/main/resources/scratchllm.properties.