@ai-matrx/agents 0.18.5 → 0.19.2
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 +32 -0
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/dist/matrx/index.cjs +2 -2
- package/dist/matrx/index.cjs.map +1 -1
- package/dist/matrx/index.js +2 -2
- package/dist/matrx/index.js.map +1 -1
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/sources/react/index.cjs +14 -4
- package/dist/sources/react/index.cjs.map +1 -1
- package/dist/sources/react/index.d.cts +11 -3
- package/dist/sources/react/index.d.ts +11 -3
- package/dist/sources/react/index.js +14 -4
- package/dist/sources/react/index.js.map +1 -1
- package/dist/sources/runtime/index.cjs +15 -4
- package/dist/sources/runtime/index.cjs.map +1 -1
- package/dist/sources/runtime/index.d.cts +22 -5
- package/dist/sources/runtime/index.d.ts +22 -5
- package/dist/sources/runtime/index.js +15 -4
- package/dist/sources/runtime/index.js.map +1 -1
- package/mandates/snapshots/keys.0.19.1.json +652 -0
- package/mandates/snapshots/keys.0.19.2.json +652 -0
- package/package.json +2 -2
|
@@ -78,6 +78,7 @@ __export(runtime_exports, {
|
|
|
78
78
|
reloadedCard: () => reloadedCard,
|
|
79
79
|
rememberPickedParts: () => rememberPickedParts,
|
|
80
80
|
removeCard: () => removeCard,
|
|
81
|
+
removedInReview: () => removedInReview,
|
|
81
82
|
renderedPartChars: () => renderedPartChars,
|
|
82
83
|
restartCard: () => restartCard,
|
|
83
84
|
restoredCards: () => restoredCards,
|
|
@@ -501,9 +502,19 @@ function setCardWaitForClean(state, id, wait) {
|
|
|
501
502
|
function setSourceTopic(state, topic) {
|
|
502
503
|
return state.topic === topic ? state : { ...state, topic };
|
|
503
504
|
}
|
|
504
|
-
function
|
|
505
|
+
function removedInReview(reviewed, answer) {
|
|
506
|
+
const kept = new Set(answer.sources.map(sourceKey));
|
|
507
|
+
return new Set(reviewed.sources.map(sourceKey).filter((k) => !kept.has(k)));
|
|
508
|
+
}
|
|
509
|
+
function applyReviewedSourceSet(state, set, reviewed) {
|
|
505
510
|
let next = state;
|
|
506
|
-
|
|
511
|
+
if (reviewed) {
|
|
512
|
+
const removed = removedInReview(reviewed, set);
|
|
513
|
+
for (const card of state.cards) {
|
|
514
|
+
if (card.draft.ref && removed.has(sourceKey(card.draft.ref))) next = removeCard(next, card.id);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
for (const card of next.cards) {
|
|
507
518
|
const ref = card.draft.ref;
|
|
508
519
|
if (!ref) continue;
|
|
509
520
|
const match = set.sources.find((r) => sameSourceRef(r, ref));
|
|
@@ -956,8 +967,8 @@ function createSourceSetController(adapter) {
|
|
|
956
967
|
hasRef: (resourceType, resourceId) => hasSourceRef(store.getState(), resourceType, resourceId),
|
|
957
968
|
liveCount: () => store.getState().cards.length,
|
|
958
969
|
toSourceSet: (options = {}) => selectSourceSet(store.getState(), options),
|
|
959
|
-
applySourceSet(set) {
|
|
960
|
-
commit(applyReviewedSourceSet(store.getState(), set));
|
|
970
|
+
applySourceSet(set, options = {}) {
|
|
971
|
+
commit(applyReviewedSourceSet(store.getState(), set, options.reviewed));
|
|
961
972
|
},
|
|
962
973
|
async manifest() {
|
|
963
974
|
const refs = readySourceRefs(store.getState());
|