sticky-note-cli 2.6.8 → 2.6.9
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/package.json
CHANGED
|
@@ -594,9 +594,17 @@ function markThreadInjected(threadId, sessionId) {
|
|
|
594
594
|
|
|
595
595
|
function isOverlapWarned(sessionId) {
|
|
596
596
|
const data = loadInjectedSet();
|
|
597
|
+
// Session-scoped check: different session → not warned
|
|
597
598
|
if (sessionId && data.session_id && data.session_id !== sessionId) {
|
|
598
599
|
return false;
|
|
599
600
|
}
|
|
601
|
+
// Time-based fallback: if warned more than 60s ago, treat as new session.
|
|
602
|
+
// Copilot CLI sessions share session IDs (via .sticky-session file), so
|
|
603
|
+
// we can't rely on session_id alone to distinguish separate sessions.
|
|
604
|
+
if (data.overlap_warned_at) {
|
|
605
|
+
const elapsed = Date.now() - new Date(data.overlap_warned_at).getTime();
|
|
606
|
+
if (elapsed > 60000) return false;
|
|
607
|
+
}
|
|
600
608
|
return !!data.overlap_warned;
|
|
601
609
|
}
|
|
602
610
|
|
|
@@ -604,6 +612,7 @@ function markOverlapWarned(sessionId) {
|
|
|
604
612
|
const data = loadInjectedSet();
|
|
605
613
|
data.session_id = sessionId || data.session_id;
|
|
606
614
|
data.overlap_warned = true;
|
|
615
|
+
data.overlap_warned_at = new Date().toISOString();
|
|
607
616
|
saveInjectedSet(data);
|
|
608
617
|
}
|
|
609
618
|
|