@prbe.ai/electron-sdk 0.1.12 → 0.1.13
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/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1841,13 +1841,6 @@ var PRBEAgent = class _PRBEAgent {
|
|
|
1841
1841
|
this.state.updateTrackedSessionIDs(ids);
|
|
1842
1842
|
this.syncPolling(ids.length > 0);
|
|
1843
1843
|
}
|
|
1844
|
-
get respondedCRIDs() {
|
|
1845
|
-
return new Set(this.persistedData.respondedCRIds ?? []);
|
|
1846
|
-
}
|
|
1847
|
-
set respondedCRIDs(ids) {
|
|
1848
|
-
this.persistedData.respondedCRIds = Array.from(ids);
|
|
1849
|
-
savePersistedData(this.persistedData);
|
|
1850
|
-
}
|
|
1851
1844
|
syncPolling(hasSessions) {
|
|
1852
1845
|
if (this.config.backgroundPolling && hasSessions) {
|
|
1853
1846
|
if (this.pollingTimer === null) {
|
|
@@ -2129,27 +2122,12 @@ var PRBEAgent = class _PRBEAgent {
|
|
|
2129
2122
|
"/api/agent/poll",
|
|
2130
2123
|
request
|
|
2131
2124
|
);
|
|
2132
|
-
const knownCRIDs = /* @__PURE__ */ new Set();
|
|
2133
2125
|
for (const ticket of response.tickets) {
|
|
2134
2126
|
for (const cr of ticket.context_requests) {
|
|
2135
|
-
|
|
2136
|
-
if (!cr.is_active || this.respondedCRIDs.has(cr.id)) continue;
|
|
2127
|
+
if (!cr.is_active) continue;
|
|
2137
2128
|
await this.investigateForCR(cr, ticket.ticket_id);
|
|
2138
|
-
const ids = this.respondedCRIDs;
|
|
2139
|
-
ids.add(cr.id);
|
|
2140
|
-
this.respondedCRIDs = ids;
|
|
2141
2129
|
}
|
|
2142
2130
|
}
|
|
2143
|
-
const currentRespondedIDs = this.respondedCRIDs;
|
|
2144
|
-
const stale = new Set(
|
|
2145
|
-
[...currentRespondedIDs].filter((id) => !knownCRIDs.has(id))
|
|
2146
|
-
);
|
|
2147
|
-
if (stale.size > 0) {
|
|
2148
|
-
const pruned = new Set(
|
|
2149
|
-
[...currentRespondedIDs].filter((id) => !stale.has(id))
|
|
2150
|
-
);
|
|
2151
|
-
this.respondedCRIDs = pruned;
|
|
2152
|
-
}
|
|
2153
2131
|
return response;
|
|
2154
2132
|
} catch {
|
|
2155
2133
|
return null;
|