Repository navigation
Conversation
…se sql.js webview DB
- Add `AssemblyRow` interface and `processAssembly()` to `lineMaps.ts`:
single loop over the assembly text builds both the `sourceToLines`
cursor-sync map and the structured row data for the webview — eliminates
the duplicate `asm.split("\n")` + double-iteration that existed before.
`buildLineMaps` is kept (marked deprecated) so existing tests pass.
- Rewrite `webviewHtml.ts` as `getShellHtml(filename, sqlJsUri, sqlWasmUri)`:
the webview HTML is set **once** (no more full-page replacement on every
update). It loads sql.js (SQLite WASM), creates an in-memory `asm_lines`
table, and listens for `{ type: 'rows', rows }` messages. On each message
it replaces the DB contents and re-renders only the DOM — scroll position
and search state are preserved across recompiles.
- Update `webview.ts`: constructor takes `extensionUri`, serves sql-wasm.js
and sql-wasm.wasm from `resources/` via `localResourceRoots` +
`asWebviewUri`. `update()` now calls `processAssembly` and posts a single
`rows` message instead of replacing `panel.webview.html`.
- Propagate `extensionUri` through `DocumentTracker` → `AssemblyView`.
- Install `sql.js`; add `esbuild.js` step to keep `resources/sql-wasm.{js,wasm}`
in sync with `node_modules/sql.js/dist/` on every build.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.