Przeglądaj źródła

feat: click on a blank area of ​​the canvas to hide the form drawer #918 (#1384)

### What problem does this PR solve?
feat: click on a blank area of ​​the canvas to hide the form drawer #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
tags/v0.8.0
balibabu 1 rok temu
rodzic
commit
a3f4258cfc
No account linked to committer's email address

+ 5
- 0
web/src/pages/flow/canvas/index.tsx Wyświetl plik

@@ -62,6 +62,10 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
[showDrawer],
);

const onPaneClick = useCallback(() => {
hideDrawer();
}, [hideDrawer]);

const { onDrop, onDragOver, setReactFlowInstance } = useHandleDrop();

const { handleKeyUp } = useHandleKeyUp();
@@ -101,6 +105,7 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
onDrop={onDrop}
onDragOver={onDragOver}
onNodeClick={onNodeClick}
onPaneClick={onPaneClick}
onInit={setReactFlowInstance}
onKeyUp={handleKeyUp}
onSelectionChange={onSelectionChange}

+ 11
- 5
web/src/pages/flow/constant.tsx Wyświetl plik

@@ -203,9 +203,9 @@ export const CategorizeAnchorPointPositions = [
export const RestrictedUpstreamMap = {
[Operator.Begin]: [],
[Operator.Categorize]: [Operator.Begin, Operator.Categorize, Operator.Answer],
[Operator.Answer]: [],
[Operator.Retrieval]: [],
[Operator.Generate]: [],
[Operator.Answer]: [Operator.Begin, Operator.Answer, Operator.Message],
[Operator.Retrieval]: [Operator.Begin, Operator.Relevant],
[Operator.Generate]: [Operator.Begin],
[Operator.Message]: [
Operator.Begin,
Operator.Message,
@@ -214,8 +214,14 @@ export const RestrictedUpstreamMap = {
Operator.RewriteQuestion,
Operator.Categorize,
],
[Operator.Relevant]: [],
[Operator.RewriteQuestion]: [],
[Operator.Relevant]: [Operator.Begin, Operator.Answer],
[Operator.RewriteQuestion]: [
Operator.Begin,
Operator.Message,
Operator.Generate,
Operator.RewriteQuestion,
Operator.Categorize,
],
};

export const NodeMap = {

+ 1
- 1
web/src/pages/flow/list/index.less Wyświetl plik

@@ -56,6 +56,6 @@
}

.templatesBox {
// max-height: 500px;
max-height: 70vh;
overflow: auto;
}

Ładowanie…
Anuluj
Zapisz