@algolia/wizard 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +10 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -3811,7 +3811,7 @@ async function runAnalysis(mode, extraInstructions = []) {
|
|
|
3811
3811
|
// package.json
|
|
3812
3812
|
var package_default = {
|
|
3813
3813
|
name: "@algolia/wizard",
|
|
3814
|
-
version: "0.
|
|
3814
|
+
version: "0.56.0",
|
|
3815
3815
|
description: "Magically implement Algolia functionality in your codebase",
|
|
3816
3816
|
type: "module",
|
|
3817
3817
|
engines: {
|
|
@@ -4461,11 +4461,11 @@ function frameworksForDoc(language) {
|
|
|
4461
4461
|
}
|
|
4462
4462
|
function baseInstructions(input) {
|
|
4463
4463
|
return [
|
|
4464
|
-
`Target Algolia index
|
|
4464
|
+
`Target Algolia index: "${input.targetIndex}"`,
|
|
4465
4465
|
`Project languages and frameworks: ${JSON.stringify(input.language)}`,
|
|
4466
4466
|
"Make minimal, idiomatic changes; do not touch unrelated code.",
|
|
4467
4467
|
`Commands run through a shell on ${process.platform}. Write commands that work there.`,
|
|
4468
|
-
"Use the project's own tooling for every command \u2014 its package manager, task runner, and test/lint commands.
|
|
4468
|
+
"Use the project's own tooling for every command \u2014 its package manager, task runner, and test/lint commands.",
|
|
4469
4469
|
"runShell needs the developer to approve each command, so give every call a clear `explanation` naming what it does and any side effect. If a command is rejected, do not retry it \u2014 take a different approach or report the limitation."
|
|
4470
4470
|
];
|
|
4471
4471
|
}
|
|
@@ -4521,11 +4521,15 @@ function ingestionInstructions(input) {
|
|
|
4521
4521
|
];
|
|
4522
4522
|
}
|
|
4523
4523
|
function searchInstructions(input) {
|
|
4524
|
+
const entity = input.findings.confirmedEntities ? input.findings.confirmedEntities[0].name : null;
|
|
4525
|
+
const attributes = input.findings.confirmedEntities ? input.findings.confirmedEntities[0].attributes : null;
|
|
4526
|
+
const entitySchemaMessage = entity && attributes ? `The following entity schema should be used to build the UI: ${JSON.stringify({ entity, attributes })}` : null;
|
|
4524
4527
|
const doc = getFrameworkSpecificDoc(frameworksForDoc(input.language));
|
|
4525
4528
|
return [
|
|
4526
4529
|
"Implement an in-app Algolia search experience.",
|
|
4530
|
+
entitySchemaMessage ?? "",
|
|
4527
4531
|
`Build the search UI for ${input.searchUiTarget}.`,
|
|
4528
|
-
"
|
|
4532
|
+
"Create search UI only. Do not create or modify ingestion scripts, rake/manage/CLI tasks, migrations, seeders, or other data-loading code, even if the data looks incomplete.",
|
|
4529
4533
|
...doc ? [
|
|
4530
4534
|
"Follow the Algolia SDK reference below for client setup, search UI wiring, and Insights instrumentation \u2014 Insights is required, not optional; prefer the reference over prior knowledge:",
|
|
4531
4535
|
doc
|
|
@@ -4533,7 +4537,7 @@ function searchInstructions(input) {
|
|
|
4533
4537
|
"No bundled Algolia SDK reference exists for this stack, so rely on the project's own conventions and Algolia's official client for its language. Do not invent APIs \u2014 keep to the documented search endpoint and its parameters."
|
|
4534
4538
|
],
|
|
4535
4539
|
`Create the search experience as its own component in a new file, following the project's existing component conventions (location, naming, styling approach). Do not write it inline into an existing file.`,
|
|
4536
|
-
`Import and render
|
|
4540
|
+
`Import and render the new component in ${input.searchLocation ? `"${input.searchLocation}"` : "the best, always-rendered layout location (e.g. a header/nav component)"} so it is reachable across the app \u2014 at least a working search input and results panel against the target index.`,
|
|
4537
4541
|
"If a search box already exists, replace its usage with an import and render of your new component; remove the old implementation.",
|
|
4538
4542
|
"When rendering results with an existing shared component (e.g. a card), import and reuse that component rather than inlining its markup \u2014 inlining silently drops the styles and behavior its own file provides.",
|
|
4539
4543
|
"Meet WCAG AA contrast (4.5:1 body text, 3:1 large text/icons) between the panel's text and its own background, and give the input and the active result a focus indicator visible against whatever sits behind it. Style the panel through the widget's class and CSS-variable overrides (or, when hand-built, the app's existing theme tokens) \u2014 never assume a light surface or reuse the surrounding page's colors unchanged inside the panel.",
|
|
@@ -4552,7 +4556,7 @@ function verificationInstructions(input) {
|
|
|
4552
4556
|
return [
|
|
4553
4557
|
"Verify the Algolia implementation changes.",
|
|
4554
4558
|
`Verification tools found in the codebase: ${JSON.stringify(input.findings.verification ?? [])}.`,
|
|
4555
|
-
"Run the project's own checks (lint, type check, tests) via runShell, using the
|
|
4559
|
+
"Run the project's own checks (lint, type check, tests) via runShell, using the project's commands \u2014 its task runner, manifest scripts, etc. Run every check that applies, not just the first.",
|
|
4556
4560
|
"If a check fails because packages or modules are missing, install the dependencies via runShell and re-run it rather than changing the code.",
|
|
4557
4561
|
"For issues caused by the implementation, make minimal fixes with writeFile and re-run the checks.",
|
|
4558
4562
|
"Do not make speculative fixes when no checks exist, a check cannot run, or failures are unrelated to these changes \u2014 note the limitation in your summary.",
|