mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-19 14:52:21 +03:00
refactor(bridge/nodejs): protected
memory constructor
This commit is contained in:
parent
5539130dd9
commit
51152a0fe3
@ -61,6 +61,7 @@ export class Memory<T = unknown> {
|
|||||||
`You cannot read the memory "${this.name}" as it belongs to another skill which haven't written to this memory yet`
|
`You cannot read the memory "${this.name}" as it belongs to another skill which haven't written to this memory yet`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!fs.existsSync(this.memoryPath)) {
|
if (!fs.existsSync(this.memoryPath)) {
|
||||||
await this.clear()
|
await this.clear()
|
||||||
|
@ -2,7 +2,7 @@ export abstract class Widget<T> {
|
|||||||
public readonly type: string
|
public readonly type: string
|
||||||
public readonly options: T
|
public readonly options: T
|
||||||
|
|
||||||
public constructor(options: T) {
|
protected constructor(options: T) {
|
||||||
this.type = this.constructor.name
|
this.type = this.constructor.name
|
||||||
this.options = options
|
this.options = options
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user