@dudousxd/nestjs-agent 1.36.2 → 1.37.0
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/a2ui/index.d.cts +1 -1
- package/dist/a2ui/index.d.ts +1 -1
- package/dist/durable/index.cjs +22 -3
- package/dist/durable/index.cjs.map +1 -1
- package/dist/durable/index.js +22 -3
- package/dist/durable/index.js.map +1 -1
- package/dist/{index-CJdTomOT.d.cts → index-4caNqEQ-.d.cts} +23 -2
- package/dist/{index-D1xRrnCq.d.ts → index-yC_Ra3CE.d.ts} +23 -2
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/durable/index.js
CHANGED
|
@@ -3808,9 +3808,28 @@ var AgentService = class {
|
|
|
3808
3808
|
await this.assertOwnsThread(actor, threadId);
|
|
3809
3809
|
return this.store.softDeleteThread(threadId);
|
|
3810
3810
|
}
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3811
|
+
/**
|
|
3812
|
+
* Copy a thread up to `fromMessageId` (inclusive) into a new one. By default only the thread's
|
|
3813
|
+
* owner may, and the copy is theirs. With `params.authorized`, the host has vouched for `actor`
|
|
3814
|
+
* (a share link it checked) and the copy is `actor`'s — see {@link ForkThreadParams}.
|
|
3815
|
+
*/
|
|
3816
|
+
async forkThread(actor, threadId, fromMessageId, params = {}) {
|
|
3817
|
+
if (params.authorized === true) {
|
|
3818
|
+
if (await this.store.ownerOfThread(threadId) === null) {
|
|
3819
|
+
throw new NotFoundException2(`thread ${threadId} not found`);
|
|
3820
|
+
}
|
|
3821
|
+
} else {
|
|
3822
|
+
await this.assertOwnsThread(actor, threadId);
|
|
3823
|
+
}
|
|
3824
|
+
const options = {
|
|
3825
|
+
...params.authorized === true ? {
|
|
3826
|
+
actorRef: actor.id
|
|
3827
|
+
} : {},
|
|
3828
|
+
...params.tenantRef !== void 0 ? {
|
|
3829
|
+
tenantRef: params.tenantRef
|
|
3830
|
+
} : {}
|
|
3831
|
+
};
|
|
3832
|
+
return this.store.forkThread(threadId, fromMessageId, options);
|
|
3814
3833
|
}
|
|
3815
3834
|
/** Kept for source compatibility — a thin wrapper over the more general `updateThread`. */
|
|
3816
3835
|
async renameThread(actor, threadId, title) {
|