@mastra/clickhouse 0.10.1-alpha.1 → 0.10.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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +35 -0
- package/dist/_tsup-dts-rollup.d.cts +13 -2
- package/dist/_tsup-dts-rollup.d.ts +13 -2
- package/dist/index.cjs +16 -5
- package/dist/index.js +16 -5
- package/package.json +4 -4
- package/src/storage/index.test.ts +19 -9
- package/src/storage/index.ts +23 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/clickhouse@0.10.1-alpha.
|
|
2
|
+
> @mastra/clickhouse@0.10.1-alpha.2 build /home/runner/work/mastra/mastra/stores/clickhouse
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 8613ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 11358ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
[32mESM[39m [1mdist/index.js [22m[32m28.23 KB[39m
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 942ms
|
|
22
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m28.49 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 943ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @mastra/clickhouse
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e5dc18d: Added a backwards compatible layer to begin storing/retrieving UIMessages in storage instead of CoreMessages
|
|
8
|
+
- c5bf1ce: Add backwards compat code for new MessageList in storage
|
|
9
|
+
- f0d559f: Fix peerdeps for alpha channel
|
|
10
|
+
- Updated dependencies [ee77e78]
|
|
11
|
+
- Updated dependencies [592a2db]
|
|
12
|
+
- Updated dependencies [e5dc18d]
|
|
13
|
+
- Updated dependencies [ab5adbe]
|
|
14
|
+
- Updated dependencies [1e8bb40]
|
|
15
|
+
- Updated dependencies [1b5fc55]
|
|
16
|
+
- Updated dependencies [195c428]
|
|
17
|
+
- Updated dependencies [f73e11b]
|
|
18
|
+
- Updated dependencies [37643b8]
|
|
19
|
+
- Updated dependencies [99fd6cf]
|
|
20
|
+
- Updated dependencies [c5bf1ce]
|
|
21
|
+
- Updated dependencies [add596e]
|
|
22
|
+
- Updated dependencies [8dc94d8]
|
|
23
|
+
- Updated dependencies [ecebbeb]
|
|
24
|
+
- Updated dependencies [79d5145]
|
|
25
|
+
- Updated dependencies [12b7002]
|
|
26
|
+
- Updated dependencies [2901125]
|
|
27
|
+
- @mastra/core@0.10.2
|
|
28
|
+
|
|
29
|
+
## 0.10.1-alpha.2
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- c5bf1ce: Add backwards compat code for new MessageList in storage
|
|
34
|
+
- Updated dependencies [c5bf1ce]
|
|
35
|
+
- Updated dependencies [12b7002]
|
|
36
|
+
- @mastra/core@0.10.2-alpha.4
|
|
37
|
+
|
|
3
38
|
## 0.10.1-alpha.1
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import type { EvalRow } from '@mastra/core/storage';
|
|
3
|
+
import type { MastraMessageV1 } from '@mastra/core/memory';
|
|
3
4
|
import type { MastraMessageV2 } from '@mastra/core/agent';
|
|
4
5
|
import { MastraStorage } from '@mastra/core/storage';
|
|
5
6
|
import type { StorageColumn } from '@mastra/core/storage';
|
|
@@ -93,9 +94,19 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
93
94
|
deleteThread({ threadId }: {
|
|
94
95
|
threadId: string;
|
|
95
96
|
}): Promise<void>;
|
|
96
|
-
getMessages
|
|
97
|
-
|
|
97
|
+
getMessages(args: StorageGetMessagesArg & {
|
|
98
|
+
format?: 'v1';
|
|
99
|
+
}): Promise<MastraMessageV1[]>;
|
|
100
|
+
getMessages(args: StorageGetMessagesArg & {
|
|
101
|
+
format: 'v2';
|
|
102
|
+
}): Promise<MastraMessageV2[]>;
|
|
103
|
+
saveMessages(args: {
|
|
104
|
+
messages: MastraMessageV1[];
|
|
105
|
+
format?: undefined | 'v1';
|
|
106
|
+
}): Promise<MastraMessageV1[]>;
|
|
107
|
+
saveMessages(args: {
|
|
98
108
|
messages: MastraMessageV2[];
|
|
109
|
+
format: 'v2';
|
|
99
110
|
}): Promise<MastraMessageV2[]>;
|
|
100
111
|
persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
|
|
101
112
|
workflowName: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import type { EvalRow } from '@mastra/core/storage';
|
|
3
|
+
import type { MastraMessageV1 } from '@mastra/core/memory';
|
|
3
4
|
import type { MastraMessageV2 } from '@mastra/core/agent';
|
|
4
5
|
import { MastraStorage } from '@mastra/core/storage';
|
|
5
6
|
import type { StorageColumn } from '@mastra/core/storage';
|
|
@@ -93,9 +94,19 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
93
94
|
deleteThread({ threadId }: {
|
|
94
95
|
threadId: string;
|
|
95
96
|
}): Promise<void>;
|
|
96
|
-
getMessages
|
|
97
|
-
|
|
97
|
+
getMessages(args: StorageGetMessagesArg & {
|
|
98
|
+
format?: 'v1';
|
|
99
|
+
}): Promise<MastraMessageV1[]>;
|
|
100
|
+
getMessages(args: StorageGetMessagesArg & {
|
|
101
|
+
format: 'v2';
|
|
102
|
+
}): Promise<MastraMessageV2[]>;
|
|
103
|
+
saveMessages(args: {
|
|
104
|
+
messages: MastraMessageV1[];
|
|
105
|
+
format?: undefined | 'v1';
|
|
106
|
+
}): Promise<MastraMessageV1[]>;
|
|
107
|
+
saveMessages(args: {
|
|
98
108
|
messages: MastraMessageV2[];
|
|
109
|
+
format: 'v2';
|
|
99
110
|
}): Promise<MastraMessageV2[]>;
|
|
100
111
|
persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
|
|
101
112
|
workflowName: string;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var client = require('@clickhouse/client');
|
|
4
|
+
var agent = require('@mastra/core/agent');
|
|
4
5
|
var storage = require('@mastra/core/storage');
|
|
5
6
|
|
|
6
7
|
// src/storage/index.ts
|
|
@@ -508,7 +509,12 @@ var ClickhouseStore = class extends storage.MastraStorage {
|
|
|
508
509
|
throw error;
|
|
509
510
|
}
|
|
510
511
|
}
|
|
511
|
-
async getMessages({
|
|
512
|
+
async getMessages({
|
|
513
|
+
threadId,
|
|
514
|
+
resourceId,
|
|
515
|
+
selectBy,
|
|
516
|
+
format
|
|
517
|
+
}) {
|
|
512
518
|
try {
|
|
513
519
|
const messages = [];
|
|
514
520
|
const limit = typeof selectBy?.last === `number` ? selectBy.last : 40;
|
|
@@ -603,18 +609,21 @@ var ClickhouseStore = class extends storage.MastraStorage {
|
|
|
603
609
|
} catch {
|
|
604
610
|
}
|
|
605
611
|
}
|
|
606
|
-
if (message.type === `v2`) delete message.type;
|
|
607
612
|
});
|
|
608
|
-
|
|
613
|
+
const list = new agent.MessageList({ threadId, resourceId }).add(messages, "memory");
|
|
614
|
+
if (format === `v2`) return list.get.all.v2();
|
|
615
|
+
return list.get.all.v1();
|
|
609
616
|
} catch (error) {
|
|
610
617
|
console.error("Error getting messages:", error);
|
|
611
618
|
throw error;
|
|
612
619
|
}
|
|
613
620
|
}
|
|
614
|
-
async saveMessages(
|
|
621
|
+
async saveMessages(args) {
|
|
622
|
+
const { messages, format = "v1" } = args;
|
|
615
623
|
if (messages.length === 0) return messages;
|
|
616
624
|
try {
|
|
617
625
|
const threadId = messages[0]?.threadId;
|
|
626
|
+
const resourceId = messages[0]?.resourceId;
|
|
618
627
|
if (!threadId) {
|
|
619
628
|
throw new Error("Thread ID is required");
|
|
620
629
|
}
|
|
@@ -640,7 +649,9 @@ var ClickhouseStore = class extends storage.MastraStorage {
|
|
|
640
649
|
output_format_json_quote_64bit_integers: 0
|
|
641
650
|
}
|
|
642
651
|
});
|
|
643
|
-
|
|
652
|
+
const list = new agent.MessageList({ threadId, resourceId }).add(messages, "memory");
|
|
653
|
+
if (format === `v2`) return list.get.all.v2();
|
|
654
|
+
return list.get.all.v1();
|
|
644
655
|
} catch (error) {
|
|
645
656
|
console.error("Error saving messages:", error);
|
|
646
657
|
throw error;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createClient } from '@clickhouse/client';
|
|
2
|
+
import { MessageList } from '@mastra/core/agent';
|
|
2
3
|
import { TABLE_EVALS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, MastraStorage, TABLE_SCHEMAS } from '@mastra/core/storage';
|
|
3
4
|
|
|
4
5
|
// src/storage/index.ts
|
|
@@ -506,7 +507,12 @@ var ClickhouseStore = class extends MastraStorage {
|
|
|
506
507
|
throw error;
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
|
-
async getMessages({
|
|
510
|
+
async getMessages({
|
|
511
|
+
threadId,
|
|
512
|
+
resourceId,
|
|
513
|
+
selectBy,
|
|
514
|
+
format
|
|
515
|
+
}) {
|
|
510
516
|
try {
|
|
511
517
|
const messages = [];
|
|
512
518
|
const limit = typeof selectBy?.last === `number` ? selectBy.last : 40;
|
|
@@ -601,18 +607,21 @@ var ClickhouseStore = class extends MastraStorage {
|
|
|
601
607
|
} catch {
|
|
602
608
|
}
|
|
603
609
|
}
|
|
604
|
-
if (message.type === `v2`) delete message.type;
|
|
605
610
|
});
|
|
606
|
-
|
|
611
|
+
const list = new MessageList({ threadId, resourceId }).add(messages, "memory");
|
|
612
|
+
if (format === `v2`) return list.get.all.v2();
|
|
613
|
+
return list.get.all.v1();
|
|
607
614
|
} catch (error) {
|
|
608
615
|
console.error("Error getting messages:", error);
|
|
609
616
|
throw error;
|
|
610
617
|
}
|
|
611
618
|
}
|
|
612
|
-
async saveMessages(
|
|
619
|
+
async saveMessages(args) {
|
|
620
|
+
const { messages, format = "v1" } = args;
|
|
613
621
|
if (messages.length === 0) return messages;
|
|
614
622
|
try {
|
|
615
623
|
const threadId = messages[0]?.threadId;
|
|
624
|
+
const resourceId = messages[0]?.resourceId;
|
|
616
625
|
if (!threadId) {
|
|
617
626
|
throw new Error("Thread ID is required");
|
|
618
627
|
}
|
|
@@ -638,7 +647,9 @@ var ClickhouseStore = class extends MastraStorage {
|
|
|
638
647
|
output_format_json_quote_64bit_integers: 0
|
|
639
648
|
}
|
|
640
649
|
});
|
|
641
|
-
|
|
650
|
+
const list = new MessageList({ threadId, resourceId }).add(messages, "memory");
|
|
651
|
+
if (format === `v2`) return list.get.all.v2();
|
|
652
|
+
return list.get.all.v1();
|
|
642
653
|
} catch (error) {
|
|
643
654
|
console.error("Error saving messages:", error);
|
|
644
655
|
throw error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/clickhouse",
|
|
3
|
-
"version": "0.10.1
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Clickhouse provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"tsup": "^8.4.0",
|
|
30
30
|
"typescript": "^5.8.2",
|
|
31
31
|
"vitest": "^3.1.2",
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
32
|
+
"@mastra/core": "0.10.2",
|
|
33
|
+
"@internal/lint": "0.0.8"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@mastra/core": "^0.10.
|
|
36
|
+
"@mastra/core": "^0.10.2-alpha.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'crypto';
|
|
2
|
-
import type { WorkflowRunState } from '@mastra/core';
|
|
3
|
-
import type { MessageType } from '@mastra/core/memory';
|
|
2
|
+
import type { MastraMessageV1, WorkflowRunState } from '@mastra/core';
|
|
4
3
|
import { TABLE_THREADS, TABLE_MESSAGES, TABLE_WORKFLOW_SNAPSHOT } from '@mastra/core/storage';
|
|
5
4
|
import { describe, it, expect, beforeAll, beforeEach, afterAll, vi, afterEach } from 'vitest';
|
|
6
5
|
|
|
@@ -28,20 +27,27 @@ const TEST_CONFIG: ClickhouseConfig = {
|
|
|
28
27
|
// Sample test data factory functions
|
|
29
28
|
const createSampleThread = () => ({
|
|
30
29
|
id: `thread-${randomUUID()}`,
|
|
31
|
-
resourceId: `
|
|
30
|
+
resourceId: `clickhouse-test`,
|
|
32
31
|
title: 'Test Thread',
|
|
33
32
|
createdAt: new Date(),
|
|
34
33
|
updatedAt: new Date(),
|
|
35
34
|
metadata: { key: 'value' },
|
|
36
35
|
});
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
let role = `user`;
|
|
38
|
+
const getRole = () => {
|
|
39
|
+
if (role === `user`) role = `assistant`;
|
|
40
|
+
else role = `user`;
|
|
41
|
+
return role as 'user' | 'assistant';
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const createSampleMessage = (threadId: string, createdAt: Date = new Date()): MastraMessageV1 => ({
|
|
39
45
|
id: `msg-${randomUUID()}`,
|
|
40
|
-
resourceId: `
|
|
41
|
-
role:
|
|
46
|
+
resourceId: `clickhouse-test`,
|
|
47
|
+
role: getRole(),
|
|
42
48
|
type: 'text',
|
|
43
49
|
threadId,
|
|
44
|
-
content:
|
|
50
|
+
content: 'Hello',
|
|
45
51
|
createdAt,
|
|
46
52
|
});
|
|
47
53
|
|
|
@@ -77,6 +83,7 @@ const createSampleWorkflowSnapshot = (status: WorkflowRunState['context']['steps
|
|
|
77
83
|
},
|
|
78
84
|
input: {},
|
|
79
85
|
},
|
|
86
|
+
serializedStepGraph: [],
|
|
80
87
|
activePaths: [],
|
|
81
88
|
suspendedPaths: {},
|
|
82
89
|
runId,
|
|
@@ -211,24 +218,27 @@ describe('ClickhouseStore', () => {
|
|
|
211
218
|
const thread = createSampleThread();
|
|
212
219
|
await store.saveThread({ thread });
|
|
213
220
|
|
|
214
|
-
const messages:
|
|
221
|
+
const messages: MastraMessageV1[] = [
|
|
215
222
|
{
|
|
216
223
|
...createSampleMessage(thread.id, new Date(Date.now() - 1000 * 3)),
|
|
217
224
|
content: [{ type: 'text', text: 'First' }],
|
|
225
|
+
role: 'user',
|
|
218
226
|
},
|
|
219
227
|
{
|
|
220
228
|
...createSampleMessage(thread.id, new Date(Date.now() - 1000 * 2)),
|
|
221
229
|
content: [{ type: 'text', text: 'Second' }],
|
|
230
|
+
role: 'assistant',
|
|
222
231
|
},
|
|
223
232
|
{
|
|
224
233
|
...createSampleMessage(thread.id, new Date(Date.now() - 1000 * 1)),
|
|
225
234
|
content: [{ type: 'text', text: 'Third' }],
|
|
235
|
+
role: 'user',
|
|
226
236
|
},
|
|
227
237
|
];
|
|
228
238
|
|
|
229
239
|
await store.saveMessages({ messages });
|
|
230
240
|
|
|
231
|
-
const retrievedMessages = await store.getMessages
|
|
241
|
+
const retrievedMessages = await store.getMessages({ threadId: thread.id });
|
|
232
242
|
expect(retrievedMessages).toHaveLength(3);
|
|
233
243
|
|
|
234
244
|
// Verify order is maintained
|
package/src/storage/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import { createClient } from '@clickhouse/client';
|
|
3
|
+
import { MessageList } from '@mastra/core/agent';
|
|
3
4
|
import type { MastraMessageV2 } from '@mastra/core/agent';
|
|
4
5
|
import type { MetricResult, TestInfo } from '@mastra/core/eval';
|
|
5
|
-
import type { StorageThreadType } from '@mastra/core/memory';
|
|
6
|
+
import type { MastraMessageV1, StorageThreadType } from '@mastra/core/memory';
|
|
6
7
|
import {
|
|
7
8
|
MastraStorage,
|
|
8
9
|
TABLE_EVALS,
|
|
@@ -647,7 +648,14 @@ export class ClickhouseStore extends MastraStorage {
|
|
|
647
648
|
}
|
|
648
649
|
}
|
|
649
650
|
|
|
650
|
-
async getMessages
|
|
651
|
+
public async getMessages(args: StorageGetMessagesArg & { format?: 'v1' }): Promise<MastraMessageV1[]>;
|
|
652
|
+
public async getMessages(args: StorageGetMessagesArg & { format: 'v2' }): Promise<MastraMessageV2[]>;
|
|
653
|
+
public async getMessages({
|
|
654
|
+
threadId,
|
|
655
|
+
resourceId,
|
|
656
|
+
selectBy,
|
|
657
|
+
format,
|
|
658
|
+
}: StorageGetMessagesArg & { format?: 'v1' | 'v2' }): Promise<MastraMessageV1[] | MastraMessageV2[]> {
|
|
651
659
|
try {
|
|
652
660
|
const messages: any[] = [];
|
|
653
661
|
const limit = typeof selectBy?.last === `number` ? selectBy.last : 40;
|
|
@@ -752,21 +760,28 @@ export class ClickhouseStore extends MastraStorage {
|
|
|
752
760
|
// If parsing fails, leave as string
|
|
753
761
|
}
|
|
754
762
|
}
|
|
755
|
-
if (message.type === `v2`) delete message.type;
|
|
756
763
|
});
|
|
757
764
|
|
|
758
|
-
|
|
765
|
+
const list = new MessageList({ threadId, resourceId }).add(messages, 'memory');
|
|
766
|
+
if (format === `v2`) return list.get.all.v2();
|
|
767
|
+
return list.get.all.v1();
|
|
759
768
|
} catch (error) {
|
|
760
769
|
console.error('Error getting messages:', error);
|
|
761
770
|
throw error;
|
|
762
771
|
}
|
|
763
772
|
}
|
|
764
773
|
|
|
765
|
-
async saveMessages(
|
|
774
|
+
async saveMessages(args: { messages: MastraMessageV1[]; format?: undefined | 'v1' }): Promise<MastraMessageV1[]>;
|
|
775
|
+
async saveMessages(args: { messages: MastraMessageV2[]; format: 'v2' }): Promise<MastraMessageV2[]>;
|
|
776
|
+
async saveMessages(
|
|
777
|
+
args: { messages: MastraMessageV1[]; format?: undefined | 'v1' } | { messages: MastraMessageV2[]; format: 'v2' },
|
|
778
|
+
): Promise<MastraMessageV2[] | MastraMessageV1[]> {
|
|
779
|
+
const { messages, format = 'v1' } = args;
|
|
766
780
|
if (messages.length === 0) return messages;
|
|
767
781
|
|
|
768
782
|
try {
|
|
769
783
|
const threadId = messages[0]?.threadId;
|
|
784
|
+
const resourceId = messages[0]?.resourceId;
|
|
770
785
|
if (!threadId) {
|
|
771
786
|
throw new Error('Thread ID is required');
|
|
772
787
|
}
|
|
@@ -796,7 +811,9 @@ export class ClickhouseStore extends MastraStorage {
|
|
|
796
811
|
},
|
|
797
812
|
});
|
|
798
813
|
|
|
799
|
-
|
|
814
|
+
const list = new MessageList({ threadId, resourceId }).add(messages, 'memory');
|
|
815
|
+
if (format === `v2`) return list.get.all.v2();
|
|
816
|
+
return list.get.all.v1();
|
|
800
817
|
} catch (error) {
|
|
801
818
|
console.error('Error saving messages:', error);
|
|
802
819
|
throw error;
|