mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: editor (#5859)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
* fix: timeselector ui error * var update node * fix: editor * feat: add name watch
This commit is contained in:
parent
44e87e3053
commit
5163e704ed
|
|
@ -524,9 +524,21 @@ export const editorStateToText = (editor: LexicalEditor) => {
|
|||
return node.children.map(extractText).join('');
|
||||
}
|
||||
|
||||
// Unknown node type
|
||||
// Unknown node type - return the raw text content if available
|
||||
console.warn('Unknown node type in extractText:', (node as any).type, node);
|
||||
return '';
|
||||
|
||||
// Try to extract text content from unknown node types
|
||||
if ('text' in node && typeof (node as any).text === 'string') {
|
||||
return (node as any).text;
|
||||
}
|
||||
|
||||
// Try to recursively extract from children if present
|
||||
if ('children' in node && Array.isArray((node as any).children)) {
|
||||
return (node as any).children.map(extractText).join('');
|
||||
}
|
||||
|
||||
// Fallback to stringifying the node content
|
||||
return JSON.stringify(node);
|
||||
};
|
||||
|
||||
paragraphs.forEach((paragraph) => {
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ const WorkflowInitContextProvider = ({
|
|||
nodesMap[node.data.nodeId] = node.data;
|
||||
compareNodeList.push({
|
||||
nodeId: node.data.nodeId,
|
||||
name: node.data.name,
|
||||
parentNodeId: node.data.parentNodeId,
|
||||
flowNodeType: node.data.flowNodeType,
|
||||
inputs: node.data.inputs.map((input) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue