npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

shimo-lizard-sdk

v0.0.26

Published

拥有主站的创建和生成文件,上传云文件的能力

Downloads

2

Readme

shimo-lizard-sdk

拥有主站的创建和生成文件,上传云文件的能力

安装

yarn add shimo-lizard-sdk
# or
npm i shimo-lizard-sdk

使用

import { LizardSDK, ChatStatus, Events } from 'shimo-lizard-sdk'

const lizardSDK = new LizardSDK()

const menus = lizardSDK.getCreateMenus()

说明

// 获取一键生成菜单的列表
const menus = lizardSDK.getCreateMenus()

// 实时监听右侧文件列表的变化
lizardSDK.on(Events.FileListChange, (fileList) => {
  // 文件列表
})

// 新文档选区发生变化时触发 内容为 string
lizardSDK.on(Events.NewdocSectionChange, (content) => {
  //
})

// 灯片随机主题变化的时候
lizardSDK.on(Events.PresentationThemesRandomlyChange, (themes)) => {
  // 主题列表
})

// 幻灯片主题应用时,成后后的返回
lizardSDK.on(Events.ApplyPresentationThemeStatusChange, (status) => {
  // success | failed
})

/**
 * 对话框显隐状体啊变化 true 显示 | false 隐藏
 */
lizardSDK.on(Events.DialogVisibleChange, (visible) => {
  // true 显示 | false 隐藏
})

// 实时监听AI的聊天状态
lizardSDK.on(Events.ChatStatusChange, (statusData) => {
  // statusData 结构如下 具体可以参考 ChatStatus 的相关类型说明
  // {
  //   status: ChatStatus.Generating,
  //   info: {
  //     data, 为any
  //     text: '石小墨生成中'
  //   }
  // }
  // {
  //   status: ChatStatus.EstablishCommunication,
  //   info: {
  //     text: ''
  //    data: {
  //      conversationId: 'asdfasdf',
  //      isNewdoc: true,
  //      file: {
  //        guid: 'sdfads',
  //        name: '标题'
  //      },
  //    }
  //   }
  // }
})

// 隐藏AI对话框
lizardSDK.hideAIDialog()

// 清空 AI 对话框 调用此方法后,需要在UI层面清空对话内容
lizardSDK.clearAIDialog('conversationId')

// 发送文本内容
lizardSDK.sendText({
  text: "这是文字内容",
  conversationId: 'conversationId'
})

// 发送文本和文件列表
lizardSDK.sendTextAndFiles({ text: “请帮我翻译这些文档”, files: [{
  name: '调研报告',
  guid: 'abcabc',
  conversationId: 'conversationId'
}]})

// 取消某个文件的上传
lizardSDK.cancelUpload({
  name: '调研报告',
  guid: 'abcabc',
})

// 重新上传文件
lizardSDK.reUpload({
  name: '调研报告',
  guid: 'abcabc',
})

// 停止 AI 继续生成内容
lizardSDK.stopGenerateContent('conversationId')

// 重新生成
lizardSDK.regenerateContent({
  messageId: 'messageId',
  conversationId: 'conversationId',
})

// 复制内容
lizardSDK.copyContent('这是要复制的文本内容')

// 根据类型 创建文件 目前只支持 新文档、幻灯片 newdoc presentation
lizardSDK.createFileByType({
  createType: 'newdoc',
  content: '这是要初始化的内容',
  conversationId: 'conversationId',
})

// 保存图片
lizardSDK.saveImage({
  b64Image: 'this_is_base64_string',
  name: '这是图片标题',
  conversationId: 'conversationId'
})

// 跳转链接
lizardSDK.gotoUrl('/docs/:guiid')

// 向新文档插入内容
lizardSDK.insertTextTonNewdoc('content')


// 应用幻灯片主题
lizardSDK.applyPresentationTheme({
  type: 'all', // 'all' | 'selected'
  id: 'asdfasdf',
})


// 获取幻灯片随机主题
lizardSDK.getPresentationThemesRandomly(4) // number 默认为4

// 对文本生成幻灯片可以展示的大纲
lizardSDK.getPPTOutlineByText({
  text: '这是需要生成的内容',
  conversationId: 'asdfasdf',
})