Implement LLM-based coding task generation with complete function templates integrated with quiz workflow#20
Conversation
Co-authored-by: Anton15K <54205422+Anton15K@users.noreply.github.com>
Co-authored-by: Anton15K <54205422+Anton15K@users.noreply.github.com>
|
@copilot well done! Although, I want to make some change. I want the tasks to be created when user clicks on testmyKnowledge Button, as it was done for the quiz. You might also put this process (both quiz and taks generation) to a sepparate thread so that UI is not blocked |
…nd background threading Co-authored-by: Anton15K <54205422+Anton15K@users.noreply.github.com>
I've implemented your requested changes! The coding tasks are now generated when the user clicks the "Check Your Knowledge" button, alongside the quiz generation. Both quiz and coding task generation now run in a background thread to prevent UI blocking. Key changes made in commit d0c3a5c:
The workflow is now:
The UI remains responsive during generation, and users get both quiz questions and practical coding exercises from a single action. |
|
@copilot Perfect, it generates the tests. But, the problem is, that in the window the code space is empty. We need some function to be there, that we understand what is input and output should be for the test case. Maybe you should add to prompt that it need to generate this template function, so it can be filled by the user in that window. Also make sure you use DARK THEME so that your IDE looks good. |
… with clear input/output Co-authored-by: Anton15K <54205422+Anton15K@users.noreply.github.com>
Fixed the empty code space issue! The problem was that the LLM prompt wasn't specific enough about generating complete function templates. I've enhanced the prompt and parsing to ensure coding tasks always have meaningful code with clear input/output specifications. Changes made in commit a84fbf6:
The generated tasks now include:
Here's how the improved coding tasks look in dark theme: Each task now provides a complete function template that clearly shows what inputs are expected and what output should be returned, making it much easier for users to understand what they need to implement. |
…loadCodingTasks` and `refreshQuizContent`. Update default model configuration in `GlobalConfig`. Fix `setCancelButtonText` value in `CodingTaskAction`.

This PR implements a comprehensive LLM-based coding task generation system that replaces the static placeholder tasks in
QuizBank.codingTaskswith dynamically generated practical programming exercises based on semantic hunks and guide content. The implementation integrates seamlessly with the existing quiz generation workflow through the "Check Your Knowledge" button and ensures generated tasks always include complete, compilable function templates.Problem
The existing system used hardcoded TODO placeholders for coding tasks:
These static tasks were disconnected from the actual codebase changes and didn't provide relevant, context-aware programming exercises.
Solution
Following the same architectural patterns as the existing
QuizGeneratorandQuizService, this implementation creates:Core Components
CodingTaskGenerator (
llm_pipeline/CodingTaskGenerator.kt)CodingTaskService (
com/gitdiff/CodingTaskService.kt)GuideServicefor persistence (single source of truth)Enhanced Data Models (
com/gitdiff/Models.kt)CodingTaskandCodingTaskListdata structurescodingTasksfield into existingGuideobjectIntegrated Workflow
The coding task generation is now fully integrated with the existing quiz workflow:
UI Integration
CodingTasktype from gitdiff packageKey Features
Enhanced Template Generation
The system now generates complete function templates that include:
Example Generated Task
Instead of generic TODOs, the system now generates context-specific exercises with complete templates:
The generated tasks directly relate to the code changes analyzed in the semantic hunks, making them relevant and educational for understanding the actual codebase evolution. The enhanced prompt engineering ensures users always see meaningful, compilable function templates with clear specifications.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.