dsh-hashline-edit 0.4.3 → 0.5.1
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 +345 -0
- package/README.md +58 -5
- package/cordis.patch.yml +11 -1
- package/grammars/go-0.25.0-9504573f352b20be.wasm +0 -0
- package/grammars/java-0.23.5-4fdeac4ca6ca089f.wasm +0 -0
- package/grammars/python-0.25.0-16108b50df4ee9a3.wasm +0 -0
- package/grammars/rust-0.24.2-24c89bd9252255e4.wasm +0 -0
- package/grammars/tsx-0.23.2-79e5da75ea62855a.wasm +0 -0
- package/grammars/typescript-0.23.2-778025db5a8be0e7.wasm +0 -0
- package/grammars/vue-0.1.0-193c01119229352f.wasm +0 -0
- package/lib/client.js +13 -3
- package/lib/index.js +2345 -75
- package/lib/types/dsh/codegraph/cli.d.ts +61 -0
- package/lib/types/dsh/codegraph/project.d.ts +27 -0
- package/lib/types/dsh/codegraph/tools.d.ts +36 -0
- package/lib/types/dsh/codegraph/view.d.ts +25 -0
- package/lib/types/dsh/diagnostics/cli.d.ts +76 -0
- package/lib/types/dsh/diagnostics/messages.d.ts +37 -0
- package/lib/types/dsh/diagnostics/parse.d.ts +39 -0
- package/lib/types/dsh/diagnostics/tools.d.ts +20 -0
- package/lib/types/dsh/diagnostics/view.d.ts +31 -0
- package/lib/types/dsh/guidance.d.ts +7 -3
- package/lib/types/dsh/index.d.ts +32 -3
- package/lib/types/dsh/syntax-health.d.ts +60 -0
- package/lib/types/dsh/tools/edit.d.ts +15 -1
- package/lib/types/dsh/tools/output.d.ts +10 -0
- package/lib/types/dsh/tools/read-folded.d.ts +85 -0
- package/lib/types/src/bundled-assets.d.ts +13 -0
- package/lib/types/src/domain-errors.d.ts +12 -1
- package/lib/types/src/edit-tool.d.ts +9 -1
- package/lib/types/src/mutation-engine/edit-expand.d.ts +36 -0
- package/lib/types/src/mutation-engine/edit-indent.d.ts +49 -0
- package/lib/types/src/mutation-engine/edit-request.d.ts +8 -0
- package/lib/types/src/mutation-engine/types.d.ts +57 -0
- package/lib/types/src/payload-contract.d.ts +8 -0
- package/lib/types/src/read-expansion/fold-skeleton.d.ts +32 -0
- package/lib/types/src/read-expansion/grammar-manifest.d.ts +3 -1
- package/lib/types/src/read-expansion/grammar-runtime.d.ts +1 -1
- package/lib/types/src/read-expansion/span-expansion.d.ts +26 -0
- package/package.json +21 -23
- package/prompts/codegraph-guidelines.md +8 -0
- package/prompts/diagnostics-guidelines.md +8 -0
- package/prompts/edit-guidelines.md +6 -2
- package/prompts/edit.md +3 -1
- package/prompts/read-description.md +1 -1
- package/prompts/read-guidelines.md +3 -1
- package/src/bundled-assets.ts +23 -0
- package/src/domain-errors.ts +52 -1
- package/src/edit-tool.ts +12 -1
- package/src/mutation-engine/edit-expand.ts +328 -0
- package/src/mutation-engine/edit-indent.ts +121 -0
- package/src/mutation-engine/edit-request.ts +8 -1
- package/src/mutation-engine/pipeline.ts +150 -48
- package/src/mutation-engine/types.ts +54 -0
- package/src/payload-contract.ts +165 -19
- package/src/read-expansion/ast-provider.ts +32 -0
- package/src/read-expansion/fold-skeleton.ts +56 -0
- package/src/read-expansion/grammar-cache.ts +33 -1
- package/src/read-expansion/grammar-manifest.ts +3 -1
- package/src/read-expansion/grammar-runtime.ts +1 -1
- package/src/read-expansion/qualified-names.ts +7 -0
- package/src/read-expansion/read-provider.ts +9 -0
- package/src/read-expansion/span-expansion.ts +26 -0
package/lib/client.js
CHANGED
|
@@ -31,7 +31,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
31
31
|
var SWITCHES = [
|
|
32
32
|
{ key: "read", label: "swRead", hint: "swReadHint", fallback: true },
|
|
33
33
|
{ key: "applyPatch", label: "swApplyPatch", hint: "swApplyPatchHint", fallback: true },
|
|
34
|
-
{ key: "edit", label: "swEdit", hint: "swEditHint", fallback: false }
|
|
34
|
+
{ key: "edit", label: "swEdit", hint: "swEditHint", fallback: false },
|
|
35
|
+
{ key: "codegraph", label: "swCodegraph", hint: "swCodegraphHint", fallback: false },
|
|
36
|
+
{ key: "diagnostics", label: "swDiagnostics", hint: "swDiagnosticsHint", fallback: false }
|
|
35
37
|
];
|
|
36
38
|
var en = {
|
|
37
39
|
swRead: "Read (shadow the host read)",
|
|
@@ -40,6 +42,10 @@ var en = {
|
|
|
40
42
|
swApplyPatchHint: "Expose apply_patch and hide the native edit / write / apply_patch / str_replace_editor tools.",
|
|
41
43
|
swEdit: "Edit (anchored ranges)",
|
|
42
44
|
swEditHint: "Expose the single-file edit tool: N anchored range items in one call. It shares anchors, the store and the mutation queue with apply_patch.",
|
|
45
|
+
swCodegraph: "Codegraph tools",
|
|
46
|
+
swCodegraphHint: "Expose the eight codegraph graph tools; explore, node and context serve their source as hash rows. Needs the codegraph CLI (1.6.4+); set codegraphPath in the row config to pin an executable outside PATH.",
|
|
47
|
+
swDiagnostics: "Diagnostics",
|
|
48
|
+
swDiagnosticsHint: "Expose the diagnostics tool: run cargo check/clippy or tsc and get the reported lines back as hash rows. Needs that toolchain on the machine; a missing one is reported as call text.",
|
|
43
49
|
groupTools: "Hashline tools",
|
|
44
50
|
groupToolsHint: "Toggle each tool live. Turning one off restores the host's own tool.",
|
|
45
51
|
save: "Save",
|
|
@@ -49,7 +55,7 @@ var en = {
|
|
|
49
55
|
rejected: "The host refused this save; reset and review your changes.",
|
|
50
56
|
loading: "Loading host settings\u2026",
|
|
51
57
|
unavailable: "Enable this row with the built-in switch to edit its settings.",
|
|
52
|
-
rowSummary: "Read, apply_patch and
|
|
58
|
+
rowSummary: "Read, apply_patch, edit, codegraph and diagnostics switches."
|
|
53
59
|
};
|
|
54
60
|
var zh = {
|
|
55
61
|
swRead: "\u8BFB\u53D6\uFF08\u906E\u853D\u5BBF\u4E3B read\uFF09",
|
|
@@ -58,6 +64,10 @@ var zh = {
|
|
|
58
64
|
swApplyPatchHint: "\u542F\u7528 apply_patch\uFF0C\u5E76\u9690\u85CF\u539F\u751F edit / write / apply_patch / str_replace_editor\u3002",
|
|
59
65
|
swEdit: "\u533A\u95F4\u7F16\u8F91",
|
|
60
66
|
swEditHint: "\u542F\u7528\u5355\u6587\u4EF6 edit \u5DE5\u5177\uFF1A\u4E00\u6B21\u8C03\u7528\u63D0\u4EA4 N \u5904\u951A\u5B9A\u533A\u95F4\u4FEE\u6539\uFF1B\u4E0E apply_patch \u5171\u7528\u951A\u70B9\u3001\u5B58\u50A8\u4E0E\u53D8\u66F4\u961F\u5217\u3002",
|
|
67
|
+
swCodegraph: "Codegraph \u56FE\u8C31\u5DE5\u5177",
|
|
68
|
+
swCodegraphHint: "\u542F\u7528 8 \u4E2A codegraph \u56FE\u8C31\u5DE5\u5177\uFF1Bexplore\u3001node\u3001context \u8FD4\u56DE\u7684\u6E90\u7801\u4F1A\u76F4\u63A5\u5E26\u4E0A\u54C8\u5E0C\u951A\u70B9\u3002\u9700\u8981 codegraph CLI\uFF081.6.4+\uFF09\uFF1B\u4E0D\u5728 PATH \u65F6\u5728\u884C\u914D\u7F6E\u91CC\u8BBE\u7F6E codegraphPath\u3002",
|
|
69
|
+
swDiagnostics: "\u7F16\u8BD1\u8BCA\u65AD",
|
|
70
|
+
swDiagnosticsHint: "\u542F\u7528 diagnostics \u5DE5\u5177\uFF1A\u8DD1 cargo check/clippy \u6216 tsc\uFF0C\u628A\u62A5\u9519\u884C\u4F5C\u4E3A\u54C8\u5E0C\u884C\u8FD4\u56DE\u3002\u9700\u8981\u673A\u5668\u4E0A\u6709\u5BF9\u5E94\u5DE5\u5177\u94FE\uFF1B\u7F3A\u5931\u65F6\u4EE5\u6587\u672C\u63D0\u793A\u8FD4\u56DE\u3002",
|
|
61
71
|
groupTools: "Hashline \u5DE5\u5177",
|
|
62
72
|
groupToolsHint: "\u5B9E\u65F6\u5207\u6362\u6BCF\u4E2A\u5DE5\u5177\uFF1B\u5173\u95ED\u540E\u6062\u590D\u5BBF\u4E3B\u81EA\u5E26\u5DE5\u5177\u3002",
|
|
63
73
|
save: "\u4FDD\u5B58",
|
|
@@ -67,7 +77,7 @@ var zh = {
|
|
|
67
77
|
rejected: "\u5BBF\u4E3B\u62D2\u7EDD\u4E86\u6B64\u6B21\u4FDD\u5B58\uFF1B\u8BF7\u91CD\u7F6E\u540E\u91CD\u65B0\u68C0\u67E5\u66F4\u6539\u3002",
|
|
68
78
|
loading: "\u6B63\u5728\u52A0\u8F7D\u5BBF\u4E3B\u8BBE\u7F6E\u2026",
|
|
69
79
|
unavailable: "\u8BF7\u5148\u7528\u5185\u7F6E\u5F00\u5173\u542F\u7528\u6B64\u884C\u540E\u518D\u7F16\u8F91\u8BBE\u7F6E\u3002",
|
|
70
|
-
rowSummary: "\u8BFB\u53D6\u3001apply_patch
|
|
80
|
+
rowSummary: "\u8BFB\u53D6\u3001apply_patch\u3001\u533A\u95F4\u7F16\u8F91\u3001codegraph \u4E0E diagnostics \u5F00\u5173\u3002"
|
|
71
81
|
};
|
|
72
82
|
var CSS = `
|
|
73
83
|
.hashline-settings { display:flex; flex-direction:column; gap:12px; font:inherit; color:var(--dsw-alias-label-primary,#222); }
|