Skip to content

Commit 471018a

Browse files
committed
refactor: core module export
1 parent 0bc64e1 commit 471018a

File tree

18 files changed

+35
-43
lines changed

18 files changed

+35
-43
lines changed

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"exports": {
1919
".": "./lib/index.js",
20-
"./store": "./lib/store.js"
20+
"./plugin": "./lib/plugins/index.js"
2121
},
2222
"files": [
2323
"lib",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

core/index.ts renamed to core/src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,4 @@ export {
261261
export { preferences } from "./preferences";
262262
export { fs } from "./fs";
263263

264-
export { JanPlugin, PluginType } from "./plugin";
265-
export {
266-
ConversationalPlugin,
267-
Conversation,
268-
Message,
269-
} from "./plugins/conversational";
264+
export { JanPlugin, PluginType } from "./plugin";
File renamed without changes.

core/src/plugins/conversational.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { JanPlugin } from "../plugin";
2+
import { Conversation } from "../types/index";
3+
4+
export abstract class ConversationalPlugin extends JanPlugin {
5+
abstract getConversations(): Promise<any[]>;
6+
abstract saveConversation(conversation: Conversation): Promise<void>;
7+
abstract deleteConversation(conversationId: string): Promise<void>;
8+
}

core/src/plugins/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ConversationalPlugin } from './conversational'

core/src/plugins/model.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { JanPlugin } from "../plugin";
2+
3+
export interface Model {
4+
url: string;
5+
fileName: string;
6+
}
7+
8+
export abstract class ModelPlugin extends JanPlugin {
9+
abstract downloadModel(): Promise<any[]>;
10+
abstract deleteModel(): Promise<void>;
11+
abstract saveModel(): Promise<any>;
12+
abstract getModels(): Promise<any>;
13+
}

0 commit comments

Comments
 (0)