diff --git a/web/src/components/llm-setting-items/next.tsx b/web/src/components/llm-setting-items/next.tsx
index c3fb3e3bb..14e6e532c 100644
--- a/web/src/components/llm-setting-items/next.tsx
+++ b/web/src/components/llm-setting-items/next.tsx
@@ -134,6 +134,7 @@ export function LlmSettingFieldItems({
label="temperature"
max={1}
step={0.01}
+ min={0}
>
);
diff --git a/web/src/interfaces/database/agent.ts b/web/src/interfaces/database/agent.ts
index 39a44225f..4fd36de2f 100644
--- a/web/src/interfaces/database/agent.ts
+++ b/web/src/interfaces/database/agent.ts
@@ -38,7 +38,7 @@ export type DSLComponents = Record;
export interface DSL {
components: DSLComponents;
history: any[];
- path?: string[][];
+ path?: string[];
answer?: any[];
graph?: IGraph;
messages: Message[];
diff --git a/web/src/pages/agent/canvas/edge/index.tsx b/web/src/pages/agent/canvas/edge/index.tsx
index 3e1b57e85..0fa23b3b9 100644
--- a/web/src/pages/agent/canvas/edge/index.tsx
+++ b/web/src/pages/agent/canvas/edge/index.tsx
@@ -39,7 +39,7 @@ function InnerButtonEdge({
targetPosition,
});
const selectedStyle = useMemo(() => {
- return selected ? { strokeWidth: 1, stroke: 'rgba(76, 164, 231, 1)' } : {};
+ return selected ? { strokeWidth: 1, stroke: 'var(--accent-primary)' } : {};
}, [selected]);
const onEdgeClick = () => {
@@ -49,31 +49,21 @@ function InnerButtonEdge({
// highlight the nodes that the workflow passes through
const { data: flowDetail } = useFetchAgent();
- const graphPath = useMemo(() => {
- // TODO: this will be called multiple times
+ const showHighlight = useMemo(() => {
const path = flowDetail?.dsl?.path ?? [];
- // The second to last
- const previousGraphPath: string[] = path.at(-2) ?? [];
- let graphPath: string[] = path.at(-1) ?? [];
- // The last of the second to last article
- const previousLatestElement = previousGraphPath.at(-1);
- if (previousGraphPath.length > 0 && previousLatestElement) {
- graphPath = [previousLatestElement, ...graphPath];
- }
- return Array.isArray(graphPath) ? graphPath : [];
- }, [flowDetail.dsl?.path]);
-
- const highlightStyle = useMemo(() => {
- const idx = graphPath.findIndex((x) => x === source);
+ const idx = path.findIndex((x) => x === target);
if (idx !== -1) {
- // The set of elements following source
- const slicedGraphPath = graphPath.slice(idx + 1);
- if (slicedGraphPath.some((x) => x === target)) {
- return { strokeWidth: 1, stroke: 'red' };
+ let index = idx - 1;
+ while (index >= 0) {
+ if (path[index] === source) {
+ return { strokeWidth: 1, stroke: 'var(--accent-primary)' };
+ }
+ index--;
}
+ return {};
}
return {};
- }, [source, target, graphPath]);
+ }, [flowDetail?.dsl?.path, source, target]);
const visible = useMemo(() => {
return (
@@ -89,8 +79,8 @@ function InnerButtonEdge({
diff --git a/web/src/pages/agent/share/index.tsx b/web/src/pages/agent/share/index.tsx
index 9246d9bcf..b33c1b3ce 100644
--- a/web/src/pages/agent/share/index.tsx
+++ b/web/src/pages/agent/share/index.tsx
@@ -107,9 +107,7 @@ const ChatContainer = () => {
const handleReset = () => {
resetSession();
clearEventList();
- if (isTaskMode) {
- showBeginParameterDialog();
- }
+ showBeginParameterDialog();
};
if (!conversationId) {
return empty
;
diff --git a/web/src/pages/next-search/search-setting-aisummery-config.tsx b/web/src/pages/next-search/search-setting-aisummery-config.tsx
index 6f30de26a..8764c3014 100644
--- a/web/src/pages/next-search/search-setting-aisummery-config.tsx
+++ b/web/src/pages/next-search/search-setting-aisummery-config.tsx
@@ -186,6 +186,7 @@ export function LlmSettingFieldItems({
checkName={getFieldWithPrefix('temperatureEnabled')}
label="temperature"
max={1}
+ min={0}
step={0.01}
onChange={() => {
checkParameterIsEquel();
@@ -197,6 +198,7 @@ export function LlmSettingFieldItems({
label="topP"
max={1}
step={0.01}
+ min={0}
onChange={() => {
checkParameterIsEquel();
}}
@@ -207,6 +209,7 @@ export function LlmSettingFieldItems({
label="presencePenalty"
max={1}
step={0.01}
+ min={0}
onChange={() => {
checkParameterIsEquel();
}}
@@ -217,6 +220,7 @@ export function LlmSettingFieldItems({
label="frequencyPenalty"
max={1}
step={0.01}
+ min={0}
onChange={() => {
checkParameterIsEquel();
}}