ai-project-manage-cli 6.0.104 → 6.0.105
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/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2035,6 +2035,9 @@ import { basename as basename3 } from "path";
|
|
|
2035
2035
|
// src/assumptions/local-validate.ts
|
|
2036
2036
|
var NO_ASSUMPTIONS_RE = /无[,,]?\s*口径均有依据/;
|
|
2037
2037
|
var BLOCK_HEADER_RE = /^####\s+(A\d+)\s*$/im;
|
|
2038
|
+
function formatAssumptionQuestionId(source, code) {
|
|
2039
|
+
return `${source}:${code}`;
|
|
2040
|
+
}
|
|
2038
2041
|
var DEV_PATTERNS = [
|
|
2039
2042
|
{ pattern: /status\s*=/i, message: "\u5305\u542B status= \u7B49\u6280\u672F\u679A\u4E3E" },
|
|
2040
2043
|
{ pattern: /\.(java|vue|ts|tsx|jsx|sql)\b/i, message: "\u5305\u542B\u6587\u4EF6\u8DEF\u5F84" },
|
|
@@ -2064,7 +2067,7 @@ function parseField(block, label) {
|
|
|
2064
2067
|
const value = match?.[1]?.trim();
|
|
2065
2068
|
return value || void 0;
|
|
2066
2069
|
}
|
|
2067
|
-
function parseStructuredBlock(code, block) {
|
|
2070
|
+
function parseStructuredBlock(code, block, source) {
|
|
2068
2071
|
const pmQuestion = parseField(block, "\u95EE") ?? parseField(block, "prompt");
|
|
2069
2072
|
if (!pmQuestion) return null;
|
|
2070
2073
|
const optionsSection = block.match(
|
|
@@ -2073,7 +2076,7 @@ function parseStructuredBlock(code, block) {
|
|
|
2073
2076
|
const options = optionsSection ? parseOptionsBlock(optionsSection[1]) : [];
|
|
2074
2077
|
return {
|
|
2075
2078
|
code,
|
|
2076
|
-
questionId: code,
|
|
2079
|
+
questionId: formatAssumptionQuestionId(source, code),
|
|
2077
2080
|
pmQuestion,
|
|
2078
2081
|
context: parseField(block, "\u573A\u666F"),
|
|
2079
2082
|
options,
|
|
@@ -2104,7 +2107,7 @@ function parseAssumptionsDocument(markdown, _source) {
|
|
|
2104
2107
|
for (const block of blocks) {
|
|
2105
2108
|
const headerMatch = block.match(BLOCK_HEADER_RE);
|
|
2106
2109
|
if (!headerMatch) continue;
|
|
2107
|
-
const parsed = parseStructuredBlock(headerMatch[1], block);
|
|
2110
|
+
const parsed = parseStructuredBlock(headerMatch[1], block, _source);
|
|
2108
2111
|
if (parsed) results.push(parsed);
|
|
2109
2112
|
}
|
|
2110
2113
|
return results;
|