Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sea-ai-ui-component

Package Overview
Dependencies
Maintainers
0
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sea-ai-ui-component

> The seatable AI UI component.

  • 0.0.81
  • npm
  • Socket score

Version published
Weekly downloads
26
increased by13.04%
Maintainers
0
Weekly downloads
 
Created
Source

Seatable AI UI component

The seatable AI UI component.

查看demo

  1. 下载源码并进入文件夹
git clone git@gitlab.seafile.top:seatable-extends/sea-ai-ui-component.git
cd sea-ai-ui-component
  1. 安装依赖
npm install
  1. 添加配置项
  • 切换目录:cd example
  • 复制一份:'setting.local.dist.js', 并重命名为 'setting.local.js'
  • 修改 pluginConfig, 该配置想同插件开发的配置项一样,请参照插件开发文档即可
  • 修改 appConfig, 该配置项同其他应用的配置项一样,请参照其他应用的配置项进行配置即可
  1. 启动
npm start
  1. 在浏览器地址栏中输入:127.0.0.1:9002,即可访问该组件库的 demo 内容

注意:自定义API 的demo,目前不支持修改参数同步更新视图

使用

  1. 安装 sea-ai-ui-component
  npm install sea-ai-ui-component
  1. 使用
  <!-- app.jsx -->
  import React from 'react';
  import SeatableAI from 'sea-ai-ui-component';
  import Layout from 'xxx';

  const APP = () => {
      return (
          <SeatableAI isDevelopment={isDevelopment}> // 加载 assistants
              <Layout />
          </SeatableAI>
      );
  }

  export default APP;
  <!-- layout.jsx -->
  import React from 'react';
  import { Chat, Assistants, useAssistants } from 'sea-ai-ui-component';

  const Layout = () => {
    const { usingAssistant } = useAssistants();

    if (usingAssistant) {
      return (<Chat usingAssistant={usingAssistant} />);
    }

    return (
      <Assistants readonly /> // readonly: 只读下不展示添加按钮
    );
  };
  1. 具体应用请参照相关 demo

开发

依据业务逻辑新编写组件

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc