ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг - Этап 4: обновлён формат ответов и добавлено правило о русском названии коммита
This commit is contained in:
+25
-8
@@ -3649,13 +3649,22 @@ function renderPolicyReply(structure, context) {
|
||||
limitationLines
|
||||
};
|
||||
const enriched = enforceDomainWordingIsolation(enrichedBase, structure, context);
|
||||
const checkedLines = dedupeNarrativeLines(enriched.evidenceLines, 6);
|
||||
const foundLines = dedupeNarrativeLines([...enriched.brokenLines, ...enriched.whyLines], 6);
|
||||
const unresolvedLines = dedupeNarrativeLines(enriched.limitationLines, 6);
|
||||
const nextStepLines = dedupeNarrativeLines(enriched.checkLines, 5);
|
||||
return sanitizeUserFacingReply([
|
||||
`Коротко: ${enriched.shortLine}`,
|
||||
`Что сломано:\n${formatList(enriched.brokenLines)}`,
|
||||
`Почему это похоже на проблему:\n${formatList(enriched.whyLines)}`,
|
||||
`На чем это основано:\n${formatList(enriched.evidenceLines)}`,
|
||||
`Что проверить первым:\n${formatList(enriched.checkLines)}`,
|
||||
`Ограничения:\n${formatList(enriched.limitationLines)}`
|
||||
`Что именно проверено:\n${formatList(checkedLines.length > 0
|
||||
? checkedLines
|
||||
: ["Подтвержденная опора собрана частично; для полного вывода нужен дополнительный проход."])}`,
|
||||
`Что найдено:\n${formatList(foundLines.length > 0 ? foundLines : ["Явные отклонения по текущей опоре не подтверждены."])}`,
|
||||
`Что пока не доказано:\n${formatList(unresolvedLines.length > 0
|
||||
? unresolvedLines
|
||||
: ["Существенных ограничений в текущем срезе не выявлено."])}`,
|
||||
`Что проверить первым:\n${formatList(nextStepLines.length > 0
|
||||
? nextStepLines
|
||||
: ["Уточните период, объект или контрагента, чтобы продолжить проверку по 1С."])}`
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n\n"));
|
||||
@@ -3687,6 +3696,7 @@ function shouldUseSoftPolicyReply(input) {
|
||||
function renderSoftPolicyReply(input) {
|
||||
const questionType = input.context?.questionType ?? "unknown";
|
||||
const shortLine = ensureSentence(buildShortSectionLine(input.structure));
|
||||
const foundLines = dedupeNarrativeLines([...buildBrokenSectionLines(input.structure), ...buildWhySectionLines(input.structure, input.context)], 3);
|
||||
const evidenceLines = dedupeNarrativeLines(buildEvidenceSectionLines(input.structure, questionType, input.context), 3);
|
||||
const limitationLines = dedupeNarrativeLines(buildLimitationsSectionLines(input.structure), 3);
|
||||
const checkLines = dedupeNarrativeLines(buildChecksSectionLines(input.structure, input.context), 3);
|
||||
@@ -3700,9 +3710,16 @@ function renderSoftPolicyReply(input) {
|
||||
return sanitizeUserFacingReply([
|
||||
`Коротко: ${shortLine}`,
|
||||
modeLine,
|
||||
evidenceLines.length > 0 ? `Что уже проверено: ${evidenceLines.join("; ")}` : "",
|
||||
limitationLines.length > 0 ? `Что пока не доказано: ${limitationLines.join("; ")}` : "",
|
||||
actionLines.length > 0 ? `Что могу сделать сейчас: ${actionLines.join("; ")}` : ""
|
||||
`Что именно проверено:\n${formatList(evidenceLines.length > 0
|
||||
? evidenceLines
|
||||
: ["Подтвержденная опора собрана частично; для полного вывода нужна дополнительная проверка."])}`,
|
||||
`Что найдено:\n${formatList(foundLines.length > 0 ? foundLines : ["Пока подтверждена только часть сигнала, без финальной фиксации причины."])}`,
|
||||
`Что пока не доказано:\n${formatList(limitationLines.length > 0
|
||||
? limitationLines
|
||||
: ["Для полного вывода не хватает деталей по части требований."])}`,
|
||||
`Что могу сделать сейчас:\n${formatList(actionLines.length > 0
|
||||
? actionLines
|
||||
: ["Уточните период, объект или контрагента, чтобы завершить проверку в следующем ходе."])}`
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n\n"));
|
||||
|
||||
Reference in New Issue
Block a user