Skip to content

Commit a01e2c6

Browse files
Eistee82claudeGermanBluefox
authored
feat: enhanced AI code generator with multi-provider support and optimized prompts (#2146)
Multi-provider API support: - Per-provider test buttons in config (OpenAI, Anthropic, Gemini, DeepSeek, Custom) - Optional API key for custom base URL (Ollama, LM Studio) - Provider icons in config and code generator - Human-readable HTTP error messages with API response details - Disable reasoning/thinking for local models (reasoning_effort: none) Two-step plan-then-code generation: - Step 1: Model analyzes task and creates implementation plan with device IDs - Step 2: Model generates code based on plan + API examples - Collapsible plan view in UI for debugging - Status display ("Planning..." / "Generating code...") - 600s timeout for local models Optimized prompts for small local models (tested with qwen2.5-coder:14b): - Concrete code examples showing correct on(), setState(), getState() syntax - WRONG/CORRECT pairs for common mistakes (adapter.set, console.log, etc.) - Compact function signature list covering all 80+ API functions - FORBIDDEN list preventing wrong patterns - Task placed after device list (recency bias) - TODO_DEVICE_ID placeholder for missing devices Build fixes: - Node 25 compatibility: rmSync instead of rmdirSync({recursive:true}) - admin/img/ preserved during clean builds - Flexible result area height (flex:1 instead of fixed calc) New documentation files: - docs-compact.md: full API in 12.5KB (used for code generation) - docs-essential.md: core functions with examples in 2.6KB - Original docs.md preserved for reference Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Bluefox <dogafox@gmail.com>
1 parent 4c80892 commit a01e2c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2560
-4375
lines changed

CLAUDE.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,21 @@ Executes Javascript, Typescript Scripts.
2626
<!--
2727
### **WORK IN PROGRESS**
2828
-->
29-
### **WORK IN PROGRESS**
29+
### WORK IN PROGRESS
30+
* Per-provider test buttons in adapter config (OpenAI, Anthropic, Gemini, DeepSeek, Custom API)
31+
* Optional API key field for custom base URL providers (e.g. Ollama without auth)
32+
* Provider icons on test buttons and in model dropdown
33+
* Human-readable HTTP error messages with API response details
34+
* Two-step AI code generation: plan first, then generate code
35+
* Collapsible plan view in AI code generator UI
36+
* Status display during generation ("Planning..." / "Generating code...")
37+
* Optimized prompts with code examples for better results with small local models
38+
* Compact API reference (docs-compact.md) for reduced context usage
39+
* Disable reasoning/thinking for local models (reasoning_effort: none)
40+
* TODO_DEVICE_ID placeholder when a required device is not in the device list
41+
* Node 25 compatibility: replaced deprecated rmdirSync with rmSync in build tasks
42+
* Flexible result area height in AI code generator (no extra scrollbar)
43+
* Added translations for all 11 languages
3044
* (@GermanBluefox) Added support for plain import/export
3145
* (@GermanBluefox) Correcting error in configuration
3246
* (@GermanBluefox) disallow writing into node_modules folder by scripts

0 commit comments

Comments
 (0)