feat: showcase自适应,展示selectnodeinfo

This commit is contained in:
li
2025-07-21 16:43:09 +08:00
parent 95b3f3bef9
commit 142e3d4ad2
8 changed files with 40 additions and 37 deletions
@@ -1,7 +1,7 @@
function getImportPath(filename) {
return `./${filename}`;
}
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-Iczzq1Rd.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 __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-CkoLcncj.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-DIJFbPQS.css","copilot_web/fonts.css"].map(path => {
const apiBase = window.comfyAPI?.api?.api?.api_base;
if (apiBase) {
// 有 API base 时,使用完整路径
@@ -11,4 +11,4 @@ function getImportPath(filename) {
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-Iczzq1Rd.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};
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-CkoLcncj.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};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -99,7 +99,7 @@ const Showcase: React.FC = () => {
</div>
{
getShowcaes()?.list?.map((item, index) => <div
className='h-[50px] flex flex-row items-center mt-4 bg-showcase-bg shadow-[0_4px_24px_rgba(0,0,0,0.12)] hover:!shadow-[0_0_12px_2px_#3b82f6] hover:!shadow-[0_0_0_4px_rgba(59,130,246,0.15)] px-4 py-2 rounded-full'
className='min-h-[50px] flex flex-row items-center mt-4 bg-showcase-bg shadow-[0_4px_24px_rgba(0,0,0,0.12)] hover:!shadow-[0_0_12px_2px_#3b82f6] hover:!shadow-[0_0_0_4px_rgba(59,130,246,0.15)] px-4 py-2 rounded-full'
key={index.toString()}
onClick={() => {
isAutoScroll.current = true
@@ -121,7 +121,7 @@ const Showcase: React.FC = () => {
}}
>
{ICONS[index]}
<div className='text-sm text-gray-900 font-normal ml-4'>
<div className='flex-1 text-sm text-gray-900 font-normal ml-4'>
{item.name}
</div>
</div>)
+3 -3
View File
@@ -430,9 +430,6 @@
.h-\[4\.5rem\] {
height: 4.5rem;
}
.h-\[50px\] {
height: 50px;
}
.h-auto {
height: auto;
}
@@ -469,6 +466,9 @@
.min-h-0 {
min-height: 0px;
}
.min-h-\[50px\] {
min-height: 50px;
}
.min-h-\[80px\] {
min-height: 80px;
}
+2 -2
View File
@@ -820,14 +820,14 @@ export default function WorkflowChat({ onClose, visible = true, triggerUsage = f
className="border-t px-4 py-3 border-gray-200 bg-white sticky bottom-0"
style={{ display: activeTab === 'chat' ? 'block' : 'none' }}
>
{/* {selectedNode && (
{selectedNode && (
<SelectedNodeInfo
nodeInfo={selectedNode}
onSendWithIntent={handleSendMessageWithIntent}
loading={loading}
onSendWithContent={handleSendMessageWithContent}
/>
)} */}
)}
<ChatInput
input={input}