dsh-plugin-wsl-env 0.26.1 → 0.26.2
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/CHANGELOG.md +79 -0
- package/README.md +1 -1
- package/docs/ARCHITECTURE.md +8 -1
- package/docs/ARCHITECTURE.zh.md +7 -1
- package/docs/CONFIGURATION.md +2 -1
- package/docs/CONFIGURATION.zh.md +2 -1
- package/docs/DIAGNOSTICS.md +5 -0
- package/docs/DIAGNOSTICS.zh.md +4 -0
- package/docs/LIMITATIONS.md +13 -1
- package/docs/LIMITATIONS.zh.md +12 -2
- package/docs/QUICKSTART.md +2 -1
- package/docs/QUICKSTART.zh.md +2 -1
- package/docs/README.zh.md +1 -1
- package/docs/REQUIREMENTS.zh.md +1 -1
- package/lib/git-exec.d.ts +39 -7
- package/lib/git-exec.js +151 -18
- package/lib/listing.d.ts +17 -0
- package/lib/listing.js +20 -0
- package/lib/messages.d.ts +27 -0
- package/lib/messages.js +26 -2
- package/lib/picker.js +33 -19
- package/lib/search-exec.d.ts +45 -9
- package/lib/search-exec.js +152 -20
- package/lib/subprocess.d.ts +4 -1
- package/lib/subprocess.js +16 -3
- package/lib/wsl.d.ts +21 -0
- package/lib/wsl.js +24 -0
- package/package.json +1 -1
- package/scripts/doctor.mjs +21 -13
package/scripts/doctor.mjs
CHANGED
|
@@ -1509,23 +1509,31 @@ async function main(options) {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
1511
|
// ---- optional tools ------------------------------------------------------
|
|
1512
|
-
// Feature-degradation warnings, not first-command prerequisites
|
|
1513
|
-
//
|
|
1514
|
-
//
|
|
1515
|
-
//
|
|
1516
|
-
//
|
|
1517
|
-
|
|
1512
|
+
// Feature-degradation warnings, not first-command prerequisites. One
|
|
1513
|
+
// combined probe (one process a distro) runs them in the quick profile too,
|
|
1514
|
+
// so a missing rg is visible in the panel at startup instead of surfacing
|
|
1515
|
+
// as an opaque failure at the model's first grep/glob. None is a
|
|
1516
|
+
// fallback-free break — a missing rg still leaves bash grep, a missing git
|
|
1517
|
+
// still leaves file-tool edits, a missing inotifywait still polls.
|
|
1518
|
+
if (want("host")) {
|
|
1518
1519
|
/** The optional tools, in the order users notice them losing. */
|
|
1519
1520
|
/** @type {Array<[string, string]>} */
|
|
1520
|
-
const optionalTools = [["rg", "the fs-search tool
|
|
1521
|
+
const optionalTools = [["rg", "the fs-search tool fails (exit 127); the model can still run grep in a shell, slower"], ["git", "change review falls back to file-tool edits"], ["inotifywait", "the watcher falls back to polling"]];
|
|
1522
|
+
// One `wsl.exe` for the set: every name is answered in the same shell, so
|
|
1523
|
+
// the quick profile pays one spawn, not three, for the full tool list.
|
|
1524
|
+
const toolAnswer = await probe(`for t in ${optionalTools.map(([tool]) => tool).join(" ")}; do if p=$(command -v "$t" 2>/dev/null); then printf 'found %s %s\\n' "$t" "$p"; else printf 'missing %s\\n' "$t"; fi; done`);
|
|
1525
|
+
/** @type {Map<string, string>} */
|
|
1526
|
+
const toolPaths = new Map();
|
|
1527
|
+
for (const line of toolAnswer.stdout.split(/\r?\n/)) {
|
|
1528
|
+
const match = /^(?:found|missing)\s+([a-z]+)(?:\s+(.*))?$/.exec(line.trim());
|
|
1529
|
+
if (match !== null && match[1] !== undefined) toolPaths.set(match[1], match[2] ?? "");
|
|
1530
|
+
}
|
|
1521
1531
|
for (const [tool, cost] of optionalTools) {
|
|
1522
|
-
const
|
|
1532
|
+
const found = toolPaths.get(tool);
|
|
1523
1533
|
if (!toolAnswer.ok && toolAnswer.flaked) flakeCheck(`tools.${tool}`, tool, toolAnswer);
|
|
1524
|
-
else {
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
else check(`tools.${tool}`, "warn", tool, `missing; ${cost}`, install);
|
|
1528
|
-
}
|
|
1534
|
+
else if (found === undefined) check(`tools.${tool}`, "info", tool, "the combined probe answered nothing for this tool, so this run cannot say whether it is installed");
|
|
1535
|
+
else if (found.length > 0) check(`tools.${tool}`, "ok", tool, found);
|
|
1536
|
+
else check(`tools.${tool}`, "warn", tool, `missing; ${cost}`, install);
|
|
1529
1537
|
}
|
|
1530
1538
|
}
|
|
1531
1539
|
|