mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: display the debugging results of each operator in a pop-up window #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -38,7 +38,11 @@ import {
|
||||
initialRewriteQuestionValues,
|
||||
} from './constant';
|
||||
import useGraphStore, { RFState } from './store';
|
||||
import { buildDslComponentsByGraph, receiveMessageError } from './utils';
|
||||
import {
|
||||
buildDslComponentsByGraph,
|
||||
receiveMessageError,
|
||||
replaceIdWithText,
|
||||
} from './utils';
|
||||
|
||||
const selector = (state: RFState) => ({
|
||||
nodes: state.nodes,
|
||||
@ -376,3 +380,13 @@ export const useSaveGraphBeforeOpeningDebugDrawer = (show: () => void) => {
|
||||
|
||||
return handleRun;
|
||||
};
|
||||
|
||||
export const useReplaceIdWithText = (output: unknown) => {
|
||||
const getNode = useGraphStore((state) => state.getNode);
|
||||
|
||||
const getNameById = (id?: string) => {
|
||||
return getNode(id)?.data.name;
|
||||
};
|
||||
|
||||
return replaceIdWithText(output, getNameById);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user