此專案所有重要更新都會記錄在此文件中。 All notable changes to this project will be documented in this file.
此格式基於 Keep a Changelog, 並且本專案遵循 語意化版本。 Format based on Keep a Changelog, and this project adheres to Semantic Versioning.
- 修復 flatted 無限遞迴 DoS 漏洞 (CVE-2026-32141) (Fix flatted unbounded recursion DoS in parse())
- 透過 npm overrides 將
flatted從 3.3.3 升級至 >=3.4.0(間接依賴 viaeslint→file-entry-cache→flat-cache→flatted) Upgradedflattedfrom 3.3.3 to >=3.4.0 via npm overrides (transitive dependency viaeslint→file-entry-cache→flat-cache→flatted) - 嚴重程度 Severity: High (CVSS: 7.5)
- GHSA-25h7-pfq9-p65f — Unbounded recursion in
flatted.parse()revive phase - 關閉 Dependabot Alert #46 Closes Dependabot Alert #46
- 透過 npm overrides 將
-
修復 hono 請求走私漏洞(Dependabot Alert) (Fix hono request smuggling vulnerability)
- 透過 npm overrides 將
hono從^4.12.4升級至^4.12.7(間接依賴 via@modelcontextprotocol/sdk) Upgradedhonofrom^4.12.4to^4.12.7via npm overrides (transitive dependency via@modelcontextprotocol/sdk) - 嚴重程度 Severity: Moderate
- GHSA-v8w9-8mx6-g223 — Request smuggling via crafted
Transfer-Encodingheader in hono - 關閉相關 Dependabot Alert Closes related Dependabot Alert
- 透過 npm overrides 將
-
修復 diff ReDoS 漏洞 (Fix diff Regular Expression Denial of Service vulnerability)
- 透過 npm overrides 將
diff鎖定至>=8.0.3(間接依賴 via@vscode/test-cli→mocha→diff) Pinneddiffto>=8.0.3via npm overrides (transitive dependency via@vscode/test-cli→mocha→diff) - 嚴重程度 Severity: Low
- GHSA-73rr-hh4g-fpgx — Regular Expression Denial of Service in
diffpackage - 此項原列為已知暫緩修復,現已透過 override 方式解決 Previously listed as known deferred fix, now resolved via npm override
- 透過 npm overrides 將
- 修復 express-rate-limit IPv4-mapped IPv6 速率限制繞過漏洞(Dependabot Alert #44) (Fix express-rate-limit IPv4-mapped IPv6 rate-limit bypass)
- 透過 npm overrides 將
express-rate-limit從8.2.1升級至8.3.0(間接依賴 via@modelcontextprotocol/sdk) Upgradedexpress-rate-limitfrom8.2.1to8.3.0via npm overrides (transitive dependency via@modelcontextprotocol/sdk) - 嚴重程度 Severity: High (CVSS 7.5)
- CVE-2026-30827 / GHSA-46wh-pxpv-q5gq — IPv4-mapped IPv6 addresses bypass per-client rate limiting on servers with dual-stack network
- 關閉 Dependabot Alert #44 Closes Dependabot Alert #44
- 透過 npm overrides 將
→ 已於 0.67.4 透過 npm override 修復diff(GHSA-73rr-hh4g-fpgx, low) via@vscode/test-cli→mocha→diff:修復需降級@vscode/test-cli至0.0.11,為破壞性變更,暫不處理→ Fixed in 0.67.4 via npm overridediff(GHSA-73rr-hh4g-fpgx, low) via@vscode/test-cli→mocha→diff: fix requires downgrading@vscode/test-clito0.0.11(breaking change), deferred
- 修復 serialize-javascript RCE 漏洞(Dependabot Alert #39) (Fix serialize-javascript RCE vulnerability)
- 透過 npm overrides 將
serialize-javascript從6.0.2升級至^7.0.4(間接依賴 via@vscode/test-cli→mocha) Upgradedserialize-javascriptfrom6.0.2to^7.0.4via npm overrides (transitive dependency via@vscode/test-cli→mocha) - 嚴重程度 Severity: High (RCE via
RegExp.flagsandDate.prototype.toISOString) - GHSA-3wgr-x9jc-gx36 — Arbitrary Code Execution in serialize-javascript
- 關閉 Dependabot Alert #39 Closes Dependabot Alert #39
- 透過 npm overrides 將
-
修復 hono Cookie/SSE 注入與路徑遍歷漏洞 (Fix hono cookie injection, SSE injection & path traversal vulnerabilities)
- 透過 npm overrides 升級
hono從^4.12.2至^4.12.4(間接依賴 via@modelcontextprotocol/sdk) Upgradedhonofrom^4.12.2to^4.12.4via npm overrides (transitive dependency via@modelcontextprotocol/sdk) - 嚴重程度 Severity: High
- GHSA-5pq2-9x2x-5p6w — Cookie Attribute Injection via unsanitized domain/path in
setCookie() - GHSA-p6xx-57qc-3wxr — SSE Control Field Injection via CR/LF in
writeSSE() - GHSA-q5qw-h33p-qvwr — Arbitrary file access via
serveStaticvulnerability
- 透過 npm overrides 升級
-
修復 @hono/node-server 靜態路徑授權繞過漏洞 (Fix @hono/node-server static path authorization bypass)
- 透過 npm overrides 升級
@hono/node-server至^1.19.10(間接依賴 via@modelcontextprotocol/sdk) Upgraded@hono/node-serverto^1.19.10via npm overrides (transitive dependency via@modelcontextprotocol/sdk) - 嚴重程度 Severity: High
- GHSA-wc8c-qw6v-h7f6 — Authorization bypass for protected static paths via encoded slashes in Serve Static Middleware
- 透過 npm overrides 升級
diff(低風險 Low):影響@vscode/test-cli→mocha測試工具鏈,屬開發依賴,不影響終端使用者。diff(Low): affects@vscode/test-cli→mochatest toolchain only. Dev-only dependency; no end-user impact.
- 非 Blockly 專案安全防護訊息 i18n 與孩子友善文案 (Safety Guard i18n & kid-friendly messages)
- 新增
getLocalizedMessage()API,支援佔位符替換{0},{1}AddedgetLocalizedMessage()API with placeholder substitution{0},{1} - 所有 15 個語系的安全防護對話框文案重寫為孩子友善、正向引導語氣 Rewrote Safety Guard dialog messages in all 15 locales with kid-friendly, positive guidance tone
workspaceValidator.ts硬編碼英文訊息改為透過localeService取得 i18n 文案 Replaced hardcoded English messages inworkspaceValidator.tswith i18n vialocaleService- 新增
safetyGuardI18n.test.ts(322 行) 覆蓋所有語系與佔位符邏輯 AddedsafetyGuardI18n.test.ts(322 lines) covering all locales and placeholder logic - 關聯 PR #63 Related PR #63
- 新增
-
修復 serialize-javascript RCE 漏洞(Dependabot Alert #39) (Fix serialize-javascript RCE vulnerability)
- 升級
copy-webpack-plugin從^13.0.1至^14.0.0(解決間接依賴serialize-javascript≤ 7.0.2 的 RCE 問題) Upgradedcopy-webpack-pluginfrom^13.0.1to^14.0.0(resolves transitiveserialize-javascript≤ 7.0.2 RCE) - 嚴重程度 Severity: High (RCE via RegExp.flags and Date.prototype.toISOString)
- 關閉 Dependabot Alert #39 Closes Dependabot Alert #39
- 升級
-
修復 minimatch ReDoS 漏洞(Dependabot Alerts #31, #35, #37, #38) (Fix minimatch ReDoS vulnerabilities)
- 透過
npm audit fix升級 eslint 間接依賴minimatch至已修補版本 Upgraded transitiveminimatchvia eslint dependency tree to patched versions vianpm audit fix - 嚴重程度 Severity: High (ReDoS via combinatorial backtracking)
- 關閉 Dependabot Alerts #31, #35, #37, #38 Closes Dependabot Alerts #31, #35, #37, #38
- 透過
-
修復 @isaacs/brace-expansion 資源消耗漏洞(Dependabot Alert #20) (Fix @isaacs/brace-expansion uncontrolled resource consumption)
- 透過
npm audit fix升級@isaacs/brace-expansion從5.0.0至5.0.1Upgraded@isaacs/brace-expansionfrom5.0.0to5.0.1vianpm audit fix - 嚴重程度 Severity: High (Uncontrolled Resource Consumption)
- 關閉 Dependabot Alert #20 Closes Dependabot Alert #20
- 透過
-
修復 ajv ReDoS 漏洞(Dependabot Alert #29) (Fix ajv ReDoS vulnerability in eslint transitive)
- 透過
npm audit fix升級 eslint 間接依賴ajv至已修補版本 Upgraded transitiveajvin eslint dependency tree vianpm audit fix - 嚴重程度 Severity: Moderate (ReDoS with
$dataoption) - 關閉 Dependabot Alert #29 Closes Dependabot Alert #29
- 透過
diff(低風險 Low) 與serialize-javascript(高風險 High,僅存於 mocha 間接依賴): 影響@vscode/test-cli→mocha測試工具鏈,修復需降級@vscode/test-cli至0.0.11(破壞性變更), 屬開發依賴,不影響終端使用者。待上游釋出相容修補後再行升級。diff(Low) andserialize-javascript(High, only in mocha transitive): affects@vscode/test-cli→mochatest toolchain only. Fix requires downgrading@vscode/test-clito0.0.11(breaking change). Dev-only dependency; no end-user impact. Will upgrade when upstream releases a compatible fix.
-
修復 ajv ReDoS 漏洞(Dependabot Alert #28) (Fix ajv ReDoS vulnerability)
- 升級
ajv從8.17.1至8.18.0Upgradedajvfrom8.17.1to8.18.0 - 嚴重程度 Severity: Medium (ReDoS with
$dataoption) - 關閉 Dependabot Alert #28 Closes Dependabot Alert #28
- 升級
-
修復 hono 計時比較漏洞(Dependabot Alert #26) (Fix hono timing comparison hardening)
- 透過 npm overrides 強制
hono升級至4.12.2(間接依賴 via@modelcontextprotocol/sdk) Forcedhonoto4.12.2via npm overrides (transitive dependency via@modelcontextprotocol/sdk) - 嚴重程度 Severity: Low (timing comparison in basicAuth/bearerAuth)
- 關閉 Dependabot Alert #26 Closes Dependabot Alert #26
- 透過 npm overrides 強制
-
修復 qs DoS 漏洞(Dependabot Alert #24) (Fix qs denial of service vulnerability)
- 透過 npm overrides 強制
qs升級至6.14.2(間接依賴 via@modelcontextprotocol/sdk → express) Forcedqsto6.14.2via npm overrides (transitive dependency via@modelcontextprotocol/sdk → express) - 嚴重程度 Severity: Low (arrayLimit bypass in comma parsing)
- 關閉 Dependabot Alert #24 Closes Dependabot Alert #24
- 透過 npm overrides 強制
-
升級
@modelcontextprotocol/sdk至1.27.0- 從
1.26.0升級至1.27.0Upgraded from1.26.0to1.27.0
- 從
- AI 影子積木建議(Copilot LM API) (AI Shadow Block Suggestions powered by Copilot LM API)
- 使用者編輯積木時,系統自動分析工作區脈絡,透過 Copilot LM API(GPT-4o / o4-mini)建議下一個邏輯積木 When editing blocks, the system analyzes workspace context via Copilot LM API and suggests the next logical block as a semi-transparent shadow block
- 以半透明「影子積木」方式呈現建議;Tab 鍵接受、Esc 鍵取消、方向鍵切換備選 Suggestions appear as semi-transparent shadow blocks; Tab to accept, Esc to dismiss, arrow keys to cycle alternatives
- 新增
AIModelManager:管理 Copilot 模型等級(GPT-4o/o4-mini/降級模式),含配額追蹤與自動重試 NewAIModelManagerhandles Copilot model tiers (GPT-4o / o4-mini / degraded mode) with quota tracking and auto-retry - 新增
AIStatusBar:狀態列顯示目前 AI 模型層級、使用量與啟用狀態 NewAIStatusBarshows current AI model tier, usage, and activation status in the status bar - 新增
ShadowSuggestionService:協調 AI 請求、快取建議、管理節流與取消 NewShadowSuggestionServiceorchestrates AI requests, caches suggestions, and manages throttling and cancellation - 新增 WebView 模組(contextExtractor.js、shadowBlockManager.js、shadowKeyboardHandler.js) New WebView modules for context extraction, shadow block rendering, and keyboard handling
- 擴充
block-dictionary.json至 159 個積木定義(含輸入、欄位、描述) Extendedblock-dictionary.jsonto 159 block definitions with inputs, fields, and descriptions - 新增 5 個 AI 相關指令:觸發建議、接受/拒絕、手動觸發、設定開關 5 new AI commands: trigger, accept/reject, manual trigger, settings toggle
- 全 15 語言 i18n 支援(8 個 AI 金鑰) Full 15-language i18n support (8 AI keys per locale)
- 關閉 PR #62 Closes PR #62
- 移除 RC 積木選單中多餘的 rc_get_button 積木 (Remove redundant rc_get_button from RC toolbox)
- CyberBrick RC 積木選單與 X12 保持一致,只顯示帶 "?" 的
rc_is_button_pressed積木 Align RC toolbox with X12 by only showingrc_is_button_pressedblock - 保留 block 定義與 generator 以維持向後相容 Block definition and generator preserved for backward compatibility
- 關閉 PR #61 Closes PR #61
- CyberBrick RC 積木選單與 X12 保持一致,只顯示帶 "?" 的
- 翻譯 Arduino 錯誤訊息至日文、韓文、德文、西班牙文 (Translate Arduino error messages to Japanese, Korean, German, Spanish)
- 為 Arduino 編譯/上傳錯誤訊息新增多語系翻譯 Added multilingual translations for Arduino compile/upload error messages
- 涵蓋語言:日文 (ja)、韓文 (ko)、德文 (de)、西班牙文 (es) Languages covered: Japanese (ja), Korean (ko), German (de), Spanish (es)
- 關閉 Issues #57, #59 — PR #60 Closes Issues #57, #59 — PR #60
-
修復 webpack buildHttp SSRF 漏洞 (CVE-2025-68458) (Fix webpack buildHttp SSRF vulnerability)
- 升級
webpack從 5.102.1 至 5.105.1 Upgradedwebpackfrom 5.102.1 to 5.105.1 - allowedUris 允許清單可透過 URL userinfo (@) 繞過,導致建置時期 SSRF 行為 allowedUris allow-list bypass via URL userinfo (@) leading to build-time SSRF behavior
- 嚴重程度:Low (CVSS 4.0: 3.7) Severity: Low (CVSS 4.0: 3.7)
- 關閉 Dependabot Alert #23 Closes Dependabot Alert #23
- 升級
-
修復 webpack buildHttp HTTP 重定向繞過漏洞 (CVE-2025-68157) (Fix webpack buildHttp HTTP redirect bypass vulnerability)
- 升級
webpack從 5.102.1 至 5.105.1 Upgradedwebpackfrom 5.102.1 to 5.105.1 - HttpUriPlugin allowedUris 可透過 HTTP 重定向繞過,導致 SSRF 與快取持久化 HttpUriPlugin allowedUris bypass via HTTP redirects leading to SSRF and cache persistence
- 嚴重程度:Low (CVSS 4.0: 3.7) Severity: Low (CVSS 4.0: 3.7)
- 關閉 Dependabot Alert #22 Closes Dependabot Alert #22
- 升級
- 防止孤立積木產生無效程式碼 (Prevent orphan blocks from generating invalid code)
- 三層防護機制:workspaceToCode 過濾器跳過未連接積木、forBlock 守衛阻止孤立積木生成程式碼、onchange 視覺警告提示使用者 Three-layer protection: workspaceToCode filter skips unconnected blocks, forBlock guard prevents orphan block code generation, onchange visual warning alerts users
- Arduino 與 MicroPython 生成器各自提供在地化警告訊息,支援全部 15 種語言 Generator-specific i18n warnings for Arduino and MicroPython, supporting all 15 locales
- 492 個測試全數通過 492 tests passing
- Arduino 上傳錯誤分類與明確提示 (Arduino upload error classification with clear messages)
- 上傳失敗時根據 PlatformIO stderr 自動分類錯誤原因:未偵測到硬體、連接埠佔用、裝置斷線、連線逾時、連線失敗 Upload failures are automatically classified from PlatformIO stderr: no device detected, port busy, device disconnected, upload timeout, connection failed
- 即使沒有連接開發板,仍會先執行編譯以確認程式碼語法是否正確 Even without a connected board, compilation runs first to verify code syntax
- 錯誤訊息支援全部 15 種語言本地化,並附帶截斷後的技術細節(≤200字元) Error messages support all 15 languages with truncated technical details (≤200 chars)
- 技術細節與耗時資訊合併為單一括號格式,避免雙括號問題 Technical details and elapsed time merged into single parenthesized format
- 修復打包後 MCP Server 無法啟動的問題 (Fix MCP Server failing to start in packaged extension)
- 移除 webpack externals 中的
@modelcontextprotocol/sdk和zod聲明,改為完整打包進dist/mcp-server.js,解決安裝後因node_modules被排除而找不到模組的問題 Removed MCP SDK and zod from webpack externals, bundling them intodist/mcp-server.jsto fixCannot find moduleerror whennode_modulesis excluded by.vscodeignore - 以自訂
TsJsResolverPlugin取代全域extensionAlias,僅對相對路徑的.jsimport 嘗試.ts解析,避免與 SDK exports map 衝突 Replaced globalextensionAliaswith customTsJsResolverPluginthat only resolves.js→.tsfor relative path imports, preventing conflicts with SDK exports map - Production build 體積 786 KB(tree-shaking 有效),
.vsix體積增幅僅 14.5% Production build size 786 KB (tree-shaking effective),.vsixsize increase only 14.5%
- 移除 webpack externals 中的
- 修復舊版工作區載入時 servo_move 角度值遺失 (Fix servo_move angle value lost when loading old workspaces)
- 新增
migrateWorkspaceState()遷移函數,在 Blockly 反序列化前將舊格式fields.ANGLE(FieldNumber)自動轉換為新格式inputs.ANGLE(ValueInput + shadow block) AddedmigrateWorkspaceState()migration function to convert oldfields.ANGLE(FieldNumber) to newinputs.ANGLE(ValueInput + shadow block) before Blockly deserialization - 覆蓋所有 3 個工作區載入路徑(初始化、FileWatcher、語言切換) Applied to all 3 workspace load paths (init, fileWatcher, language switch)
- 新增
- 伺服馬達角度積木支援動態輸入 (Servo motor angle block now accepts dynamic input)
- 將
servo_move積木的角度從固定數字欄位(FieldNumber)改為值輸入插槽(ValueInput),支援插入變數積木、迴圈變數、數學運算等動態值 Changedservo_moveblock's angle from fixed FieldNumber to ValueInput, supporting variable blocks, loop counters, and math expressions - Arduino 生成器使用
constrain(angle, 0, 180)保護,防止動態值超出伺服馬達安全範圍 Arduino generator usesconstrain(angle, 0, 180)protection to prevent dynamic values from exceeding servo safe range - 工具箱加入 shadow block(預設值 90),從工具箱拖出時自帶預設角度 Added shadow block (default 90) in toolbox, providing default angle when dragged from toolbox
- 新增 Blockly 12.x JSON 序列化 hooks(
saveExtraState/loadExtraState) Added Blockly 12.x JSON serialization hooks (saveExtraState/loadExtraState)
- 將
-
修復 Node.js 警告通知阻塞 Blockly 編輯器開啟 (Fix Node.js warning notification blocking Blockly editor opening)
showNodeJsWarning()使用await showWarningMessage()等待使用者互動,阻塞activate()完成,導致 VS Code 不執行擴充功能命令showNodeJsWarning()usedawait showWarningMessage()waiting for user interaction, blockingactivate()completion and preventing VS Code from dispatching extension commands- 改為 fire-and-forget 模式(
.then()處理按鈕回應),通知照常顯示但不阻塞啟動 Changed to fire-and-forget pattern (.then()for button handling), notification still shows but doesn't block activation
-
修復 webpack MCP server 編譯靜默失敗 (Fix webpack MCP server silent build failure)
mcpServerConfig的extensionAlias與@modelcontextprotocol/sdk的 exports map 衝突,導致 webpack 靜默失敗(exit code 1,無錯誤訊息)mcpServerConfig'sextensionAliasconflicted with@modelcontextprotocol/sdk's exports map, causing webpack to fail silently (exit code 1, no error messages)- 將 MCP SDK 和 zod 標記為 externals,MCP server 作為獨立 Node.js 進程可直接存取 node_modules Added MCP SDK and zod as externals since MCP server runs as standalone Node.js process with direct access to node_modules
- 修復 MCP SDK 跨客戶端資料洩漏漏洞 (CVE-2026-25536) (Fix MCP SDK Cross-Client Data Leak Vulnerability)
- 升級
@modelcontextprotocol/sdk從 1.25.3 至 1.26.0 Upgraded@modelcontextprotocol/sdkfrom 1.25.3 to 1.26.0 - 修復當單一 McpServer/Server 和 transport 實例在多個客戶端連線間重用時的跨客戶端回應資料洩漏問題 Fixed cross-client response data leak when a single McpServer/Server and transport instance is reused across multiple client connections
- 嚴重程度 Severity: High (CVSS: 7.1)
- 關閉 Dependabot Alert #21 Closes Dependabot Alert #21
- 升級
- 診斷報告完整國際化支援 (Full Internationalization for Diagnostic Reports)
- 診斷報告現在會根據使用者的 VSCode 語言設定顯示本地化文字 Diagnostic reports now display localized text based on user's VSCode language setting
- 時間戳會使用使用者語言對應的格式顯示(不再硬編碼為 zh-TW) Timestamps now use the format corresponding to user's language (no longer hardcoded to zh-TW)
- 新增 37 個診斷報告相關翻譯鍵 (DIAG**, REC*_) 至所有 15 種語言 Added 37 diagnostic report translation keys (DIAG__, REC_*) to all 15 languages
- 修復 Copilot Code Review 指出的問題 (Fix issues identified by Copilot Code Review)
- 修復
showNodeJsWarning函數中設定更新失敗未處理的問題 Fixed unhandled setting update failure inshowNodeJsWarningfunction - 修復時間戳格式硬編碼為 zh-TW 的問題,改為動態根據使用者語言設定 Fixed hardcoded zh-TW timestamp format, now dynamically uses user's language setting
- 修復診斷報告文字硬編碼為繁體中文的問題,改為透過 LocaleService 獲取本地化文字 Fixed hardcoded Traditional Chinese text in diagnostic reports, now uses LocaleService for localization
- 修復
- MCP Server 優雅降級與 Node.js 檢測 (MCP Server Graceful Degradation with Node.js Detection)
- 新增 NodeDetectionService:自動檢測 Node.js 可用性與版本相容性(需 >= 22.16.0) New NodeDetectionService: Auto-detects Node.js availability and version compatibility (requires >= 22.16.0)
- 新增 DiagnosticService:收集 MCP 狀態診斷資訊,支援複製到剪貼簿 New DiagnosticService: Collects MCP status diagnostics with clipboard copy support
- 新增「檢查 MCP 狀態」命令:顯示完整診斷報告,協助使用者排除問題 New "Check MCP Status" command: Shows comprehensive diagnostic report for troubleshooting
- 新增
singularBlockly.mcp.nodePath設定:支援自訂 Node.js 路徑(適用於 nvm/fnm 使用者) NewsingularBlockly.mcp.nodePathsetting: Custom Node.js path support for nvm/fnm users - 新增
singularBlockly.mcp.showStartupWarning設定:可停用 Node.js 警告訊息 NewsingularBlockly.mcp.showStartupWarningsetting: Option to disable Node.js warning dialogs - 優雅降級:當 Node.js 不可用時,MCP 功能停用但 Blockly 編輯功能正常運作 Graceful degradation: When Node.js unavailable, MCP features disabled but Blockly editing works normally
- 完整 15 語言翻譯支援 (Full 15-Language Translation Support)
- 新增
package.nls.*.json檔案,支援 VSCode 設定介面在地化 Addedpackage.nls.*.jsonfiles for VSCode settings UI localization - 新增 10 個 MCP 相關翻譯鍵至所有語言的
messages.jsAdded 10 MCP-related translation keys to all languagemessages.jsfiles - 支援語言 Supported languages: en, zh-hant, ja, ko, de, es, fr, pt-br, it, ru, pl, hu, tr, bg, cs
- 新增
- 修復 Windows 命令執行編碼問題 (Fix Windows Command Execution Encoding Issue)
- 修復 Windows CMD Big5 編碼導致中文錯誤訊息亂碼問題 Fixed Windows CMD Big5 encoding causing garbled Chinese error messages
- 修復 Windows 下
"node" --version引號問題導致命令執行失敗 Fixed Windows quote handling issue causing"node" --versioncommand failure
- 修復 CyberBrick text_print 積木的換行控制功能 (Fix CyberBrick text_print block newline control)
- 修復 MicroPython 版本的
text_print積木 NEW_LINE checkbox 功能,使其能正確控制輸出是否換行 Fixed MicroPython version oftext_printblock NEW_LINE checkbox to correctly control output newline behavior - 勾選「換行」時產生
print(msg),取消勾選時產生print(msg, end="")When "New Line" is checked, generatesprint(msg); when unchecked, generatesprint(msg, end="") - 與 Arduino 版本行為保持一致(
Serial.println()vsSerial.print()) Maintains consistent behavior with Arduino version (Serial.println()vsSerial.print()) - 修改檔案 Modified files:
media/blockly/generators/micropython/text.js(新增 2 行程式碼)src/test/suite/text-print-generation.test.ts(新增文件化測試)
- 修復 MicroPython 版本的
- 修復 Hono 多個中度安全漏洞 (Fix multiple Hono medium-severity vulnerabilities)
- 升級
@modelcontextprotocol/sdk從 1.25.2 至 1.25.3,間接升級hono從 4.11.4 至 4.11.7 Upgraded@modelcontextprotocol/sdkfrom 1.25.2 to 1.25.3, indirectly upgradinghonofrom 4.11.4 to 4.11.7 - 修復 XSS through ErrorBoundary component (Dependabot Alert #19) Fixed XSS through ErrorBoundary component (Dependabot Alert #19)
- 修復 Arbitrary Key Read in Serve static Middleware (Dependabot Alert #18) Fixed Arbitrary Key Read in Serve static Middleware (Dependabot Alert #18)
- 修復 Cache middleware Web Cache Deception (Dependabot Alert #17) Fixed Cache middleware Web Cache Deception (Dependabot Alert #17)
- 修復 IPv4 address validation bypass allows IP spoofing (Dependabot Alert #16) Fixed IPv4 address validation bypass allows IP spoofing (Dependabot Alert #16)
- 嚴重程度 Severity: Medium
- 升級
- Arduino Serial Monitor 整合 (Arduino Serial Monitor Integration)
- 新增 Monitor 按鈕:對所有 Arduino 開發板顯示,使用 PlatformIO CLI 的
pio device monitor命令 New Monitor button: Shows for all Arduino boards, using PlatformIO CLI'spio device monitorcommand - 自動 Baud Rate 偵測:從
platformio.ini讀取monitor_speed,預設 9600(與積木生成的Serial.begin(9600)一致) Auto baud rate detection: Readsmonitor_speedfromplatformio.ini, defaults to 9600 (matches block-generatedSerial.begin(9600)) - ESP32 Exception Decoder:ESP32/Super Mini 開發板自動啟用崩潰訊息解碼 ESP32 exception decoder: Auto-enabled for ESP32/Super Mini boards for crash analysis
- 上傳整合:上傳時自動停止 Monitor,上傳成功後自動重啟 Upload integration: Auto-stop Monitor before upload, auto-restart after success
- UI 統一:Monitor 按鈕對所有開發板顯示,與 CyberBrick 體驗一致 Unified UI: Monitor button shows for all boards, consistent with CyberBrick experience
- 新增 Monitor 按鈕:對所有 Arduino 開發板顯示,使用 PlatformIO CLI 的
- CyberBrick 輸出監控器 (CyberBrick Output Monitor)
- 新增 Monitor 按鈕:可開啟終端機即時查看 CyberBrick 的
print()輸出 New Monitor button: Opens terminal to view CyberBrickprint()output in real-time - 自動埠偵測:自動偵測已連接的 CyberBrick 裝置,無需手動選擇 COM 埠 Auto port detection: Automatically detects connected CyberBrick device, no manual COM port selection needed
- 上傳衝突處理:上傳前自動關閉 Monitor 釋放 COM 埠,避免衝突 Upload conflict handling: Automatically closes Monitor before upload to release COM port
- 條件顯示:Monitor 按鈕僅在選擇 CyberBrick 板時顯示,Arduino 板不顯示 Conditional display: Monitor button only shows when CyberBrick board is selected
- 使用 pyserial 實現穩定的裝置重置與輸出捕獲,確保從程式開頭顯示所有輸出 Uses pyserial for reliable device reset and output capture, ensuring all output from program start
- 支援 15 種語言翻譯 (10 個翻譯鍵) Supports 15 language translations (10 translation keys)
- 新增 Monitor 按鈕:可開啟終端機即時查看 CyberBrick 的
-
HuskyLens ID-Based 積木查詢 (HuskyLens ID-Based Block Query)
- 新增「依 ID 請求方塊」積木:只請求特定 ID 的方塊辨識結果,提高效率 New "Request Blocks by ID" block: Request only blocks with specific ID for better efficiency
- 新增「依 ID 取得方塊數量」積木:取得特定 ID 的方塊數量 New "Count Blocks by ID" block: Get the count of blocks with specific ID
- 新增「依 ID 取得方塊資訊」積木:直接取得特定 ID 方塊的座標/尺寸,無需迴圈遍歷 New "Get Block by ID" block: Get coordinates/size of specific ID block without loop iteration
- 支援 15 種語言翻譯 (165 個翻譯鍵) Supports 15 language translations (165 translation keys)
- 更新 MCP 積木字典 (141 → 144 積木) Updated MCP block dictionary (141 → 144 blocks)
-
PR 模板系統 (PR Template System)
- 新增預設 PR 模板 (.github/pull_request_template.md) Added default PR template (.github/pull_request_template.md)
- 新增功能開發專用模板 (.github/PULL_REQUEST_TEMPLATE/feature.md) Added feature development template (.github/PULL_REQUEST_TEMPLATE/feature.md)
- 新增 Bug 修復專用模板 (.github/PULL_REQUEST_TEMPLATE/bugfix.md) Added bugfix template (.github/PULL_REQUEST_TEMPLATE/bugfix.md)
- HuskyLens 積木動態編號輸入 (HuskyLens Dynamic Index Input)
- 「取得方塊」和「取得箭頭」積木的編號欄位現可連接變數、數字或數學運算積木 INDEX field of "Get Block" and "Get Arrow" blocks now accepts variable, number, or math blocks
- 支援在迴圈中動態掃描所有偵測結果 Enables dynamic iteration over all detected results in loops
- 工具箱積木預設顯示數字 0,維持使用體驗 Toolbox blocks default to number 0, maintaining user experience
- 修復發布打包問題 (Fix Publishing Package Issue)
- 排除
.agent/資料夾避免 vsce 打包錯誤 Exclude.agent/folder to prevent vsce packaging error
- 排除
- MicroPython 全域變數提升 (MicroPython Global Variable Hoisting)
- 自訂函式可修改主程式 (
main) 變數,自動插入global宣告 Custom functions can modifymainvariables;globaldeclarations are automatically inserted - 智慧判斷全域變數需求,唯讀變數不產生
global宣告 Smart detection of global variable usage; read-only variables do not generateglobaldeclarations - 過濾函式參數同名變數,避免 Python 語法錯誤 Filters out variables with same name as function parameters to prevent Python syntax errors
- 自訂函式可修改主程式 (
- CyberBrick 時間積木解除實驗標記 (CyberBrick Time Blocks Graduated)
- 移除
cyberbrick_ticks_ms/cyberbrick_ticks_diff的實驗標記與提示 Removed experimental marking and prompts forcyberbrick_ticks_ms/cyberbrick_ticks_diff
- 移除
-
規格文件整理 (Specification Docs Update)
- 補齊本功能的 spec / plan / tasks / research / quickstart / data-model / contracts Added complete spec / plan / tasks / research / quickstart / data-model / contracts for this feature
-
ESLint 忽略設定調整 (ESLint Ignore Cleanup)
- 移除已棄用的
.eslintignore,統一由eslint.config.mjsignores 管理 Removed deprecated.eslintignore; ignores are managed viaeslint.config.mjs
- 移除已棄用的
-
CyberBrick 時間回傳值積木 (CyberBrick Time Value Blocks)
- 新增「取得目前毫秒數/計算時間差」積木,支援非阻塞計時流程 Added "Get Current Milliseconds" and "Time Difference" blocks for non-blocking timing
- MicroPython 產碼使用
time.ticks_ms()/time.ticks_diff(),處理時間 wrap-around MicroPython generation usestime.ticks_ms()/time.ticks_diff()to handle wrap-around
-
MCP 積木字典支援 (MCP Block Dictionary Support)
- 新增 CyberBrick 時間積木條目、分類與搜尋標籤 Added CyberBrick time blocks, category, and search tags to MCP dictionary
-
實驗積木標記 (Experimental Block Marking)
- CyberBrick 時間積木加入實驗積木清單並顯示提示 Marked CyberBrick time blocks as experimental with workspace indicator
-
15 種語系 i18n 更新 (15-language i18n Update)
- 新增時間積木名稱、欄位與提示翻譯 Added translations for time block names, fields, and tooltips
- CyberBrick MicroPython 文件 (CyberBrick MicroPython Docs)
- 補齊時間積木對應表與範例 Added time block mappings and examples
- Blockly.Msg 翻譯鍵掃描工具 (Blockly.Msg Translation Key Scanner)
- 新增
npm run scan:blockly-msg掃描腳本 Addednpm run scan:blockly-msgscan script
- 新增
-
主程式積木數量限制與刪除保護 (Main Program Block Limits & Deletion Guard)
maxInstances限制主程式積木為單一實例,並動態更新 deletable 狀態 EnforcedmaxInstancessingle-instance limit with dynamic deletable state- 多積木情境顯示警告提示 Shows warning when duplicate main blocks are detected
-
備份預覽 URI 修正 (Backup Preview URI Fix)
vscode.open改用vscode.Uri.file()包裝路徑vscode.opennow usesvscode.Uri.file()for file paths
-
還原前自動備份 (Auto Backup Before Restore)
- 還原前建立
auto_restore_YYYYMMDD_HHMMSS.json備份並回傳檔名 Createsauto_restore_YYYYMMDD_HHMMSS.jsonbefore restore and returns the backup name
- 還原前建立
-
Blockly 迴圈翻譯鍵補齊 (Blockly Loop Translation Key Completion)
- 補上
CONTROLS_REPEAT_INPUT_DO與主程式警告翻譯鍵 AddedCONTROLS_REPEAT_INPUT_DOand main block warning translation keys
- 補上
- 編輯器語言選擇器 (In-editor Language Selector)
- 工具列地球圖示提供語言下拉選單,立即更新 UI Toolbar globe menu provides a language dropdown with instant UI updates
- Auto 模式跟隨 VS Code 顯示語言 Auto mode follows VS Code display language
- 語言與開發板下拉選單樣式一致化 Unified styling for language and board dropdowns
- WebView 訊息處理穩定性 (WebView Message Handling Stability)
- 補齊變數建立/刪除/確認對話框處理 Restored variable create/delete/confirm dialog handling
- board=none 時不再等待開發板設定請求 Avoids waiting for board config when board=none
- FileWatcher reload 正確取得工作區路徑 FileWatcher reload now resolves workspace root correctly
- CyberBrick ESP-NOW RC 配對積木 (CyberBrick ESP-NOW RC Pairing Blocks)
- 新增 10 個積木支援 ESP-NOW 無線遙控配對功能 Added 10 blocks for ESP-NOW wireless RC pairing feature
- 發射端:初始化發射端、發送資料 Transmitter: Master init, Send data
- 接收端:初始化接收端、等待配對、是否已連線 Receiver: Slave init, Wait connection, Is connected
- 資料讀取:搖桿原始值、搖桿映射值、按鈕按下、按鈕狀態 Data reading: Joystick raw, Joystick mapped, Button pressed, Button state
- 支援配對 ID (1-255) 和 WiFi 頻道 (1-11) 隔離不同組別 Supports Pair ID (1-255) and WiFi channel (1-11) to isolate different groups
- 解決教室多組同時使用時的訊號干擾問題 Solves signal interference when multiple groups operate simultaneously in classroom
- 完整 15 語言 i18n 支援 Full 15-language i18n support
- ESP-NOW 連線穩定性最佳實踐 (ESP-NOW Connection Stability Best Practices)
- 發送端:失敗重試機制,10 次失敗後自動重新初始化 Transmitter: Retry mechanism, auto-reinitialize after 10 failures
- 接收端:定期垃圾回收 (30 秒)、irq 錯誤處理、斷線自動重連 (5 秒) Receiver: Periodic GC (30s), irq error handling, auto-reconnect after disconnect (5s)
- 增加 rxbuf 緩衝區至 1024 bytes 避免 NO_MEM 錯誤 Increased rxbuf buffer to 1024 bytes to avoid NO_MEM errors
- 禁止 WiFi 自動重連避免頻道掃描干擾 ESP-NOW (
sta.config(reconnects=0)) Disabled WiFi auto-reconnect to prevent channel scanning interference
- 修復 Hono JWT 演算法混淆漏洞 (Fix Hono JWT Algorithm Confusion Vulnerabilities)
- 升級
hono從 4.11.3 至 4.11.4(間接依賴,透過@modelcontextprotocol/sdk) Upgradedhonofrom 4.11.3 to 4.11.4 (transitive dependency via@modelcontextprotocol/sdk) - 修復 JWK Auth Middleware 在缺少 "alg" 時的 JWT 演算法混淆問題 Fixed JWK Auth Middleware JWT algorithm confusion when JWK lacks "alg"
- 修復 JWT Middleware 因不安全預設值 (HS256) 導致的權杖偽造與認證繞過 Fixed JWT Middleware's algorithm confusion via unsafe default (HS256) allowing token forgery
- 嚴重程度:High Severity: High
- 關閉 Dependabot Alert #12, #13 Closes Dependabot Alert #12, #13
- 升級
- 修復 MCP SDK ReDoS 安全漏洞 (CVE-2026-0621) (Fix MCP SDK ReDoS Security Vulnerability)
- 升級
@modelcontextprotocol/sdk從 1.25.1 至 1.25.2 Upgraded@modelcontextprotocol/sdkfrom 1.25.1 to 1.25.2 - 修復
UriTemplate類別處理 RFC 6570 擴展陣列模式時的 ReDoS 漏洞 Fixed ReDoS vulnerability inUriTemplateclass when handling RFC 6570 expansion array patterns - 嚴重程度:High (CVSS 4.0: 8.7) Severity: High (CVSS 4.0: 8.7)
- 關閉 Dependabot Alert #11 Closes Dependabot Alert #11
- 升級
-
CyberBrick X12 發射端擴展板積木選單 (CyberBrick X12 Transmitter Extension Board Blocks)
- 新增 3 個積木支援 X12 發射端擴展板(僅 CyberBrick 開發板顯示) Added 3 blocks for X12 transmitter extension board (CyberBrick only)
- 本機搖桿讀取:讀取 ADC 值 0-4095(L1-L3 左搖桿、R1-R3 右搖桿) Local joystick reading: Read ADC value 0-4095 (L1-L3 left, R1-R3 right)
- 搖桿數值映射:將 ADC 值映射到自訂範圍(如 -100 ~ 100) Joystick value mapping: Map ADC value to custom range (e.g., -100 ~ 100)
- 本機按鈕偵測:檢查 K1-K4 按鈕是否被按下 Local button detection: Check if K1-K4 buttons are pressed
-
RC 遙控通訊積木(預留) (RC Remote Control Blocks - Reserved)
- 積木定義與生成器已完成,但暫不在 Toolbox 中顯示 Block definitions and generators completed, but not yet visible in Toolbox
- 待雙機配對測試環境就緒後啟用 Will be enabled after dual-device pairing test environment is ready
- 包含:發射端/接收端初始化、遠端搖桿/按鈕讀取、連線狀態檢查 Includes: Master/Slave init, remote joystick/button reading, connection status
-
MicroPython 無限迴圈安全機制 (MicroPython Infinite Loop Safety)
- 自動偵測
while True迴圈內是否有延遲 Auto-detect ifwhile Trueloop contains delay - 若無延遲,自動加入
time.sleep_ms(10)確保可中斷 If no delay, auto-addtime.sleep_ms(10)to ensure interruptibility - 只檢查最外層程式碼,不影響 if/else 內的邏輯 Only checks top-level code, doesn't affect logic inside if/else
- 自動偵測
-
15 種語言完整 i18n 支援 (Full i18n Support for 15 Languages)
- 所有 X12 積木翻譯完整覆蓋 All X12 blocks fully translated
- RC 積木翻譯預留(待啟用) RC block translations reserved (pending activation)
- 修復法文 i18n 檔案解析問題 (Fix French i18n File Parsing Issue)
- 修正
translation-reader.js解析法文撇號(如l'émetteur)時的錯誤 Fixedtranslation-reader.jsparsing error with French apostrophes (e.g.,l'émetteur) - 改用更穩健的
lastIndexOf('});')方法取代字元追蹤 Replaced character tracking with more robustlastIndexOf('});')approach
- 修正
- 新增檔案 New Files:
media/blockly/blocks/x12.js:X12 積木定義(3 個積木)media/blockly/blocks/rc.js:RC 積木定義(8 個積木,預留)media/blockly/generators/micropython/x12.js:X12 MicroPython 生成器media/blockly/generators/micropython/rc.js:RC MicroPython 生成器media/toolbox/categories/cyberbrick_x12.json:X12 Toolbox 類別media/toolbox/categories/cyberbrick_rc.json:RC Toolbox 類別(預留)
- Block Dictionary 更新:
- 新增 X12 類別(4 積木)和 RC 類別(8 積木)
- 總計 139 blocks, 15 categories
-
修復格式字串注入漏洞 (CWE-134) (Fix Format String Injection Vulnerability)
- 修正
handleUploadProgress()中的console.log使用%s格式化字串 Fixedconsole.loginhandleUploadProgress()to use%sformat specifiers - 防止外部輸入觸發格式化字串攻擊 Prevents format string attacks from external input
- 關閉 GitHub Code Scanning Alert #8 Closes GitHub Code Scanning Alert #8
- 修正
-
升級 MCP SDK 至最新版本 (Upgrade MCP SDK to Latest Version)
- 升級
@modelcontextprotocol/sdk從 1.24.3 至 1.25.1 Upgraded@modelcontextprotocol/sdkfrom 1.24.3 to 1.25.1 - 注意:CVE-2026-0621 (ReDoS) 漏洞尚無上游修補版本 Note: CVE-2026-0621 (ReDoS) vulnerability has no upstream fix yet
- 風險評估:MCP 伺服器僅接受本地連接,對一般使用影響低 Risk assessment: MCP server only accepts local connections, low impact for typical usage
- 升級
- SECURITY.md 安全政策文件 (SECURITY.md Security Policy Document)
- 記錄已知漏洞與風險評估 Documents known vulnerabilities and risk assessment
- 提供安全問題回報管道 Provides security issue reporting channel
-
CyberBrick X11 擴展板積木選單 (CyberBrick X11 Extension Board Blockly Menu)
- 新增 6 個積木支援 X11 擴展板(僅 CyberBrick 開發板顯示) Added 6 blocks for X11 extension board (CyberBrick only)
- 180° 伺服馬達角度控制:設定 0-180° 角度 (S1-S4 埠位) 180° Servo angle control: Set angle 0-180° (ports S1-S4)
- 360° 伺服馬達速度控制:設定 -100
100% 旋轉速度 (S1-S4 埠位) 360° Servo speed control: Set speed -100100% (ports S1-S4) - 停止伺服馬達:停止指定埠位的伺服馬達 Stop servo: Stop servo motor on specified port
- 直流馬達速度控制:設定 -2048
2048 轉速 (M1-M2 埠位) DC Motor speed control: Set speed -20482048 (ports M1-M2) - 停止直流馬達:停止指定埠位的直流馬達 Stop DC motor: Stop DC motor on specified port
- WS2812 LED 燈條顏色控制:設定 RGB 顏色 (D1-D2 埠位,GPIO21/GPIO20) WS2812 LED strip color control: Set RGB color (ports D1-D2, GPIO21/GPIO20)
-
MicroPython 程式碼生成器 (MicroPython Code Generator)
- 使用
bbl.servos.ServosController模組控制伺服馬達 Usesbbl.servos.ServosControllermodule for servo control - 使用
bbl.motors.MotorsController模組控制直流馬達 Usesbbl.motors.MotorsControllermodule for DC motor control - 使用
neopixel.NeoPixel模組控制 LED 燈條 Usesneopixel.NeoPixelmodule for LED strip control - 自動 import 管理和硬體初始化 Automatic import management and hardware initialization
- 數值範圍自動 clamp 確保安全 Automatic value clamping for safety
- 使用
-
15 種語言完整 i18n 支援 (Full i18n Support for 15 Languages)
- 所有 X11 積木翻譯完整覆蓋 All X11 blocks fully translated
- 支援繁體中文、英文、日文、韓文、德文、法文、西班牙文、義大利文、 葡萄牙文(巴西)、俄文、波蘭文、土耳其文、匈牙利文、捷克文、保加利亞文 Supports zh-hant, en, ja, ko, de, fr, es, it, pt-br, ru, pl, tr, hu, cs, bg
- 新增檔案 New Files:
media/blockly/blocks/x11.js:X11 積木定義(6 個積木)media/blockly/generators/micropython/x11.js:MicroPython 生成器media/toolbox/categories/cyberbrick_x11.json:Toolbox 類別定義
- Block Dictionary 更新:
- 新增 X11 類別和 6 個積木元資料
- 總計 127 blocks, 13 categories
- 移除功能 Removed Features(因 API 限制):
- 伺服馬達平滑移動 (
set_angle_stepping):CyberBrick API 存在 bug Servo smooth stepping: CyberBrick API bug (sensitity vs sensitivity typo) - 關閉 LED 燈條積木:使用者可設定 RGB=(0,0,0) 達成相同效果 LED off block: Users can set RGB=(0,0,0) for the same effect
- 伺服馬達平滑移動 (
-
統一 Arduino C++ 與 MicroPython 上傳 UI (Unified Arduino C++ and MicroPython Upload UI)
- 所有開發板類型都顯示上傳按鈕(包含 Arduino UNO、ESP32、Mega 等) Upload button now visible for all board types (Arduino UNO, ESP32, Mega, etc.)
- Arduino 板子點擊上傳按鈕時自動透過 PlatformIO 編譯並上傳 Click upload button on Arduino boards to compile and upload via PlatformIO
- 未連接開發板時自動切換為「僅編譯」模式,顯示「編譯成功」訊息 Automatically switches to "compile-only" mode when no board connected
- CyberBrick MicroPython 上傳流程維持原有行為不變 CyberBrick MicroPython upload workflow remains unchanged
- 新增 Tooltip 動態更新:Arduino →「編譯並上傳」、CyberBrick →「上傳至 CyberBrick」 Dynamic tooltip updates based on board type
- 上傳階段訊息支援 15 種語系完整翻譯 Upload stage messages fully translated in 15 languages
-
ArduinoUploader 服務 (ArduinoUploader Service)
- 新增
src/services/arduinoUploader.ts服務,整合 PlatformIO CLI New ArduinoUploader service integrating PlatformIO CLI - 自動偵測已連接的開發板(USB 連接埠) Automatic detection of connected boards (USB ports)
- 過濾藍牙連接埠避免誤判 Filters Bluetooth ports to avoid false detection
- 編譯錯誤解析與友善提示 Parse and display user-friendly compile errors
- 支援 lib_deps、build_flags、lib_ldf_mode 傳遞 Supports passing lib_deps, build_flags, lib_ldf_mode
- 新增
- Extension Host 層:
- 新增
src/types/arduino.ts:Arduino 上傳類型定義(ArduinoUploadStage、Progress、Result、Request、PortInfo) - 新增
src/services/arduinoUploader.ts:PlatformIO CLI 整合服務 - 修改
src/webview/messageHandler.ts:新增 Arduino 上傳路由與進度回報
- 新增
- WebView 層 (
media/js/blocklyEdit.js):updateUIForBoard():移除上傳按鈕隱藏條件,新增動態 TooltiphandleUploadClick():根據程式語言類型發送不同的上傳請求handleUploadProgress():新增 Arduino 階段訊息對應handleUploadResult():區分「編譯成功」與「上傳成功」訊息getLocalizedUploadError():新增 Arduino 錯誤類型支援
- i18n 國際化:
- 15 種語系新增 Arduino 上傳相關 i18n 鍵名
- 包含按鈕標題、階段訊息、成功訊息、錯誤訊息
- 修復拖曳時 FileWatcher 重載崩潰問題 (Fix FileWatcher Reload Crash During Drag)
- 修復在拖曳積木時外部修改 main.json 導致 UI 凍結和積木消失的問題 Fixed UI freeze and block disappearance when external changes to main.json occur during block drag
- 實作雙重拖曳偵測機制(
isDraggingBlock || workspace.isDragging())確保可靠偵測 Implemented dual drag detection mechanism for reliable detection - FileWatcher 觸發的重載請求在拖曳期間自動暫存,拖曳結束後自動執行 FileWatcher reload requests are automatically deferred during drag and executed after drag ends
- 新增剪貼簿操作鎖定機制,防止 Ctrl+C/V/X 期間觸發不完整儲存 Added clipboard operation lock mechanism to prevent incomplete saves during Ctrl+C/V/X
- 將內部更新保護從布林旗標升級為計數器機制,支援巢狀保存操作和 2000ms 保護窗口 Upgraded internal update protection from boolean flag to counter mechanism with 2000ms protection window
- 更新棄用的 Blockly Variable API(
workspace.getVariableById→workspace.getVariableMap().getVariableById) Updated deprecated Blockly Variable API calls for v13 compatibility
- WebView 層 (
media/js/blocklyEdit.js):- 新增
isCurrentlyDragging()輔助函數 - 新增
shouldSkipSave()整合所有儲存守衛條件 - 新增
processPendingReload()延遲執行 FileWatcher 重載 - 新增剪貼簿操作鎖定計時器和安全超時機制
- 新增
- Extension 層 (
src/webview/webviewManager.ts):internalUpdateCount計數器取代isInternalUpdate布林值- 2000ms 延遲重置確保檔案系統事件完成
-
依賴套件安全性更新 (Dependency Security Update)
- 修復
qs套件高嚴重性漏洞 (GHSA-6rw7-vpxm-498p) Fixed high severity vulnerability inqspackage (GHSA-6rw7-vpxm-498p) qs從 6.14.0 升級至 6.14.1,防止 arrayLimit bypass 導致的 DoS 記憶體耗盡攻擊 Upgradedqsfrom 6.14.0 to 6.14.1 to prevent DoS memory exhaustion via arrayLimit bypass
- 修復
-
Code Scanning Alert #7 修復 (Code Scanning Alert #7 Fix)
- 修復 CodeQL 偵測到的未驗證動態方法呼叫問題 Fixed unvalidated dynamic method call detected by CodeQL
- 在調用
callback前增加typeof callback === 'function'類型檢查 Addedtypeof callback === 'function'type check before invoking callback - 防止潛在的 TypeError 異常和意外行為 Prevents potential TypeError exceptions and unexpected behavior
- Extension Host i18n 硬編碼字串修復 (Extension Host i18n Hardcoded Strings Fix)
- 修復英文環境顯示 i18n key 名稱而非翻譯文字的問題 Fixed English environment showing i18n key names instead of translated text
- 修復 MicroPython 上傳進度訊息在非英文環境顯示英文的問題 Fixed MicroPython upload progress messages showing English in non-English environments
- 修復備份對話框訊息硬編碼中文的問題 Fixed backup dialog messages being hardcoded in Chinese
- 新增 LocaleService fallback 鏈機制:當前語言 → 英文 → fallback 參數 → key 名稱 Added LocaleService fallback chain: current language → English → fallback parameter → key name
- 新增
src/types/i18nKeys.ts提供類型安全的 i18n 鍵名常數 Addedsrc/types/i18nKeys.tsfor type-safe i18n key constants - 更新所有 15 種語言的翻譯檔案,新增 39 個翻譯鍵值 Updated all 15 language translation files with 39 new translation keys
- i18n 翻譯審計機制優化 (i18n Translation Audit Optimization)
- 修復俄語翻譯檔案中
CONTROLS_IF_ELSE_TITLE_ELSE使用西里爾字母的 key 名稱錯誤(СЕ → SE) Fixed Russian translation file key name error using Cyrillic characters (СЕ → SE) inCONTROLS_IF_ELSE_TITLE_ELSE - 新增 CyberBrick 品牌名稱白名單規則,避免技術專有名詞誤報 Added CyberBrick brand name whitelist rules to prevent technical term false positives
- 新增國際技術縮寫白名單(LED/GPIO/PWM/I2C/UART/WiFi) Added international technical acronym whitelist (LED/GPIO/PWM/I2C/UART/WiFi)
- 為 CJK 語言(日文、韓文、繁體中文)放寬檢測閾值以適應字元效率差異 Relaxed detection thresholds for CJK languages (Japanese, Korean, Traditional Chinese) to accommodate character efficiency differences
- 將文化適切性(culturalMismatch)檢測降級為低嚴重性,避免阻擋 PR Downgraded cultural mismatch detection to low severity to prevent blocking PRs
- 白名單版本更新至 v1.2.0,總規則數從 16 增至 19 Updated whitelist to v1.2.0, total rules increased from 16 to 19
- 修復俄語翻譯檔案中
- Issue #29 已關閉 (Issue #29 Closed)
- 解決翻譯審計誤報問題,高嚴重度問題從 31 降至 5 以下 Resolved translation audit false positives, high severity issues reduced from 31 to under 5
- Arduino C++ 中文參數名稱自動轉換 (Arduino C++ Chinese Parameter Name Auto-Conversion)
- 自訂函數的中文參數名稱自動轉換為合法的 C++ 識別符 Chinese parameter names in custom functions are automatically converted to valid C++ identifiers
- 新增
functionParamMap追蹤參數名稱轉換對應 AddedfunctionParamMapto track parameter name conversions variables_get和variables_set生成器現在支援轉換後的參數名稱variables_getandvariables_setgenerators now support converted parameter names- 中文參數名稱編碼為十六進位格式(例如:「速度」→
fn901f_5ea6) Chinese parameter names are encoded to hex format (e.g., '速度' →fn901f_5ea6)
- MicroPython 函數生成器防禦性檢查 (MicroPython Function Generator Defensive Check)
- 為
arduino_function生成器加入函數名稱空值防護 Added null check for function name inarduino_functiongenerator - 為
arduino_function_call生成器加入函數名稱空值防護 Added null check for function name inarduino_function_callgenerator - 函數名稱為空時跳過生成並記錄警告,避免產生無效 Python 語法 Skip generation and log warning when function name is empty, preventing invalid Python syntax
- 為
- MicroPython 自訂函數生成器 (MicroPython Custom Function Generator) 🎉
- 為
arduino_function積木新增 MicroPython 程式碼生成器,生成 Pythondef語法 Added MicroPython code generator forarduino_functionblocks, generating Pythondefsyntax - 為
arduino_function_call積木新增 MicroPython 生成器,支援函數呼叫語法 Added MicroPython generator forarduino_function_callblocks, supporting function call syntax - 支援中文函數名稱,保留原始 Unicode 識別符(Python 3 原生支援) Support Chinese function names, preserving original Unicode identifiers (Python 3 native support)
- 支援帶參數的自訂函數,參數以 Python 動態型別處理 Support custom functions with parameters, handled as Python dynamic types
- 空函數體自動生成
pass語句,符合 Python 語法要求 Empty function bodies automatically generatepassstatement, conforming to Python syntax requirements - 修復 CyberBrick Python 模式使用自訂函數時出現的 "MicroPython generator does not know how to generate code" 錯誤 Fixed "MicroPython generator does not know how to generate code" error when using custom functions in CyberBrick Python mode
- 為
- CyberBrick MicroPython 支援 (CyberBrick MicroPython Support) 🎉
- 新增 CyberBrick 主板支援(ESP32-C3 架構),可進行 MicroPython 視覺化程式設計 Added CyberBrick board support (ESP32-C3 architecture) for MicroPython visual programming
- 實作完整的 MicroPython 程式碼生成器:邏輯、迴圈、數學、文字、列表、變數、函數積木 Implemented complete MicroPython code generators: logic, loops, math, text, lists, variables, functions blocks
- 新增 CyberBrick 專用積木:主程式、LED(RGB)、GPIO(讀寫)、時序(毫秒/秒延遲)、WiFi(連線/斷線/狀態/IP) Added CyberBrick-specific blocks: main, LED (RGB), GPIO (read/write), time (ms/s delay), WiFi (connect/disconnect/status/IP)
- 主板切換時自動備份工作區並切換工具箱(Arduino ↔ MicroPython) Auto-backup workspace and switch toolbox when switching boards (Arduino ↔ MicroPython)
- 實作 MicropythonUploader 服務支援一鍵上傳(使用 mpremote) Implemented MicropythonUploader service for one-click upload (using mpremote)
- 選擇 CyberBrick 時自動刪除 platformio.ini 避免與 PlatformIO 衝突 Auto-delete platformio.ini when CyberBrick selected to avoid PlatformIO conflicts
- 支援 15 種語言的 i18n 翻譯(新增 64 個翻譯鍵/語言) Supports i18n translations for 15 languages (64 new translation keys per language)
- Preview 面板支援 CyberBrick 主板 Preview panel supports CyberBrick board
- 修正 HuskyLens 積木 RX/TX 標籤顯示 (Fix HuskyLens Block RX/TX Label Display)
- 將 HuskyLens UART 積木的標籤從「RX 腳位」「TX 腳位」改為「連接 HuskyLens TX →」「連接 HuskyLens RX →」 Changed HuskyLens UART block labels from "RX Pin" / "TX Pin" to "Connect to HuskyLens TX →" / "Connect to HuskyLens RX →"
- 更清楚指引使用者 Arduino 腳位應連接到 HuskyLens 的哪個腳位 Clearer guidance for users on which HuskyLens pin to connect Arduino pins to
- 新增智慧預設腳位:ESP32 (GPIO16/17)、Super Mini (GPIO20/21)、AVR (D2/D3) Added smart default pins: ESP32 (GPIO16/17), Super Mini (GPIO20/21), AVR (D2/D3)
- 新增腳位驗證 fallback:當預設腳位不在有效列表中時回退到第一個可用腳位 Added pin validation fallback: falls back to first available pin when default is invalid
- 支援 15 種語言的 i18n 翻譯 Supports i18n translations for 15 languages
- 100% 向後相容:舊版 main.json 的 HuskyLens 積木腳位設定能正確還原 100% backward compatible: old main.json HuskyLens block pin settings restore correctly
- 空 Workspace 防護機制 (Empty Workspace Guard)
- 修復方塊拖曳時意外消失的資料遺失問題 Fixed data loss issue where blocks disappear unexpectedly during drag
- WebView 層:拖曳中不儲存,避免序列化不完整狀態 WebView layer: Skip save during drag to avoid serializing incomplete state
- WebView 層:空工作區狀態不送出,防止覆寫有效資料 WebView layer: Empty workspace state not sent, prevents overwriting valid data
- Extension 層:拒絕空狀態儲存請求,作為第二層防護 Extension layer: Reject empty state save requests as second-line defense
- 覆寫前自動備份:每次儲存前將現有
main.json備份到main.json.bakAuto backup before overwrite: Backs up existingmain.jsontomain.json.bakbefore each save - 新增 7 個單元測試確保防護機制正常運作 Added 7 unit tests to ensure guard mechanism works correctly
- 修復預覽模式開發板配置顯示錯誤 (Fix Preview Mode Board Configuration Display)
- 修復 ESP32 備份檔案預覽時顯示 Arduino 腳位而非 GPIO 腳位的問題 Fixed ESP32 backup preview showing Arduino pins instead of GPIO pins
- 預覽模式現在正確讀取備份檔案中的
board設定並套用對應的腳位配置 Preview mode now correctly readsboardsetting from backup and applies corresponding pin configuration - 新增 ESP32 WiFi/MQTT 積木定義載入,確保預覽時正確顯示這些積木 Added ESP32 WiFi/MQTT block definitions loading to preview for correct display
- 向後相容:舊版備份檔案(無
board欄位)自動使用 Arduino Uno 預設配置 Backward compatible: old backups withoutboardfield default to Arduino Uno configuration
-
Ctrl+S 快速備份快捷鍵 (Ctrl+S Quick Backup Shortcut)
- 在 Blockly 編輯區按下 Ctrl+S(macOS 為 Cmd+S)即可快速備份工作區 Press Ctrl+S (Cmd+S on macOS) in Blockly editor for quick workspace backup
- 備份檔案自動命名為
backup_YYYYMMDD_HHMMSS格式 Backup files auto-named withbackup_YYYYMMDD_HHMMSSformat - 新增 Toast 通知系統,即時顯示備份結果(成功/警告) Added Toast notification system for instant backup feedback (success/warning)
- 支援 ARIA 無障礙屬性(role="status", aria-live="polite") Supports ARIA accessibility attributes (role="status", aria-live="polite")
-
備份節流機制 (Backup Throttle Mechanism)
- 3 秒冷卻時間防止短時間內重複建立備份 3-second cooldown prevents duplicate backups in short succession
- 冷卻期間按下 Ctrl+S 顯示友善提示 Shows friendly message when pressing Ctrl+S during cooldown
-
空工作區保護 (Empty Workspace Protection)
- 工作區為空時跳過備份並顯示提示,避免建立無意義的空備份 Skips backup and shows notification when workspace is empty
- 新增 3 個 i18n 翻譯鍵(15 種語言) Added 3 i18n translation keys (15 languages)
- Toast 通知支援淺色/深色主題 Toast notifications support light/dark themes
- 380 個測試全部通過 380 tests passing
- 計算 PID 積木外觀優化 (Encoder PID Compute Block UI Improvement)
- 將「目標值」輸入改為內嵌模式 (inline),使積木更緊湊 Changed "Target" input to inline mode for a more compact block appearance
- 減少積木佔用空間,提升工作區視覺整潔度 Reduced block footprint for cleaner workspace layout
- 380 個測試全部通過 380 tests passing
- MCP 積木字典完整性 (MCP Block Dictionary Completeness)
- 新增 39 個 Blockly 核心積木到 MCP 字典(從 82 個增加到 121 個) Added 39 Blockly core blocks to MCP dictionary (from 82 to 121 blocks)
- 包含邏輯積木:
controls_if、logic_compare、logic_operation等 7 個 Includes logic blocks:controls_if,logic_compare,logic_operation, etc. (7 blocks) - 包含迴圈積木:
controls_repeat_ext、controls_whileUntil、controls_for等 5 個 Includes loop blocks:controls_repeat_ext,controls_whileUntil,controls_for, etc. (5 blocks) - 包含數學積木:
math_number、math_arithmetic、math_single等 12 個 Includes math blocks:math_number,math_arithmetic,math_single, etc. (12 blocks) - 包含文字積木:
text、text_length、text_isEmpty等 8 個 Includes text blocks:text,text_length,text_isEmpty, etc. (8 blocks) - 包含清單積木:
lists_create_empty、lists_create_with、lists_length等 8 個 Includes list blocks:lists_create_empty,lists_create_with,lists_length, etc. (8 blocks) - 修復 AI 工具無法查詢基本積木用法的問題 Fixed issue where AI tools couldn't query basic block usage
- 380 個測試全部通過 380 tests passing
-
ESP32 WiFi/MQTT 通訊積木 (ESP32 WiFi/MQTT Communication Blocks)
- 新增 7 個 WiFi 積木:連線、斷線、狀態檢查、取得 IP、掃描網路、取得 SSID、取得 RSSI Added 7 WiFi blocks: connect, disconnect, status check, get IP, scan networks, get SSID, get RSSI
- 新增 7 個 MQTT 積木:設定、連線、發布、訂閱、迴圈處理、取得主題、取得訊息 Added 7 MQTT blocks: setup, connect, publish, subscribe, loop, get topic, get message
- 自動引入 PubSubClient@^2.8 函式庫依賴 Auto-includes PubSubClient@^2.8 library dependency
- 支援 ESP32 與 ESP32-C3 (Super Mini) 開發板 Supports ESP32 and ESP32-C3 (Super Mini) boards
- 非 ESP32 板使用時生成警告註解 Generates warning comment when used with non-ESP32 boards
-
文字轉數字積木 (Text to Number Block)
- 新增
text_to_number積木,支援整數與浮點數轉換 Addedtext_to_numberblock supporting integer and float conversion - 使用 Arduino String 類別的
.toInt()與.toFloat()方法 Uses Arduino String class.toInt()and.toFloat()methods - 適用於 MQTT 訊息處理場景 Useful for MQTT message processing scenarios
- 新增
-
通訊類別 (Communication Category)
- 新增「通訊」工具箱類別,整合 WiFi 與 MQTT 積木 Added "Communication" toolbox category integrating WiFi and MQTT blocks
- 包含完整 shadow blocks 設定 Includes complete shadow blocks configuration
-
積木刪除視角跳轉問題 (Block Delete Viewport Jump Fix)
- 修復刪除積木時視角自動跳到原點的問題 Fixed viewport automatically jumping to origin when deleting blocks
- 實作 50ms debounce 機制處理批次刪除 Implemented 50ms debounce mechanism for batch deletions
- 使用
workspace.scroll()恢復視角座標 Usesworkspace.scroll()to restore viewport coordinates
-
text_join 型態錯誤 (text_join Type Error Fix)
- 修復
text_join積木連接數字時生成指標運算的錯誤 Fixedtext_joinblock generating pointer arithmetic when joining numbers - 所有輸入項目現在都正確包裝為
String()All input items are now correctly wrapped inString() - 更新 ORDER 優先級為
ORDER_ADDITIONUpdated ORDER priority toORDER_ADDITION
- 修復
- 15 語言完整 i18n 支援(約 50 個新翻譯鍵值) Full 15-language i18n support (~50 new translation keys)
- 380 個測試全部通過 380 tests passing
- PlatformIO 誤觸發問題 (PlatformIO False Trigger Fix)
- 修復編輯積木時誤觸發「開發板已切換」訊息的問題 Fixed false "board changed" message trigger when editing blocks
- 修復每次編輯都觸發 PlatformIO 重新檢查專案的問題 Fixed PlatformIO project reconfiguration on every block edit
- 新增
loadWorkspace時的開發板比較邏輯,避免無變更時發送updateBoardAdded board comparison inloadWorkspaceto prevent unnecessaryupdateBoardmessages - 新增
platformio.ini內容比較,只有實際變更時才覆寫檔案 Addedplatformio.inicontent comparison, only write when actually changed - 優化
syncPlatformIOSettings函數,比較lib_deps、build_flags、lib_ldf_mode新舊值 OptimizedsyncPlatformIOSettingsto compare existing vs new values forlib_deps,build_flags,lib_ldf_mode
- 380 個測試全部通過 380 tests passing
-
MCP Server 整合 (MCP Server Integration)
- 全新 MCP (Model Context Protocol) 伺服器,讓 AI 助手能理解並操作 Blockly 積木系統 New MCP (Model Context Protocol) server enabling AI assistants to understand and interact with Blockly block system
- 積木字典系統,包含 111 個積木定義與 15 語言 i18n 支援 Block dictionary system with 111 block definitions and 15-language i18n support
- VSCode MCP Provider 自動註冊(需 VSCode 1.105.0+) VSCode MCP Provider auto-registration (requires VSCode 1.105.0+)
- 8 個 AI 工具:
get_block_usage、search_blocks、list_blocks_by_category、get_platform_config、get_board_pins、get_generated_code、get_workspace_state、refresh_editor8 AI tools:get_block_usage,search_blocks,list_blocks_by_category,get_platform_config,get_board_pins,get_generated_code,get_workspace_state,refresh_editor
-
PID 控制器增強 (PID Controller Enhancement)
- 為
encoder_pid_setup積木新增 MODE 欄位,支援位置模式與速度模式 Added MODE field toencoder_pid_setupblock, supporting Position and Speed modes - 新增
encoder_pid_reset積木,用於重設 PID 控制器狀態 Addedencoder_pid_resetblock for resetting PID controller state - 15 語言翻譯更新 15-language translation updates
- 為
-
For 迴圈遞減支援 (For Loop Decrement Support)
controls_for積木現可自動偵測並生成遞減迴圈controls_forblock now auto-detects and generates decrement loops- 範例:從 10 到 1 會自動生成
for (int i = 10; i >= 1; i -= 1)Example: from 10 to 1 auto-generatesfor (int i = 10; i >= 1; i -= 1)
-
編輯器效能優化 (Editor Performance Optimization)
- 修復拖動積木時的延遲問題,使用
BLOCK_DRAG事件追蹤拖動狀態 Fixed block dragging lag usingBLOCK_DRAGevent for drag state tracking - 修復拖動後視圖位置重設問題,透過 FileWatcher 內部更新標記避免重載 Fixed view position reset after drag via FileWatcher internal update flag
- 新增 150ms 防抖動機制優化程式碼更新 Added 150ms debounce for code update optimization
- 修復拖動積木時的延遲問題,使用
-
字典修正 (Dictionary Fixes)
- 修正
threshold_function_setup缺少 NAME 和 PIN 欄位定義 Fixed missing NAME and PIN field definitions inthreshold_function_setup - 新增閾值函式使用說明(函式名稱可自訂) Added usage notes for threshold functions (function name customizable)
- 修正
- 完整規格文件
specs/015-mcp-server-integration/Complete specification inspecs/015-mcp-server-integration/ - 新增 MCP 測試套件(blockDictionary、blockQuery、platformConfig、workspaceOps) Added MCP test suite (blockDictionary, blockQuery, platformConfig, workspaceOps)
- Webpack 配置新增 MCP Server 打包 Webpack config added MCP Server bundling
- 380 個測試通過 380 tests passing
- 所有 14 個語言的 i18n 驗證通過 All 14 languages passed i18n validation
-
Encoder 積木 JSON 序列化修復 (Encoder Block JSON Serialization Fix)
- 為 5 個 encoder 積木新增
saveExtraState/loadExtraStateJSON hooks AddedsaveExtraState/loadExtraStateJSON hooks for 5 encoder blocks - 修復 Blockly 12.x 中積木連接關係在保存/載入後遺失的問題 Fixed block connection loss after save/load in Blockly 12.x
- 影響積木:
encoder_setup、encoder_read、encoder_reset、encoder_pid_setup、encoder_pid_computeAffected blocks:encoder_setup,encoder_read,encoder_reset,encoder_pid_setup,encoder_pid_compute
- 為 5 個 encoder 積木新增
-
裸露表達式防護機制 (Naked Value Expression Protection)
- 新增
arduinoGenerator.scrubNakedValue方法 AddedarduinoGenerator.scrubNakedValuemethod - 將獨立放置的 value block 轉為註釋,避免 Arduino C++ 編譯錯誤 Converts standalone value blocks to comments, preventing Arduino C++ compilation errors
- 例如:
myEncoder.getCount();→// 未連接的表達式: myEncoder.getCount()Example:myEncoder.getCount();→// 未連接的表達式: myEncoder.getCount()
- 新增
-
FieldDropdown 箭頭函數參考問題 (FieldDropdown Arrow Function Reference Issue)
- 修復 7 處
this.sourceBlock_在箭頭函數中為 undefined 的問題 Fixed 7 instances ofthis.sourceBlock_being undefined in arrow functions - 改用
this.workspace || Blockly.getMainWorkspace()取得工作區 Changed to usethis.workspace || Blockly.getMainWorkspace()for workspace access - 影響檔案:
motors.js(6 處)、arduino.js(1 處) Affected files:motors.js(6 places),arduino.js(1 place)
- 修復 7 處
-
ORDER_FUNCTION_CALL 常數遺漏 (ORDER_FUNCTION_CALL Constant Missing)
- 補充
arduinoGenerator.ORDER_FUNCTION_CALL常數定義 AddedarduinoGenerator.ORDER_FUNCTION_CALLconstant definition - 解決 "Expecting valid order from value block" 錯誤 Fixed "Expecting valid order from value block" error
- 補充
- 新增完整規格文件
specs/014-block-serialization-fix/Added complete specification documents inspecs/014-block-serialization-fix/
- 手動測試:encoder_read 連接 text_print 後保存/載入,連接關係正確保持 Manual test: encoder_read connected to text_print saves/loads with connection preserved
- 手動測試:程式碼生成正確產生
Serial.println(myEncoder.getCount());Manual test: Code generation correctly producesSerial.println(myEncoder.getCount()); - 手動測試:獨立放置的 encoder_read 生成註釋而非裸露表達式 Manual test: Standalone encoder_read generates comment instead of naked expression
- 視覺感測器積木正式化 (Vision Sensor Blocks Graduation)
- 將 8 個已測試完成的 Pixetto 與 HUSKYLENS 積木從實驗階段移除 Graduated 8 tested Pixetto and HUSKYLENS blocks from experimental status
- Pixetto 正式積木:初始化、偵測到物體、取得偵測類型 ID、獲取偵測物體座標 Pixetto graduated blocks: init, is_detected, get_type_id, get_position
- HUSKYLENS 正式積木:UART 初始化、請求辨識結果、偵測到的方塊數量、取得方塊資訊 HUSKYLENS graduated blocks: init_uart, request, count_blocks, get_block_info
- 其餘視覺感測器積木維持實驗階段標記 Remaining vision sensor blocks retain experimental status
- HuskyLens 動態腳位提示 (HuskyLens Dynamic Pin Hints)
- I2C 初始化區塊 tooltip 根據開發板顯示對應腳位資訊
I2C initialization block tooltip displays board-specific pin information
- Uno/Nano: A4(SDA)/A5(SCL)
- Mega: D20(SDA)/D21(SCL)
- ESP32: GPIO21(SDA)/GPIO22(SCL)
- Super Mini: GPIO8(SDA)/GPIO9(SCL)
- UART 初始化區塊 tooltip 根據開發板顯示建議腳位
UART initialization block tooltip displays recommended pins per board
- AVR 系列: 任意數位腳位 (Any digital pin)
- ESP32: GPIO16(RX2)/GPIO17(TX2)
- Super Mini: GPIO20(RX)/GPIO21(TX)
- 使用 Blockly 12.x 動態函數 tooltip 機制,切換開發板後自動更新 Uses Blockly 12.x dynamic function tooltip mechanism, auto-updates on board change
- I2C 初始化區塊 tooltip 根據開發板顯示對應腳位資訊
I2C initialization block tooltip displays board-specific pin information
- 更新 15 種語言翻譯以支援腳位提示功能
Updated translations for 15 languages to support pin hint feature
- 新增 i18n 鍵值:
HUSKYLENS_I2C_PIN_HINT、HUSKYLENS_UART_PIN_HINT、HUSKYLENS_UART_ANY_DIGITALAdded i18n keys:HUSKYLENS_I2C_PIN_HINT,HUSKYLENS_UART_PIN_HINT,HUSKYLENS_UART_ANY_DIGITAL
- 新增 i18n 鍵值:
- Vision Sensors 工具箱間距一致性 (Vision Sensors Toolbox Spacing Consistency)
- 移除
vision-sensors.json中 3 個多餘的sep分隔符 Removed 3 redundantsepseparators invision-sensors.json - 保留 Pixetto 與 HuskyLens 群組之間的分隔 Preserved separator between Pixetto and HuskyLens groups
- 工具箱間距現與其他類別(Arduino、感測器、馬達)一致 Toolbox spacing now consistent with other categories (Arduino, Sensors, Motors)
- 移除
npm run validate:i18n: 14/14 語言 PASS,0 錯誤npm run validate:i18n: 14/14 languages PASS, 0 errorsnpm run lint: 無錯誤npm run lint: No errorsnpm run compile: 成功(4.2 秒)npm run compile: Successful (4.2 seconds)
- ESP32 Pixetto 程式碼生成修正 (ESP32 Pixetto Code Generation Fix)
- 修正 Pixetto 智慧鏡頭積木在 ESP32 開發板上生成不必要的 SoftwareSerial 引用 Fixed Pixetto vision sensor block generating unnecessary SoftwareSerial references on ESP32 boards
- ESP32 不再添加
#include <SoftwareSerial.h>和 AVR 專用 build_flags ESP32 no longer adds#include <SoftwareSerial.h>and AVR-specific build_flags - AVR 開發板(UNO/Nano/Mega)維持現有行為 AVR boards (UNO/Nano/Mega) maintain existing behavior
- 參照 HuskyLens 實作模式,使用
window.currentBoard.includes('esp32')判斷開發板類型 Following HuskyLens implementation pattern, usingwindow.currentBoard.includes('esp32')for board type detection
- 4/4 手動測試通過(100%):ESP32、Arduino UNO、開發板切換、Super Mini 驗證 4/4 manual tests passing (100%): ESP32, Arduino UNO, board switching, Super Mini verification
- 測試框架改進 (Test Framework Improvements)
- 修復 WebViewManager 測試中的主題設定讀取問題,確保測試環境正確使用 mock 檔案系統 Fixed theme settings reading issue in WebViewManager tests, ensuring test environment correctly uses mock file system
- SettingsManager 與 WebViewManager 現在支援依賴注入,提升測試可靠性 SettingsManager and WebViewManager now support dependency injection, improving test reliability
- 所有 285 個單元測試穩定通過 (100%) All 285 unit tests passing stably (100%)
- ESP32 PWM 頻率與解析度設定 (ESP32 PWM Frequency and Resolution Configuration)
ESP32 PWM Frequency and Resolution Configuration
- 新增
esp32_pwm_setup積木,允許使用者自訂 PWM 頻率(1-80000 Hz)和解析度(8-16 bit) Addedesp32_pwm_setupblock for custom PWM frequency (1-80000 Hz) and resolution (8-16 bit) configuration - 支援馬達驅動晶片高頻 PWM 需求(20-75KHz,適用於 AT8833CR、DRV8833 等晶片) Support for high-frequency PWM requirements of motor driver chips (20-75KHz, compatible with AT8833CR, DRV8833, etc.)
- 自動驗證與調整機制:符合 ESP32 硬體限制(頻率 × 2^解析度 ≤ 80,000,000) Automatic validation and adjustment: complies with ESP32 hardware limits (frequency × 2^resolution ≤ 80,000,000)
- 向後相容:現有專案無需 PWM 設定積木即可使用預設值(75000Hz / 8bit) Backward compatible: existing projects work with default values (75000Hz / 8bit) without PWM setup block
- 與 ESP32Servo 伺服馬達積木獨立運作,互不干擾 Independent operation with ESP32Servo blocks, no interference
- 新增
- 更新 15 種語言翻譯以支援 ESP32 PWM 功能(包含繁體中文、英文、德文、法文、西班牙文、義大利文、日文、韓文、葡萄牙文、波蘭文、土耳其文、捷克文、俄文、匈牙利文、保加利亞文) Updated translations for 15 languages to support ESP32 PWM features (including Traditional Chinese, English, German, French, Spanish, Italian, Japanese, Korean, Portuguese, Polish, Turkish, Czech, Russian, Hungarian, Bulgarian)
- 新增 18 個 PWM 驗證單元測試(100% 通過率) Added 18 PWM validation unit tests (100% pass rate)
- 新增 15 個程式碼生成文件化測試 Added 15 code generation documentation tests
- 284/285 單元測試通過(99.6%) 284/285 unit tests passing (99.6%)
- 22/22 手動測試通過(100%) 22/22 manual tests passing (100%)
- 5/5 硬體測試通過(100%) 5/5 hardware tests passing (100%)
- 移除多餘的臨時檔案和升級記錄 Removed redundant temporary files and upgrade records
- 更新 .gitignore 以排除開發過程產物 Updated .gitignore to exclude development artifacts
-
國際化品質保證系統 (Internationalization Quality Assurance System) Internationalization Quality Assurance System
- 建立完整的 i18n 品質保證系統,採用自動化優先策略 Established comprehensive i18n QA system with automation-first strategy
- 100% 消除高嚴重性誤報 (61 → 0 個問題) 100% high-severity false positive elimination (61 → 0 issues)
- 15 種語言平均翻譯覆蓋率達 98.94% 98.94% average translation coverage across 15 languages
- 33 個單元測試,100% 通過率 33 unit tests with 100% pass rate
- Whitelist 規則系統 v1.1.0 (16 條規則,效能 <100ms) Whitelist rule system v1.1.0 (16 rules, <100ms performance)
- CI/CD 自動化品質檢查閘門 Zero validation errors with automated CI/CD quality gates
-
翻譯審計白名單系統 (Translation Audit Whitelist System) Translation Audit Whitelist System
- 新增 audit-whitelist.json 包含 8 條過濾規則 Added audit-whitelist.json with 8 filtering rules
- 實作 whitelist-checker.js 用於誤報過濾 Implemented whitelist-checker.js for false positive filtering
- 整合白名單至 audit-translations.js Integrated whitelist into audit-translations.js
- 生成包含白名單統計的審計報告 Generated audit report with whitelist statistics
- 高嚴重性問題減少 68.9% (61 → 19) Reduced high-severity issues by 68.9% (61 → 19)
- 過濾 149 個誤報 (佔總問題的 8.8%) Filtered 149 false positives (8.8% of total issues)
-
Speckit 自動化增強 (Speckit Automation Enhancement) Speckit Automation Enhancement
- 擴充 create-new-feature.ps1 功能 Extended create-new-feature.ps1 functionality
- 改進 update-agent-context.ps1 錯誤處理 Improved update-agent-context.ps1 error handling
- 新增多個 Speckit prompt 範本以改善開發流程 Added multiple Speckit prompt templates to improve development workflow
- 安全性修復 (Security Fix)
Security Fix
- 修復 blocklyPreview 中的 XSS 漏洞 Fixed XSS vulnerability in blocklyPreview
- 改用 textContent 設定文字並安全地添加 badge 元素 Used textContent for text setting and safely added badge elements
-
模板重構 (Template Refactoring) Template Refactoring
- 簡化 plan-template.md 的技術上下文段落 Simplified technical context section in plan-template.md
- 優化 spec-template.md 使用者故事優先級結構 Optimized user story priority structure in spec-template.md
- 重組 tasks-template.md 使其更符合獨立測試原則 Reorganized tasks-template.md to align with independent testing principles
-
憲法更新 (Constitution Update) Constitution Update
- 更新 constitution.md 至 v1.4.0 Updated constitution.md to v1.4.0
- 新增完整 Conventional Commits 1.0.0 規範 Added full Conventional Commits 1.0.0 specification
- 新增 11 種 commit type 定義與繁體中文說明 Added 11 commit type definitions with Traditional Chinese descriptions
- 新增 breaking change 標記規範 (!) Added breaking change marker specification (!)
- 新增 git tag 觸發 CI/CD 警告 Added git tag triggering CI/CD warning
-
工作區設定 (Workspace Settings) Workspace Settings
- 更新 VSCode 工作區設定並調整編輯器配置 Updated VSCode workspace settings and adjusted editor configuration
- 新增 Feature 010 完整規格文件 (Project Safety Guard)
Added Feature 010 complete specification documents (Project Safety Guard)
- 17 個完整文件,涵蓋完整開發生命週期 17 complete documents covering full development lifecycle
- 包含規格、研究、資料模型、計畫、任務清單、快速入門等 Includes specifications, research, data models, plans, task lists, quickstart guides
- 更新所有 Speckit 命令提示詞檔案
Updated all Speckit command prompt files
- 同步格式化與內容改進 Synchronized formatting and content improvements
- 更新命令執行流程說明 Updated command execution flow descriptions
- Pure function 架構用於 whitelist-checker.js Pure function architecture for whitelist-checker.js
- JSON 驅動的規則配置 (非技術編輯者友好) JSON-driven rule configuration (non-technical editor friendly)
- GitHub Actions CI/CD 整合 GitHub Actions CI/CD integration
- 完成 6/8 個開發階段 (Phase 0-4, 7-8) Completed 6/8 development phases (Phase 0-4, 7-8)
- 測試通過率: 249/250 (99.6%) Test pass rate: 249/250 (99.6%)
相關 PR: #17
相關 Issue: #16
- 專案安全防護機制 (Project Safety Guard)
Project Safety Guard Feature
- 在非 Blockly 專案中開啟編輯器時顯示警告對話框 Shows warning dialog when opening editor in non-Blockly projects
- 智慧型專案類型識別 (支援 Node.js, Python, Java, .NET, Go 等 6 種類型) Smart project type detection (supports 6 types: Node.js, Python, Java, .NET, Go, etc.)
- 三種使用者選擇: 繼續 / 取消 / 不再提醒 Three user choices: Continue / Cancel / Don't remind again
- 工作區級別的偏好設定記憶 Workspace-level preference memory
- 完整多語言支援 (15 種語言) Full multilingual support (15 languages)
- 修正安全警告對話框註解描述不準確的問題 Fixed inaccurate comment description in safety warning dialog
- 新增
WorkspaceValidator服務類別 (292 行) Added WorkspaceValidator service class (292 lines) - 新增
ProjectTypeDetector純函式模組 (109 行) Added ProjectTypeDetector pure function module (109 lines) - 新增 54 個單元測試與整合測試 (涵蓋率 100%) Added 54 unit and integration tests (100% coverage)
- 改進測試環境偵測邏輯,支援 NODE_ENV 環境變數 Improved test environment detection logic with NODE_ENV support
- 使用
path.isAbsolute()替代手動路徑驗證,支援 UNC 路徑 Replaced manual path validation withpath.isAbsolute()for UNC path support - JSDoc 範例路徑改用跨平台 POSIX 格式 Updated JSDoc example paths to cross-platform POSIX format
- Bundle 大小: 152 KiB (+25 KiB) Bundle size: 152 KiB (+25 KiB)
- 測試套件: 249/250 通過 (99.6%) Test suite: 249/250 passing (99.6%)
- 新增 ES2023 語法驗證測試套件 (5 個測試)
Added ES2023 syntax validation test suite (5 tests)
- toSorted() - 不可變陣列排序
- findLast() - 從末尾查找
- toReversed() - 不可變陣列反轉
- with() - 不可變元素替換
- findLastIndex() - 從末尾查找索引
- 升級 @typescript-eslint/eslint-plugin 從 8.46.1 至 8.46.2 Upgraded @typescript-eslint/eslint-plugin from 8.46.1 to 8.46.2
- 升級 webpack-cli 從 5.1.4 至 6.0.1 (MAJOR 版本)
Upgraded webpack-cli from 5.1.4 to 6.0.1 (MAJOR version)
- 包含 @webpack-cli/configtest 3.0.1, @webpack-cli/info 3.0.1, @webpack-cli/serve 3.0.1
- 無需修改配置檔案或腳本
- 更新 ESLint ecmaVersion 設定從 2022 至 2023 Updated ESLint ecmaVersion configuration from 2022 to 2023
- 效能改善: 編譯時間改善 7% (5775ms → 5368ms) Performance Improvement: 7% faster compilation time (5775ms → 5368ms)
- 測試覆蓋率提升: 測試數量從 190 增加至 195 Test Coverage Increased: Test count increased from 190 to 195
- 零破壞性變更: 所有升級維持完全向後相容 Zero Breaking Changes: All upgrades maintain full backward compatibility
- Node.js 需求: webpack-cli 6.x 需要 Node.js 18.12+ (專案使用 22.16.0) Node.js Requirement: webpack-cli 6.x requires Node.js 18.12+ (project uses 22.16.0)
- 重新發布版本,修正標籤發布順序問題 Re-release version to fix tag publishing order issue
- 內容與 0.39.0 完全相同,僅修正發布流程 Content identical to 0.39.0, only fixing release process
- 升級 Blockly 從 11.2.2 至 12.3.1 Upgraded Blockly from 11.2.2 to 12.3.1
- 升級 @blockly/theme-modern 從 6.0.12 至 7.0.1 Upgraded @blockly/theme-modern from 6.0.12 to 7.0.1
- 完全向後相容: 零破壞性變更,所有現有工作區和積木定義無需修改 Fully Backward Compatible: Zero breaking changes, all existing workspaces and block definitions work without modification
- 效能改善: 編譯時間改善 13.1% (3.999s vs 4.6s) Performance Improvement: 13.1% faster compilation time (3.999s vs 4.6s)
- API 相容性: 100% API 相容性驗證通過
API Compatibility: 100% API compatibility verified
- Blockly.inject() - 無變更
- Blockly.serialization.* - 無變更
- Blockly.Events.* - 無變更
- Blockly.Theme.defineTheme() - 無變更
- 測試覆蓋率: 維持 87.21% 測試覆蓋率,189/190 測試通過 Test Coverage: Maintained 87.21% test coverage, 189/190 tests passing
- Blockly 12.x 新功能:
- 改善的渲染效能和記憶體使用
- 增強的事件系統內部最佳化
- 更清晰的積木邊框 (@blockly/theme-modern 7.x "darker borders")
- TypeScript 內建定義檔 (無需 @types/blockly)
- 修正 package.json 中 engines.vscode 版本要求 (從 ^1.96.0 更新至 ^1.105.0) Fixed engines.vscode version requirement in package.json (updated from ^1.96.0 to ^1.105.0)
- 修正 GitHub Actions 工作流程中的 Node.js 版本不匹配問題 Fixed Node.js version mismatch in GitHub Actions workflows
- 升級所有 CI/CD 流程使用 Node.js 22 以匹配 @types/node@^22.0.0 Upgraded all CI/CD pipelines to use Node.js 22 to match @types/node@^22.0.0
- 此修正確保 VSCode Marketplace 發布流程正常運作 This fix ensures VSCode Marketplace publishing workflow operates correctly
- 所有 GitHub Actions workflows 現在使用一致的 Node.js 版本 All GitHub Actions workflows now use consistent Node.js version
- 升級 @types/vscode 從 1.96.0 至 1.105.0 Upgraded @types/vscode from 1.96.0 to 1.105.0
- 升級 @types/node 從 20.19.22 至 22.18.12 以對齊 Node.js 22.16.0 runtime Upgraded @types/node from 20.19.22 to 22.18.12 to align with Node.js 22.16.0 runtime
- 更新 TypeScript target 從 ES2022 至 ES2023 Updated TypeScript target from ES2022 to ES2023
- 所有變更向後相容,無破壞性變更 All changes are backward compatible with no breaking changes
- 190 測試全數通過,覆蓋率維持 87.21% All 190 tests passing, coverage maintained at 87.21%
- 建置產物大小變化: 0% (130,506 bytes, 與基準完全一致) Build artifact size change: 0% (130,506 bytes, identical to baseline)
- 升級開發依賴套件 (Phase 2 - 次要版本更新)
Upgraded development dependencies (Phase 2 - Minor updates)
- @blockly/theme-modern: 6.0.10 → 6.0.12 (主題系統 bug 修復) @blockly/theme-modern: 6.0.10 → 6.0.12 (theme system bug fixes)
- @types/node: 20.17.12 → 20.19.22 (Node.js 20.x 型別定義改進) @types/node: 20.17.12 → 20.19.22 (Node.js 20.x type definition improvements)
- 升級開發依賴套件至最新穩定版本 (Phase 1 - 安全更新)
Upgraded development dependencies to latest stable versions (Phase 1 - Safe Updates)
- TypeScript: 5.7.2 → 5.9.3 (效能提升 11%, 編譯時間 -25%) TypeScript: 5.7.2 → 5.9.3 (11% performance improvement, -25% compilation time)
- @typescript-eslint/eslint-plugin: 8.19.1 → 8.46.1 (27 個 bug 修復) @typescript-eslint/eslint-plugin: 8.19.1 → 8.46.1 (27 bug fixes)
- @typescript-eslint/parser: 8.19.1 → 8.46.1
- @vscode/test-electron: 2.4.1 → 2.5.2
- @vscode/test-cli: 0.0.10 → 0.0.12 (測試執行時間 -34%) @vscode/test-cli: 0.0.10 → 0.0.12 (-34% test execution time)
- sinon: 20.0.0 → 21.0.0 (完全向後相容) sinon: 20.0.0 → 21.0.0 (fully backward compatible)
- webpack: 5.97.1 → 5.102.1 (ES modules 優化, 建置時間 -25%) webpack: 5.97.1 → 5.102.1 (ES modules optimizations, -25% build time)
- ts-loader: 9.5.1 → 9.5.4
- eslint: 9.32.0 → 9.38.0 (新規則和 bug 修復) eslint: 9.32.0 → 9.38.0 (new rules and bug fixes)
- 開發工作流程效能大幅改善 Significant development workflow performance improvements
- 編譯時間減少 25.22% (6.1s → 4.6s) Compilation time reduced by 25.22% (6.1s → 4.6s)
- 測試執行時間減少 33.81% (29.6s → 19.6s) Test execution time reduced by 33.81% (29.6s → 19.6s)
- Lint 時間減少 16.44% (3.7s → 3.1s) Lint duration reduced by 16.44% (3.7s → 3.1s)
- Bundle 大小維持穩定 (130,506 bytes, 0% 變化) Bundle size maintained stable (130,506 bytes, 0% change)
- 新增 63 個高品質測試,大幅提升測試覆蓋率
Added 63 high-quality tests, significantly improved test coverage
- SettingsManager 進階測試 (20 個): syncLibraryDeps, syncPlatformIOSettings, 錯誤處理 SettingsManager advanced tests (20 tests): syncLibraryDeps, syncPlatformIOSettings, error handling
- MessageHandler 錯誤處理測試 (25 個): catch blocks, 驗證邏輯, 邊界案例 MessageHandler error handling tests (25 tests): catch blocks, validation logic, edge cases
- WebViewManager 進階測試 (8 個): 臨時檔案清理, 錯誤處理, HTML 內容生成 WebViewManager advanced tests (8 tests): temp file cleanup, error handling, HTML content generation
- Extension.ts 錯誤處理測試 (10 個): previewBackup, toggleTheme, openBlocklyEdit 錯誤場景 Extension.ts error handling tests (10 tests): previewBackup, toggleTheme, openBlocklyEdit error scenarios
- 新增測試工具模組 (Test Helpers): 隔離服務建立、Mock 驗證函式 Added test helper modules: isolated service creation, mock validation functions
- 新增完整專案文件: COMPLETION-REPORT.md (測試覆蓋率優化專案完成報告) Added comprehensive project documentation: COMPLETION-REPORT.md (test coverage improvement project completion report)
- 修正 3 個測試失敗問題: API 方法錯誤、command 名稱不符、非同步回調處理 Fixed 3 test failures: API method errors, command name mismatches, async callback handling
- 修正 5 個 TypeScript 編譯錯誤: 型別不匹配、私有方法存取、檔案 metadata 格式 Fixed 5 TypeScript compilation errors: type mismatches, private method access, file metadata format
- 測試覆蓋率從 83.09% 提升至 87.21% (+4.12%)
Test coverage improved from 83.09% to 87.21% (+4.12%)
- Statement coverage: 87.21% (3330/3818 lines)
- Branch coverage: 83.78% (429/512 branches, +12.42%)
- Function coverage: 89.68% (113/126 functions, +7.94%)
- 核心服務測試覆蓋率達 94.08%: FileService 97.85%, SettingsManager 92.65%, LocaleService 90.67% Core services test coverage reached 94.08%: FileService 97.85%, SettingsManager 92.65%, LocaleService 90.67%
- 測試執行時間優化至 <3 秒 (從 ~5 秒優化 40%) Test execution time optimized to <3 seconds (40% improvement from ~5 seconds)
- 測試數量從 127 個增加至 190 個 (+63 tests, +49.6%) Test count increased from 127 to 190 (+63 tests, +49.6%)
- 重構測試架構: 統一 Mock 管理策略, 改善測試可維護性 Refactored test architecture: unified mock management strategy, improved test maintainability
- 優化測試 setup/teardown 模式: 更清晰的測試結構 Optimized test setup/teardown patterns: clearer test structure
- 新增 HuskyLens AI 視覺感測器完整支援 (11 個積木)
Added complete HuskyLens AI Vision Sensor support (11 blocks)
- 初始化積木:I2C (0x32)、UART (支援 Arduino AVR SoftwareSerial 與 ESP32 HardwareSerial) Initialization blocks: I2C (0x32), UART (supports Arduino AVR SoftwareSerial and ESP32 HardwareSerial)
- 演算法設定:7 種 AI 辨識演算法 (人臉辨識、物體追蹤、物體辨識、線條追蹤、色塊辨識、標籤辨識、物體分類) Algorithm configuration: 7 AI recognition algorithms (face recognition, object tracking, object recognition, line tracking, color recognition, tag recognition, object classification)
- 資料查詢:請求資料、檢查學習狀態、計數方塊/箭頭、取得座標/尺寸/ID 資訊 Data query: request data, check learning status, count blocks/arrows, get coordinates/dimensions/ID information
- 學習功能:學習目標 (指定 ID)、忘記學習內容 Learning functions: learn target (specify ID), forget learned content
- 新增 HuskyLens 積木 15 種語言國際化翻譯 (645 個翻譯單元) Added HuskyLens blocks i18n support for 15 languages (645 translation units)
- 新增 8 份完整驗證報告文件 (積木定義、程式碼生成、國際化、錯誤處理、註冊機制、邊界案例、手動測試、完整驗證流程) Added 8 comprehensive validation report documents (block definition, code generation, i18n, error handling, registration mechanism, edge cases, manual testing, complete validation workflow)
- 修正 ESP32 開發板 UART 初始化問題:使用 HardwareSerial 取代不支援的 SoftwareSerial Fixed ESP32 board UART initialization: use HardwareSerial instead of unsupported SoftwareSerial
- 修正 HuskyLens 方塊/箭頭資訊取得積木的 ID 屬性:從小寫
.id改為大寫.ID以符合 HuskyLens API Fixed ID property in HuskyLens block/arrow info blocks: changed from lowercase.idto uppercase.IDto match HuskyLens API - 修正多個 HuskyLens 積木同時使用時的重複宣告問題:實作去重邏輯 (includes, variables, lib_deps, setupCode) Fixed duplicate declarations when using multiple HuskyLens blocks: implemented deduplication logic (includes, variables, lib_deps, setupCode)
- 修正測試框架相依性注入問題:提升測試通過率從 41 個到 67 個 (98.5%) Fixed test framework dependency injection issues: improved test pass rate from 41 to 67 (98.5%)
- 更新 FileService:改進建構函式參數類型,支援更靈活的路徑解析 Updated FileService: improved constructor parameter types for more flexible path resolution
- 更新 LocaleService:優化語言檔案載入邏輯 Updated LocaleService: optimized language file loading logic
- 更新 logging 服務:增強日誌輸出功能 Updated logging service: enhanced logging output functionality
- 更新測試輔助工具 (mocks.ts):改進 mock 函式實作,支援依賴注入測試模式 Updated test helpers (mocks.ts): improved mock function implementation to support dependency injection test patterns
- 完成 HuskyLens 積木完整驗證 (78/105 任務,100% 通過率)
Completed comprehensive HuskyLens blocks validation (78/105 tasks, 100% pass rate)
- 自動化驗證:71/71 任務通過 Automated validation: 71/71 tasks passed
- 手動測試:7/7 任務通過 (UI、國際化、程式碼生成) Manual testing: 7/7 tasks passed (UI, i18n, code generation)
- 完整驗證流程:79/79 檢查項目通過 Complete validation workflow: 79/79 checks passed
- PlatformIO 編譯測試:4 種開發板全部通過 (Arduino Uno/Nano/Mega、ESP32) PlatformIO compilation tests: all 4 board types passed (Arduino Uno/Nano/Mega, ESP32)
- 單元測試:提升通過率從 77.4% 到 98.5% (67/68 測試通過) Unit tests: improved pass rate from 77.4% to 98.5% (67/68 tests passed)
- 品質評分:5/5 星,零缺陷 Quality score: 5/5 stars, zero defects
- 新增 specs/004-test-coverage-improvement/TEST-FRAMEWORK-FIX-PROGRESS.md:記錄測試框架修復過程 Added specs/004-test-coverage-improvement/TEST-FRAMEWORK-FIX-PROGRESS.md: documents test framework fix process
- 更新 specs/003-huskylens-blocks-validation/tasks.md:完整任務追蹤與狀態記錄 Updated specs/003-huskylens-blocks-validation/tasks.md: complete task tracking and status records
- 新增國際化品質保證系統:4 個自動化工具(驗證、統計、偵測、稽核) Added internationalization quality assurance system: 4 automation tools (validate, stats, detect, audit)
- 新增 228 個翻譯鍵值,涵蓋 15 種語言(平均覆蓋率 98.94%) Added 228 translation keys across 15 languages (98.94% average coverage)
- 新增 CI/CD 自動化驗證流程 (
.github/workflows/i18n-validation.yml) Added CI/CD automated validation workflow (.github/workflows/i18n-validation.yml) - 新增 5 個語言風格指南 (日文、韓文、德文、西班牙文、繁體中文) Added 5 language style guidelines (Japanese, Korean, German, Spanish, Traditional Chinese)
- 新增專案術語詞彙表 (
localization-glossary.json),895 個術語條目 Added project terminology glossary (localization-glossary.json) with 895 term entries - 新增本地化 PR 模板 (
.github/PULL_REQUEST_TEMPLATE/localization.md) Added localization PR template (.github/PULL_REQUEST_TEMPLATE/localization.md) - 新增貢獻者指南 (
CONTRIBUTING.md),包含完整的本地化工作流程 Added contributor guide (CONTRIBUTING.md) with complete localization workflow
- 修正 15 種語言的缺失翻譯問題(bg, cs, de, es, fr, hu, it, ja, ko, pl, pt-br, ru, tr, zh-hant, en) Fixed missing translations in 15 languages (bg, cs, de, es, fr, hu, it, ja, ko, pl, pt-br, ru, tr, zh-hant, en)
- 修正日文、韓文、德文中的直譯和文化不適配問題 Fixed literal translations and cultural mismatches in Japanese, Korean, and German
- 修正術語一致性問題(如 sensor/感測器、motor/馬達 等) Fixed terminology consistency issues (e.g., sensor/感測器, motor/馬達)
- 更新 README.md 國際化章節,新增品質指標和語言覆蓋率詳情 Updated README.md internationalization section with quality metrics and language coverage details
- 更新所有語言檔案至最新結構(bg, cs, de, es, fr, hu, it, ja, ko, pl, pt-br, ru, tr, zh-hant, en) Updated all language files to latest structure (bg, cs, de, es, fr, hu, it, ja, ko, pl, pt-br, ru, tr, zh-hant, en)
- 建立 4 層驗證機制(JSON Schema → 語法 → 模式 → 稽核) Established 4-layer validation mechanism (JSON Schema → Syntax → Pattern → Audit)
- 整合 10+ npm 腳本用於 i18n 工作流程 Integrated 10+ npm scripts for i18n workflow
- 建立基準稽核報告系統用於長期品質追蹤 Established baseline audit report system for long-term quality tracking
- 新增完整的 i18n 專案規格文件 (
specs/002-i18n-localization-review/) Added complete i18n project specification documentation (specs/002-i18n-localization-review/) - 新增快速入門指南 (
quickstart.md),協助貢獻者參與本地化工作 Added quickstart guide (quickstart.md) to help contributors participate in localization - 新增實作計畫和任務追蹤文件 (
plan.md,tasks.md) Added implementation plan and task tracking documents (plan.md,tasks.md)
- 新增 FileService 雙實例模式:
extensionFileService用於擴充套件資源,fileService用於工作區檔案 Added dual FileService pattern:extensionFileServicefor extension resources,fileServicefor workspace files - 新增動態 Arduino 模組發現機制 (
discoverArduinoModules()),自動掃描media/blockly/generators/arduino/目錄 Added dynamic Arduino module discovery mechanism (discoverArduinoModules()), automatically scansmedia/blockly/generators/arduino/directory - 新增唯一暫存檔案命名機制 (
temp_toolbox_{timestamp}.json),避免多視窗衝突 Added unique temporary file naming mechanism (temp_toolbox_{timestamp}.json) to prevent multi-window conflicts - 新增計時常數以提升程式碼可讀性:
UI_MESSAGE_DELAY_MS,UI_REVEAL_DELAY_MS,BOARD_CONFIG_REQUEST_TIMEOUT_MSAdded timing constants to improve code readability:UI_MESSAGE_DELAY_MS,UI_REVEAL_DELAY_MS,BOARD_CONFIG_REQUEST_TIMEOUT_MS - 新增過期暫存檔案自動清理功能,啟動時清理超過 1 小時的 temptoolbox.json 檔案 Added automatic stale temporary file cleanup, removing temptoolbox.json files older than 1 hour on activation
- 移除
webviewManager.ts中的直接fs模組引用,改用 FileService 抽象層 Removed directfsmodule imports inwebviewManager.ts, replaced with FileService abstraction - 修正暫存工具箱檔案在多視窗場景下的競爭條件問題 Fixed race condition issues with temporary toolbox files in multi-window scenarios
- 修正
threshold_function_read積木的下拉選單驗證錯誤,新增錯誤處理機制 Fixed dropdown validation error inthreshold_function_readblock, added error handling mechanism - 修正暫存工具箱檔案被誤加入 Git 追蹤的問題,新增 .gitignore 規則 Fixed temporary toolbox files being incorrectly tracked by Git, added .gitignore rules
- 將 6 個方法轉換為非同步模式 (
getWebviewContent,loadArduinoModules等) Converted 6 methods to async mode (getWebviewContent,loadArduinoModules, etc.) - 重構語言檔案載入邏輯,統一為單一方法
loadLocaleScripts(),減少 50% 程式碼重複 Refactored locale file loading logic into unifiedloadLocaleScripts()method, reducing 50% code duplication - 改進
threshold_function_read積木的向後相容性,自動修正舊版 workspace 中的無效值 Improved backward compatibility forthreshold_function_readblock, auto-correcting invalid values from legacy workspaces
- 移除
src/modules/下所有空目錄 (core/, features/, services/, types/, utils/) Removed all empty directories undersrc/modules/(core/, features/, services/, types/, utils/) - 移除硬編碼的 Arduino 模組列表,改用目錄掃描動態發現 Removed hardcoded Arduino module list, replaced with directory scanning for dynamic discovery
- 所有魔術數字已提取為命名常數,提升程式碼可維護性 All magic numbers extracted to named constants for improved code maintainability
- 完成 6 項手動測試,涵蓋 Phase 1-6 所有功能(100% 通過率)
Completed 6 manual tests covering all Phase 1-6 features (100% pass rate)
- T032-T033: Phase 1 FileService 整合測試 Phase 1 FileService integration tests
- T045-T046: Phase 3 語言載入測試 Phase 3 locale loading tests
- T058-T059: Phase 6 魔術數字消除測試 Phase 6 magic number elimination tests
- 維護測試基準線:22 個通過,31 個失敗(無新增迴歸) Maintained test baseline: 22 passing, 31 failing (no new regressions)
完成 6 個主要架構清理任務(78/79 tasks, 98.7%): Completed 6 major architecture cleanup tasks (78/79 tasks, 98.7%):
- Phase 1: 移除空目錄 (Empty directory cleanup)
- Phase 2: FileService 整合 (FileService integration)
- Phase 3: 語言載入去重 (Locale loading deduplication)
- Phase 4: 暫存檔案處理 (Unique temp file handling + stale cleanup)
- Phase 5: 動態模組發現 (Dynamic module discovery)
- Phase 6: 魔術數字消除 (Magic number elimination)
詳細報告請參閱:specs/001-refactor-architecture-cleanup/PHASE-COMPLETION-REPORT.md
For detailed report, see: specs/001-refactor-architecture-cleanup/PHASE-COMPLETION-REPORT.md
- 新增 form-data 套件依賴 (v4.0.4),提供表單數據處理功能 Added form-data package dependency (v4.0.4) for form data processing functionality
- 升級 Blockly 版本從 11.2.2 到 11.2.2,保持最新穩定版本 Updated Blockly version from 11.2.0 to 11.2.2 to maintain latest stable version
- 更新多個 ESLint 相關套件到最新版本,提升程式碼品質和安全性
Updated multiple ESLint-related packages to latest versions for improved code quality and security
- @eslint/config-array: 0.19.1 → 0.21.0
- @eslint/core: 0.9.1 → 0.15.1
- @eslint/eslintrc: 3.2.0 → 3.3.1
- @eslint/js: 9.17.0 → 9.32.0
- @eslint/object-schema: 2.1.5 → 2.1.6
- @eslint/plugin-kit: 0.2.4 → 0.3.4
- eslint: 9.17.0 → 9.32.0
- 其他相關依賴的版本更新 Other related dependency version updates
- 升級 Blockly 版本從 11.2.0 到 11.2.2,提升穩定性和性能 Updated Blockly version from 11.2.0 to 11.2.2 for improved stability and performance
- 改進 Blockly API 兼容性處理,使用新的
setLocaleAPI (v11.2.0+) 並保持向後兼容 Improved Blockly API compatibility handling, using newsetLocaleAPI (v11.2.0+) while maintaining backward compatibility - 優化程式碼品質,移除重複的程式碼片段和改善函數結構 Optimized code quality by removing duplicate code fragments and improving function structure
- 增強錯誤處理和回退機制,提供更穩定的語言切換體驗 Enhanced error handling and fallback mechanisms for more stable language switching experience
- 更新檢查流程提示檔案,增加新的工具支援選項 Updated check process prompt file with additional tool support options
- 重構語言載入機制,採用更現代和安全的 Blockly API 呼叫方式 Refactored language loading mechanism using more modern and secure Blockly API calling methods
- 新增 HUSKYLENS 智慧鏡頭積木支援,包含 I2C 和 UART 初始化方式 Added HUSKYLENS smart camera block support, including I2C and UART initialization modes
- 新增 HUSKYLENS 多種辨識演算法積木:人臉辨識、物體追蹤、物體辨識、線路追蹤、顏色辨識、標籤辨識、物體分類 Added HUSKYLENS multiple recognition algorithm blocks: face recognition, object tracking, object recognition, line tracking, color recognition, tag recognition, object classification
- 新增 HUSKYLENS 資料取得積木:方塊和箭頭的偵測結果、位置資訊、ID 等 Added HUSKYLENS data retrieval blocks: block and arrow detection results, position information, ID, etc.
- 新增 HUSKYLENS 學習功能積木:學習物體和忘記所有學習內容 Added HUSKYLENS learning function blocks: learn objects and forget all learned content
- 所有 HUSKYLENS 積木標記為實驗性質,提供視覺指示和通知系統 All HUSKYLENS blocks marked as experimental with visual indicators and notification system
- 更新視覺感測器工具箱分類,整合 HUSKYLENS 積木 Updated vision sensors toolbox category to integrate HUSKYLENS blocks
- 更新實驗積木標記系統,增強對 HUSKYLENS 積木的支援 Updated experimental block marking system with enhanced support for HUSKYLENS blocks
- 更新所有語言文件的授權標頭格式,提升一致性 Updated license header format in all language files for improved consistency
- 重新組織視覺感測器積木分類,將 HUSKYLENS 和 Pixetto 分別標註 Reorganized vision sensor block categories with separate labeling for HUSKYLENS and Pixetto
- 新增 Pixetto 基礎檢測積木:是否偵測到物體、取得偵測類型 ID、取得功能 ID Added Pixetto basic detection blocks: object detected check, get type ID, get function ID
- 增強 Pixetto 程式碼生成邏輯,改善各種偵測模式的準確性和一致性 Enhanced Pixetto code generation logic, improving accuracy and consistency of various detection modes
- 更新所有語言的 Pixetto 翻譯支援,涵蓋新增的積木功能 Updated Pixetto translations for all languages, covering newly added block functions
- 修正 Pixetto 形狀偵測中六邊形的對應問題(改用五邊形代替) Fixed hexagon mapping issue in Pixetto shape detection (using pentagon instead)
- 改善 Pixetto 程式碼生成的常數名稱,符合最新函式庫規範 Improved Pixetto code generation constant names to comply with latest library specifications
- 更新 Pixetto 工具箱配置,整合新的基礎檢測積木 Updated Pixetto toolbox configuration to integrate new basic detection blocks
- 重構 Pixetto 偵測積木的程式碼生成方式,使用更精確的條件判斷 Refactored Pixetto detection block code generation to use more precise conditional logic
- 新增 Pixetto 智慧鏡頭支援:完整的視覺識別積木組件 Added Pixetto Smart Camera support: Complete visual recognition block components
- 新增 Pixetto 初始化功能,支援 UART 通訊設定 Added Pixetto initialization function with UART communication setup
- 新增多種 Pixetto 偵測模式:顏色偵測、形狀偵測、人臉偵測、AprilTag 偵測 Added multiple Pixetto detection modes: color detection, shape detection, face detection, AprilTag detection
- 新增 Pixetto 進階功能:神經網路辨識、手寫數字辨識、道路偵測 Added Pixetto advanced features: neural network recognition, handwritten digit recognition, road detection
- 新增 Pixetto 資料讀取功能:座標、尺寸和道路資訊取得 Added Pixetto data reading functions: coordinate, size and road information retrieval
- 新增 15 種語言的 Pixetto 相關翻譯支援 Added Pixetto-related translations for 15 languages
- 增強 platformio.ini 設定同步功能,支援 build_flags 和 lib_ldf_mode 設定 Enhanced platformio.ini settings synchronization to support build_flags and lib_ldf_mode configurations
- 新增重新整理按鈕功能:在積木編輯器右上角新增重新整理按鈕,可手動觸發程式碼重新生成 Added refresh button feature: Added a refresh button in the top-right corner of the block editor to manually trigger code regeneration
- 重新整理按鈕具備旋轉動畫效果,提供視覺回饋 Refresh button features rotation animation for visual feedback
- 新增 15 種語言的重新整理按鈕標題翻譯支援 Added refresh button title translations for 15 languages
- 修正重新整理按鈕 SVG 圖示的旋轉中心點,確保以圖片中心進行旋轉 Fixed refresh button SVG icon rotation center to ensure rotation around the image center
- 修正預覽視窗缺少 loops block 的問題 Fixed preview window missing loops block
- 新增獨立的 loops.js 文件,專門管理與循環相關的區塊定義 Added a dedicated loops.js file for managing loop-related block definitions
- 新增
singular_flow_statements區塊,包含自定義驗證邏輯確保只在循環內使用 Addedsingular_flow_statementsblock with custom validation logic to ensure it's used only within loops
- 將
controls_duration區塊從 arduino.js 移動到 loops.js 文件中,改善程式碼組織結構 Movedcontrols_durationblock from arduino.js to loops.js file, improving code organization - 在工具箱中將
controls_flow_statements更改為singular_flow_statementsChangedcontrols_flow_statementstosingular_flow_statementsin the toolbox
- 改進搜尋結果容器的捲軸樣式,使其與備份管理的捲軸保持一致性 Improved scrollbar styles for search results container to maintain consistency with backup management scrollbars
- 新增積木搜尋功能,支援在工作區內快速搜尋積木名稱或參數,並可高亮、導覽搜尋結果,支援多國語言與快捷鍵(Ctrl+F) Added block search feature: quickly search blocks by name or parameter in the workspace, highlight and navigate results, with multi-language support and keyboard shortcut (Ctrl+F)
- 所有支援語言新增積木搜尋相關翻譯字串 Added block search related translation strings for all supported languages
- 新增超音波觸發(ultrasonic_trigger)和讀取(ultrasonic_read)積木的自動註冊,確保它們能找到超音波感測器積木 Added automatic registration of ultrasonic trigger and read blocks, ensuring they can find the ultrasonic sensor block
- 改進超音波感測器相關積木之間的關聯性,現在超音波觸發和讀取積木能自動偵測工作區中的超音波感測器積木 Improved relationship between ultrasonic-related blocks; now ultrasonic trigger and read blocks can automatically detect ultrasonic sensor blocks in the workspace
- 增強超音波感測器積木的日誌系統,提供更詳細的運行時資訊,有助於除錯 Enhanced logging system for ultrasonic sensor blocks, providing more detailed runtime information for debugging
- 重構超音波感測器程式碼生成邏輯,提升程式碼品質和可維護性 Refactored ultrasonic sensor code generation logic for better code quality and maintainability
- 新增編碼馬達相關積木,包括設定、讀取、重設和 PID 控制功能 Added encoder motor blocks, including setup, read, reset and PID control functionality
- 新增實驗性積木追蹤系統,可自動識別與管理實驗階段的積木 Added experimental blocks tracking system to automatically identify and manage blocks in experimental stage
- 更新專案資料夾結構,將指導文件從
instructions移至prompts資料夾並新增模式標記 Updated project folder structure, moved instruction files frominstructionstopromptsfolder and added mode tags - 更新日誌輸出方式說明,統一使用
log.info、log.error等方法,取代console.logUpdated logging method instructions, standardized to uselog.info,log.error, etc., instead ofconsole.log
- 新增
getPWMPinOptions()函數來獲取支援 PWM 的引腳選項,提高伺服馬達和類比寫入積木的準確性 AddedgetPWMPinOptions()function to get PWM-supported pins, improving accuracy for servo and analog write blocks - 在程式碼生成中添加註釋系統,使生成的程式碼更易於理解 Added comments system in code generation, making generated code more understandable
- 更新類比寫入積木,現在使用專用的 PWM 引腳選項函數,確保只顯示支援 PWM 的引腳 Updated analog write block to use dedicated PWM pin options function, ensuring only PWM-capable pins are displayed
- 更新伺服馬達積木,現在使用 PWM 引腳選項,確保硬體相容性 Updated servo motor blocks to use PWM pin options, ensuring hardware compatibility
- 為 ESP32 開發板添加專用的伺服馬達支援,使用 ESP32Servo 庫及其特定設定 Added dedicated servo support for ESP32 boards, using ESP32Servo library and its specific configurations
- 改進伺服馬達程式碼生成,根據不同開發板選擇適當的伺服馬達庫和設定 Improved servo code generation, selecting appropriate servo libraries and settings based on different boards
- 改進了檔案名稱驗證功能,允許使用中文和更多有效字符,排除了檔案系統不允許的特殊字符 Improved filename validation to support Chinese characters and more valid characters, excluding only special characters not allowed by the file system
- 更新了無效檔案名稱的錯誤訊息,使其更具體明確 Updated error message for invalid filenames to be more specific and clear
- 新增自動備份功能,定期儲存工作區以防止意外資料遺失 Added auto-backup feature that periodically saves the workspace to prevent accidental data loss
- 新增自動備份間隔設定功能,使用者可依需求自訂備份頻率 Added auto-backup interval setting feature, allowing users to customize backup frequency
- 新增備份管理介面 UI 改進,包含按鈕樣式和版面配置優化 Added UI improvements to the backup management interface, including button styling and layout optimization
- 更新備份管理介面的樣式,提供更現代化的使用者體驗 Updated the style of the backup management interface for a more modern user experience
- 為所有支援的語言添加了自動備份相關的翻譯 Added translations related to auto-backup for all supported languages
- 改進備份列表顯示,增加視覺回饋和互動體驗 Improved backup list display with enhanced visual feedback and interaction experience
- 重構備份相關 CSS 樣式,使用更一致的風格並支援不同設備尺寸 Refactored backup-related CSS styles for more consistent styling and support for different device sizes
- 更新 ESP32 開發板的引腳定義,標記多個引腳支援 PWM 功能,提供更準確的硬體功能描述 Updated ESP32 pin definitions to mark multiple pins as supporting PWM functionality, providing more accurate hardware capability descriptions
- 改進類比寫入 (analogWrite) 積木的程式碼生成邏輯,現在對所有類型的輸入值(包括數字字面量和表達式)都套用 constrain 函數,確保輸出在開發板支援的範圍內 Improved code generation logic for analog write (analogWrite) blocks, now applying constrain function to all types of input values (including numeric literals and expressions), ensuring output is within the range supported by the board
- 將
arduino_analog_write和arduino_digital_write積木註冊為始終生成的積木,確保在特定情況下的正確程式碼生成 Registeredarduino_analog_writeandarduino_digital_writeblocks as always-generate blocks, ensuring correct code generation in specific scenarios
- 新增伺服馬達停止積木,允許透過 detach() 函數停止伺服訊號輸出 Added servo motor stop block, allowing servo signal output to be stopped using the detach() function
- 為所有支援的語言添加了伺服馬達停止積木的相關翻譯 Added translations for the servo motor stop block for all supported languages
- 更新 Arduino Nano 的 platformio 設定,將板子類型從 nanoatmega328 改為 nanoatmega328new Updated Arduino Nano platformio configuration, changing board type from nanoatmega328 to nanoatmega328new
- 改進開發板選擇機制,從靜態 HTML 選項改為動態生成選單
Improved board selection mechanism, changing from static HTML options to dynamically generated menu
- 開發板選項現在直接從 BOARD_CONFIGS 物件動態產生 Board options are now dynamically generated from the BOARD_CONFIGS object
- 確保開發板顯示名稱與內部配置保持一致 Ensure board display names are consistent with internal configurations
- 新增深色主題圖示於預覽模式中,改善深色模式的視覺體驗 Added dark theme icon in preview mode, improving visual experience in dark mode
- 更新 Blockly 工作區,支援觸控設備的縮放功能 (pinch 縮放) Updated Blockly workspace to support touch device zooming (pinch zoom)
- 在預覽模式中調整滾輪行為,避免縮放功能與滾動衝突 Adjusted wheel behavior in preview mode to avoid conflicts between zooming and scrolling
- 新增積木自動生成機制,讓特定積木類型無論位置都能生成代碼
Added automatic block generation mechanism to ensure specific block types generate code regardless of their position
- 新增
alwaysGenerateBlocks_陣列用於管理必須生成的積木 AddedalwaysGenerateBlocks_array to manage blocks that must generate code - 提供
registerAlwaysGenerateBlock輔助函數使各模組能註冊自身積木 ProvidedregisterAlwaysGenerateBlockhelper function for modules to register their blocks
- 新增
- 改進伺服馬達積木,從文字輸入改為下拉選單
Improved servo motor blocks, changing from text input to dropdown menu
- 自動顯示工作區中所有已設定的伺服馬達名稱 Automatically displays all configured servo motor names in the workspace
- 實現變異記錄功能,保存選擇的馬達值 Implemented mutation recording to save selected motor values
- 改進代碼生成的日誌記錄,從 console.log 改為使用標準日誌服務 Improved code generation logging, changing from console.log to standard logging service
- 新增伺服馬達積木
Added servo motor blocks
- 支援伺服馬達設定與角度控制 Support servo motor setup and angle control
- 在所有支援的語言中加入馬達相關翻譯 Add motor-related translations in all supported languages
- 改進函式庫依賴管理
Improved library dependency management
- 新增
lib_deps_系統用於追蹤函式庫依賴 Addedlib_deps_system for tracking library dependencies - 自動在 platformio.ini 中同步函式庫依賴資訊 Automatically synchronize library dependency information in platformio.ini
- 新增
- 更新 Blockly 編輯器與預覽頁面,增加馬達積木的主題顏色 Updated Blockly editor and preview page with motor block theme colors
- 新增函數名稱轉換功能,支援將中文函數名稱轉換為合法的 C++ 函數名稱 Added function name conversion functionality to support converting Chinese function names to valid C++ function names
- 修復了函數名稱變更時的邏輯和連接恢復機制 Fixed function name change logic and connection recovery mechanism
- 更新使用統一的日誌系統,取代直接使用 console 方法 Updated to use unified logging system instead of direct console methods
- 改進了函數定義處理的正則表達式,使其更健壯 Improved the regular expression for function definition processing to make it more robust
- 新增複製貼上函數積木時的自動名稱處理功能,避免重複名稱 Added automatic name handling when copy-pasting function blocks to avoid duplicate names
- 新增檢查防止建立同名函數,顯示警告並還原為原有名稱 Added check to prevent creating functions with duplicate names, showing warning and reverting to original name
- 優化函數複製貼上後的名稱處理邏輯,避免重複函數名稱引起的問題 Optimized name handling logic after function block duplication to avoid issues caused by duplicate function names
- 在預覽頁面中新增頁內標題更新功能,顯示更加一致的多語言標題 Added in-page title update functionality in preview page for consistent multilingual title display
- 更新預覽頁面,新增對感測器區塊的支援 Updated preview page to add support for sensor blocks
- 改進多語言訊息解析的正則表達式,支援更多格式的訊息定義 Improved regex for multilingual message parsing to support more message definition formats
- 增強預覽視窗的多語言支援,統一視窗標題和頁內標題顯示 Enhanced multilingual support for preview windows, unifying window title and in-page title display
- 新增自動掃描機制,確保 threshold_function_setup 與 ultrasonic_sensor 設定積木正確初始化 Added automatic scanning mechanism to ensure threshold_function_setup and ultrasonic_sensor setup blocks are properly initialized
- 移除未使用的腳位模式追蹤全局物件,優化記憶體使用 Removed unused pin mode tracking global object to optimize memory usage
- 新增超音波觸發積木
Added independent ultrasonic trigger block
- 新增超音波感測器積木
Added ultrasonic sensor blocks
- 支援設定 Trig 和 Echo 腳位 Support setting Trig and Echo pins
- 支援使用硬體中斷提高精確度 Support using hardware interrupts for better accuracy
- 支援不同開發板的硬體中斷腳位 Support hardware interrupt pins for different boards
- 更新所有語言檔案,支援新增的感測器功能 Updated all language files to support new sensor features
- 開發板配置增強:為所有支援的開發板新增硬體中斷腳位設定 Enhanced board configurations: Added hardware interrupt pin configurations for all supported boards
- 更新積木顏色管理,使用主題樣式而非直接設置顏色 Updated block color management to use theme styles instead of direct color setting
- 更新主題檔案,添加感測器區塊樣式 Updated theme files to add sensor block styles
- 改進備份管理界面的響應式設計
Improved responsive design of backup management interface
- 新增按鈕區域自動換行功能,提高在小視窗下的可用性 Added button area auto-wrap functionality to improve usability in small windows
- 添加按鈕之間的間距,優化換行後的視覺效果 Added spacing between buttons to optimize visual appearance after wrapping
- 修改自動備份文件的命名格式
Modified auto-backup file naming format
- 從
auto_backup_before_restore_YYYYMMDD_HHMMSS簡化為auto_restore_YYYYMMDD_HHMMSSSimplified fromauto_backup_before_restore_YYYYMMDD_HHMMSStoauto_restore_YYYYMMDD_HHMMSS
- 從
- 增強多語言支援功能
Enhanced multilingual support functionality
- 改進了使用者介面元素的多語言支援 Improved multilingual support for user interface elements
- 為備份管理視窗和預覽模式添加多語言支援 Added multilingual support for backup management window and preview mode
- 增強了從 JS 檔案中提取訊息的能力 Enhanced ability to extract messages from JS files
- 修改滑鼠滾輪設定,避免與縮放功能衝突
Modified mouse wheel settings to avoid conflicts with zoom functionality
- 在編輯器中禁用滾輪的移動功能 Disabled wheel movement in the editor
- 修復程式碼生成器中的運算優先順序問題
Fixed operator precedence issues in code generators
- 在邏輯比較運算中加入括號以確保運算優先順序正確 Added parentheses to logic comparison operations to ensure correct operator precedence
- 在邏輯運算(AND、OR)中加入括號 Added parentheses to logic operations (AND, OR)
- 在邏輯否定運算中加入括號 Added parentheses to logic negation operations
- 修正 while-until 迴圈中的條件判斷加入括號 Fixed condition evaluation in while-until loops by adding parentheses
- 移除預覽模式中的複製功能
Removed copy functionality from preview mode
- 將預覽工作區設為完全唯讀模式 Set preview workspace to fully read-only mode
- 移除相關的複製界面元素和提示文字 Removed related copy UI elements and prompt text
- 清理不再需要的複製成功提示樣式和腳本 Cleaned up no longer needed copy success notification styles and scripts
- 新增備份預覽功能
Added backup preview functionality
- 用戶現在可以直接在閱讀模式中預覽備份檔案,不需要先還原 Users can now preview backup files in read mode without having to restore them first
- 新增 blocklyPreview.html 和 blocklyPreview.js 實現預覽視窗功能 Added blocklyPreview.html and blocklyPreview.js to implement preview window functionality
- 在備份管理面板中新增預覽按鈕,點擊即可在新視窗中查看備份內容 Added preview button in the backup management panel for viewing backup content in a new window
- 改進 UI 元素設計和互動體驗
Improved UI element design and interaction experience
- 優化備份操作按鈕的視覺效果,添加圖標提高可識別性 Optimized the visual effects of backup operation buttons, adding icons to improve recognizability
- 更新主題命名系統,從 dark-mode/light-mode 改為 theme-dark/theme-light Updated theme naming system from dark-mode/light-mode to theme-dark/theme-light
- 改進複製功能,新增成功提示訊息 Improved copy functionality with success notification messages
- 新增獲取檔案時間戳功能
Added file timestamp retrieval functionality
- 在 FileService 中新增 getFileStats 方法,可獲取檔案的完整時間戳資訊 Added getFileStats method in FileService to retrieve complete timestamp information for files
- 改進備份檔案處理機制
Improved backup file handling mechanism
- 備份列表現在顯示真實的檔案創建時間和大小 Backup list now displays actual file creation time and size
- 優化備份檔案路徑管理,便於後續功能擴展 Optimized backup file path management for future feature extensions
- 新增備份還原功能
Added backup restoration feature
- 用戶現在可以透過界面還原之前創建的備份 Users can now restore previously created backups through the interface
- 在還原前自動創建臨時備份,確保操作安全 Temporary backups are automatically created before restoration to ensure operation safety
- 新增還原按鈕和相應的視覺樣式 Added restoration button and corresponding visual styles
- 新增自動檢測需要 Serial 初始化的積木功能
Added automatic detection for blocks requiring Serial initialization
- 當工作區中存在 text_print 或 text_prompt_ext 積木時,自動添加 Serial.begin(9600) Automatically adds Serial.begin(9600) when text_print or text_prompt_ext blocks exist in workspace
- 優化代碼生成流程,提高用戶體驗 Optimized code generation process for better user experience
- 修復門檻值函數讀取區塊功能問題
Fixed threshold function read block issues
- 增強變異記錄與恢復機制,解決運行時選項保存問題 Enhanced mutation recording and restoration mechanism to solve runtime option preservation issues
- 改進正則表達式處理,支援含有換行符的函式定義 Improved regex processing to support function definitions with line breaks
- 重構擴充功能架構,提升代碼可維護性與擴展性
Refactored extension architecture to improve code maintainability and extensibility
- 將大型檔案拆分成模組化的服務類別 Split large files into modular service classes
- 實作日誌服務、檔案服務、多語言服務和設定管理服務 Implemented logging service, file service, locale service, and settings manager -採用更好的物件導向設計,提高程式碼組織結構 Adopted better object-oriented design for improved code organization
- 改進閾值函數讀取區塊功能
Enhanced threshold function read block functionality
- 現在會保留使用者先前選擇的函數值 Now preserves previously selected function value
- 新增變異記錄方法,可在重新載入時保持選擇狀態 Added mutation recording methods to maintain selection state when reloaded
- 新增備份管理功能,支援區塊程式碼的備份與復原
Added backup management functionality, supporting block code backup and restoration
- 實作備份檔案儲存與載入機制 Implemented backup file storage and loading mechanism
- 新增備份建立、刪除功能 Added backup creation and deletion features
- 整合備份管理對話框與使用者介面 Integrated backup management dialog and user interface
- 改進使用者介面
Enhanced user interface
- 新增備份管理按鈕與對話框 Added backup management button and modal dialog
- 優化深色模式下的備份管理介面 Optimized backup management interface in dark mode
- 優化函數處理機制,提升代碼生成穩定性
Optimized function processing mechanism to improve code generation stability
- 改進日誌輸出,增加函數數量和清單的記錄 Improved logging output with function count and list information
- 改進 Arduino 程式碼生成器的函數處理流程
Enhanced Arduino generator's function processing workflow
- 新增函數前向宣告機制,解決相依性問題 Added function forward declarations mechanism to solve dependency issues
- 保持函數定義的原始順序,提升生成代碼的一致性 Preserved original order of function definitions for better generated code consistency
- 新增統一的日誌系統,支援跨模組的日誌記錄與監控
Added unified logging system supporting cross-module logging and monitoring
- 實作了分層級的日誌功能 (debug、info、warn、error) Implemented multi-level logging functionality (debug, info, warn, error)
- 新增 VS Code 輸出頻道整合,便於除錯 Added VS Code output channel integration for easier debugging
- 修正函式積木名稱變更時影響其他不相關函式積木的問題 Fixed a bug where changing one function block name would affect unrelated function blocks
- 修正函數呼叫積木在工作區重新載入後連接點消失的問題 Fixed function call blocks losing connections after workspace reload
- 修正多個代碼格式與條件判斷中的括號問題 Fixed multiple code formatting issues and missing brackets in conditional statements
- 重新實作函數與函數呼叫積木,提高穩定性與兼容性
Reimplemented function and function call blocks for better stability and compatibility
- 統一函數為無回傳值 (void) 類型,簡化設計 Unified functions as void type, simplifying the design
- 改進函數積木參數的變數整合 Improved variable integration for function parameters
- 優化函數呼叫積木的連接還原機制 Enhanced connection restoration mechanism for function call blocks
-
新增深色主題支援與主題切換功能 Added dark theme support and theme switching functionality
- 實作 singularDark.js Blockly 深色主題 Implemented singularDark.js Blockly dark theme
- 新增主題切換按鈕與深色模式樣式 Added theme toggle button and dark mode styles
- 支援主題偏好設定儲存 Support for saving theme preferences
- 加入自動主題同步機制,同步編輯器與使用者設定 Added automatic theme synchronization between editor and user settings
-
新增 PlatformIO 板子設定整合 Added PlatformIO board configuration integration
- 為所有支援的開發板新增 platformio 設定 Added platformio configuration for all supported boards
- 實作 getBoardConfig 函數用於獲取板子的 platformio.ini 設定 Implemented getBoardConfig function to retrieve platformio.ini settings for boards
- 優化使用者介面
Enhanced user interface
- 重構控制元件區域佈局,改善主題切換與開發板選擇的整合 Refactored control element area layout for better theme switching and board selection integration
- 改進深色模式下的元件樣式與可讀性 Improved component styles and readability in dark mode
- 改進 VSCode 設定處理機制
Improved VSCode settings handling mechanism
- 修改 WebView 訊息處理架構,支援主題與板子設定訊息 Modified WebView messaging architecture to support theme and board configuration messages
- 優化主題與開發板設定的儲存與載入流程 Optimized saving and loading processes for theme and board settings
- 新增確認對話框機制,改善使用者體驗
Added confirmation dialog mechanism for better user experience
- 使用 VSCode API 顯示對話框,取代原生瀏覽器對話框 Using VSCode API for dialogs instead of native browser dialogs
- 優化方塊刪除確認流程 Enhanced block deletion confirmation process
- 增強多語言支援系統
Enhanced internationalization support system
- 在所有語言檔中新增 VS Code UI 相關訊息翻譯 Added VS Code UI related message translations in all language files
- 實作完整的 UI 訊息本地化機制 Implemented complete UI message localization mechanism
- 改進方塊整理後的儲存機制
Improved block organization and saving mechanism
- 方塊整理 (Clean Up) 後自動保存工作區狀態 Automatically save workspace state after block cleanup
- 優化方塊拖曳與座標變更的儲存邏輯 Optimized block dragging and coordinate change saving logic
- 改進多語言處理機制
Improved multilingual processing mechanism
- 新增
syncToBlocklyMsg函數,自動同步翻譯到 Blockly.Msg AddedsyncToBlocklyMsgfunction to automatically sync translations to Blockly.Msg - 移除舊版覆蓋 Blockly 訊息的方法 Removed legacy method for overriding Blockly messages
- 優化語言切換和載入時的翻譯同步處理 Enhanced translation synchronization handling during language switching and loading
- 新增
- 優化 PlatformIO 整合功能
Enhanced PlatformIO integration
- 移除舊有的監控系統 Removed legacy monitoring system
- 新增預設停用 PlatformIO 首頁啟動功能 Added default setting to disable PlatformIO Home startup
- 新增自動配置 PlatformIO 設定功能,預設停用自動開啟 platformio.ini Added automatic PlatformIO configuration, disabled auto-opening of platformio.ini by default
- 改進工作區檢查邏輯 Improved workspace validation logic
- 新增腳位模式追蹤系統,提升 Arduino 積木使用體驗
Added pin mode tracking system for enhanced Arduino block experience
- 自動記錄每個腳位的模式 (INPUT、OUTPUT、INPUT_PULLUP) Automatically tracks pin modes (INPUT, OUTPUT, INPUT_PULLUP)
- 偵測腳位模式衝突並顯示警告 Detects pin mode conflicts and displays warnings
- 產生程式碼時自動添加必要的 pinMode 設定 Automatically adds necessary pinMode configurations during code generation
- 程式碼產生時顯示腳位模式警告訊息 Displays pin mode warning messages during code generation
- 增加門檻值函式積木,可以建立基於類比輸入的門檻觸發函式
Added threshold function blocks, allowing creation of threshold-triggered functions based on analog inputs
- 新增「設定門檻值函式」積木,用於設定感測器腳位、門檻值與輸出值 Added "Set Threshold Function" block for configuring sensor pin, threshold value, and output values
- 新增「讀取門檻值函式」積木,用於取得函式運算結果 Added "Get Threshold Function" block for retrieving function computation results
- 支援數字、布林值與字串輸出型別 Support for numeric, boolean, and string output types
- 新增自動關閉 platformio.ini 預覽模式功能,當開啟 Blockly 編輯器時,會自動監控並關閉預覽模式的 platformio.ini 檔案 Added automatic closing of platformio.ini preview mode, which monitors and closes the platformio.ini file in preview mode when the Blockly editor is opened
- 更新 README.md 文件,新增 VS Code 市集徽章(版本、下載量及評分) Updated README.md documentation with VS Code Marketplace badges (version, downloads, and ratings)
- 新增多種語言支援:西班牙文、法文、匈牙利文、義大利文、日文、韓文、波蘭文、葡萄牙文(巴西)、俄文、土耳其文 Added support for multiple languages: Spanish, French, Hungarian, Italian, Japanese, Korean, Polish, Portuguese (Brazil), Russian, Turkish
- 擴展 VSCode 語言檢測與對應支援,自動選擇合適的 Blockly 語言 Extended VSCode language detection and mapping, automatically selecting the appropriate Blockly language
- 新增七段顯示器積木 (七段顯示器與顯示器腳位設定) Added seven-segment display blocks (seven-segment display and pin configuration)
- 新增七段顯示器相關多語系文字 Added seven-segment display related i18n text
- 實作七段顯示器程式碼生成器,支援共陰極與共陽極模式 Implemented seven-segment display code generator with support for common cathode and anode modes
- 可選擇是否顯示小數點 Added option to display decimal point
- 新增數值映射積木 (Arduino map) Added value mapping block (Arduino map)
- 新增數值映射相關多語系文字
Added value mapping related i18n text
- 新增語言檔案載入機制及工具箱翻譯前處理功能
Added language file loading mechanism and toolbox translation pre-processing functionality - 新增覆寫 Blockly 字串替換函數以支援多語系
Added override for Blockly's message replacement function to support i18n
- 將積木、板卡配置及函式區塊中硬編碼文字替換為
window.languageManager.getMessage(...)呼叫,提升多語系支援
Replaced hard-coded texts in blocks, board configurations, and function blocks withwindow.languageManager.getMessage(...)calls for enhanced i18n support - 更新本地化訊息檔案(en 與 zh-hant),新增多項鍵值(如 ARDUINO_PULLUP、ARDUINO_MODE、DURATION_REPEAT 等)
Updated localization message files (en and zh-hant) with new keys such as ARDUINO_PULLUP, ARDUINO_MODE, DURATION_REPEAT, etc. - 更新工具箱類別名稱為翻譯標記(例如:%{CATEGORY_ARDUINO}、%{CATEGORY_LISTS}、%{CATEGORY_LOGIC}、%{CATEGORY_LOOPS}、%{CATEGORY_MATH}、%{CATEGORY_TEXT}、%{CATEGORY_VARIABLES}、%{CATEGORY_FUNCTIONS})
Updated toolbox category names to use translation tokens (e.g., %{CATEGORY_ARDUINO}, %{CATEGORY_LISTS}, %{CATEGORY_LOGIC}, %{CATEGORY_LOOPS}, %{CATEGORY_MATH}, %{CATEGORY_TEXT}, %{CATEGORY_VARIABLES}, %{CATEGORY_FUNCTIONS})
- 移除不再需要的
ms-vscode.cpptools相依性
Removed the unnecessaryms-vscode.cpptoolsdependency - 更新 extension 以引入語言檔案並支援多語系
Updated extension to include language file loading for enhanced i18n support
- 更新 README.md 文件內容 Updated README.md documentation content
- 多開發板支援 (Arduino 與 ESP32 平台) Multi-board support (Arduino and ESP32 platforms)
- 多語言本地化功能 Multi-language localization
- 函式積木系統 Function block system
- 變數管理系統
Variable management system
- 重新命名功能 Rename functionality
- 刪除功能 Delete functionality
- 即時程式碼產生 Real-time code generation
- 工作區狀態持久化 Workspace state persistence
- 客製化主題實作 Custom theme implementation
- 更新積木顏色配置以提升可讀性 Updated block color scheme for better readability
- 優化使用者界面佈局 Optimized user interface layout
- 整合 Blockly 核心功能 Integrated Blockly core functionality
- 實作 Arduino 程式碼生成器 Implemented Arduino code generator
- 新增工作區狀態管理機制 Added workspace state management
- 加入單元測試框架 Added unit testing framework