vscode-objectscript icon indicating copy to clipboard operation
vscode-objectscript copied to clipboard

Intellisense in Lite Terminal

Open jtsalten opened this issue 1 year ago • 1 comments

Type: Feature Request

We should have intellisense built-in in our websocket terminal so we can get commands autocompletion and also help for autocompletion of classes' name, methods and so on...

Extension version: 2.12.7 VS Code version: Code 1.92.2 (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z) OS version: Windows_NT x64 10.0.22621 Modes:

jtsalten avatar Aug 27 '24 10:08 jtsalten

I'm not sure command completion has any value but completion for class names, class members, system functions/variables would be nice. Not sure if there's a VS Code API for this, or if I need to implement some form of tab completion. Regardless, this is a lot of work and not something I can get to anytime soon.

isc-bsaviano avatar Aug 27 '24 11:08 isc-bsaviano

The Community webterminal has implemented this already, so might be worth a look on how webterminal is doing it.

isc-lindensc avatar Nov 19 '24 03:11 isc-lindensc

The Community webterminal has implemented this already, so might be worth a look on how webterminal is doing it.

Image

The community web terminal sends your input to the server via WebSocket to retrieve autocomplete suggestions. However, the problem is that VSCode's pseudoterminal does not support any form of autocomplete. You'll need to hack the I/O output to simulate this behavior.

hsyhhssyy avatar Apr 09 '25 09:04 hsyhhssyy

Blocked by the finalization of the VS Code terminal completion API (https://github.com/microsoft/vscode/issues/226562)

isc-bsaviano avatar Apr 11 '25 18:04 isc-bsaviano

On the VSCode side, above issue introduces a proposed API called terminalCompletionProvider. We should wait for the finalization.

As for the IRIS side, the Community WebTerminal offers several server-side classes (WebTerminal.*.cls) that include support for auto-completion.

It appears that the Atelier WebSocket does not expose interfaces related to auto-completion, so unless we bring in server-side components, we might be limited to offering only basic syntax and keyword suggestions.

Alternatively, could we consider using the Community Terminal a optional choice of the WebSocket provider? For some older versions of IRIS where the Atelier terminal WebSocket isn't available, installing the Community Terminal might provide a comparable WebSocket interface.

hsyhhssyy avatar Apr 21 '25 07:04 hsyhhssyy

It appears that the Atelier WebSocket does not expose interfaces related to auto-completion, so unless we bring in server-side components, we might be limited to offering only basic syntax and keyword suggestions.

Yes, I'm going to need to make server-side changes to implement this feature.

Alternatively, could we consider using the Community Terminal a optional choice of the WebSocket provider? For some older versions of IRIS where the Atelier terminal WebSocket isn't available, installing the Community Terminal might provide a comparable WebSocket interface.

We aren't going to do this. We don't want the extensions in the official pack to have dependencies on third-party tools. If you want a way to launch the WebTerminal from VS Code, consider installing this small extension developed by George James Software.

isc-bsaviano avatar Apr 21 '25 10:04 isc-bsaviano

I plan to implement this functionality in the Language Server when the VS Code API is finalized. Please follow the linked issue there for progress. This issue will be closed when the linked PR that enables the Language Server to provide the completion is closed.

isc-bsaviano avatar Sep 30 '25 14:09 isc-bsaviano