VS Code panel fixes and copy controls (0.7.0), with the core changes they need - #19
Merged
Conversation
Cancel cleared the in-flight state only when the engine unwound, so the composer stayed locked and the button dead for as long as that took. A late event from the abandoned turn could also paint into the turn that replaced it. An error about a result no longer held in memory was handled as a general error: it deleted the live turn's progress row, rendered its query in the wrong place, and put the message under the wrong question. Those errors now carry the id of the result whose button was clicked and land in that turn. Copy controls on the query, the explanation, a schema answer, a corrected query and each fenced block, each confirming only once the host reports the clipboard was written. A corrected query can be run directly; it re-enters through the normal ask path, so the guard and the approval step still apply. Fenced code had no CSS rule at all, which left it unstyled and made a long line scroll the whole transcript sideways. The automatic row-limit notice names the cap the engine applied rather than the raw setting, which could be above the ceiling or fractional.
rahulmahadik
had a problem deploying
to
github-pages
August 8, 2026 18:04 — with
GitHub Actions
Failure
… names A maxRows that was fractional, zero or negative went straight into $limit, which MongoDB rejects outright, so the query failed rather than returning fewer rows. Above the ceiling it was injected unclamped while the surrounding warning named the capped number. Both engines now resolve the cap through one shared function, so the prompt, the injected limit and the warning agree. The grounding floor treated anything in backticks as an identifier, so `?`, a date, or `:param` were reported as names missing from the schema. Hyphens are legal inside backticks and are still checked. The adapters peer-depend on @asksql/core rather than depending on it. A consumer pinned to a different core got a second copy installed under the adapter, so instanceof AskSqlError silently returned false for them. The range is >= and not ^: a caret on a 0.x package excludes the next minor, which would major-bump every adapter on a core release.
rahulmahadik
temporarily deployed
to
github-pages
August 8, 2026 18:08 — with
GitHub Actions
Inactive
A regular dependency let npm install a second copy of core under the adapter whenever the consumer pinned a different version, and instanceof AskSqlError then returned false for them. Only a peer makes npm resolve one shared core. The range is >= rather than ^: a caret on a 0.x package excludes the next minor, and with onlyUpdatePeerDependentsWhenOutOfRange a core minor would then major-bump all nine. yarn and legacy-peer-deps do not auto-install peers, so installing an adapter on its own now fails there. Each README names core in the install line and says so. React gains copy controls on prose and the result grid, streamed output while a local model works, cell tooltips, export feedback, and a fix for the red error shown while a schema answer was still being written.
rahulmahadik
temporarily deployed
to
github-pages
August 8, 2026 18:16 — with
GitHub Actions
Inactive
This was referenced Aug 8, 2026
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.
VS Code extension 0.7.0, plus the
@asksql/corechanges it depends on.The core commit is here because
src/engine.tsimportsresolveMongoGuardPolicyfrom@asksql/core/mongo; splitting them left the extension importing an export that did not exist yet.The npm packages publish from their own
v*tag, so this PR lands the code only.VS Code, fixed
Cancel left the panel unusable. Stopping a turn cleared the in-flight state only when the engine
unwound, so the composer stayed locked and the button dead for as long as that took. A late event
from the abandoned turn could also paint into the turn that replaced it.
Result-store errors landed in the wrong turn. An error about a result no longer in memory was
handled as a general error, which deleted the live turn's progress row, rendered its query in the
wrong place, and put the message under the wrong question.
Plan progress and turn progress deleted each other. With approval on, asking for a query plan
during the pause left whichever lost the race looking stalled.
Fenced code had no CSS rule at all, so it was unstyled and a long line scrolled the whole
transcript sideways.
The row-limit notice named the raw setting rather than the cap actually applied.
VS Code, added
Copy controls on the query, the explanation, a schema answer, a corrected query and each fenced
block, each confirming only once the host reports the clipboard was written. A corrected query can
be run directly; it re-enters through the normal ask path, so the guard and approval still apply.
Core
The MongoDB row cap was never clamped. A
maxRowsthat was fractional, zero or negative wentstraight into
$limit, which MongoDB rejects outright, so the query failed rather than returningfewer rows. Above the ceiling it was injected unclamped while the warning named the capped number.
Both engines now resolve through one shared function.
The grounding floor treated anything in backticks as an identifier, so
`?`, a date or:paramwere reported as names missing from the schema.The adapters peer-depend on core rather than depending on it. A consumer pinned to a different
core got a second copy under the adapter, so
instanceof AskSqlErrorsilently returned false. Therange is
>=and not^, because a caret on a 0.x package excludes the next minor and wouldmajor-bump every adapter on a core release. A committed test packs a real tarball and asserts npm
reports ERESOLVE instead of installing a second copy.
Note the trade-off: yarn and
legacy-peer-depsdo not auto-install peers, so installing an adapteralone now fails there. The documented
npm i @asksql/core @asksql/<adapter>is unaffected, and eachadapter README says so.
Tests
1730 passing across core, vscode and the shared tests. VS Code typecheck clean.