Commit History
-
Fix LLM to run once per button click and match exact code signatures
Mahdi Naser Moghadasi1. LLM Analysis: - Add triggerAnalysis prop to AIAssistantChat to control when analysis runs - Remove auto-analysis on every code change - only trigger on explicit button clicks - Add aiHelperAnalysisTrigger counter to trigger analysis once per Run/Submit click - Prevents multiple LLM calls per single button click 2. Code Signature Matching: - Infer Java parameter types from test case input (exact match) - Infer Java return type from test case expected output (exact match) - Fallback to parameter name inference only if test cases unavailable - Ensures exact signature match: int returns int, int[] returns int[], etc.1e00060 -
Remove remaining JavaScript and C++ references from CodeEditor
Mahdi Naser Moghadasi- Remove javascript and cpp from languageMap - Remove javascript and cpp from getCodeMirrorLanguage switch - Remove javascript and cpp from getLanguageName - Remove javascript and cpp from language selector dropdown - Remove cpp-specific language prop handling - Remove javascript and cpp cases from code-templates - Remove javascript and cpp function name extraction from llmChecker - Fixes build error: 'javascript' does not exist in type 'Record<SupportedLanguage, string>'b890cbb -
Simplify to support only Python and Java languages
Mahdi Naser Moghadasi- Remove JavaScript and C++ from SupportedLanguage type - Remove JavaScript and C++ from CodeEditor language selector - Remove JavaScript and C++ code templates - Remove JavaScript and C++ function name extraction patterns - Remove JavaScript and C++ from execution endpoint routing - Keep only Python and Java support for simplicity9d69b49 -
Fix Java execution: add default return statement and convertToJson helper
Mahdi Naser Moghadasi- Add default return statement based on return type (int[] returns new int[0], int returns 0) - Add convertToJson helper methods to Main class for int[] and int - Improve return type inference to include 'Intersection' and 'Union' functions - Fixes 'missing return statement' and 'cannot find symbol convertToJson' errors1a96512 -
Fix C++ code execution: add proper includes, fix function extraction, and Solution class method calls
Mahdi Naser Moghadasi- Add necessary C++ headers (vector, iostream, unordered_map) to template - Fix function name extraction for C++ class methods - Update test code generation to create Solution instance and call method - Fix JSON conversion helpers for C++ vectors and ints - Use 'using namespace std' for cleaner code2f7e139 -
Fix code template generation and return type inference
Mahdi Naser Moghadasi- Improve return type inference for Java and C++ based on function name - Fix maxProfit and similar functions to return int instead of int[] - Ensure code updates properly when language changesea151a1 -
Add language-specific code templates and auto-update on language change
Mahdi Naser Moghadasi- Create code-templates.ts utility to generate starter code for all languages - Parse Python starter code to extract function name and parameters - Generate equivalent JavaScript, Java, and C++ code templates - Update code automatically when language changes - Update code when question is selected using current language - Default language is Pythonbb11aeb