dsh-codebase-chat 0.19.0 → 0.22.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
@@ -84,19 +84,21 @@ 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
- pnpm add dsh-codebase-chat
88
- # or
89
- npm install dsh-codebase-chat
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
 
96
96
  ```bash
97
- npx dsh-codebase-chat-mcp
97
+ npx dsh-codebase-chat-mcp setup # detects Claude/Cursor/Windsurf/VS Code and writes the config
98
98
  ```
99
99
 
100
+ Or configure manually:
101
+
100
102
  ```json
101
103
  {
102
104
  "mcpServers": {
@@ -187,7 +189,7 @@ graph LR
187
189
  E --> F[Cited answer]
188
190
  ```
189
191
 
190
- 1. **Index** — AST + regex extraction builds a symbol-level index, cached on disk and refreshed incrementally (mtime/size based — no full re-reads).
192
+ 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
193
  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
194
  3. **Prompt** — a language-aware prompt is assembled with module graphs, metrics, debt signals, and file excerpts.
193
195
  4. **Answer** — the model responds with `[source: file:line]` citations, `[Confidence: X%]`, and `[Severity: …]` labels.
@@ -201,6 +203,34 @@ before overwriting, enforce protected paths, and never write outside the selecte
201
203
 
202
204
  ## Configuration
203
205
 
206
+ ### `.codebase-chat.json` — per-project settings
207
+
208
+ Drop this file at the project root to tune indexing, prompts and safety. Every key
209
+ is optional; explicit CLI flags and tool arguments always take precedence, and a
210
+ missing or malformed file falls back to built-in defaults.
211
+
212
+ ```json
213
+ {
214
+ "lang": "en",
215
+ "maxTokens": 60000,
216
+ "ignoreDirs": ["generated", "fixtures"],
217
+ "ignoreFiles": ["bundle.js"],
218
+ "ignoreGlobs": ["src/vendor/**", "*.snap"],
219
+ "protectedPaths": ["src/locked", "migrations"]
220
+ }
221
+ ```
222
+
223
+ | Key | Effect |
224
+ | --- | --- |
225
+ | `lang` | Default prompt language (`en` or `fr`) for the CLI, MCP tools and slash commands |
226
+ | `maxTokens` | Default context budget when the caller passes none |
227
+ | `ignoreDirs` | Extra directory names skipped by indexing, `codebase_health` and the file tree |
228
+ | `ignoreFiles` | Extra file names skipped the same way |
229
+ | `ignoreGlobs` | Globs on project-relative paths — `**` spans directories, `*` one segment, `?` one char |
230
+ | `protectedPaths` | Extra paths the apply pipeline can never patch (adds to `DSH_PROTECTED_PATHS` and built-ins) |
231
+
232
+ ### Environment variables
233
+
204
234
  | Variable | Default | Purpose |
205
235
  | --- | --- | --- |
206
236
  | `CODEBASE_CACHE_DIR` | OS cache dir | Where the index cache lives |