1.0.6 • Published 11 months ago

@chatbot-ui/local-storage v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Chatbot UI Local Storage

This extension provides local storage support to my custom version of Chatbot UI.

Installation

Installing this extension by hand is usually not required, as it ships with the base version of Chatbot UI. However, if you replaced this extension with a database extension, then you can re-install with the following steps:

Step 1

Install the local storage extension with npm:

npm i @chatbot-ui/local-storage@latest

Step 2

Update /utils/app/storage.ts to use the local storage:

import { Database } from '@chatbot-ui/core';
import { LocalDatabase } from 'chatbot-ui-local-storage';

// <-----Update here

let database: Database | null = null;

export const getDatabase = async () => {
  if (database) {
    return database;
  } else {
    database = new LocalDatabase(); // <-----Update here
    await database.connect();
    return database;
  }
};

That's it.

1.0.2

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.1

12 months ago

1.0.0

12 months ago