mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 18:40:00 +08:00
fix(core): add document content params for section edit tool (#13334)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Section editing now uses the full document context to ensure edits are consistent with the overall tone, style, and structure. * Cleaner output for edited sections, with internal markdown comments removed. * **Improvements** * Enhanced instructions and descriptions for section editing, providing clearer guidance and examples for users. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1481,13 +1481,21 @@ Key requirements:
|
||||
- Maintain the original markdown formatting
|
||||
- Preserve the tone and style unless specifically asked to change it
|
||||
- Only make the requested changes
|
||||
- Return only the modified text without any explanations or comments`,
|
||||
- Return only the modified text without any explanations or comments
|
||||
- Use the full document context to ensure consistency and accuracy
|
||||
- Do not output markdown annotations like <!-- block_id=... -->`,
|
||||
},
|
||||
{
|
||||
role: 'user',
|
||||
content: `Please modify the following text according to these instructions: "{{instructions}}"
|
||||
Original text:
|
||||
{{content}}`,
|
||||
|
||||
Full document context:
|
||||
{{document}}
|
||||
|
||||
Section to edit:
|
||||
{{content}}
|
||||
|
||||
Please return only the modified section, maintaining consistency with the overall document context.`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user