@ninjaxtools/slopdex 0.27.0 → 0.29.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/README.md CHANGED
@@ -112,21 +112,22 @@ $ export OPENAI_API_KEY="your-api-key"
112
112
  # Or
113
113
  # opencode auth login # use stored credentials instead of env variables
114
114
 
115
- $ slopdex descriptions enable
115
+ $ slopdex config set descriptionsEnabled true
116
116
  $ slopdex search-descriptions "keep the repository index synchronized"
117
117
  ```
118
118
 
119
119
  You can list and configure one of OpenCode's models like this (or use the interactive config):
120
120
 
121
121
  ```console
122
- $ slopdex models opencode-go
123
- $ slopdex config model opencode-go/gpt-5.6-luna
124
- $ slopdex config fallback-model opencode-go/muse-spark-1.3-contributor
122
+ $ slopdex help models opencode-go
123
+ $ slopdex config set descriptionProvider opencode-go
124
+ $ slopdex config set descriptionModel gpt-5.6-luna
125
+ $ slopdex config set descriptionFallbackModel muse-spark-1.3-contributor
125
126
  ```
126
127
 
127
128
  The fallback-model is used if the main model reports an error, and if the fallback-model reports an error the main model is tried again.
128
129
 
129
- File and function descriptions are cached by source and description context, so renaming a file can reuse its descriptions. Function changes or a changed file-description context can require new callable descriptions. File descriptions after edits can be refreshed explicitly with `reindex-files`.
130
+ File and function descriptions are cached by source and description context, so renaming a file can reuse its descriptions. Function changes or a changed file-description context can require new callable descriptions. File descriptions after edits can be refreshed explicitly with `index reindex-files`.
130
131
 
131
132
  ### Interactive Config
132
133
 
@@ -152,29 +153,15 @@ Compare functions across files, exclude short wrappers, and group matches into c
152
153
 
153
154
  ```console
154
155
  $ slopdex cross-search --cross-file-only --lines 4 --threshold 0.9
155
- Cluster 1 · 3 functions · similarity 0.9124-0.9568
156
-
157
- *** src/auth/session.ts
158
- @@ 18-29 @@
159
- export function validateSession(token: string): Session
160
-
161
- *** src/http/middleware.ts
162
- @@ 42-57 @@
163
- export function authenticate(req: Request): Session
164
-
165
- *** src/users/user-service.ts
166
- @@ 27-48 @@ UserService.authenticate
167
- authenticate(token: string): Session
156
+ *** Cluster 1 · 3 symbols · similarity 0.91-0.96
157
+ src/auth/session.ts:18-29:validateSession
158
+ src/http/middleware.ts:42-57:authenticate
159
+ src/users/user-service.ts:27-48:UserService.authenticate
168
160
  ...
169
161
  ```
170
162
 
171
163
  Using `--cross-file-only` is useful to exclude similar code in the same file.
172
164
 
173
- Cross-search defaults to `--threshold 0.8` (query search defaults to `0.3`).
174
- Clusters join matches transitively, so a low threshold can connect many groups
175
- into one large cluster. Use `0.9` for stricter duplicate detection, or explicitly
176
- pass `--threshold 0.3` for the pre-rewrite default.
177
-
178
165
  You can use threshold and line-count ranges as well. Range starts are inclusive
179
166
  and ends are exclusive, so `--lines 4-20` selects functions with 4 through 19
180
167
  lines:
@@ -218,7 +205,7 @@ Just put this in your `AGENTS.md` file and adjust as desired, no skill necessary
218
205
  ```
219
206
  - use `slopdex map -g "<glob>" -i -e "<regex>" <files or directories...>` to obtain a compact structural code skeleton, and then perform targeted reads using the line numbers for implementation details. To filter for specific symbols, use `-e`. To only include specific kinds of symbols use `-k` with `imports`, `fns`, `consts`, `types`, or `classes`.
220
207
  - use semantic code search to find code with: `slopdex search "<query>" --threshold 0.5`; vary the search query if you get no results
221
- - when reviewing uncommitted code avoid introducing duplicates by looking for related matches: `slopdex cross-search --uncommitted --cross-file-only --threshold 0.8`
208
+ - when reviewing uncommitted determine if similar code elsewhere warrants a refactor: `slopdex cross-search --uncommitted --cross-file-only --threshold 0.8`
222
209
  - when tasked to do advanced codebase analysis, use `slopdex --help` first to see all options
223
210
  ```
224
211
 
@@ -228,9 +215,10 @@ Optionally a second-stage reranker can be enabled for all query-search commands:
228
215
 
229
216
  ```console
230
217
  $ export COHERE_API_KEY="your-api-key"
231
- $ slopdex config reranker cohere
232
- # Or: export JINA_API_KEY="your-api-key" && slopdex config reranker jina
233
- # Or use an LLM: export OPENAI_API_KEY="your-api-key" && slopdex config reranker openai
218
+ $ slopdex config set rerankerProvider cohere
219
+ $ slopdex config set rerankingEnabled true
220
+ # Or: export JINA_API_KEY="your-api-key" && slopdex config set rerankerProvider jina
221
+ # Or use an LLM: export OPENAI_API_KEY="your-api-key" && slopdex config set rerankerProvider openai
234
222
  ```
235
223
 
236
224
  ### Compare repositories
@@ -246,11 +234,11 @@ Pass the target's `indexPath` from `slopdex --root /path/to/other/repo --format
246
234
 
247
235
  ### Inspect index health
248
236
 
249
- If some functions can't be indexed a warning is printed. Index errors can be investigated and fixed with the `index-errors` command to ensure the index is complete.
237
+ If some functions can't be indexed a warning is printed. Index errors can be investigated and fixed with the `index errors` command to ensure the index is complete.
250
238
 
251
239
  ```console
252
240
  $ slopdex status
253
- $ slopdex index-errors --format summary
241
+ $ slopdex index errors --format summary
254
242
  $ slopdex --version
255
243
  ```
256
244
 
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT",
21
21
  "name": "@ninjaxtools/slopdex",
22
- "version": "0.27.0"
22
+ "version": "0.29.0"
23
23
  },
24
24
  "node_modules/detect-libc": {
25
25
  "engines": {
@@ -48,5 +48,5 @@
48
48
  }
49
49
  },
50
50
  "requires": true,
51
- "version": "0.27.0"
51
+ "version": "0.29.0"
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/ninjaxtools/slopdex/releases/download/v0.27.0"
3
+ "https://github.com/ninjaxtools/slopdex/releases/download/v0.29.0"
4
4
  ],
5
5
  "bin": {
6
6
  "slopdex": "run-slopdex.js"
@@ -80,7 +80,7 @@
80
80
  "zipExt": ".tar.xz"
81
81
  }
82
82
  },
83
- "version": "0.27.0",
83
+ "version": "0.29.0",
84
84
  "volta": {
85
85
  "node": "18.14.1",
86
86
  "npm": "9.5.0"