feat: 反馈按钮优化
This commit is contained in:
Vendored
-14
@@ -1,14 +0,0 @@
|
||||
function getImportPath(filename) {
|
||||
return `./${filename}`;
|
||||
}
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-jPkziF5m.js","copilot_web/vendor-markdown-CBmlBP6m.js","copilot_web/vendor-react-Dixhfmvb.js","copilot_web/message-components-DoPpEV2n.js","copilot_web/input.js","copilot_web/assets/input-BbfIXYvZ.css","copilot_web/fonts.css"].map(path => {
|
||||
const apiBase = window.comfyAPI?.api?.api?.api_base;
|
||||
if (apiBase) {
|
||||
// 有 API base 时,使用完整路径
|
||||
return `${apiBase.substring(1)}/${path}`;
|
||||
} else {
|
||||
// 没有 API base 时,使用相对路径
|
||||
return `./${path}`;
|
||||
}
|
||||
}))))=>i.map(i=>d[i]);
|
||||
import{_ as a}from"./input.js";import{j as e}from"./vendor-markdown-CBmlBP6m.js";import{r as t,R as i}from"./vendor-react-Dixhfmvb.js";import{C as n}from"./message-components-DoPpEV2n.js";const s={EXPLAIN_NODE:"copilot:explain-node",TOOLBOX_USAGE:"copilot:toolbox-usage",TOOLBOX_PARAMETERS:"copilot:toolbox-parameters",TOOLBOX_DOWNSTREAMNODES:"copilot:toolbox-downstreamnodes"},d=i.lazy(()=>a(()=>import(getImportPath("workflowChat-jPkziF5m.js")),__vite__mapDeps([0,1,2,3,4,5,6])).then(o=>({default:o.default})));function c(){const[o,r]=t.useState(!1);return t.useEffect(()=>{const l=()=>{r(!0)};return window.addEventListener(s.EXPLAIN_NODE,l),()=>window.removeEventListener(s.EXPLAIN_NODE,l)},[]),e.jsx(n,{children:e.jsx("div",{className:"h-full w-full flex flex-col",children:e.jsx(t.Suspense,{fallback:e.jsx("div",{className:"h-full w-full flex items-center justify-center",children:"Loading..."}),children:e.jsx(d,{visible:!0,triggerUsage:o,onUsageTriggered:()=>r(!1)})})})})}const O=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"}));export{O as A,s as C};
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
-181
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"Copilot_Toolbox_Usage": {
|
||||
"label": "Usage"
|
||||
},
|
||||
"Copilot_Toolbox_Parameters": {
|
||||
"label": "Parameters"
|
||||
},
|
||||
"Copilot_Toolbox_DownstreamNodes": {
|
||||
"label": "Downstream Nodes"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"menuLabels": {
|
||||
"Usage": "Usage",
|
||||
"Parameters": "Parameters",
|
||||
"Downstream Nodes": "Downstream Nodes"
|
||||
}
|
||||
}
|
||||
@@ -84,16 +84,16 @@ export function ChatHeader({
|
||||
<h3 className="text-[14px] font-medium text-gray-800">{title}</h3>
|
||||
<button
|
||||
onClick={handleApiKeyClick}
|
||||
className="p-1 bg-white border-none hover:bg-gray-100 rounded text-gray-500"
|
||||
className="p-1 bg-white border-none hover:!bg-gray-100 rounded text-gray-500"
|
||||
>
|
||||
<CogIcon className="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<button
|
||||
className='inline-flex bg-white border-none items-center justify-center rounded-md p-1.5 text-gray-500 hover:!bg-gray-100'
|
||||
className='inline-flex bg-white border-none items-center justify-center rounded-md p-1.5 text-gray-700 hover:!bg-gray-100'
|
||||
onClick={onFeedback}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 482 511.85" width="14" height="14" fill='currentColor'><path d="M439.58 393.45c.21 5.31.03 35.96-.53 41.24l24.89 12.63c2.64 1.33 4.36 3.77 4.89 6.47l10.6 46.83c1.12 4.95-1.99 9.87-6.96 10.99-4.95 1.12-9.87-2-10.98-6.95l-9.72-42.87-16.47-8.37c-8.3 27.57-27.55 46.89-49.97 46.89-22.54 0-41.88-19.55-50.1-47.37l-18 8.17-8.26 43.26c-.96 4.99-5.78 8.27-10.77 7.31-5-.96-8.27-5.78-7.32-10.77l9.12-47.77c.5-2.91 2.4-5.53 5.29-6.83l26.3-11.95c-.53-5.2-.7-35.73-.5-40.96l-27.76-9.58c-2.92-1-5-3.32-5.82-6.06l-10.19-33.69c-1.45-4.88 1.32-10.01 6.2-11.46 4.87-1.46 10 1.32 11.45 6.2l8.81 29.19 22.24 7.67 98.76.01 20.36-7.03 8.81-29.2c1.46-4.87 6.59-7.65 11.47-6.19a9.204 9.204 0 0 1 6.19 11.46l-10.16 33.7-.04-.01a9.152 9.152 0 0 1-5.8 6.06l-26.03 8.98zM42.65 0h356.9c11.68 0 22.33 4.8 30.08 12.52l.05.06c7.74 7.76 12.52 18.41 12.52 30.07v212c-1.57.22-3.14.57-4.71 1.03-8.65 2.54-15.81 4.76-21.8 6.9V42.65c0-4.45-1.8-8.48-4.7-11.38l-.05-.06c-2.9-2.9-6.94-4.7-11.39-4.7H42.65c-4.43 0-8.46 1.82-11.39 4.75-2.93 2.93-4.75 6.96-4.75 11.39v421.43c0 4.45 1.8 8.49 4.7 11.39l.05.05c2.91 2.9 6.94 4.71 11.39 4.71H267l-2.97 15.55c-.71 3.7-.83 7.38-.42 10.95H42.65c-11.68 0-22.33-4.79-30.08-12.52l-.05-.05C4.78 486.39 0 475.75 0 464.08V42.65c0-11.74 4.8-22.42 12.52-30.13C20.23 4.8 30.9 0 42.65 0zm121.12 395.29c-5.47 0-9.9-4.43-9.9-9.9 0-5.47 4.43-9.9 9.9-9.9h95.64l3.09 10.18c1.02 3.39 2.55 6.64 4.54 9.62H163.77zm-62.68-29.85c11.02 0 19.96 8.93 19.96 19.95s-8.94 19.95-19.96 19.95c-11.02 0-19.95-8.93-19.95-19.95s8.93-19.95 19.95-19.95zm62.68-58.5c-5.47 0-9.9-4.44-9.9-9.91s4.43-9.9 9.9-9.9h116.35a33.68 33.68 0 0 0 4.11 16.83l.57 1.01c-1.89.13-3.79.42-5.68.85l-2.25.57c-.57.17-1.12.35-1.68.55H163.77zm-62.68-29.86c11.02 0 19.96 8.93 19.96 19.95s-8.94 19.96-19.96 19.96c-11.02 0-19.95-8.94-19.95-19.96 0-11.02 8.93-19.95 19.95-19.95zm62.68-66.39c-5.47 0-9.9-4.44-9.9-9.91s4.43-9.9 9.9-9.9h185.59c5.47 0 9.9 4.43 9.9 9.9 0 5.47-4.43 9.91-9.9 9.91H163.77zm-54.38-29.92a8.143 8.143 0 0 1 11.59-.05c3.23 3.23 3.23 8.45.05 11.73l-8.14 8.33 8.14 8.33c3.18 3.23 3.14 8.41-.09 11.64-3.23 3.22-8.41 3.18-11.55 0l-8.04-8.24-8.09 8.28c-3.19 3.23-8.42 3.28-11.6.05-3.23-3.23-3.23-8.45-.04-11.73l8.14-8.33-8.14-8.34c-3.19-3.22-3.14-8.4.09-11.63 3.23-3.23 8.41-3.18 11.55 0l8.04 8.24 8.09-8.28zm54.38-66.34c-5.47 0-9.9-4.43-9.9-9.9 0-5.47 4.43-9.9 9.9-9.9h185.59c5.47 0 9.9 4.43 9.9 9.9 0 5.47-4.43 9.9-9.9 9.9H163.77zM79 96.66c3.93-2.64 9.27-1.6 11.94 2.37l4.3 5.13 15.05-19.1c3.01-3.66 8.43-4.2 12.1-1.18 3.66 3.01 4.2 8.44 1.19 12.09l-22.2 27.77c-.57.73-1.26 1.38-2.06 1.95-3.93 2.63-9.27 1.6-11.95-2.37l-10.74-14.71c-2.65-3.96-1.57-9.3 2.37-11.95zM394.81 326.1c1.18-2.62 2.26-5.07 3.24-7.31 10.3-23.44 11.64-26.49 47.15-36.9 3.32-.97 6.81.93 7.79 4.25.97 3.32-.93 6.8-4.25 7.78-29.9 8.76-30.97 11.21-39.2 29.93-1.15 2.6-2.41 5.49-3.92 8.79 9.36 8.08 16.7 21.42 20.48 37.55h-82.69c3.78-16.13 11.12-29.47 20.48-37.54a627.9 627.9 0 0 1-3.92-8.8c-8.23-18.72-9.3-21.17-39.2-29.93a6.265 6.265 0 0 1-4.25-7.78 6.283 6.283 0 0 1 7.79-4.25c35.5 10.41 36.84 13.46 47.15 36.91.98 2.23 2.06 4.68 3.24 7.3 6.6-2.46 13.51-2.47 20.11 0zm5.52 16.58c4.62 0 8.37 3.74 8.37 8.37 0 4.61-3.75 8.36-8.37 8.36-4.62 0-8.37-3.75-8.37-8.36 0-4.63 3.75-8.37 8.37-8.37zm-31.15 0c4.62 0 8.37 3.74 8.37 8.37 0 4.61-3.75 8.36-8.37 8.36-4.62 0-8.37-3.75-8.37-8.36 0-4.63 3.75-8.37 8.37-8.37z"/></svg>
|
||||
<svg t="1752744500193" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16120" width="16" height="16" fill="currentColor"><path d="M170.666667 896v0.021333c-0.426667 0.021333 0 0.426667 0 2.069334C170.666667 896.426667 170.24 896 170.666667 896z m682.666666-607.488V896H170.666667V170.666667h554.666666V128H170.474667C147.178667 128 128 146.176 128 168.576v729.514667C128 920.448 147.114667 938.666667 170.666667 938.666667h682.666666c23.68 0 42.666667-18.218667 42.666667-40.661334v-609.493333h-42.666667zM618.474667 519.701333a21.312 21.312 0 0 0 29.226666-7.530666l245.333334-416a21.354667 21.354667 0 0 0-36.757334-21.674667l-245.333333 416a21.333333 21.333333 0 0 0 7.530667 29.226667zM298.666667 384.021333h298.666666v-42.666666H298.666667v42.666666z m0 128h170.666666v-42.666666h-170.666666v42.666666z" p-id="16121"></path></svg>
|
||||
</button>
|
||||
<button
|
||||
className={`inline-flex bg-white border-none items-center justify-center rounded-md p-1.5
|
||||
|
||||
Reference in New Issue
Block a user