rhua-chatgpt-web 1.0.88 → 1.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +223 -223
- package/dist/{api_chain-B-cNhdDc.js → api_chain-C-0jZvv9.js} +2 -2
- package/dist/{api_chain-BPIbTDHe.cjs → api_chain-ndbj9N9y.cjs} +1 -1
- package/dist/{combine_docs_chain-D1CuxrUl.js → combine_docs_chain-BV3YQBdx.js} +2 -2
- package/dist/{combine_docs_chain-CW-UAkmi.cjs → combine_docs_chain-DQTvoBRZ.cjs} +1 -1
- package/dist/{few_shot-CHAK1-z8.cjs → few_shot-B5sleOZV.cjs} +1 -1
- package/dist/{few_shot-O8-67QuC.js → few_shot-CKQd-oWZ.js} +1 -1
- package/dist/{index-BRLEtxTg.cjs → index---9AxgqH.cjs} +1 -1
- package/dist/index-6ysrd1Ya.js +4 -0
- package/dist/{index-BA6KSnfj.cjs → index-B7SLuAnl.cjs} +1 -1
- package/dist/{index-J0zCCOyj.js → index-BC6UWh7M.js} +1 -1
- package/dist/{index-C-HCxZKS.cjs → index-BDwOxjJB.cjs} +1 -1
- package/dist/{index-Bg4i1_-_.cjs → index-BP3ZLGza.cjs} +1 -1
- package/dist/index-BQHT54Oj.js +4 -0
- package/dist/index-BngGbFgs.js +4 -0
- package/dist/{index-sMdaGF1L.js → index-Btsunyw4.js} +2 -2
- package/dist/{index-D3iuGzzy.cjs → index-C-punTJk.cjs} +1 -1
- package/dist/{index-BXQVmPn_.cjs → index-C3tkG9PE.cjs} +1 -1
- package/dist/{index-Dawav42U.js → index-CHlurisP.js} +1 -1
- package/dist/{index-B4crbL_b.js → index-CL5dD4QL.js} +1 -1
- package/dist/{index-JsBtelL9.cjs → index-Cpx0aWjC.cjs} +1 -1
- package/dist/{index-2igGLT_8.cjs → index-D2l1IPLs.cjs} +1 -1
- package/dist/{index-G6Jqqpqx.js → index-DbyUBV_n.js} +2 -2
- package/dist/{index-Dn5Crg-3.cjs → index-DkbGwcKs.cjs} +1 -1
- package/dist/{index-Bwh8m6XG.js → index-DwuY6VJ2.js} +1 -1
- package/dist/{index-DhxUJGkZ.js → index-HO_HGmtl.js} +39 -40
- package/dist/index-M9STV34q.js +4 -0
- package/dist/{index-B1DQ8aUN.cjs → index-ScWV43Ya.cjs} +21 -21
- package/dist/{index-CkR9wjPN.cjs → index-i1kcSW4p.cjs} +1 -1
- package/dist/{index-QfgFr2NR.js → index-kQX1nE2W.js} +1 -1
- package/dist/{index-DPQGdSAq.cjs → index-vPFPFNIK.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-Dy7rlkzW.js → index.es-CUW_2i1O.js} +1432 -1345
- package/dist/{index.es-DE2oeY2C.cjs → index.es-pbdKKw38.cjs} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/{llm_chain-B0TiomYu.cjs → llm_chain-BKOS6WwS.cjs} +1 -1
- package/dist/{llm_chain-CO4ogBIS.js → llm_chain-Cp-fdIHU.js} +1 -1
- package/dist/{sequential_chain-B-UjCF25.js → sequential_chain-B9xFRCud.js} +1 -1
- package/dist/{sequential_chain-lf28C-hW.cjs → sequential_chain-DTZBsSxs.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/tauri.svg +6 -6
- package/dist/{vector_db_qa-w17H47Y_.cjs → vector_db_qa-ClnOaOPx.cjs} +1 -1
- package/dist/{vector_db_qa-Cglbxmug.js → vector_db_qa-dNJ2CIeL.js} +3 -3
- package/package.json +2 -2
- package/dist/index-8JU2LnMZ.js +0 -4
- package/dist/index-B70YuZoP.js +0 -4
- package/dist/index-CriBv7jE.js +0 -4
- package/dist/index-DjYbqyO7.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index-
|
|
1
|
+
"use strict";const e=require("./index-ScWV43Ya.cjs"),t=e.convertElement(function(e){return"audio"===e.tagName||"canvas"===e.tagName||"embed"===e.tagName||"iframe"===e.tagName||"img"===e.tagName||"math"===e.tagName||"object"===e.tagName||"picture"===e.tagName||"svg"===e.tagName||"video"===e.tagName}),r=["address","article","aside","blockquote","body","br","caption","center","col","colgroup","dd","dialog","dir","div","dl","dt","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","legend","li","li","listing","main","menu","nav","ol","optgroup","option","p","plaintext","pre","section","summary","table","tbody","td","td","tfoot","th","th","thead","tr","ul","wbr","xmp"],n=["button","input","select","textarea"],a=["area","base","basefont","dialog","datalist","head","link","meta","noembed","noframes","param","rp","script","source","style","template","track","title"],i={},o=e.convert(["comment","doctype"]);function s(e,t){if("children"in e){const r={...t};return("root"===e.type||u(e))&&(r.before=!0,r.after=!0),r.whitespace=function(e,t){if("tagName"in e&&e.properties)switch(e.tagName){case"listing":case"plaintext":case"script":case"style":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return e.properties.wrap?"pre-wrap":"pre";case"td":case"th":return e.properties.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}return t.whitespace}(e,t),function(e,t){let r=t.before;const n=t.after,a=e.children;let i=a.length,o=-1;for(;++o<i;){const e=s(a[o],{...t,after:c(a,o,n),before:r});e.remove?(a.splice(o,1),o--,i--):e.ignore||(r=e.stripAtStart),l(a[o])&&(r=!1)}return{ignore:!1,stripAtStart:Boolean(r||n),remove:!1}}(e,r)}if("text"===e.type){if("normal"===t.whitespace)return function(e,t){const r=t.collapse(e.value),n={ignore:!1,stripAtStart:!1,remove:!1};let a=0,i=r.length;t.before&&f(r.charAt(0))&&a++;a!==i&&f(r.charAt(i-1))&&(t.after?i--:n.stripAtStart=!0);a===i?n.remove=!0:e.value=r.slice(a,i);return n}(e,t);"nowrap"===t.whitespace&&(e.value=t.collapse(e.value))}return{ignore:o(e),stripAtStart:!1,remove:!1}}function c(e,t,r){for(;++t<e.length;){const r=e[t];let n=p(r);if(void 0===n&&"children"in r&&!m(r)&&(n=c(r.children,-1)),"boolean"==typeof n)return n}return r}function p(t){if("element"===t.type){if(l(t))return!1;if(u(t))return!0}else if("text"===t.type){if(!e.whitespace(t))return!1}else if(!o(t))return!1}function l(r){return t(r)||e.isElement(r,n)}function u(t){return e.isElement(t,r)}function m(t){return Boolean("element"===t.type&&t.properties.hidden)||o(t)||e.isElement(t,a)}function f(e){return" "===e||"\n"===e}function d(e){const t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function h(){return" "}function g(e){return function(t){return String(t).replace(/[\t\n\v\f\r ]+/g,e)}}const b={}.hasOwnProperty;const y=new Set(["pingback","prefetch","stylesheet"]);const v=e.convertElement(["a","abbr","area","b","bdi","bdo","br","button","cite","code","data","datalist","del","dfn","em","i","input","ins","kbd","keygen","label","map","mark","meter","noscript","output","progress","q","ruby","s","samp","script","select","small","span","strong","sub","sup","template","textarea","time","u","var","wbr"]),w=e.convertElement("meta");exports.embedded=t,exports.minifyWhitespace=function(e,t){s(e,{collapse:g((t||i).newlines?d:h),whitespace:"normal"})},exports.phrasing=function(e){return Boolean("text"===e.type||v(e)||t(e)||function(e){if("element"!==e.type||"link"!==e.tagName)return!1;if(e.properties.itemProp)return!0;const t=e.properties.rel;let r=-1;if(!Array.isArray(t)||0===t.length)return!1;for(;++r<t.length;)if(!y.has(String(t[r])))return!1;return!0}(e)||w(e)&&function(e,t){const r="element"===e.type&&b.call(e.properties,t)&&e.properties[t];return null!=r&&!1!==r}(e,"itemProp"))};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as toText, Q as phrasing$2, T as structuredClone, w as whitespace, U as visit, W as EXIT, X as toString, S as SKIP, Y as position } from "./index-
|
|
2
|
-
import { m as minifyWhitespace, p as phrasing$1 } from "./index-
|
|
1
|
+
import { O as toText, Q as phrasing$2, T as structuredClone, w as whitespace, U as visit, W as EXIT, X as toString, S as SKIP, Y as position } from "./index-HO_HGmtl.js";
|
|
2
|
+
import { m as minifyWhitespace, p as phrasing$1 } from "./index-BC6UWh7M.js";
|
|
3
3
|
function rehypeMinifyWhitespace(options) {
|
|
4
4
|
return function(tree) {
|
|
5
5
|
minifyWhitespace(tree, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ScWV43Ya.cjs");exports.default=e.remarkGfm;
|
|
@@ -1321,7 +1321,7 @@ styled(Select)`
|
|
|
1321
1321
|
background: #ffffff;
|
|
1322
1322
|
border-color: #e8e8e8 !important;
|
|
1323
1323
|
`;
|
|
1324
|
-
|
|
1324
|
+
styled(Checkbox)`
|
|
1325
1325
|
color: #666666 !important;
|
|
1326
1326
|
display: flex !important;
|
|
1327
1327
|
align-items: center !important;
|
|
@@ -1847,34 +1847,24 @@ const AiList = ({
|
|
|
1847
1847
|
}, [showUserMenu, openMenuId]);
|
|
1848
1848
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(WorkspaceApp, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ContentArea, { children: [
|
|
1849
1849
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ContentHeader, { children: [
|
|
1850
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
1850
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FilterSection, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FilterTabs, { children: [
|
|
1851
1851
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1852
|
-
|
|
1852
|
+
FilterTab,
|
|
1853
1853
|
{
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
children: "
|
|
1854
|
+
$active: activeFilter === "all",
|
|
1855
|
+
onClick: () => setActiveFilter("all"),
|
|
1856
|
+
children: "应用"
|
|
1857
1857
|
}
|
|
1858
1858
|
),
|
|
1859
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1869
|
-
FilterTab,
|
|
1870
|
-
{
|
|
1871
|
-
$active: activeFilter === "workflow",
|
|
1872
|
-
onClick: () => setActiveFilter("workflow"),
|
|
1873
|
-
children: "工具"
|
|
1874
|
-
}
|
|
1875
|
-
)
|
|
1876
|
-
] })
|
|
1877
|
-
] }),
|
|
1859
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1860
|
+
FilterTab,
|
|
1861
|
+
{
|
|
1862
|
+
$active: activeFilter === "workflow",
|
|
1863
|
+
onClick: () => setActiveFilter("workflow"),
|
|
1864
|
+
children: "工具"
|
|
1865
|
+
}
|
|
1866
|
+
)
|
|
1867
|
+
] }) }),
|
|
1878
1868
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SearchSection, { children: [
|
|
1879
1869
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1880
1870
|
AddButton,
|
|
@@ -43352,6 +43342,9 @@ const DynamicForm = ({
|
|
|
43352
43342
|
] }) }, variable);
|
|
43353
43343
|
};
|
|
43354
43344
|
const renderParagraphField = (config, variable) => {
|
|
43345
|
+
const currentValue = formData[variable] || "";
|
|
43346
|
+
const currentLength = currentValue.length;
|
|
43347
|
+
const maxLength = config.max_length;
|
|
43355
43348
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dynamic-form-field", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dynamic-text-input-field", children: [
|
|
43356
43349
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "dynamic-form-label", children: [
|
|
43357
43350
|
config.label,
|
|
@@ -43360,15 +43353,20 @@ const DynamicForm = ({
|
|
|
43360
43353
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43361
43354
|
TextArea,
|
|
43362
43355
|
{
|
|
43363
|
-
value:
|
|
43356
|
+
value: currentValue,
|
|
43364
43357
|
onChange: (value) => handleParagraphChange(variable, value),
|
|
43365
43358
|
placeholder: config.placeholder || `请输入${config.label}`,
|
|
43366
|
-
maxLength
|
|
43359
|
+
maxLength,
|
|
43367
43360
|
showClear: true,
|
|
43368
43361
|
autosize: { minRows: 3, maxRows: 8 },
|
|
43369
43362
|
style: { width: "100%" }
|
|
43370
43363
|
}
|
|
43371
|
-
)
|
|
43364
|
+
),
|
|
43365
|
+
maxLength && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dynamic-char-count", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { type: "tertiary", size: "small", children: [
|
|
43366
|
+
currentLength,
|
|
43367
|
+
"/",
|
|
43368
|
+
maxLength
|
|
43369
|
+
] }) })
|
|
43372
43370
|
] }) }, variable);
|
|
43373
43371
|
};
|
|
43374
43372
|
const renderNumberField = (config, variable) => {
|
|
@@ -45956,7 +45954,7 @@ const BlockEdit = ({
|
|
|
45956
45954
|
const initVueEditor = async () => {
|
|
45957
45955
|
if (editorRef.current) {
|
|
45958
45956
|
try {
|
|
45959
|
-
const BlockNoteEditorModule = await import("./index.es-
|
|
45957
|
+
const BlockNoteEditorModule = await import("./index.es-CUW_2i1O.js");
|
|
45960
45958
|
const BlockNoteEditor = BlockNoteEditorModule.BlockNoteEditor;
|
|
45961
45959
|
const theme = {
|
|
45962
45960
|
colors: {
|
|
@@ -46306,6 +46304,7 @@ const Chat3 = forwardRef(
|
|
|
46306
46304
|
const [aiActionOutlineContent, setAiActionOutlineContent] = useState("");
|
|
46307
46305
|
const [conversationId, setConversationId] = useState("");
|
|
46308
46306
|
const extractAnswerOnly = (text2) => {
|
|
46307
|
+
console.log("extractAnswerOnly", text2);
|
|
46309
46308
|
if (!text2) return "";
|
|
46310
46309
|
if (text2.includes("</details>")) {
|
|
46311
46310
|
return text2.split("</details>")[1] || "";
|
|
@@ -46377,7 +46376,7 @@ const Chat3 = forwardRef(
|
|
|
46377
46376
|
} else if (menu.event === "2") {
|
|
46378
46377
|
setMsgList((prev) => prev.filter((i) => i.id !== item.id));
|
|
46379
46378
|
} else if (menu.event === "3") {
|
|
46380
|
-
if (["summarize", "ask"].includes(aiAction)) {
|
|
46379
|
+
if (["summarize", "ask"].includes(aiAction) || !aiAction) {
|
|
46381
46380
|
Toast.info("请复制内容手动插入到编辑器中");
|
|
46382
46381
|
return;
|
|
46383
46382
|
}
|
|
@@ -46933,7 +46932,7 @@ const AiBlockEdit = ({
|
|
|
46933
46932
|
const initVueEditor = async () => {
|
|
46934
46933
|
if (editorRef.current) {
|
|
46935
46934
|
try {
|
|
46936
|
-
const BlockNoteEditorModule = await import("./index.es-
|
|
46935
|
+
const BlockNoteEditorModule = await import("./index.es-CUW_2i1O.js");
|
|
46937
46936
|
const BlockNoteEditor = BlockNoteEditorModule.BlockNoteEditor;
|
|
46938
46937
|
const theme = {
|
|
46939
46938
|
colors: {
|
|
@@ -47859,7 +47858,7 @@ class BasePromptTemplate extends Runnable {
|
|
|
47859
47858
|
return PromptTemplate2.deserialize({ ...data, _type: "prompt" });
|
|
47860
47859
|
}
|
|
47861
47860
|
case "few_shot": {
|
|
47862
|
-
const { FewShotPromptTemplate } = await import("./few_shot-
|
|
47861
|
+
const { FewShotPromptTemplate } = await import("./few_shot-CKQd-oWZ.js");
|
|
47863
47862
|
return FewShotPromptTemplate.deserialize(data);
|
|
47864
47863
|
}
|
|
47865
47864
|
default:
|
|
@@ -49431,35 +49430,35 @@ class BaseChain extends BaseLangChain {
|
|
|
49431
49430
|
static async deserialize(data, values = {}) {
|
|
49432
49431
|
switch (data._type) {
|
|
49433
49432
|
case "llm_chain": {
|
|
49434
|
-
const { LLMChain } = await import("./llm_chain-
|
|
49433
|
+
const { LLMChain } = await import("./llm_chain-Cp-fdIHU.js");
|
|
49435
49434
|
return LLMChain.deserialize(data);
|
|
49436
49435
|
}
|
|
49437
49436
|
case "sequential_chain": {
|
|
49438
|
-
const { SequentialChain } = await import("./sequential_chain-
|
|
49437
|
+
const { SequentialChain } = await import("./sequential_chain-B9xFRCud.js");
|
|
49439
49438
|
return SequentialChain.deserialize(data);
|
|
49440
49439
|
}
|
|
49441
49440
|
case "simple_sequential_chain": {
|
|
49442
|
-
const { SimpleSequentialChain } = await import("./sequential_chain-
|
|
49441
|
+
const { SimpleSequentialChain } = await import("./sequential_chain-B9xFRCud.js");
|
|
49443
49442
|
return SimpleSequentialChain.deserialize(data);
|
|
49444
49443
|
}
|
|
49445
49444
|
case "stuff_documents_chain": {
|
|
49446
|
-
const { StuffDocumentsChain } = await import("./combine_docs_chain-
|
|
49445
|
+
const { StuffDocumentsChain } = await import("./combine_docs_chain-BV3YQBdx.js");
|
|
49447
49446
|
return StuffDocumentsChain.deserialize(data);
|
|
49448
49447
|
}
|
|
49449
49448
|
case "map_reduce_documents_chain": {
|
|
49450
|
-
const { MapReduceDocumentsChain } = await import("./combine_docs_chain-
|
|
49449
|
+
const { MapReduceDocumentsChain } = await import("./combine_docs_chain-BV3YQBdx.js");
|
|
49451
49450
|
return MapReduceDocumentsChain.deserialize(data);
|
|
49452
49451
|
}
|
|
49453
49452
|
case "refine_documents_chain": {
|
|
49454
|
-
const { RefineDocumentsChain } = await import("./combine_docs_chain-
|
|
49453
|
+
const { RefineDocumentsChain } = await import("./combine_docs_chain-BV3YQBdx.js");
|
|
49455
49454
|
return RefineDocumentsChain.deserialize(data);
|
|
49456
49455
|
}
|
|
49457
49456
|
case "vector_db_qa": {
|
|
49458
|
-
const { VectorDBQAChain } = await import("./vector_db_qa-
|
|
49457
|
+
const { VectorDBQAChain } = await import("./vector_db_qa-dNJ2CIeL.js");
|
|
49459
49458
|
return VectorDBQAChain.deserialize(data, values);
|
|
49460
49459
|
}
|
|
49461
49460
|
case "api_chain": {
|
|
49462
|
-
const { APIChain } = await import("./api_chain-
|
|
49461
|
+
const { APIChain } = await import("./api_chain-C-0jZvv9.js");
|
|
49463
49462
|
return APIChain.deserialize(data);
|
|
49464
49463
|
}
|
|
49465
49464
|
default:
|