gitnexus 1.6.11-rc.34 → 1.6.11-rc.35
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/dist/cli/detect-changes-format.js +21 -0
- package/dist/cli/i18n/en.d.ts +1 -0
- package/dist/cli/i18n/en.js +1 -0
- package/dist/cli/i18n/resources.d.ts +2 -0
- package/dist/cli/i18n/zh-CN.d.ts +1 -0
- package/dist/cli/i18n/zh-CN.js +1 -0
- package/dist/mcp/local/local-backend.js +3 -0
- package/package.json +1 -1
|
@@ -20,6 +20,27 @@ export function formatDetectChangesResult(result) {
|
|
|
20
20
|
if (payload.truncated)
|
|
21
21
|
notes.push(t(payload.partial ? 'tool.detectChanges.truncatedDegraded' : 'tool.detectChanges.truncated'));
|
|
22
22
|
if ((summary.changed_count ?? 0) === 0) {
|
|
23
|
+
// Parse-fail payloads set `partial` and an honest `message` (#2915/#3131).
|
|
24
|
+
// Production *clean* trees also set English `message: 'No changes detected.'`
|
|
25
|
+
// — that must go through `t('tool.detectChanges.noChanges')` or zh-CN never
|
|
26
|
+
// fires. Only pass the backend string through on a degraded/parse-fail run.
|
|
27
|
+
if (payload.partial &&
|
|
28
|
+
typeof summary.message === 'string' &&
|
|
29
|
+
summary.message.trim().length > 0) {
|
|
30
|
+
return [...notes, summary.message.trim()].join('\n');
|
|
31
|
+
}
|
|
32
|
+
// Confirmed no-overlap: files parsed, mapping succeeded, zero symbols.
|
|
33
|
+
// `queryDegraded` is `partial: true` with the same counts and no message —
|
|
34
|
+
// do not call that a confirmed mapping (#3131 honesty).
|
|
35
|
+
if (!payload.partial && (summary.changed_files ?? 0) > 0) {
|
|
36
|
+
return [
|
|
37
|
+
...notes,
|
|
38
|
+
t('tool.detectChanges.noOverlappingSymbols', { files: summary.changed_files }),
|
|
39
|
+
].join('\n');
|
|
40
|
+
}
|
|
41
|
+
if (payload.partial) {
|
|
42
|
+
return notes.join('\n');
|
|
43
|
+
}
|
|
23
44
|
return [...notes, t('tool.detectChanges.noChanges')].join('\n');
|
|
24
45
|
}
|
|
25
46
|
const lines = [];
|
package/dist/cli/i18n/en.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export declare const en: {
|
|
|
66
66
|
readonly 'tool.usage.cypher': "Usage: gitnexus cypher <cypher_query>";
|
|
67
67
|
readonly 'tool.warn.unknownKind': "--kind '{{kind}}' is not a known symbol kind (e.g. Function, Class, Method); it will not narrow the result.";
|
|
68
68
|
readonly 'tool.detectChanges.noChanges': "No changes detected.";
|
|
69
|
+
readonly 'tool.detectChanges.noOverlappingSymbols': "Diff touched {{files}} file(s) but no indexed symbols overlap those hunks — not a clean tree.";
|
|
69
70
|
readonly 'tool.detectChanges.partial': "PARTIAL RESULT: a graph query failed, so changed symbols may be missing. Do not read this as a clean pre-commit check.";
|
|
70
71
|
readonly 'tool.detectChanges.truncated': "LISTING CAPPED: the changed-symbol list was capped, so it does not name every changed symbol. The counts and risk level still cover all of them.";
|
|
71
72
|
readonly 'tool.detectChanges.truncatedDegraded': "LISTING CAPPED: the changed-symbol list was capped. The run also degraded, so the counts are a lower bound, not a total.";
|
package/dist/cli/i18n/en.js
CHANGED
|
@@ -66,6 +66,7 @@ export const en = {
|
|
|
66
66
|
'tool.usage.cypher': 'Usage: gitnexus cypher <cypher_query>',
|
|
67
67
|
'tool.warn.unknownKind': "--kind '{{kind}}' is not a known symbol kind (e.g. Function, Class, Method); it will not narrow the result.",
|
|
68
68
|
'tool.detectChanges.noChanges': 'No changes detected.',
|
|
69
|
+
'tool.detectChanges.noOverlappingSymbols': 'Diff touched {{files}} file(s) but no indexed symbols overlap those hunks — not a clean tree.',
|
|
69
70
|
'tool.detectChanges.partial': 'PARTIAL RESULT: a graph query failed, so changed symbols may be missing. Do not read this as a clean pre-commit check.',
|
|
70
71
|
'tool.detectChanges.truncated': 'LISTING CAPPED: the changed-symbol list was capped, so it does not name every changed symbol. The counts and risk level still cover all of them.',
|
|
71
72
|
// The reassurance above is only true on its own. When the run also degraded,
|
|
@@ -67,6 +67,7 @@ export declare const cliResources: {
|
|
|
67
67
|
readonly 'tool.usage.cypher': "Usage: gitnexus cypher <cypher_query>";
|
|
68
68
|
readonly 'tool.warn.unknownKind': "--kind '{{kind}}' is not a known symbol kind (e.g. Function, Class, Method); it will not narrow the result.";
|
|
69
69
|
readonly 'tool.detectChanges.noChanges': "No changes detected.";
|
|
70
|
+
readonly 'tool.detectChanges.noOverlappingSymbols': "Diff touched {{files}} file(s) but no indexed symbols overlap those hunks — not a clean tree.";
|
|
70
71
|
readonly 'tool.detectChanges.partial': "PARTIAL RESULT: a graph query failed, so changed symbols may be missing. Do not read this as a clean pre-commit check.";
|
|
71
72
|
readonly 'tool.detectChanges.truncated': "LISTING CAPPED: the changed-symbol list was capped, so it does not name every changed symbol. The counts and risk level still cover all of them.";
|
|
72
73
|
readonly 'tool.detectChanges.truncatedDegraded': "LISTING CAPPED: the changed-symbol list was capped. The run also degraded, so the counts are a lower bound, not a total.";
|
|
@@ -331,6 +332,7 @@ export declare const cliResources: {
|
|
|
331
332
|
'tool.usage.cypher': string;
|
|
332
333
|
'tool.warn.unknownKind': string;
|
|
333
334
|
'tool.detectChanges.noChanges': string;
|
|
335
|
+
'tool.detectChanges.noOverlappingSymbols': string;
|
|
334
336
|
'tool.detectChanges.partial': string;
|
|
335
337
|
'tool.detectChanges.truncated': string;
|
|
336
338
|
'tool.detectChanges.truncatedDegraded': string;
|
package/dist/cli/i18n/zh-CN.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export declare const zhCN: {
|
|
|
66
66
|
'tool.usage.cypher': string;
|
|
67
67
|
'tool.warn.unknownKind': string;
|
|
68
68
|
'tool.detectChanges.noChanges': string;
|
|
69
|
+
'tool.detectChanges.noOverlappingSymbols': string;
|
|
69
70
|
'tool.detectChanges.partial': string;
|
|
70
71
|
'tool.detectChanges.truncated': string;
|
|
71
72
|
'tool.detectChanges.truncatedDegraded': string;
|
package/dist/cli/i18n/zh-CN.js
CHANGED
|
@@ -66,6 +66,7 @@ export const zhCN = {
|
|
|
66
66
|
'tool.usage.cypher': '用法:gitnexus cypher <Cypher 查询>',
|
|
67
67
|
'tool.warn.unknownKind': "--kind '{{kind}}' 不是已知的符号类型(如 Function、Class、Method),不会用于缩小结果范围。",
|
|
68
68
|
'tool.detectChanges.noChanges': '未检测到变更。',
|
|
69
|
+
'tool.detectChanges.noOverlappingSymbols': 'diff 触及 {{files}} 个文件,但没有索引符号与这些 hunk 重叠 — 并非干净工作区。',
|
|
69
70
|
'tool.detectChanges.partial': '结果不完整:图查询失败,可能遗漏已变更符号。请勿将其视为通过的提交前检查。',
|
|
70
71
|
'tool.detectChanges.truncated': '列表已截断:已变更符号列表被截断,未列出全部变更符号。计数与风险等级仍涵盖全部符号。',
|
|
71
72
|
'tool.detectChanges.truncatedDegraded': '列表已截断:已变更符号列表被截断。本次运行同时不完整,因此计数为下限而非总数。',
|
|
@@ -655,6 +655,9 @@ export function buildDetectChangesDiffArgs(scope, baseRef) {
|
|
|
655
655
|
'diff',
|
|
656
656
|
'--ignore-cr-at-eol',
|
|
657
657
|
'--no-ext-diff',
|
|
658
|
+
// color.ui=always prefixes `+++ b/` with ANSI, so parseDiffHunks sees zero
|
|
659
|
+
// files and the CLI used to print a clean "No changes detected." (#3131).
|
|
660
|
+
'--color=never',
|
|
658
661
|
'--src-prefix=a/',
|
|
659
662
|
'--dst-prefix=b/',
|
|
660
663
|
];
|
package/package.json
CHANGED