In macOS 27, document-based applications appear to gain a new feature where, when Autosave in Place is enabled, draft document titles are automatically suggested based on the document’s content.
I was surprised to see this, but I think it is a great feature. (Interestingly, I have received similar feature requests from users of my own application in the past, but I declined them because I felt they would add unnecessary complexity.)
My question is mostly out of curiosity: how is this feature implemented?
My assumption is that the system may be reusing the new Spotlight indexing infrastructure to extract document content, perhaps by combining the Data returned from NSDocument.data(ofType:) during autosave with the document’s fileType. Is that understanding correct, or is a different mechanism involved?
Are there any articles, WWDC sessions, or other documentation that explain this new draft title suggestion feature? I have not been able to find any information about it.
Also, is there currently any way to disable this behavior? I am not personally looking to turn it off, but I suspect some users of my application may eventually ask for that option.
I'm glad you're enjoying this feature, and I definitely hope your users will find it useful as well.
The suggested names feature draws from multiple sources in order to generate its suggestions. These sources include the document contents (including text and images), as you alluded to, as well as the metadata and contents of files in the same directory. All of these inputs are fed into an Apple Intelligence model specifically tuned to generate naming suggestions, and the resulting names are returned to NSDocument or Finder (depending on how the feature is being used).
(Just a reminder that the implementation is subject to change at any time, and apps shouldn't rely on the assumption that this feature will generate names derived from any particular data source.)
Unfortunately, there aren't any WWDC sessions about this feature, nor is there any detailed documentation on it as far as I'm aware.
Right now, the way to disable name suggestions is to go to Finder settings (click on Finder in the Dock, then Finder menu --> Settings...). In the General tab, near the bottom, there should be a setting called "Suggest file names". I do think it would be useful to have a programmatic (API) way for apps to control this for themselves, so if that's something you think would be useful please file an enhancement request!