@mytegroupinc/myte-core 0.0.30 → 0.0.31
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/cli.js +16 -13
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -3401,22 +3401,25 @@ function writeFeedbackSnapshot({ snapshot, wrapperRoot, outputDir }) {
|
|
|
3401
3401
|
let prdFileCount = 0;
|
|
3402
3402
|
const materializedItems = items.map((rawItem, index) => {
|
|
3403
3403
|
const item = isPlainObject(rawItem) ? { ...rawItem } : {};
|
|
3404
|
-
const feedbackId = stableItemId(item, ["feedback_id", "id"], `F${String(index + 1).padStart(3, "0")}`);
|
|
3405
|
-
const conversationTurns = normalizeFeedbackConversationTurns(item.conversation_turns);
|
|
3406
|
-
const prdText = String(item.prd_text || "").trim();
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
let
|
|
3410
|
-
let
|
|
3404
|
+
const feedbackId = stableItemId(item, ["feedback_id", "id"], `F${String(index + 1).padStart(3, "0")}`);
|
|
3405
|
+
const conversationTurns = normalizeFeedbackConversationTurns(item.conversation_turns);
|
|
3406
|
+
const prdText = String(item.prd_text || "").trim();
|
|
3407
|
+
const attachmentDocuments = Array.isArray(item.attachment_documents) ? item.attachment_documents : [];
|
|
3408
|
+
|
|
3409
|
+
let contextSource = "description_only";
|
|
3410
|
+
let contextNote = "No separate PRD. Use feedback_text as the context for this feedback item.";
|
|
3411
|
+
let prdFile = null;
|
|
3411
3412
|
|
|
3412
3413
|
if (prdText) {
|
|
3413
3414
|
const prdFilename = `${sanitizeFileSegment(feedbackId, `feedback-${index + 1}`)}.md`;
|
|
3414
|
-
const prdPath = path.join(prdSyncDir, prdFilename);
|
|
3415
|
-
writeTextFile(prdPath, ensureTrailingNewline(prdText));
|
|
3416
|
-
prdFile = toPosixRelativePath(targetRoot, prdPath);
|
|
3417
|
-
contextSource = "prd_file";
|
|
3418
|
-
contextNote =
|
|
3419
|
-
|
|
3415
|
+
const prdPath = path.join(prdSyncDir, prdFilename);
|
|
3416
|
+
writeTextFile(prdPath, ensureTrailingNewline(prdText));
|
|
3417
|
+
prdFile = toPosixRelativePath(targetRoot, prdPath);
|
|
3418
|
+
contextSource = attachmentDocuments.length > 0 ? "attachment_file" : "prd_file";
|
|
3419
|
+
contextNote = attachmentDocuments.length > 0
|
|
3420
|
+
? "Readable feedback attachment documents are stored in the linked file."
|
|
3421
|
+
: "Full PRD context is stored in the linked file.";
|
|
3422
|
+
prdFileCount += 1;
|
|
3420
3423
|
} else if (item.has_prd_text) {
|
|
3421
3424
|
contextSource = "prd_declared_but_unavailable";
|
|
3422
3425
|
contextNote = "A separate PRD exists for this feedback item, but readable PRD text was not included in this sync snapshot.";
|