@mastra/mssql 1.2.2-alpha.0 → 1.2.2-alpha.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.js CHANGED
@@ -1783,7 +1783,10 @@ var MemoryMSSQL = class _MemoryMSSQL extends MemoryStorage {
1783
1783
  await this.db.clearTable({ tableName: TABLE_THREADS });
1784
1784
  await this.db.clearTable({ tableName: TABLE_RESOURCES });
1785
1785
  }
1786
- async getThreadById({ threadId }) {
1786
+ async getThreadById({
1787
+ threadId,
1788
+ resourceId
1789
+ }) {
1787
1790
  try {
1788
1791
  const sql5 = `SELECT
1789
1792
  id,
@@ -1798,7 +1801,7 @@ var MemoryMSSQL = class _MemoryMSSQL extends MemoryStorage {
1798
1801
  request.input("threadId", threadId);
1799
1802
  const resultSet = await request.query(sql5);
1800
1803
  const thread = resultSet.recordset[0] || null;
1801
- if (!thread) {
1804
+ if (!thread || resourceId !== void 0 && thread.resourceId !== resourceId) {
1802
1805
  return null;
1803
1806
  }
1804
1807
  return {