Repository navigation
Save a version and publish a model to Commons from AI Chat - #84
Merged
Merged
Conversation
Asking AI Chat to save now saves the open model or drawing as a private
cloud version, exactly as Save version does, with optional change notes in
the requester's words or the agent's summary of its changes. The chat shows
"Saved version N." or says nothing changed and no version was made.
In a 3D model, asking to publish ("publish this to Commons in my Shaker
cabinets collection") saves a version and shows a Publish to Commons card:
title, a drafted description, category, license (CC BY 4.0 suggested when
none is named, or the copy's retained source licenses), collections matched
to the publisher's own by name or created as new private ones, and the
current view. Nothing is public until Publish model (Publish changes for a
published model) is chosen: it opens the publishing dialog with the card's
values and publishes as soon as the upload is ready, including the first
profile step. Edit details opens the same dialog to review first; Cancel
publishes nothing. The card then shows Published with a link.
Backend: document_save, commons_publishing_info and commons_publish_propose
with their rules, offered to tabs that say they can save or publish; a
publication made or cancelled ends the turn without another model call.
The publishing dialog takes a preset, auto-publishing and a callback for a
publication whose collections failed. Help covers both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Chat can now save the open document and publish a 3D model to Commons when asked. Until now a request like "publish this to Commons in my shaker cabinet collection" got a list of manual steps.
What you see
How it works
requests-core):document_save,commons_publishing_info(the agent's view of your collections, the categories, licenses, the current publication, and retained or blocked source licenses) andcommons_publish_propose.save: 1orpublish: 1(publishing in model tabs only).requests-ui): the card, alineoutcome for the save message, and "Published" / "Not published." lines after a reload.ui):chatPublishingsaves through the existingCloudAutosaveand prepares the card: it matches collections, keeps a published model's current details unless the agent changes them, and refuses no-derivatives sources.PublishSnapshotfor the card.editorViewis extracted from Save version.commons-ui):UploadDialoggainspreset(details and collections),autoPublish, andonPublication, so a publication whose collections failed still reports.Compatibility and deployment
Older backends ignore
saveandpublishin the descriptor, and older clients never send them. The feature goes live once the backend in this change is deployed.Testing
tsc -b,eslint .,spdx-check,license-checkand the full vitest suite pass (586 files, 4505 tests).🤖 Generated with Claude Code