Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper Fix for Ideal New/Untitled Flow (#1351)
# [rfc] Proper (?) Fix for Ideal New/Untitled Flow This implements a proper(?) fix for creating new/untitled aiconfig files: - treats the file as regular Untitled (but with proper `.aiconfig.json/yaml` extension), prompting for filename only on first save, no longer needing to prompt immediately on create (undoing #1337) - now, only one tab is opened and it opens the custom editor The main change/fix is using a `WorkspaceEdit` to hold the initial content changes instead of opening/showing a new text editor with the content. I found that solution from microsoft/vscode#93441 However, now the webview seems to reload the file after saving it for the first time, which makes it go back to readonly and start up the server :( --> it seems to dispose the untitled webview (killing the server) and refresh with a new server... https://github.com/lastmile-ai/aiconfig/assets/5060851/8a471b5e-f6d3-4860-a780-949ca928394a Not sure if this is overall better because of the server thing. Need to investigate some more. Fwiw, current scenario on main with 2 tabs is probably a worse UX because: - obviously, 2 tabs is confusing - closing text editor tab seems to break custom editor (can't make edits in custom editor after)? Also, closing text editor tab has the same notification about unable to update server - on top of ^, need to name the file beforehand, as opposed to on save
- Loading branch information