Add objectscript.insertStubContent setting#1765
Add objectscript.insertStubContent setting#1765isc-bsaviano wants to merge 1 commit intointersystems-community:masterfrom
objectscript.insertStubContent setting#1765Conversation
|
Let me make sure I understand the context correctly:
Given that, the best available option is to allow users to disable stub insertion entirely when their AIs may create files. |
|
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. |
|
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. |
|
I don't see a snippet for the class header anymore (see snippets/objectscript-class.json) |
|
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. |
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.