dsh-codebase-chat 0.19.0 → 0.21.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 +33 -5
- package/dist/cli.js +409 -85
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +45 -2
- package/dist/index.js +390 -75
- package/dist/index.js.map +1 -1
- package/lib/index.js +62 -7
- package/package.json +13 -10
package/README.md
CHANGED
|
@@ -84,12 +84,12 @@ chunks that matter, and assembles a **sourced prompt** — every answer comes ba
|
|
|
84
84
|
### Option A — DeepSeek Harness plugin
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
|
-
|
|
88
|
-
#
|
|
89
|
-
|
|
87
|
+
dsh plugin --profile web add dsh-codebase-chat
|
|
88
|
+
# without a global dsh install:
|
|
89
|
+
npx -p @deepseek-ai/dsh dsh plugin --profile web add dsh-codebase-chat
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
Then open `http://127.0.0.1:3080` and click the **Codebase Pro** button in the sidebar.
|
|
92
|
+
Then restart `dsh web`, open `http://127.0.0.1:3080` and click the **Codebase Pro** button in the sidebar.
|
|
93
93
|
|
|
94
94
|
### Option B — MCP server (Cursor, Claude, Windsurf…)
|
|
95
95
|
|
|
@@ -187,7 +187,7 @@ graph LR
|
|
|
187
187
|
E --> F[Cited answer]
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
1. **Index** — AST
|
|
190
|
+
1. **Index** — real AST extraction (Babel for JS/TS, tree-sitter WASM for Python, Go, Rust, Java, C# and PHP, regex fallback elsewhere) builds a symbol-level index, cached on disk and refreshed incrementally (mtime/size based — no full re-reads).
|
|
191
191
|
2. **Retrieve** — lexical scoring plus optional local multilingual embeddings (`Xenova/paraphrase-multilingual-MiniLM-L12-v2`) select the most relevant chunks inside a token budget.
|
|
192
192
|
3. **Prompt** — a language-aware prompt is assembled with module graphs, metrics, debt signals, and file excerpts.
|
|
193
193
|
4. **Answer** — the model responds with `[source: file:line]` citations, `[Confidence: X%]`, and `[Severity: …]` labels.
|
|
@@ -201,6 +201,34 @@ before overwriting, enforce protected paths, and never write outside the selecte
|
|
|
201
201
|
|
|
202
202
|
## Configuration
|
|
203
203
|
|
|
204
|
+
### `.codebase-chat.json` — per-project settings
|
|
205
|
+
|
|
206
|
+
Drop this file at the project root to tune indexing, prompts and safety. Every key
|
|
207
|
+
is optional; explicit CLI flags and tool arguments always take precedence, and a
|
|
208
|
+
missing or malformed file falls back to built-in defaults.
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"lang": "en",
|
|
213
|
+
"maxTokens": 60000,
|
|
214
|
+
"ignoreDirs": ["generated", "fixtures"],
|
|
215
|
+
"ignoreFiles": ["bundle.js"],
|
|
216
|
+
"ignoreGlobs": ["src/vendor/**", "*.snap"],
|
|
217
|
+
"protectedPaths": ["src/locked", "migrations"]
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
| Key | Effect |
|
|
222
|
+
| --- | --- |
|
|
223
|
+
| `lang` | Default prompt language (`en` or `fr`) for the CLI, MCP tools and slash commands |
|
|
224
|
+
| `maxTokens` | Default context budget when the caller passes none |
|
|
225
|
+
| `ignoreDirs` | Extra directory names skipped by indexing, `codebase_health` and the file tree |
|
|
226
|
+
| `ignoreFiles` | Extra file names skipped the same way |
|
|
227
|
+
| `ignoreGlobs` | Globs on project-relative paths — `**` spans directories, `*` one segment, `?` one char |
|
|
228
|
+
| `protectedPaths` | Extra paths the apply pipeline can never patch (adds to `DSH_PROTECTED_PATHS` and built-ins) |
|
|
229
|
+
|
|
230
|
+
### Environment variables
|
|
231
|
+
|
|
204
232
|
| Variable | Default | Purpose |
|
|
205
233
|
| --- | --- | --- |
|
|
206
234
|
| `CODEBASE_CACHE_DIR` | OS cache dir | Where the index cache lives |
|