feat: split individual semantic change (#13155)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a new AI-powered document update feature, allowing users to
apply multiple independent block-level edits to Markdown documents.
* Added support for applying document updates via a new GraphQL query,
enabling seamless integration with the frontend.

* **Enhancements**
* Improved the document editing tool to handle and display multiple
simultaneous edit operations with better UI feedback and state
management.
* Expanded model support with new "morph-v3-fast" and "morph-v3-large"
options for document update operations.
* Enhanced frontend components and services to support asynchronous
application and acceptance of multiple document edits independently.

* **Bug Fixes**
* Enhanced error handling and user notifications for failed document
update operations.

* **Documentation**
* Updated tool descriptions and examples to clarify the new multi-edit
workflow and expected input/output formats.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

> CLOSE AI-337
This commit is contained in:
德布劳外 · 贾贵
2025-07-15 10:34:01 +08:00
committed by GitHub
parent 36bd8f645a
commit 812c199b45
15 changed files with 610 additions and 160 deletions
@@ -472,10 +472,18 @@ export class TextStreamParser {
result = this.addPrefix(result);
switch (chunk.toolName) {
case 'doc_edit': {
if (chunk.result && typeof chunk.result === 'object') {
result += `\n${chunk.result.result}\n`;
if (
chunk.result &&
typeof chunk.result === 'object' &&
Array.isArray(chunk.result.result)
) {
result += chunk.result.result
.map(item => {
return `\n${item.changedContent}\n`;
})
.join('');
this.docEditFootnotes[this.docEditFootnotes.length - 1].result =
chunk.result.result;
result;
} else {
this.docEditFootnotes.pop();
}