Draft
Conversation
Add support for using Claude Agent SDK as a local AI provider for GDevelop's AI generation features. This allows users with Claude Pro/Max subscriptions to use Claude directly instead of GDevelop's cloud AI. New files: - localAIServer/: Express server wrapping Claude Agent SDK - GDevelop-compatible tool definitions - API endpoints matching GDevelop Generation API - AiGenerationRouter.js: Routes requests to local or cloud based on preset - LocalGeneration.js: API client for local AI server - LocalAiToggle.js: Preferences UI for enabling local AI Modified files: - AiConfiguration.js: Added local Claude presets and isLocalAiPreset helper - ApiConfigs.js: Added LocalAiApi configuration - PreferencesDialog.js: Added local AI toggle UI Usage: 1. Run: cd localAIServer && npm install && npm start 2. Enable in GDevelop: Preferences > Advanced > Other > "Use local Claude AI" 3. Select "Claude Agent (Local)" preset when using AI features
Updated AskAiEditorContainer.js and AskAiStandAloneForm.js to import createAiRequest and addMessageToAiRequest from AiGenerationRouter instead of directly from Generation.js. This ensures requests are properly routed to local AI server when local preset is selected.
The Utils.js watcher was still calling getPartialAiRequest from Generation.js, causing 404 errors when polling for local request status. Now uses routed versions for all AI request operations.
Claude outputs function calls in markdown code blocks (```json ... ```) which the previous regex couldn't parse. Updated extraction to: 1. First try extracting JSON from code blocks 2. Fall back to inline JSON matching 3. Handle nested objects in args properly
Claude was asking for clarification instead of creating games directly. Updated prompt to: - Tell Claude to NOT ask for clarification - Tell Claude to NOT explain, just output function calls - Be explicit about creating complete playable games
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.
No description provided.