fix: document deploy (#5868)

* mcp memory

* Editor space parse error

* fix: ts

* fix: debug interactive

* fix: templateId

* fix: editor in debug

* doc
This commit is contained in:
Archer
2025-11-06 14:47:55 +08:00
committed by GitHub
parent 89ca81d1a4
commit 7aaa28ed08
25 changed files with 556 additions and 131 deletions
@@ -30,6 +30,7 @@ import FocusPlugin from '../../Textarea/PromptEditor/plugins/FocusPlugin';
import VariableLabelPlugin from '../../Textarea/PromptEditor/plugins/VariableLabelPlugin';
import { VariableLabelNode } from '../../Textarea/PromptEditor/plugins/VariableLabelPlugin/node';
import VariableLabelPickerPlugin from '../../Textarea/PromptEditor/plugins/VariableLabelPickerPlugin';
import { useDeepCompareEffect } from 'ahooks';
export default function Editor({
h = 40,
@@ -45,7 +46,7 @@ export default function Editor({
h?: number;
variables: EditorVariablePickerType[];
variableLabels: EditorVariableLabelPickerType[];
onChange?: (editorState: EditorState, editor: LexicalEditor) => void;
onChange?: (editor: LexicalEditor) => void;
onBlur?: (editor: LexicalEditor) => void;
value?: string;
currentValue?: string;
@@ -61,11 +62,11 @@ export default function Editor({
nodes: [VariableNode, VariableLabelNode],
editorState: textToEditorState(value),
onError: (error: Error) => {
throw error;
console.error('Lexical errror', error);
}
};
useEffect(() => {
useDeepCompareEffect(() => {
if (focus) return;
setKey(getNanoid(6));
}, [value, variables.length]);
@@ -119,7 +120,7 @@ export default function Editor({
<OnChangePlugin
onChange={(editorState: EditorState, editor: LexicalEditor) => {
startSts(() => {
onChange?.(editorState, editor);
onChange?.(editor);
});
}}
/>