mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-10-10 07:23:23 +08:00
添加quickcommand.markdownParse接口,可视化编排支持解析markdown
This commit is contained in:
@@ -5,6 +5,7 @@ const kill = require("tree-kill");
|
||||
const iconv = require("iconv-lite");
|
||||
const path = require("path");
|
||||
const axios = require("axios");
|
||||
const marked = require("marked");
|
||||
const { chat, getModels } = require("./ai");
|
||||
|
||||
window.getModelsFromAiApi = getModels;
|
||||
@@ -84,6 +85,11 @@ const quickcommand = {
|
||||
return new DOMParser().parseFromString(html, "text/html");
|
||||
},
|
||||
|
||||
// markdown 解析
|
||||
markdownParse: function (markdown) {
|
||||
return marked.parse(markdown);
|
||||
},
|
||||
|
||||
// 下载文件
|
||||
downloadFile: function (url, file) {
|
||||
return new Promise((reslove, reject) => {
|
||||
|
Reference in New Issue
Block a user