|
14 | 14 | - `src/sketchProfileManager.ts`: `sketch.yaml` build profiles. |
15 | 15 | - `vue_webview/src/stores/useVsCodeStore.ts`: message dispatch + webview state. |
16 | 16 | - `vue_webview/src/components/OtherTools.vue`: external tools UI. |
| 17 | +- `vue_webview/src/components/LibExamples.vue`: library examples UI (sorted list + sorted examples). |
| 18 | +- `vue_webview/src/components/BoardExamples.vue`: board examples UI (sorted list + sorted examples). |
| 19 | +- `src/cliOutputView.ts`: Arduino CLI Output webview panel (search/filter, colorized output). |
17 | 20 |
|
18 | 21 | ## Build/Run |
19 | 22 | - Extension build: `npm run compile` (produces `build/extension.js` via Vite). |
|
28 | 31 | - Extension -> webview: `VueWebviewPanel.sendMessage()`. |
29 | 32 | - Any new message should be defined in `src/shared/messages.ts` and handled on both sides. |
30 | 33 |
|
| 34 | +## Board Examples |
| 35 | +- Fetch path: `BoardExamples.vue` -> `ARDUINO_MESSAGES.CLI_BOARD_EXAMPLES` -> `VueWebviewPanel` -> `ArduinoCLI.searchBoardExamples()` -> `arduino-cli lib list --all`. |
| 36 | +- Filtering happens in the extension (`src/cli.ts`), not the UI, so board/library caches stay separate. |
| 37 | +- FQBN respects build profiles: `ArduinoCLI.getBoardFqbnForExamples()` selects profile FQBN when active and passes it to CLI args. |
| 38 | +- UI label shows `library.container_platform` as "Examples from: ..."; `container_platform` is part of `Library` in `src/shared/messages.ts`. |
| 39 | + |
| 40 | +## Library Examples |
| 41 | +- Uses `cli_libraryInstalled` output; no server-side filtering. |
| 42 | +- UI sorts libraries and example lists alphabetically. |
| 43 | + |
| 44 | +## Ports and Profiles |
| 45 | +- Home upload port is disabled when build profiles are active (profiles manage port). |
| 46 | +- Port selection sync is debounced to avoid overriding user choices during refresh; monitor port is kept in sync with upload port in `ArduinoProject.setPort`. |
| 47 | + |
| 48 | +## Build Invalidation |
| 49 | +- Build invalidation happens on editor changes and filesystem changes (including git pulls) via file watchers in `src/extension.ts`. |
| 50 | +- Upload checks build freshness: `ArduinoProject.isUploadReady()` compares `compile_result.json` mtime to latest source mtime. |
| 51 | + |
31 | 52 | ## Build Output + Profiles |
32 | 53 | - Default build output is `build/` at workspace root. |
33 | 54 | - With active profiles, build output is `build/build_<profile>`. |
|
0 commit comments