@xcanwin/manyoyo 5.6.4 → 5.6.6
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/lib/dev-release.js +22 -1
- package/package.json +1 -1
package/lib/dev-release.js
CHANGED
|
@@ -123,10 +123,31 @@ function normalizeCommitMessage(text) {
|
|
|
123
123
|
return lines.slice(start, end).join('\n').trim();
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
function extractAgentMessageFromCodexJsonl(text) {
|
|
127
|
+
let lastMessage = '';
|
|
128
|
+
for (const rawLine of String(text || '').split('\n')) {
|
|
129
|
+
const line = rawLine.trim();
|
|
130
|
+
if (!line) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
let payload;
|
|
134
|
+
try {
|
|
135
|
+
payload = JSON.parse(line);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (payload && payload.type === 'item.completed' && payload.item && payload.item.type === 'agent_message') {
|
|
140
|
+
lastMessage = String(payload.item.text || '');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return lastMessage.trim();
|
|
144
|
+
}
|
|
145
|
+
|
|
126
146
|
module.exports = {
|
|
127
147
|
parseReleaseVersion,
|
|
128
148
|
compareReleaseVersions,
|
|
129
149
|
buildVersionSuggestions,
|
|
130
150
|
pickLatestVersionTag,
|
|
131
|
-
normalizeCommitMessage
|
|
151
|
+
normalizeCommitMessage,
|
|
152
|
+
extractAgentMessageFromCodexJsonl
|
|
132
153
|
};
|