@supernova-studio/client 1.39.0 → 1.39.1
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 +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +99 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17788,6 +17788,101 @@ var BackendForgeProjectRoomYDoc = class {
|
|
|
17788
17788
|
}
|
|
17789
17789
|
};
|
|
17790
17790
|
|
|
17791
|
+
// src/yjs/thread-room/base.ts
|
|
17792
|
+
var ThreadRoomBaseYDoc = class {
|
|
17793
|
+
constructor(yDoc) {
|
|
17794
|
+
__publicField(this, "yDoc");
|
|
17795
|
+
this.yDoc = yDoc;
|
|
17796
|
+
}
|
|
17797
|
+
getState() {
|
|
17798
|
+
const agentResponseTrackers = this.getAgentResponseTrackers();
|
|
17799
|
+
const isLoaded = true;
|
|
17800
|
+
return {
|
|
17801
|
+
isLoaded,
|
|
17802
|
+
agentResponseTrackers
|
|
17803
|
+
};
|
|
17804
|
+
}
|
|
17805
|
+
//
|
|
17806
|
+
// Agent Response Trackers
|
|
17807
|
+
//
|
|
17808
|
+
getAgentResponseTrackers() {
|
|
17809
|
+
return this.getObjects(this.agentResponseTrackersYMap, DTOFeatureAgentResponseTracker);
|
|
17810
|
+
}
|
|
17811
|
+
updateAgentResponseTrackers(trackers) {
|
|
17812
|
+
this.setObjects(this.agentResponseTrackersYMap, trackers);
|
|
17813
|
+
}
|
|
17814
|
+
deleteAgentResponseTrackers(ids) {
|
|
17815
|
+
this.deleteObjects(this.agentResponseTrackersYMap, ids);
|
|
17816
|
+
}
|
|
17817
|
+
get agentResponseTrackersYMap() {
|
|
17818
|
+
return this.yDoc.getMap("forgeFeatureAgentResponseTrackers");
|
|
17819
|
+
}
|
|
17820
|
+
//
|
|
17821
|
+
// Utility methods
|
|
17822
|
+
//
|
|
17823
|
+
getObjects(map, schema) {
|
|
17824
|
+
const objects = [];
|
|
17825
|
+
map.forEach((value) => objects.push(schema.parse(value)));
|
|
17826
|
+
return objects;
|
|
17827
|
+
}
|
|
17828
|
+
setObjects(map, objects) {
|
|
17829
|
+
objects.forEach((o) => map.set(o.id, JSON.parse(JSON.stringify(o))));
|
|
17830
|
+
}
|
|
17831
|
+
deleteObjects(map, ids) {
|
|
17832
|
+
ids.forEach((id) => map.delete(id));
|
|
17833
|
+
}
|
|
17834
|
+
};
|
|
17835
|
+
|
|
17836
|
+
// src/yjs/thread-room/backend.ts
|
|
17837
|
+
var BackendThreadRoomYDoc = class {
|
|
17838
|
+
constructor(yDoc) {
|
|
17839
|
+
__publicField(this, "yDoc");
|
|
17840
|
+
this.yDoc = yDoc;
|
|
17841
|
+
}
|
|
17842
|
+
updateState(transaction) {
|
|
17843
|
+
this.yDoc.transact((trx) => {
|
|
17844
|
+
const yDoc = new ThreadRoomBaseYDoc(trx.doc);
|
|
17845
|
+
transaction.agentResponseTrackerIdsToDelete && yDoc.deleteAgentResponseTrackers(transaction.agentResponseTrackerIdsToDelete);
|
|
17846
|
+
transaction.agentResponseTrackers && yDoc.updateAgentResponseTrackers(transaction.agentResponseTrackers);
|
|
17847
|
+
});
|
|
17848
|
+
}
|
|
17849
|
+
getState() {
|
|
17850
|
+
const featureRoomDoc = new ThreadRoomBaseYDoc(this.yDoc);
|
|
17851
|
+
return featureRoomDoc.getState();
|
|
17852
|
+
}
|
|
17853
|
+
};
|
|
17854
|
+
|
|
17855
|
+
// src/yjs/thread-room/frontend.ts
|
|
17856
|
+
var FrontendThreadRoomYDoc = class {
|
|
17857
|
+
constructor(yDoc, debug = false) {
|
|
17858
|
+
this.debug = debug;
|
|
17859
|
+
__publicField(this, "yDoc");
|
|
17860
|
+
this.yDoc = yDoc;
|
|
17861
|
+
}
|
|
17862
|
+
//
|
|
17863
|
+
// State Access
|
|
17864
|
+
//
|
|
17865
|
+
getState() {
|
|
17866
|
+
const doc = new ThreadRoomBaseYDoc(this.yDoc);
|
|
17867
|
+
return doc.getState();
|
|
17868
|
+
}
|
|
17869
|
+
//
|
|
17870
|
+
// Agent Response Trackers
|
|
17871
|
+
//
|
|
17872
|
+
getAgentResponseTrackers() {
|
|
17873
|
+
const doc = new ThreadRoomBaseYDoc(this.yDoc);
|
|
17874
|
+
return doc.getAgentResponseTrackers();
|
|
17875
|
+
}
|
|
17876
|
+
updateAgentResponseTracker(tracker) {
|
|
17877
|
+
const doc = new ThreadRoomBaseYDoc(this.yDoc);
|
|
17878
|
+
return doc.updateAgentResponseTrackers([tracker]);
|
|
17879
|
+
}
|
|
17880
|
+
deleteAgentResponseTrackers(id) {
|
|
17881
|
+
const doc = new ThreadRoomBaseYDoc(this.yDoc);
|
|
17882
|
+
return doc.deleteAgentResponseTrackers([id]);
|
|
17883
|
+
}
|
|
17884
|
+
};
|
|
17885
|
+
|
|
17791
17886
|
// src/yjs/version-room/backend.ts
|
|
17792
17887
|
var BackendVersionRoomYDoc = class {
|
|
17793
17888
|
constructor(yDoc) {
|
|
@@ -18447,6 +18542,7 @@ var TransactionQueue2 = class {
|
|
|
18447
18542
|
export {
|
|
18448
18543
|
BackendFeatureRoomYDoc,
|
|
18449
18544
|
BackendForgeProjectRoomYDoc,
|
|
18545
|
+
BackendThreadRoomYDoc,
|
|
18450
18546
|
BackendVersionRoomYDoc,
|
|
18451
18547
|
BlockDefinitionUtils,
|
|
18452
18548
|
BlockParsingUtils,
|
|
@@ -19147,6 +19243,7 @@ export {
|
|
|
19147
19243
|
ForgeProjectsEndpoint,
|
|
19148
19244
|
FormattedCollections,
|
|
19149
19245
|
FrontendFeatureRoomYDoc,
|
|
19246
|
+
FrontendThreadRoomYDoc,
|
|
19150
19247
|
FrontendVersionRoomYDoc,
|
|
19151
19248
|
GitDestinationOptions,
|
|
19152
19249
|
ImportJobsEndpoint,
|
|
@@ -19171,6 +19268,7 @@ export {
|
|
|
19171
19268
|
StringVariableScopeType,
|
|
19172
19269
|
SupernovaApiClient,
|
|
19173
19270
|
ThemesEndpoint,
|
|
19271
|
+
ThreadRoomBaseYDoc,
|
|
19174
19272
|
TokenCollectionsEndpoint,
|
|
19175
19273
|
TokenGroupsEndpoint,
|
|
19176
19274
|
TokensEndpoint,
|