Skip to content

Add objectscript.insertStubContent setting#1765

Open
isc-bsaviano wants to merge 1 commit intointersystems-community:masterfrom
isc-bsaviano:fix-1736
Open

Add objectscript.insertStubContent setting#1765
isc-bsaviano wants to merge 1 commit intointersystems-community:masterfrom
isc-bsaviano:fix-1736

Conversation

@isc-bsaviano
Copy link
Copy Markdown
Contributor

This PR fixes #1736. I would strongly prefer to avoid adding another setting but think this one may be necessary. If any of you can think of a better way to avoid the problem in the issue please let me know.

@isc-klu
Copy link
Copy Markdown
Collaborator

isc-klu commented Apr 20, 2026

Let me make sure I understand the context correctly:

  • We want to insert stub content into new files that are created manually by users.
  • We do not want to insert stub content into new files created by AIs.
  • There is no reliable way to distinguish between these two kinds of newly created files.

Given that, the best available option is to allow users to disable stub insertion entirely when their AIs may create files.
Is this understanding correct?

@isc-bsaviano
Copy link
Copy Markdown
Contributor Author

There were users who already didn't like the sub insertion. I resisted making a config setting because the stub is easy for a human to remove by undoing the insertion. The insertion is not saved. However, the AI is just not seeing that stub was inserted so it doesn't adapt or remove it. It seems to be easier to not have the stub there than to figure out some way for the AI to know about it.

@isc-klu
Copy link
Copy Markdown
Collaborator

isc-klu commented Apr 20, 2026

I believe a similar stub is already inserted when users type class and accept the first autocomplete suggestion. Are the two stubs identical? If so, removing stub insertion altogether seems more reasonable—it avoids these issues, doesn’t require introducing a new configuration, aligns better with the common behavior of language extensions, and keeps the overall cost of stub insertion low.

@isc-bsaviano
Copy link
Copy Markdown
Contributor Author

I don't see a snippet for the class header anymore (see snippets/objectscript-class.json)

@isc-klu
Copy link
Copy Markdown
Collaborator

isc-klu commented Apr 20, 2026

Sorry—that was a hallucination on my part. I also took a look at the snippet API, and it doesn’t seem flexible enough to compute the stub. We could provide the stub via IntelliSense, but your current solution is probably the most straightforward option for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to fully disable automatic edits to All Files

2 participants