kcode-pi 0.1.14 → 0.1.15

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.
@@ -46,7 +46,7 @@ export async function inspectSdkSignature(cwd: string, params: SdkSignatureParam
46
46
  query,
47
47
  exitCode: 2,
48
48
  stdout: "",
49
- stderr: "Provide query or className for kd_sdk_signature. method is only a filter within a matched class/type.",
49
+ stderr: "kd_sdk_signature 需要提供 query classNamemethod 只是在已匹配类/类型内部过滤。",
50
50
  sources: [],
51
51
  };
52
52
  }
@@ -57,14 +57,14 @@ export async function inspectSdkSignature(cwd: string, params: SdkSignatureParam
57
57
 
58
58
  export function formatSdkSignatureResult(result: SdkSignatureResult): string {
59
59
  return [
60
- `Language: ${result.language}`,
61
- `Query: ${result.query}`,
62
- `Exit: ${result.exitCode}`,
63
- result.sources.length ? `Sources:\n${result.sources.map((source) => `- ${source}`).join("\n")}` : "Sources: none",
60
+ `语言:${result.language}`,
61
+ `查询:${result.query}`,
62
+ `退出码:${result.exitCode}`,
63
+ result.sources.length ? `来源:\n${result.sources.map((source) => `- ${source}`).join("\n")}` : "来源:无",
64
64
  result.stdout.trim() ? `\nSTDOUT:\n${result.stdout.trim()}` : undefined,
65
65
  result.stderr.trim() ? `\nSTDERR:\n${result.stderr.trim()}` : undefined,
66
66
  "",
67
- "Use this as local SDK evidence only when Exit is 0. If it fails, use build output or project SDK configuration before trusting bundled knowledge.",
67
+ "只有退出码为 0 时,才能把该结果作为本地 SDK 证据。失败时,应先使用构建输出或项目 SDK 配置查证,再相信随包知识库。",
68
68
  ]
69
69
  .filter(Boolean)
70
70
  .join("\n");
@@ -79,7 +79,7 @@ async function inspectJavaSignature(cwd: string, params: SdkSignatureParams, que
79
79
  query,
80
80
  exitCode: 2,
81
81
  stdout: "",
82
- stderr: "No jar files found in the current project. Build/copy dependencies first or pass path=<sdk/lib directory>.",
82
+ stderr: "当前项目未找到 jar 文件。请先构建/复制依赖,或传入 path=<sdk/lib 目录>。",
83
83
  sources: [],
84
84
  };
85
85
  }
@@ -91,7 +91,7 @@ async function inspectJavaSignature(cwd: string, params: SdkSignatureParams, que
91
91
  query,
92
92
  exitCode: 1,
93
93
  stdout: "",
94
- stderr: `No class matching "${query}" found in project jars.`,
94
+ stderr: `项目 jar 中未找到匹配 "${query}" 的类。`,
95
95
  sources: jars.map((jar) => relativeOrSelf(cwd, jar)).slice(0, 20),
96
96
  };
97
97
  }
@@ -136,7 +136,7 @@ async function inspectCsharpSignature(cwd: string, params: SdkSignatureParams, q
136
136
  query,
137
137
  exitCode: 2,
138
138
  stdout: "",
139
- stderr: "No dll files found in the current project. Build/restore references first or pass path=<sdk/bin directory>.",
139
+ stderr: "当前项目未找到 dll 文件。请先构建/还原引用,或传入 path=<sdk/bin 目录>。",
140
140
  sources: [],
141
141
  };
142
142
  }
@@ -180,7 +180,7 @@ async function inspectCsharpSignature(cwd: string, params: SdkSignatureParams, q
180
180
  query,
181
181
  exitCode: stdout.trim() ? 0 : 1,
182
182
  stdout,
183
- stderr: stdout.trim() ? "" : `No public type matching "${query}" found in project dlls.`,
183
+ stderr: stdout.trim() ? "" : `项目 dll 中未找到匹配 "${query}" 的公开类型。`,
184
184
  sources: dlls.map((dll) => relativeOrSelf(cwd, dll)).slice(0, 20),
185
185
  };
186
186
  } catch (error) {