Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/datahub-ai-service/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ async def test_legacy_and_modern_clients(gms: FakeGms, protocol: str) -> None:
"add_structured_properties",
"remove_structured_properties",
"save_document",
"update_document",
]
assert result.data["data"]["corpUser"]["urn"] == "urn:li:corpuser:bob"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,16 @@ query getDocumentAuthor {
}
}
}

# GMS checks here that the new parent exists and is neither the document nor
# one of its descendants.
mutation moveDocument($input: MoveDocumentInput!) {
moveDocument(input: $input)
}

# The body goes through GMS's own content write, as the UI's does: it stamps
# documentInfo.lastModified and, from 1.9.0, rewrites the semanticText aspect
# (the embedding pipeline's preferred source) to follow the new body.
mutation updateDocumentContents($input: UpdateDocumentContentsInput!) {
updateDocumentContents(input: $input)
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
)
from .tools.tags import add_tags, create_tag, remove_tags
from .tools.terms import add_glossary_terms, remove_glossary_terms
from .tools.update_document import update_document
from .version_requirements import tool_annotations

_P = ParamSpec("_P")
Expand Down Expand Up @@ -291,7 +292,10 @@ def add(
ToolType.MUTATION,
)
if is_save_document_enabled():
# They ship together: an agent that can create a document but not edit
# it is not a configuration anyone needs.
add("save_document", save_document, ToolType.MUTATION)
add("update_document", update_document, ToolType.MUTATION)
else:
logger.info(
"Document tools not registered (SAVE_DOCUMENT_TOOL_ENABLED is false)"
Expand Down
Loading
Loading