Repository navigation
Conversation
Detect the framework, preview the exact edit, and write the snippet after confirmation. Anything ambiguous falls back to the agent-driven install.
…files - Optional extras: package.json pre-check scopes the agent run, consent sits right before launch, and the wizard prints its own results summary from .subtext/extras-result.json. Reports move to .subtext/. - Output: combined sign-in line, Claude Code spinner (stderr captured, no MCP servers loaded), shorter snippet preview, Next steps box, framed demo prompt, conditional outro. - Static installer split into one file per framework under src/staticInstall/frameworks, with shared edit helpers in edit/.
2 of 4 tasks
This branch has not been deployed
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.
Summary
Step 1 (installing the capture snippet) no longer needs a coding agent for the frameworks we recognize. The wizard detects the framework, previews the exact lines it will add, and writes them once the user confirms. Anything it can't place with certainty goes to the agent-driven install, which is unchanged.
Supported
<Script strategy="beforeInteractive">in the root layout's<head>(or first in<body>), adds thenext/scriptimport if missing<Head>in_document, or creates_document<head>inapp/rootapp.head.scripttonuxt.configgatsby-ssrwithonRenderBody<head>, as<script is:inline></head>in the entry HTMLJS/TS edits use
@babel/parserto find insertion points and splice text, so the rest of the file's formatting is untouched, and the edited file must parse again before it's written. A write is refused if the file changed after the preview.Falls back to the agent when
Monorepo roots, React Native, unsupported frameworks (TanStack Start, SolidStart, Qwik, Redwood, Ember), Nuxt 2, any detected Content-Security-Policy (including
helmet/nuxt-security), mixed App/Pages Router, customappDirectoryor Viteroot, multi-page Vite apps, an existinggatsby-ssror Nuxtappblock, zero or several<head>s, unparseable files, a declined edit, or a failed write.Flow changes (
run.ts)precheck/explore/plan/installitself, so the funnel shape is unchanged.--print-promptpreviews the edit without writing.Other
@babel/parseris now a runtime dependency (was already in the lockfile transitively).Test plan
npm test: new suite with throwaway projects for every framework and fallback case (88 tests passing)npm run typecheck,npm run buildcreate-next-app(App and Pages Router) and a Nuxt starter