+
);
}
@@ -102,10 +115,10 @@ export function AgentTools() {
return (
- {t('flow.tools')}
-
+ {t('flow.tools')}
+
{toolNames.map((x) => (
-
+
{x}
@@ -118,7 +131,7 @@ export function AgentTools() {
))}
{mcpIds.map((id) => (
-
+
{findMcpById(id)?.name}
- {t('flow.agent')}
-
+ {t('flow.agent')}
+
{subBottomAgentNodeIds.map((id) => {
const currentNode = getNode(id);
return (
-
+
{currentNode?.data.name}
-
- {isSubAgent && }
-
- {findLlmByUuid(llmId)?.model_type === LlmModelType.Image2text && (
-
+ {isSubAgent && }
+
+ {findLlmByUuid(llmId)?.model_type === LlmModelType.Image2text && (
+
+ )}
+ (
+
+ {t('flow.systemPrompt')}
+
+
+
+
)}
-
-
-
+ />
+ {isSubAgent || (
(
- {t('flow.systemPrompt')}
+ {t('flow.userPrompt')}
-
+
)}
/>
-
- {isSubAgent || (
-
- {/* */}
- (
-
- {t('flow.userPrompt')}
-
-
-
-
- )}
- />
-
)}
-
-
-
-
-
+
+
+
{t('flow.advancedSettings')}
}>
-
+
+
diff --git a/web/src/pages/agent/form/begin-form/query-table.tsx b/web/src/pages/agent/form/begin-form/query-table.tsx
index 5701c49b1..19d84bd67 100644
--- a/web/src/pages/agent/form/begin-form/query-table.tsx
+++ b/web/src/pages/agent/form/begin-form/query-table.tsx
@@ -147,53 +147,48 @@ export function QueryTable({ data = [], deleteRecord, showModal }: IProps) {
});
return (
-
-
-
-
- {table.getHeaderGroups().map((headerGroup) => (
-
- {headerGroup.headers.map((header) => {
- return (
-
- {header.isPlaceholder
- ? null
- : flexRender(
- header.column.columnDef.header,
- header.getContext(),
- )}
-
- );
- })}
+
+
+
+ {table.getHeaderGroups().map((headerGroup) => (
+
+ {headerGroup.headers.map((header) => {
+ return (
+
+ {header.isPlaceholder
+ ? null
+ : flexRender(
+ header.column.columnDef.header,
+ header.getContext(),
+ )}
+
+ );
+ })}
+
+ ))}
+
+
+ {table.getRowModel().rows?.length ? (
+ table.getRowModel().rows.map((row) => (
+
+ {row.getVisibleCells().map((cell) => (
+
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
+
+ ))}
- ))}
-
-
- {table.getRowModel().rows?.length ? (
- table.getRowModel().rows.map((row) => (
-
- {row.getVisibleCells().map((cell) => (
-
- {flexRender(
- cell.column.columnDef.cell,
- cell.getContext(),
- )}
-
- ))}
-
- ))
- ) : (
-
- )}
-
-
-
+ ))
+ ) : (
+
+ )}
+
+
);
}
diff --git a/web/src/pages/agent/form/components/prompt-editor/index.css b/web/src/pages/agent/form/components/prompt-editor/index.css
index 8f3050647..a7abebc5f 100644
--- a/web/src/pages/agent/form/components/prompt-editor/index.css
+++ b/web/src/pages/agent/form/components/prompt-editor/index.css
@@ -1,5 +1,4 @@
.typeahead-popover {
- background: #fff;
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
border-radius: 8px;
position: fixed;
@@ -10,16 +9,6 @@
list-style: none;
margin: 0;
max-height: 200px;
- overflow-y: scroll;
-}
-
-.typeahead-popover ul::-webkit-scrollbar {
- display: none;
-}
-
-.typeahead-popover ul {
- -ms-overflow-style: none;
- scrollbar-width: none;
}
.typeahead-popover ul li {
@@ -28,7 +17,6 @@
font-size: 14px;
outline: none;
cursor: pointer;
- border-radius: 8px;
}
.typeahead-popover ul li.selected {
@@ -37,7 +25,6 @@
.typeahead-popover li {
margin: 0 8px 0 8px;
- color: #050505;
cursor: pointer;
line-height: 16px;
font-size: 15px;
@@ -45,7 +32,6 @@
align-content: center;
flex-direction: row;
flex-shrink: 0;
- background-color: #fff;
border: 0;
}
diff --git a/web/src/pages/agent/form/components/prompt-editor/index.tsx b/web/src/pages/agent/form/components/prompt-editor/index.tsx
index c0242293a..afff80e29 100644
--- a/web/src/pages/agent/form/components/prompt-editor/index.tsx
+++ b/web/src/pages/agent/form/components/prompt-editor/index.tsx
@@ -89,7 +89,7 @@ function PromptContent({
return (
{showToolbar && (
@@ -107,7 +107,7 @@ function PromptContent({
)}
{
decorate(): ReactNode {
let content: ReactNode = (
- {this.__label}
+ {this.__label}
);
if (this.__parentLabel) {
content = (
@@ -62,7 +62,7 @@ export class VariableNode extends DecoratorNode {
);
}
return (
-
+
{content}
);
diff --git a/web/src/pages/agent/form/components/prompt-editor/variable-picker-plugin.tsx b/web/src/pages/agent/form/components/prompt-editor/variable-picker-plugin.tsx
index cb4905b45..42f06b2cc 100644
--- a/web/src/pages/agent/form/components/prompt-editor/variable-picker-plugin.tsx
+++ b/web/src/pages/agent/form/components/prompt-editor/variable-picker-plugin.tsx
@@ -91,13 +91,13 @@ function VariablePickerMenuItem({
id={'typeahead-item-' + index}
>
-
{option.title}
+
{option.title}
{option.options.map((x) => (
- selectOptionAndCleanUp(x)}
- className="hover:bg-slate-300 p-1"
+ className="hover:bg-bg-card p-1 text-text-primary rounded-sm"
>
{x.label}
@@ -335,8 +335,8 @@ export default function VariablePickerMenuPlugin({
const nextOptions = buildNextOptions();
return anchorElementRef.current && nextOptions.length
? ReactDOM.createPortal(
-
-
+
+
{nextOptions.map((option, i: number) => (
state.clickedToolId);
+
+ return (
+ operatorName === Operator.Tool &&
+ Object.values(Operator).every((x) => x !== clickedToolId)
+ );
+}