mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 12:51:26 +08:00
refactor(CodeBlock): add todo comment for future improvement
The event form cannot obtain handler completion status via promise. Plan to use useContext for topicId and useEditCodeBlock for editing.
This commit is contained in:
parent
d3d02712a4
commit
e69260defa
@ -36,6 +36,8 @@ const CodeBlock: React.FC<Props> = ({ children, className, node, blockId }) => {
|
||||
const handleSave = useCallback(
|
||||
async (newContent: string) => {
|
||||
if (id !== undefined) {
|
||||
// The event form cannot obtain the completion status of the handler via a promise.
|
||||
// TODO: Use useContext to get topicId, use useEditCodeBlock to edit code block.
|
||||
EventEmitter.emit(EVENT_NAMES.EDIT_CODE_BLOCK, {
|
||||
msgBlockId: blockId,
|
||||
codeBlockId: id,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user