@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
|
@@ -382,9 +382,19 @@ function setCardWaitForClean(state, id, wait) {
|
|
|
382
382
|
function setSourceTopic(state, topic) {
|
|
383
383
|
return state.topic === topic ? state : { ...state, topic };
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function removedInReview(reviewed, answer) {
|
|
386
|
+
const kept = new Set(answer.sources.map(sourceKey));
|
|
387
|
+
return new Set(reviewed.sources.map(sourceKey).filter((k) => !kept.has(k)));
|
|
388
|
+
}
|
|
389
|
+
function applyReviewedSourceSet(state, set, reviewed) {
|
|
386
390
|
let next = state;
|
|
387
|
-
|
|
391
|
+
if (reviewed) {
|
|
392
|
+
const removed = removedInReview(reviewed, set);
|
|
393
|
+
for (const card of state.cards) {
|
|
394
|
+
if (card.draft.ref && removed.has(sourceKey(card.draft.ref))) next = removeCard(next, card.id);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
for (const card of next.cards) {
|
|
388
398
|
const ref = card.draft.ref;
|
|
389
399
|
if (!ref) continue;
|
|
390
400
|
const match = set.sources.find((r) => sameSourceRef(r, ref));
|
|
@@ -600,8 +610,8 @@ function createSourceSetController(adapter) {
|
|
|
600
610
|
hasRef: (resourceType, resourceId) => hasSourceRef(store.getState(), resourceType, resourceId),
|
|
601
611
|
liveCount: () => store.getState().cards.length,
|
|
602
612
|
toSourceSet: (options = {}) => selectSourceSet(store.getState(), options),
|
|
603
|
-
applySourceSet(set) {
|
|
604
|
-
commit(applyReviewedSourceSet(store.getState(), set));
|
|
613
|
+
applySourceSet(set, options = {}) {
|
|
614
|
+
commit(applyReviewedSourceSet(store.getState(), set, options.reviewed));
|
|
605
615
|
},
|
|
606
616
|
async manifest() {
|
|
607
617
|
const refs = readySourceRefs(store.getState());
|