Code reference detail
main.ts
reqlan rq/packages/extension/src/extension/main.ts
| Idea | Status | Tags | Summary |
|---|---|---|---|
| installation_event | done | On installation of the extension a webview should be opened showing: - A welcome message - Resolved links to site, github, docs etc. ( not template placeholders ) - A syntax-highlighted example `.rq` with real URLs ( clickable ) from ["../../packages/extension/templates/thanks-for-installing.template.rq"] after placeholder substitution - A control to open that example as an untitled `.rq` editor beside the webview - Short tips for the activity bar and `@reqlan` chat - A thanks to sponsors Place in overall install sequencing: ["../installation.rq".welcome_webview_install] / ["../installation.rq".extension_installation]. Implemented as a Svelte webview under ["../../packages/extension/webviews/onboarding/"] bundled to ["../../packages/extension/media/webviews/onboarding/"] and opened once on first activation by ["../../packages/extension/src/extension/open-thanks-for-installing.ts"] via ["../../packages/extension/src/extension/onboarding-panel.ts"]. Resource links and template values are resolved at runtime from [phonebook_reqs.phonebook] through ["../../packages/extension/src/shared/phonebook.ts"] and posted to the webview; the example block imports ["../../packages/extension/templates/thanks-for-installing.template.rq"] via Vite `?raw` and substitutes `{{…}}` placeholders before display. Highlighting uses the onboarding tokenizer in ["../../packages/extension/webviews/onboarding/lib/rq-highlight.ts"]. The source template still uses placeholders such as { { SITE_URL } }; those matching braces are body prose per ["../language/syntax-edge-cases.rq".nested_curly_braces] and must parse without errors. Activation state is stored in extension global state key `onboarding` with `onboardingMessageShown` and `lastVersion` per ["../../packages/extension/src/extension/onboarding-state.ts"]. VS Code persists `globalState` in the extension global storage directory ( `globalStorage/reqlan.reqlan-extension/state.vscdb` under the editor user data folder ). | |
| installation_event_trigger | done | The installation event should be checked and triggered at extension [activation.activation]. Verified: ["../../packages/extension/src/extension/main.ts"] calls `openThanksForInstallingIfNeeded` at the end of `activate`, and [activation.onboarding_check] documents the gating behaviour. |
Reference labels
../../packages/extension/src/extension/main.ts