@runllm/search-widget

0.0.20-alpha1 • Public • Published

UI Search Widget

This is the codebase for the search widget, which provides a modal for users to converse with an assistant.

The Search modal can be opened via hotkey or by clicking on the floating UI.

Installation and Configuration

For a detailed example of how to set up the Widget, you can refer to the contents of search-widget/index.html.

Development Quickstart

To get started developing the search widget, you will first need to install the dependencies:

Prerequisites

In order to make authenticated requests to the search widget while in local development mode, you will need to configure reCAPTCHA according to the reCAPTCHA configuration guide.

Installing Dependencies

This guide assumes that all commands are run from the root of the search-widget folder.

cd ApiOverflow/src/search-widget

To install the dependencies, run:

yarn install

Building the bundle

You can build the widget's bundle by running:

yarn build

Configuring your Development Site

You will need to configure your widget in the src/search-widget/index.html file according to the steps provided in the Installation and Configuration section.

Once you have your configuration set up accordingly, you can serve the widget by running:

npx serve

The npx serve command will serve the index.html file located at the root of the search-widget directory.

Note: Running npx serve creates an HTTP server. If you wish to serve an HTML file other than index.html, this will require some additional configuration. Please refer to the documentation on npm for the serve package for more details.

Publishing Changes

After you are happy with your changes, you will need to publish a new verision of the npm package.

From the root of the search-widget directory, run the following command:

yarn publish

This command will prompt you for the new package version number. You can either provide a new number here, or press enter to omit. If you provide the new version number, this command will update package.json and commit the change.

Running yarn publish requires that you are a part of the runllm npm organization. Please contact @agiron123 for help with this if you are not currently a member.

After your changes are published, you can check here to ensure that your newly published version is present.

Deploying to Production

After testing your changes and verifying that everything is working properly, you can deploy the changes to production by tagging the version as stable.

To do so, you will need to tag the npm package version as 'stable'. You can achieve this by running the following command:

yarn tag add @runllm/search-widget@<version_number> stable

For more information on the yarn tag command, you can refer to the documentation.

Readme

Keywords

none

Package Sidebar

Install

npm i @runllm/search-widget

Weekly Downloads

135

Version

0.0.20-alpha1

License

none

Unpacked Size

1.04 MB

Total Files

68

Last publish

Collaborators

  • kenxu95
  • cgwu
  • likawind
  • andre.aqueducthq