@link-assistant/hive-mind 1.54.6 â 1.54.7
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/solve.mjs +2 -2
- package/src/solve.results.lib.mjs +8 -8
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/solve.mjs
CHANGED
|
@@ -642,7 +642,7 @@ try {
|
|
|
642
642
|
// Continue mode is a manual resume via PR URL
|
|
643
643
|
sessionType = SESSION_TYPES.RESUME;
|
|
644
644
|
}
|
|
645
|
-
await startWorkSession({
|
|
645
|
+
const workStartTime = await startWorkSession({
|
|
646
646
|
isContinueMode,
|
|
647
647
|
prNumber,
|
|
648
648
|
argv,
|
|
@@ -1190,7 +1190,7 @@ try {
|
|
|
1190
1190
|
} else if (argv.autoAttachSolutionSummary) {
|
|
1191
1191
|
// Auto mode - only attach if AI didn't create comments
|
|
1192
1192
|
await log('đ Checking if AI created any comments during session (--auto-attach-solution-summary)...');
|
|
1193
|
-
const aiCreatedComments = await checkForAiCreatedComments(
|
|
1193
|
+
const aiCreatedComments = await checkForAiCreatedComments(workStartTime, owner, repo, prNumber, issueNumber);
|
|
1194
1194
|
if (aiCreatedComments) {
|
|
1195
1195
|
await log('âšī¸ AI created comments during session, skipping solution summary attachment');
|
|
1196
1196
|
} else {
|
|
@@ -1058,14 +1058,14 @@ export const { TOOL_GENERATED_COMMENT_MARKERS, isToolGeneratedComment, trackTool
|
|
|
1058
1058
|
* Issue #1625: Filter out comments produced by solve.mjs itself (session start,
|
|
1059
1059
|
* log upload, auto-restart, etc.) so they do not falsely count as AI-authored.
|
|
1060
1060
|
*
|
|
1061
|
-
* @param {Date}
|
|
1061
|
+
* @param {Date} sessionStartTime - The timestamp when this solve work session started
|
|
1062
1062
|
* @param {string} owner - Repository owner
|
|
1063
1063
|
* @param {string} repo - Repository name
|
|
1064
1064
|
* @param {number} prNumber - Pull request number (null if working on issue only)
|
|
1065
1065
|
* @param {number} issueNumber - Issue number
|
|
1066
1066
|
* @returns {Promise<boolean>} - True if AI created comments during the session
|
|
1067
1067
|
*/
|
|
1068
|
-
export const checkForAiCreatedComments = async (
|
|
1068
|
+
export const checkForAiCreatedComments = async (sessionStartTime, owner, repo, prNumber, issueNumber) => {
|
|
1069
1069
|
try {
|
|
1070
1070
|
// Get the current user's GitHub username
|
|
1071
1071
|
const userResult = await $`gh api user --jq .login`;
|
|
@@ -1077,10 +1077,10 @@ export const checkForAiCreatedComments = async (referenceTime, owner, repo, prNu
|
|
|
1077
1077
|
return false;
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
|
-
await log(`đ Checking comments by '${currentUser}' after ${
|
|
1080
|
+
await log(`đ Checking comments by '${currentUser}' after session start ${sessionStartTime.toISOString()} (PR #${prNumber ?? 'none'}, issue #${issueNumber ?? 'none'})`, { verbose: true });
|
|
1081
1081
|
|
|
1082
1082
|
// Issue #1625: A comment counts as an "AI comment" only if it was posted
|
|
1083
|
-
// by the current user AFTER
|
|
1083
|
+
// by the current user AFTER sessionStartTime AND solve.mjs did NOT post it
|
|
1084
1084
|
// itself. We identify tool-posted comments in two ways, in order:
|
|
1085
1085
|
// 1. Primary: comment ID is in the in-memory tracked set populated by
|
|
1086
1086
|
// every solve.mjs posting site (postTrackedComment / trackToolCommentId).
|
|
@@ -1097,7 +1097,7 @@ export const checkForAiCreatedComments = async (referenceTime, owner, repo, prNu
|
|
|
1097
1097
|
const skippedByIdCount = { n: 0 };
|
|
1098
1098
|
for (const comment of comments) {
|
|
1099
1099
|
if (!comment || !comment.user || comment.user.login !== currentUser) continue;
|
|
1100
|
-
if (!(new Date(comment.created_at) >
|
|
1100
|
+
if (!(new Date(comment.created_at) > sessionStartTime)) continue;
|
|
1101
1101
|
|
|
1102
1102
|
const isReview = kind === 'review';
|
|
1103
1103
|
if (!isReview) {
|
|
@@ -1132,7 +1132,7 @@ export const checkForAiCreatedComments = async (referenceTime, owner, repo, prNu
|
|
|
1132
1132
|
if (prCommentsResult.code === 0) {
|
|
1133
1133
|
const prComments = JSON.parse(prCommentsResult.stdout.toString().trim() || '[]');
|
|
1134
1134
|
const newPrComments = filterNewAiComments(prComments, 'pr');
|
|
1135
|
-
await log(` đ¨ PR conversation comments after
|
|
1135
|
+
await log(` đ¨ PR conversation comments after session start by '${currentUser}' (excluding tool-generated): ${newPrComments.length}`, { verbose: true });
|
|
1136
1136
|
if (newPrComments.length > 0) {
|
|
1137
1137
|
return true;
|
|
1138
1138
|
}
|
|
@@ -1143,7 +1143,7 @@ export const checkForAiCreatedComments = async (referenceTime, owner, repo, prNu
|
|
|
1143
1143
|
if (reviewCommentsResult.code === 0) {
|
|
1144
1144
|
const reviewComments = JSON.parse(reviewCommentsResult.stdout.toString().trim() || '[]');
|
|
1145
1145
|
const newReviewComments = filterNewAiComments(reviewComments, 'review');
|
|
1146
|
-
await log(` đ PR review (inline) comments after
|
|
1146
|
+
await log(` đ PR review (inline) comments after session start by '${currentUser}': ${newReviewComments.length}`, { verbose: true });
|
|
1147
1147
|
if (newReviewComments.length > 0) {
|
|
1148
1148
|
return true;
|
|
1149
1149
|
}
|
|
@@ -1156,7 +1156,7 @@ export const checkForAiCreatedComments = async (referenceTime, owner, repo, prNu
|
|
|
1156
1156
|
if (issueCommentsResult.code === 0) {
|
|
1157
1157
|
const issueComments = JSON.parse(issueCommentsResult.stdout.toString().trim() || '[]');
|
|
1158
1158
|
const newIssueComments = filterNewAiComments(issueComments, 'issue');
|
|
1159
|
-
await log(` đ¨ Issue comments after
|
|
1159
|
+
await log(` đ¨ Issue comments after session start by '${currentUser}' (excluding tool-generated): ${newIssueComments.length}`, { verbose: true });
|
|
1160
1160
|
if (newIssueComments.length > 0) {
|
|
1161
1161
|
return true;
|
|
1162
1162
|
}
|