chore: palceholder

This commit is contained in:
Joel
2026-01-15 16:07:56 +08:00
parent 5c03a2e251
commit e91fb94d0e
4 changed files with 25 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import type { FC } from 'react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import PromptEditor from '@/app/components/base/prompt-editor'
type MarkdownFileEditorProps = {
@ -8,6 +9,8 @@ type MarkdownFileEditorProps = {
}
const MarkdownFileEditor: FC<MarkdownFileEditorProps> = ({ value, onChange }) => {
const { t } = useTranslation()
return (
<div className="h-full w-full bg-components-panel-bg">
<PromptEditor
@ -16,6 +19,19 @@ const MarkdownFileEditor: FC<MarkdownFileEditorProps> = ({ value, onChange }) =>
showLineNumbers
className="h-full"
wrapperClassName="h-full"
placeholder={(
<span className="flex items-center gap-1 text-components-input-text-placeholder">
<span>{t('promptEditor.skillMarkdown.placeholderPrefix', { ns: 'common' })}</span>
<span className="system-kbd inline-flex h-4 min-w-4 items-center justify-center rounded-[4px] bg-components-kbd-bg-gray px-[1px] text-text-placeholder">/</span>
<span className="text-[13px] leading-4 underline decoration-dotted">
{t('promptEditor.skillMarkdown.placeholderReferenceFiles', { ns: 'common' })}
</span>
<span className="system-kbd inline-flex h-4 min-w-4 items-center justify-center rounded-[4px] bg-components-kbd-bg-gray px-[1px] text-text-placeholder">@</span>
<span className="text-[13px] leading-4 underline decoration-dotted">
{t('promptEditor.skillMarkdown.placeholderUseTools', { ns: 'common' })}
</span>
</span>
)}
/>
</div>
)