Introduce sms-api & qt-sms#442
Draft
OrkunTokdemir wants to merge 75 commits into
Draft
Conversation
090c53f to
4d27dd8
Compare
41d9cd4 to
1e8b129
Compare
9eb50c7 to
3390a3a
Compare
22342dc to
0f6a5d9
Compare
Implement missing IPC operations from the SMS client protocol spec: - Add Cache class with updateCache (cache/update) and clearCache (cache/clear) methods - Add Settings class with setSetting (settings/set) and getSetting (settings/get) methods - Add service/message notification dispatch and onMessage callback in JobCallbacks - Add optional message field to ProgressInfo - Add placeholderText field to UserPrompt (parsed from placeHolderText) - Make prompt type parsing case-insensitive, supporting lowercase variants (choice, text, file, directory) matching C++ behavior - Export new types (MessageInfo) and classes (Cache, Settings) Tests: Add cache.test.ts, settings.test.ts, and extend jsonrpc and packages tests for message notifications, prompt type variants, placeholderText, and progress message field.
Add ServiceLauncher class for on-demand service lifecycle management with socket polling, process spawning, and error reporting. Add Packages.createOffline() method for offline package creation. Update types to match upstream C++ API: - Add ServiceLifecycle error category and codes (ServiceNotFound, ServiceStartFailed, ServiceStartTimeout, ServiceStopFailed) - Add InvalidRequestFormat and NetworkError error codes - Renumber Service/Unknown categories and related error codes - Rename PackageFilters.version to packageVersion, add packageId - Add createOffline IPC method Update integration tests: - Add search, createOffline, and ServiceLauncher test cases - Handle proper JSON-RPC error responses instead of expecting timeouts Update unit tests: - Add createOffline to command test matrix - Add packageVersion/packageId filter key tests
- Use mock HOME dir so the service installs to a test-local path ($MOCK_HOME/Qt) instead of the real home directory - Add install tests: install first available package, install non-existent package, list all packages - Add post-install verification that checks extracted files exist and validates the installation journal contains the correct package ID and version
- Add onStdout/onStderr callbacks to ServiceLauncherOptions for observing service process output - Capture stderr during startup and include it in error messages - Detect early process exit and fail fast instead of polling until timeout - Spawn service with stdio pipes instead of 'ignore' - Add integration test suite (test:integration:launcher) covering start/stop lifecycle, error cases, already-running detection, Session connectivity, and start-stop-start cycles
The C++ service uses camelCase keys (scReplyChoice = "replyChoice", scReplyText = "replyText") as defined in ipcconstants.h. Update the TypeScript client and tests to match.
- Remove erroneous `* 100` multiplication; the service already reports progress in the 0–100 range - Track previous percentage and pass `increment` to `progress.report` so the VS Code progress bar advances correctly - Detect phase resets (e.g. Downloading → Installing) by checking when progress goes backwards and reset the baseline accordingly - Include both the phase message and percentage in the notification
When the `installationPath` is already set via `settings.json`, it should not be overwritten.
To not pollute users' `~Qt` directory with alpha versions of Qt, we change the default installation path to `~/Qt_sm_alpha`. Users can still change it to whatever they want.
…ble` Since the settings are user specific and don't need to be overridden at workspacefolder level, we can set the scope to `application`.
39bc199 to
bfa9795
Compare
Replace hardcoded `/tmp/qtclient_socket` with `path.join(os.tmpdir(), 'qtclient_socket')` to resolve platform-specific temporary directories correctly. This ensures consistent behavior across platforms: - macOS: /var/folders/…/T/qtclient_socket (matching Qt's QDir::tempPath()) - Linux: /tmp/qtclient_socket - Windows: uses named pipes (different mechanism)
- Add "Get Started" view with an "Open Walkthrough" button - Add "Qt Account" view showing sign-in/sign-out state: - Logged out: "Sign In" button via viewsWelcome content - Logged in: account email in view description and "Sign Out" button - Add `qt-sms.openWalkthrough` command to open the walkthrough - Add "Sign in to Qt Account" as first walkthrough step with auto-completion on login via `onContext:qt-sms.isLoggedIn`
- Split the install progress notification into two phases: a cancellable "Downloading" notification and a non-cancellable "Installing" one - Add Packages.cancel() method to sms-api (packages/cancel IPC) - Pass --no-console-log flag when spawning the SMS service - Update backend URL to `api.install.qt.io`
b15546d to
51b0acc
Compare
Support the new installation folder structure where Qt is installed under QtFramework/<version>/<arch>/bin/. Add platform-specific architecture mapping and pass the installed package version to registerInstalledQtPaths().
Add an installed-packages-store backed by globalState to remember which Qt versions have been installed via the extension. On activation (when logged in) and on login, sync the store from the SMS service. In the Install Package command, query listInstalledPackages and merge with globalState to build a complete set of installed versions, then exclude them from the QuickPick so users only see what's available for installation.
- Use Windows named pipe (\\.\pipe\qtclient_socket) as default socket path on Windows; Qt's QLocalServer creates named pipes, not Unix domain sockets - Disable detached mode on Windows to prevent new console/process group creation; add windowsHide to suppress console windows - Update integration test helper with matching platform-aware socket path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.