feat: prompt editor support line num

This commit is contained in:
Joel
2026-01-15 15:56:36 +08:00
parent ff632bf9b8
commit 4cfc135652
4 changed files with 68 additions and 11 deletions

View File

@ -1,23 +1,21 @@
import type { FC } from 'react'
import * as React from 'react'
import PromptEditor from '@/app/components/workflow/nodes/_base/components/prompt/editor'
import PromptEditor from '@/app/components/base/prompt-editor'
type MarkdownFileEditorProps = {
title: string
value: string
onChange: (value: string) => void
}
const MarkdownFileEditor: FC<MarkdownFileEditorProps> = ({ title, value, onChange }) => {
const MarkdownFileEditor: FC<MarkdownFileEditorProps> = ({ value, onChange }) => {
return (
<div className="h-full w-full">
<div className="h-full w-full bg-components-panel-bg">
<PromptEditor
title={title}
value={value}
onChange={onChange}
showLineNumbers
className="h-full"
editorContainerClassName="h-full"
containerBackgroundClassName="bg-components-panel-bg"
wrapperClassName="h-full"
/>
</div>
)

View File

@ -211,7 +211,6 @@ const SkillDocEditor: FC = () => {
<div className="h-full w-full overflow-hidden bg-components-panel-bg">
{isMarkdown && (
<MarkdownFileEditor
title={fileName}
value={currentContent}
onChange={handleEditorChange}
/>