mirror of
https://github.com/syuilo/ai.git
synced 2024-11-14 01:37:59 +00:00
18 lines
268 B
TypeScript
18 lines
268 B
TypeScript
// 藍の記憶
|
|
|
|
import * as loki from 'lokijs';
|
|
|
|
const db = new loki('ai');
|
|
|
|
export default db;
|
|
|
|
export const contexts = db.addCollection<{
|
|
isMessage: boolean;
|
|
noteId?: string;
|
|
userId?: string;
|
|
module: string;
|
|
key: string;
|
|
}>('contexts', {
|
|
indices: ['key']
|
|
});
|