feat(components): Add markdown editing capability and enhance component styling

- Add editable mode to Markdown component with edit/save/cancel buttons
- Import EditOutlined, SaveOutlined, CloseOutlined icons from ant-design
- Add useState, useRef, useEffect hooks for managing edit state
- Add editable, onContentChange, and onSave props to RbMarkdownProps interface
- Create RbModal component with new index.css stylesheet for modal styling
- Add index.css stylesheet to KnowledgeBase components for consistent styling
- Update i18n translations in en.ts and zh.ts for new UI elements
- Refactor Markdown component handlers to accept and spread additional props
- Update InsertModal and RecallTestResult components for improved UX
- Fix prop spreading in component handlers to maintain compatibility with Ant Design components
This commit is contained in:
yujiangping
2025-12-22 17:03:31 +08:00
parent ad2f47029d
commit 54ff151ed8
8 changed files with 306 additions and 81 deletions

View File

@@ -585,7 +585,6 @@ export const en = {
insertContent: 'Insert Content',
editContent:'Edit Content',
insertContentPlaceholder: 'Please enter the content',
pleaseEnterContent: 'Please enter content',
documentIdRequired: 'Document ID is required',
editContentDesc:'Edit content',
insertContentDesc:'Insert content',
@@ -598,6 +597,10 @@ export const en = {
semantic:'Semantic',
hybrid:'Hybrid',
updateEmbeddingContent:'Are you sure about updating the embedding model? After the update, will the block vector data need to be reconstructed?',
question: 'Question',
answer: 'Answer',
normalMode: 'Normal Mode',
qaMode: 'QA Mode',
createForm:{
name: 'Name',
embedding_id: 'Embedding',

View File

@@ -216,7 +216,6 @@ export const zh = {
insertContent: '插入内容',
editContent: '编辑内容',
insertContentPlaceholder: '请输入内容',
pleaseEnterContent: '请输入内容',
documentIdRequired: '文档ID是必需的',
editContentDesc: '编辑内容',
insertContentDesc: '插入内容',
@@ -229,6 +228,10 @@ export const zh = {
semantic: '语义',
hybrid: '混合',
updateEmbeddingContent: '确定要更新嵌入模型吗?更新后,分块向量数据需要重新构建?',
question: '问题',
answer: '答案',
normalMode: '常规模式',
qaMode: '问答模式',
createForm: {
name: '名称',
embedding_id: '嵌入模型',