Skip to content

Commit d1ac67b

Browse files
agents.md
1 parent 887bb15 commit d1ac67b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎AGENTS.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
- `src/sketchProfileManager.ts`: `sketch.yaml` build profiles.
1515
- `vue_webview/src/stores/useVsCodeStore.ts`: message dispatch + webview state.
1616
- `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).
1720

1821
## Build/Run
1922
- Extension build: `npm run compile` (produces `build/extension.js` via Vite).
@@ -28,6 +31,24 @@
2831
- Extension -> webview: `VueWebviewPanel.sendMessage()`.
2932
- Any new message should be defined in `src/shared/messages.ts` and handled on both sides.
3033

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+
3152
## Build Output + Profiles
3253
- Default build output is `build/` at workspace root.
3354
- With active profiles, build output is `build/build_<profile>`.

0 commit comments

Comments
 (0)