@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.d.mts
CHANGED
|
@@ -152,8 +152,6 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
152
152
|
private get agentID();
|
|
153
153
|
private get trackedSessionIDs();
|
|
154
154
|
private set trackedSessionIDs(value);
|
|
155
|
-
private get respondedCRIDs();
|
|
156
|
-
private set respondedCRIDs(value);
|
|
157
155
|
private syncPolling;
|
|
158
156
|
private addTrackedSession;
|
|
159
157
|
constructor(config: PRBEAgentConfig);
|
package/dist/index.d.ts
CHANGED
|
@@ -152,8 +152,6 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
152
152
|
private get agentID();
|
|
153
153
|
private get trackedSessionIDs();
|
|
154
154
|
private set trackedSessionIDs(value);
|
|
155
|
-
private get respondedCRIDs();
|
|
156
|
-
private set respondedCRIDs(value);
|
|
157
155
|
private syncPolling;
|
|
158
156
|
private addTrackedSession;
|
|
159
157
|
constructor(config: PRBEAgentConfig);
|
package/dist/index.js
CHANGED
|
@@ -1911,13 +1911,6 @@ var PRBEAgent = class _PRBEAgent {
|
|
|
1911
1911
|
this.state.updateTrackedSessionIDs(ids);
|
|
1912
1912
|
this.syncPolling(ids.length > 0);
|
|
1913
1913
|
}
|
|
1914
|
-
get respondedCRIDs() {
|
|
1915
|
-
return new Set(this.persistedData.respondedCRIds ?? []);
|
|
1916
|
-
}
|
|
1917
|
-
set respondedCRIDs(ids) {
|
|
1918
|
-
this.persistedData.respondedCRIds = Array.from(ids);
|
|
1919
|
-
savePersistedData(this.persistedData);
|
|
1920
|
-
}
|
|
1921
1914
|
syncPolling(hasSessions) {
|
|
1922
1915
|
if (this.config.backgroundPolling && hasSessions) {
|
|
1923
1916
|
if (this.pollingTimer === null) {
|
|
@@ -2199,27 +2192,12 @@ var PRBEAgent = class _PRBEAgent {
|
|
|
2199
2192
|
"/api/agent/poll",
|
|
2200
2193
|
request
|
|
2201
2194
|
);
|
|
2202
|
-
const knownCRIDs = /* @__PURE__ */ new Set();
|
|
2203
2195
|
for (const ticket of response.tickets) {
|
|
2204
2196
|
for (const cr of ticket.context_requests) {
|
|
2205
|
-
|
|
2206
|
-
if (!cr.is_active || this.respondedCRIDs.has(cr.id)) continue;
|
|
2197
|
+
if (!cr.is_active) continue;
|
|
2207
2198
|
await this.investigateForCR(cr, ticket.ticket_id);
|
|
2208
|
-
const ids = this.respondedCRIDs;
|
|
2209
|
-
ids.add(cr.id);
|
|
2210
|
-
this.respondedCRIDs = ids;
|
|
2211
2199
|
}
|
|
2212
2200
|
}
|
|
2213
|
-
const currentRespondedIDs = this.respondedCRIDs;
|
|
2214
|
-
const stale = new Set(
|
|
2215
|
-
[...currentRespondedIDs].filter((id) => !knownCRIDs.has(id))
|
|
2216
|
-
);
|
|
2217
|
-
if (stale.size > 0) {
|
|
2218
|
-
const pruned = new Set(
|
|
2219
|
-
[...currentRespondedIDs].filter((id) => !stale.has(id))
|
|
2220
|
-
);
|
|
2221
|
-
this.respondedCRIDs = pruned;
|
|
2222
|
-
}
|
|
2223
2201
|
return response;
|
|
2224
2202
|
} catch {
|
|
2225
2203
|
return null;
|