dsh-codebase-chat 0.24.0 → 0.25.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/README.md +1 -0
- package/dist/cli.js +932 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +44 -2
- package/dist/index.js +961 -6
- package/dist/index.js.map +1 -1
- package/lib/index.js +45 -275
- package/package.json +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -244,7 +244,7 @@ declare function loadProjectConfig(absProject: string): Promise<ProjectConfig>;
|
|
|
244
244
|
declare function clearConfigCache(absProject?: string): void;
|
|
245
245
|
/** Minimal glob → RegExp: `**` spans directories, `*` one segment, `?` one char. */
|
|
246
246
|
declare function globToRegExp(glob: string): RegExp;
|
|
247
|
-
/** Match a project-relative path (posix separators) against a list of globs. */
|
|
247
|
+
/** Match a project-relative path (posix separators) against a list of globs. Globs without `/` match the basename at any depth (gitignore-style). */
|
|
248
248
|
declare function matchesAnyGlob(relPath: string, globs: string[] | undefined): boolean;
|
|
249
249
|
|
|
250
250
|
interface DiffScope {
|
|
@@ -261,4 +261,46 @@ interface DiffScope {
|
|
|
261
261
|
*/
|
|
262
262
|
declare function getChangedFiles(absProject: string, base: string): Promise<DiffScope>;
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
interface ToolPromptOptions {
|
|
265
|
+
context: string;
|
|
266
|
+
projectName: string;
|
|
267
|
+
lang?: string;
|
|
268
|
+
style?: string;
|
|
269
|
+
query?: string;
|
|
270
|
+
focus?: string;
|
|
271
|
+
filePath?: string;
|
|
272
|
+
description?: string;
|
|
273
|
+
crea?: boolean;
|
|
274
|
+
creaTheme?: string;
|
|
275
|
+
}
|
|
276
|
+
declare function langInstruction(lang?: string): string;
|
|
277
|
+
declare function normalizeLabels(prompt: string, lang: string): string;
|
|
278
|
+
declare function buildChatPrompt(question: string, context: string, projectName: string, crea?: boolean, creaTheme?: string, lang?: string): string;
|
|
279
|
+
declare function buildSearchPrompt(query: string, context: string, projectName: string, crea?: boolean, creaTheme?: string, lang?: string): string;
|
|
280
|
+
declare function buildExplainPrompt(target: string, context: string, projectName: string, crea?: boolean, creaTheme?: string, lang?: string): string;
|
|
281
|
+
declare function buildRefactorPrompt(filePath: string, description: string, context: string, projectName: string, crea?: boolean, creaTheme?: string, lang?: string): string;
|
|
282
|
+
declare function buildCreaPrompt(theme: string, context: string, projectName: string, lang?: string): string;
|
|
283
|
+
declare function styleInstruction(style?: string, lang?: string): string;
|
|
284
|
+
declare function buildIntelligencePrompt(context: string, projectName: string, focus?: string, style?: string, lang?: string): string;
|
|
285
|
+
declare function buildAuditPrompt(context: string, projectName: string, focus?: string, lang?: string): string;
|
|
286
|
+
declare function brandSignature(lang?: string): string;
|
|
287
|
+
declare function buildAsciiBanner(projectName: string, modeLabel: string, tagline?: string): string;
|
|
288
|
+
declare function buildReportPrompt(context: string, projectName: string, focus?: string, style?: string, lang?: string): string;
|
|
289
|
+
declare function buildTasksPrompt(context: string, projectName: string, focus?: string, style?: string, lang?: string): string;
|
|
290
|
+
declare function buildCeoPrompt(context: string, projectName: string, focus?: string, lang?: string): string;
|
|
291
|
+
declare function buildBuildPrompt(context: string, projectName: string, focus?: string, lang?: string): string;
|
|
292
|
+
declare function buildPlayerPrompt(context: string, projectName: string, focus?: string, lang?: string): string;
|
|
293
|
+
declare function buildGitPrompt(context: string, projectName: string, focus?: string, lang?: string): string;
|
|
294
|
+
declare function buildApplyPrompt(filePath: string, newContent: string, projectName: string, lang?: string): string;
|
|
295
|
+
/**
|
|
296
|
+
* Assemble the full LLM prompt (context + persona + mandatory sections +
|
|
297
|
+
* ASCII banner + citation rules) for a codebase_* tool — the same text the
|
|
298
|
+
* DeepSeek Harness plugin sends, so MCP clients and the CLI get identical
|
|
299
|
+
* reports. Unknown tool names throw.
|
|
300
|
+
*/
|
|
301
|
+
declare function buildToolPrompt(tool: string, opts: ToolPromptOptions): string;
|
|
302
|
+
|
|
303
|
+
declare function isLocalLlmEnabled(): boolean;
|
|
304
|
+
declare function callLocalLlm(prompt: string, lang?: string): Promise<string>;
|
|
305
|
+
|
|
306
|
+
export { CONFIG_FILE, type CloneGroup, type CodeChunk, type CodeIndex, type ConfigLang, type ContextOptions, type ContextResult, type Cycle, type DiffScope, type HealthReport, type Hotspot, type ImpactDependent, type ImpactReport, type ImpactResult, type IndexedFile, type InvertedIndex, type ProjectConfig, type ToolPromptOptions, type UnusedExport, analyzeImpact, analyzeProject, brandSignature, buildApplyPrompt, buildAsciiBanner, buildAuditPrompt, buildBuildPrompt, buildCeoPrompt, buildChatPrompt, buildContext, buildCreaPrompt, buildExplainPrompt, buildGitPrompt, buildIndex, buildIntelligencePrompt, buildPlayerPrompt, buildRefactorPrompt, buildReportPrompt, buildSearchPrompt, buildTasksPrompt, buildToolPrompt, callLocalLlm, chunkByTokens, clearConfigCache, cosineSimilarity, countTokens, disposeTreeSitter, embedIndex, ensureTreeSitterForExt, extractChunks, findProjectRoot, formatHealthReport, formatHealthReportMd, formatImpactReport, formatImpactReportMd, getCacheDir, getChangedFiles, getEmbedding, getEmbeddings, getExtractor, getIndex, globToRegExp, initTreeSitter, isLocalLlmEnabled, langInstruction, loadIndex, loadProjectConfig, matchesAnyGlob, normalizeLabels, resolveProjectPath, saveIndex, scoreChunks, selectChunks, styleInstruction, treeSitterReady, truncateToTokens };
|