Compare commits

..

2 Commits

Author SHA1 Message Date
f8d0895aab v1.10.0
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-12-02 12:17:10 +00:00
d7ec2220a1 feat(diff-processor): Improve diff sampling and file prioritization: increase inclusion thresholds, expand sampled context, and boost priority for interface/type and entry-point files 2025-12-02 12:17:10 +00:00
5 changed files with 28 additions and 8 deletions

View File

@@ -1,5 +1,13 @@
# Changelog # Changelog
## 2025-12-02 - 1.10.0 - feat(diff-processor)
Improve diff sampling and file prioritization: increase inclusion thresholds, expand sampled context, and boost priority for interface/type and entry-point files
- Raise small/medium file thresholds used by DiffProcessor (smallFileLines 50 -> 300, mediumFileLines 200 -> 800) so more source files are included fully or summarized rather than treated as large metadata-only files
- Increase sample window for medium files (sampleHeadLines/sampleTailLines 20 -> 75) to provide more context when summarizing diffs
- Boost importance scoring for interfaces/type files and entry points (adds +20 for interfaces/.types and +15 for index/mod entry files) to prioritize critical API surface in diff processing
- Keep other prioritization rules intact (source/test/config/docs/build heuristics), and align the aidoc commit DiffProcessor usage with the new defaults
## 2025-11-04 - 1.9.2 - fix(deps) ## 2025-11-04 - 1.9.2 - fix(deps)
Update dependencies and devDependencies to newer versions (bump multiple packages) Update dependencies and devDependencies to newer versions (bump multiple packages)

View File

@@ -1,6 +1,6 @@
{ {
"name": "@git.zone/tsdoc", "name": "@git.zone/tsdoc",
"version": "1.9.2", "version": "1.10.0",
"private": false, "private": false,
"description": "A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.", "description": "A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.",
"type": "module", "type": "module",

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/tsdoc', name: '@git.zone/tsdoc',
version: '1.9.2', version: '1.10.0',
description: 'A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.' description: 'A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.'
} }

View File

@@ -92,10 +92,10 @@ export class Commit {
// Use DiffProcessor to intelligently handle large diffs // Use DiffProcessor to intelligently handle large diffs
const diffProcessor = new DiffProcessor({ const diffProcessor = new DiffProcessor({
maxDiffTokens: 100000, // Reserve 100k tokens for diffs maxDiffTokens: 100000, // Reserve 100k tokens for diffs
smallFileLines: 50, // Include files <= 50 lines fully smallFileLines: 300, // Most source files are under 300 lines
mediumFileLines: 200, // Summarize files <= 200 lines mediumFileLines: 800, // Only very large files get head/tail treatment
sampleHeadLines: 20, // Show first 20 lines sampleHeadLines: 75, // When sampling, show more context
sampleTailLines: 20, // Show last 20 lines sampleTailLines: 75, // When sampling, show more context
}); });
const processedDiff = diffProcessor.processDiffs(diffStringArray); const processedDiff = diffProcessor.processDiffs(diffStringArray);

View File

@@ -239,8 +239,20 @@ export class DiffProcessor {
return 10; return 10;
} }
// Everything else - default priority // Start with default priority
return 50; let score = 50;
// Boost interface/type files - they're usually small but critical
if (filepath.includes('interfaces/') || filepath.includes('.types.')) {
score += 20;
}
// Boost entry points
if (filepath.endsWith('index.ts') || filepath.endsWith('mod.ts')) {
score += 15;
}
return score;
} }
/** /**