Add Class entry to New File... quickpick#1732
Conversation
Co-authored-by: gjsjohnmurray <6726799+gjsjohnmurray@users.noreply.github.com>
|
@copilot please hide the new Class command from Command Palette |
Co-authored-by: gjsjohnmurray <6726799+gjsjohnmurray@users.noreply.github.com>
|
@copilot please add a third step to the user interaction, prompting for an optional superclass. Look at the Try to reuse code rather than duplicating it. When the user does pick a superclass, use it in the document you generate. For example: |
Co-authored-by: gjsjohnmurray <6726799+gjsjohnmurray@users.noreply.github.com>
Done in e73b96c. A third step now prompts for an optional superclass. When connected to a server it uses an expandable QuickPick (reusing If a superclass is chosen, the generated class includes the Pressing Escape on the superclass step skips it and produces a plain |
|
@copilot please integrate the class picking step into the |
Co-authored-by: gjsjohnmurray <6726799+gjsjohnmurray@users.noreply.github.com>
Done in 60db6b1. Added
The |
|
@isc-bsaviano @isc-rsingh I think Copilot did a pretty good job using Claude Sonnet 4.6, and the PR deserves to be merged.
|
|
Look like a fun experiment John! I'll review in detail after KC's change. I can't read that link FYI. @isc-rsingh I think we should write up a policy related to agent-only PRs into CONTRIBUTING.md. I know it's unlikely but I don't want us to be drowning in PRs thst we didn't ask for. That has happened to other open source projects, although they were much bigger. |
|
@isc-bsaviano looks like the session link isn't shareable. I've updated my comment. I agree re adding something to CONTRIBUTING.md |
|
We actually might not need anything. We already have language on getting agreement on a spec before implementation for features. Once that's settled then there's probably nothing wrong with the user letting AI do the work. |
|
Thanks for making the changes John. Just tested and looks good to me. @isc-klu Any feedback before I approve? |
The New File... quickpick only offered interoperability-specific class types, leaving no guided path for creating a plain ObjectScript class. New users struggled with naming conventions, separators, and the required
.clssuffix.Changes
src/commands/newFile.tsClass = "Class"toNewFileTypeenumKPIexception)multiStepInput: (1) class name, (2) optional description, (3) optional superclass via a newclassPickstep typeClassPickStepOptionsinterface (type: "classPick",title,api) and extended theInputStepOptionsunion to include itmultiStepInputhandles theclassPicktype: uses the expandable class picker when connected to a server, falls back to an InputBox otherwise; Escape skips the optional step (never cancels the wizard), Back navigates to the previous stepsrc/commands/project.ts— exports apickClass(api, title, canGoBack?)function: an expandable single-select QuickPick for classes using%Library.RoutineMgr_StudioOpenDialog, reusingPickAdditionsItemandsodItemToPickAdditionsItemfrom the Add Items to Project command; includes System/Generated toggles, auto-expand-on-dot, collapse support, optional Back button, and asettledflag to prevent double-resolutionsrc/extension.ts— registersvscode-objectscript.newFile.classcommandpackage.json— addsClasstocontributes.commandsandfile/newFilemenu; hides the command from the Command Palette (consistent with all othernewFile.*commands)When connected to a server the superclass step shows an expandable class picker (only
.clsfiles offered, single-select, with Back button support); when there is no server connection it falls back to a plain InputBox with class-name validation. Pressing Escape on the superclass step skips it.Generated template for
My.Package.ClassNamewith description"A test class"and no superclass:Generated template for
Foo.Barwith superclass%Library.Persistent:Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.