mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-03 23:15:37 +00:00
updates modal
This commit is contained in:
parent
d6e2535a5e
commit
2a83318739
8
docs/package-lock.json
generated
8
docs/package-lock.json
generated
@ -6,7 +6,7 @@
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@vercel/analytics": "^1.0.2",
|
||||
"docsgpt": "^0.2.3",
|
||||
"docsgpt": "^0.2.4",
|
||||
"next": "^13.4.19",
|
||||
"nextra": "^2.12.3",
|
||||
"nextra-theme-docs": "^2.12.3",
|
||||
@ -1623,9 +1623,9 @@
|
||||
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
|
||||
},
|
||||
"node_modules/docsgpt": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/docsgpt/-/docsgpt-0.2.3.tgz",
|
||||
"integrity": "sha512-IeLfvJbnvcdUy50OZz79R6dKQdg9TcatUabvjtUKN6IS/KgPmdKj9hZ6BLBNkJaxSCegmkMlRS6ZDYtaoGmNHw==",
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/docsgpt/-/docsgpt-0.2.4.tgz",
|
||||
"integrity": "sha512-za4YY8HPFdNgV3deVzrQ73XG5DJXVWtXb0cLVm6ZLrulWZ/MDj29AeAjGpLyXoKHLdD8sGq90wEfnfI7ih+JXA==",
|
||||
"dependencies": {
|
||||
"postcss-cli": "^10.1.0",
|
||||
"react": "^18.2.0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@vercel/analytics": "^1.0.2",
|
||||
"docsgpt": "^0.2.3",
|
||||
"docsgpt": "^0.2.4",
|
||||
"next": "^13.4.19",
|
||||
"nextra": "^2.12.3",
|
||||
"nextra-theme-docs": "^2.12.3",
|
||||
|
32
extensions/react-widget/dist/index.es.js
vendored
32
extensions/react-widget/dist/index.es.js
vendored
@ -1,4 +1,4 @@
|
||||
import De, { useState as ke, useRef as ur, useEffect as Pe } from "react";
|
||||
import Ne, { useState as ke, useRef as ur, useEffect as Pe } from "react";
|
||||
var ne = { exports: {} }, Y = {};
|
||||
/**
|
||||
* @license React
|
||||
@ -14,7 +14,7 @@ function cr() {
|
||||
if (Ce)
|
||||
return Y;
|
||||
Ce = 1;
|
||||
var D = De, w = Symbol.for("react.element"), C = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, E = D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
var N = Ne, w = Symbol.for("react.element"), C = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, E = N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function T(b, d, v) {
|
||||
var m, h = {}, x = null, p = null;
|
||||
v !== void 0 && (x = "" + v), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (p = d.ref);
|
||||
@ -40,14 +40,14 @@ var L = {};
|
||||
var Oe;
|
||||
function fr() {
|
||||
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
||||
var D = De, w = Symbol.for("react.element"), C = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), b = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, j = "@@iterator";
|
||||
var N = Ne, w = Symbol.for("react.element"), C = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), b = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, j = "@@iterator";
|
||||
function J(e) {
|
||||
if (e === null || typeof e != "object")
|
||||
return null;
|
||||
var r = R && e[R] || e[j];
|
||||
return typeof r == "function" ? r : null;
|
||||
}
|
||||
var O = D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
var O = N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function g(e) {
|
||||
{
|
||||
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
||||
@ -65,10 +65,10 @@ function fr() {
|
||||
s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
|
||||
}
|
||||
}
|
||||
var N = !1, z = !1, Ne = !1, Ae = !1, Fe = !1, ae;
|
||||
var D = !1, z = !1, De = !1, Ae = !1, Fe = !1, ae;
|
||||
ae = Symbol.for("react.module.reference");
|
||||
function Ie(e) {
|
||||
return !!(typeof e == "string" || typeof e == "function" || e === u || e === S || Fe || e === E || e === v || e === m || Ae || e === p || N || z || Ne || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === h || e.$$typeof === T || e.$$typeof === b || e.$$typeof === d || // This needs to include all possible module reference object
|
||||
return !!(typeof e == "string" || typeof e == "function" || e === u || e === S || Fe || e === E || e === v || e === m || Ae || e === p || D || z || De || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === h || e.$$typeof === T || e.$$typeof === b || e.$$typeof === d || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
// with.
|
||||
@ -627,7 +627,7 @@ Check the top-level render call using <` + t + ">.");
|
||||
process.env.NODE_ENV === "production" ? ne.exports = cr() : ne.exports = fr();
|
||||
var l = ne.exports;
|
||||
function dr({
|
||||
question: D = "",
|
||||
question: N = "",
|
||||
apiKey: w = "",
|
||||
selectedDocs: C = "",
|
||||
history: u = [],
|
||||
@ -640,7 +640,7 @@ function dr({
|
||||
let b = "default";
|
||||
return C && (b = C), new Promise((d, v) => {
|
||||
const m = {
|
||||
question: D,
|
||||
question: N,
|
||||
api_key: w,
|
||||
embeddings_key: w,
|
||||
active_docs: b,
|
||||
@ -670,12 +670,12 @@ function dr({
|
||||
R += 1;
|
||||
const B = p.decode(O).split(`
|
||||
`);
|
||||
for (let N of B) {
|
||||
if (N.trim() == "")
|
||||
for (let D of B) {
|
||||
if (D.trim() == "")
|
||||
continue;
|
||||
N.startsWith("data:") && (N = N.substring(5));
|
||||
D.startsWith("data:") && (D = D.substring(5));
|
||||
const z = new MessageEvent("message", {
|
||||
data: N
|
||||
data: D
|
||||
});
|
||||
T(z);
|
||||
}
|
||||
@ -687,7 +687,7 @@ function dr({
|
||||
});
|
||||
});
|
||||
}
|
||||
const pr = ({ apiHost: D = "https://gptcloud.arc53.com", selectDocs: w = "default", apiKey: C = "docsgpt-public" }) => {
|
||||
const pr = ({ apiHost: N = "https://gptcloud.arc53.com", selectDocs: w = "default", apiKey: C = "docsgpt-public" }) => {
|
||||
const [u, E] = ke(() => typeof window < "u" && localStorage.getItem("docsGPTChatState") || "init"), [S, T] = ke(""), b = ur(null);
|
||||
Pe(() => {
|
||||
if (b.current) {
|
||||
@ -714,7 +714,7 @@ const pr = ({ apiHost: D = "https://gptcloud.arc53.com", selectDocs: w = "defaul
|
||||
selectedDocs: w,
|
||||
history: [],
|
||||
conversationId: null,
|
||||
apiHost: D,
|
||||
apiHost: N,
|
||||
onEvent: (x) => {
|
||||
const p = JSON.parse(x.data);
|
||||
if (p.type === "end")
|
||||
@ -768,7 +768,7 @@ const pr = ({ apiHost: D = "https://gptcloud.arc53.com", selectDocs: w = "defaul
|
||||
{
|
||||
src: "https://d3dg1063dc54p9.cloudfront.net/exit.svg",
|
||||
alt: "Exit",
|
||||
className: "cursor-pointer hover:opacity-50 h-3 absolute top-0 right-0 m-2 white-filter",
|
||||
className: "cursor-pointer hover:opacity-50 h-2 absolute top-0 right-0 m-2 white-filter",
|
||||
onClick: (v) => {
|
||||
v.stopPropagation(), E(
|
||||
"minimized"
|
||||
@ -779,7 +779,7 @@ const pr = ({ apiHost: D = "https://gptcloud.arc53.com", selectDocs: w = "defaul
|
||||
),
|
||||
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 p-3", children: [
|
||||
/* @__PURE__ */ l.jsxs("div", { className: `${u === "init" || u === "processing" || u === "typing" ? "" : "hidden"} flex-1`, children: [
|
||||
/* @__PURE__ */ l.jsx("h3", { className: "text-sm font-bold text-gray-700 dark:text-gray-200", children: "Looking for help with documentation?" }),
|
||||
/* @__PURE__ */ l.jsx("h3", { className: "text-sm font-bold text-gray-700 dark:text-gray-200", children: "Need help with documentation?" }),
|
||||
/* @__PURE__ */ l.jsx("p", { className: "mt-1 text-xs text-gray-400 dark:text-gray-500", children: "DocsGPT AI assistant will help you with docs" })
|
||||
] }),
|
||||
/* @__PURE__ */ l.jsx("div", { id: "docsgpt-answer", ref: b, className: `${u !== "answer" ? "hidden" : ""}`, children: /* @__PURE__ */ l.jsx("p", { className: "mt-1 text-sm text-gray-600 dark:text-white text-left", children: S }) })
|
||||
|
2
extensions/react-widget/dist/index.es.js.map
vendored
2
extensions/react-widget/dist/index.es.js.map
vendored
File diff suppressed because one or more lines are too long
12
extensions/react-widget/dist/index.umd.js
vendored
12
extensions/react-widget/dist/index.umd.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
extensions/react-widget/dist/style.css
vendored
4
extensions/react-widget/dist/style.css
vendored
@ -518,8 +518,8 @@ video {
|
||||
.h-14 {
|
||||
height: 3.5rem;
|
||||
}
|
||||
.h-3 {
|
||||
height: 0.75rem;
|
||||
.h-2 {
|
||||
height: 0.5rem;
|
||||
}
|
||||
.w-20 {
|
||||
width: 5rem;
|
||||
|
4
extensions/react-widget/package-lock.json
generated
4
extensions/react-widget/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "docsgpt",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "docsgpt",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.3",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"postcss-cli": "^10.1.0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "docsgpt",
|
||||
"private": false,
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"type": "module",
|
||||
"main": "dist/index.umd.js",
|
||||
"module": "dist/index.es.js",
|
||||
|
@ -202,7 +202,7 @@ export const DocsGPTWidget = ({ apiHost = 'https://gptcloud.arc53.com', selectDo
|
||||
<img
|
||||
src="https://d3dg1063dc54p9.cloudfront.net/exit.svg"
|
||||
alt="Exit"
|
||||
className="cursor-pointer hover:opacity-50 h-3 absolute top-0 right-0 m-2 white-filter"
|
||||
className="cursor-pointer hover:opacity-50 h-2 absolute top-0 right-0 m-2 white-filter"
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
setChatState(ChatStates.Minimized);
|
||||
@ -213,7 +213,7 @@ export const DocsGPTWidget = ({ apiHost = 'https://gptcloud.arc53.com', selectDo
|
||||
chatState === 'processing' ? '' :
|
||||
chatState === 'typing' ? '' :
|
||||
'hidden'} flex-1`}>
|
||||
<h3 className="text-sm font-bold text-gray-700 dark:text-gray-200">Looking for help with documentation?</h3>
|
||||
<h3 className="text-sm font-bold text-gray-700 dark:text-gray-200">Need help with documentation?</h3>
|
||||
<p className="mt-1 text-xs text-gray-400 dark:text-gray-500">DocsGPT AI assistant will help you with docs</p>
|
||||
</div>
|
||||
<div id="docsgpt-answer" ref={answerRef} className={`${chatState !== 'answer' ? 'hidden' : ''}`}>
|
||||
|
Loading…
Reference in New Issue
Block a user