Commit graph

87 commits

Author SHA1 Message Date
ByteAtATime
7b2720b8c2
ci: add github action for building 2025-07-12 16:26:24 -07:00
ByteAtATime
66f40dc607
refactor: move plugin list request and discovery logic to backend
This commit removes the `sendPluginList` function and its associated calls from the frontend. The plugin discovery logic is now handled directly in the Tauri backend, which is the first step in moving the sidecar to purely be about running plugins.
2025-07-09 09:54:26 -07:00
ByteAtATime
3ad7c0ecbb
feat(toast): add showToast overload function
This commit updates the showToast function to support multiple calling signatures, allowing for both an options object and individual parameters for style, title, and message. The latter is not officially documented, but is present in the type definitions of @raycast/api.
2025-07-08 11:57:29 -07:00
ByteAtATime
e0f2889c0d
fix(sidecar): convert components factory to return functions
This commit updates the component factory utilities in the sidecar to address a compatibility issue with Raycast extensions. Many extensions invoke UI components as direct function calls (e.g., `List(props)`) instead of using JSX syntax, which caused a `TypeError` because our components were objects returned by `React.forwardRef`. This change modifies `createWrapperComponent` and `createSlottedComponent` to return simple factory functions that produce the required React elements, making them callable and resolving the runtime error.
2025-07-08 11:56:29 -07:00
ByteAtATime
854786f0bb
feat(grid): make grid feature-complete
This commit finishes the basic implementation of Grid by implementing the `Grid.EmptyView` component and updating its props. I've expanded the Grid API to support loading states, pagination, and empty views, bringing it more in line with the native Raycast API. To accommodate these new features, this commit rewrites the `useGridView` hook. It now handles complex 2D keyboard navigation, programmatic selection, and the logic for pagination and filtering. The `Grid.Item` component was also updated to support more complex content, including accessories and tooltips, and layout options like `aspectRatio` and `fit`.

Although there are still some bugs to iron out, this commit adds all the basic features in Grid.
2025-07-08 11:01:35 -07:00
ByteAtATime
6ed4af5ce7
refactor(components): unify accessory prop handling for UI components
This refactoring introduces a new `createSlottedComponent` factory to abstract the repetitive logic for handling "accessory" props like `actions`, `detail`, and `searchBarAccessory`. It replacs the manual, boilerplate implementations in `List`, `Grid`, `Form`, and `Detail` components with a single call to this new factory.
2025-07-04 21:25:45 -07:00
ByteAtATime
2b383ea8e6
refactor(rpc): migrate to generic RPC proxy for sidecar commands
This commit replaces the specific, one-off message types for each native function (e.g., clipboard, system) with a single generic `invoke_command` message. The frontend `SidecarService` now acts as a simple proxy, dynamically invoking the specified Rust command from the message payload without needing to know its implementation details. This change significantly reduces boilerplate and decouples the frontend from the backend's RPC interface.
2025-07-03 09:43:27 -07:00
ByteAtATime
5f44461a45
fix(environment): update request identifiers for selected finder items and text 2025-07-02 08:59:03 -07:00
ByteAtATime
5c66ba34f1
feat(actions): implement destructive action styles
This commit introduces support for `Action.Style.Destructive` as outlined in the API documentation. The `Action` component and its variants now accept a `style` prop, which can be set to `'destructive'`.
2025-07-01 22:14:28 -07:00
ByteAtATime
87a7f946fa
perf(reconciler): implement high-speed prop templating
This commit optimizes the data payload generation by replacing the previous slow, generic fingerprinting logic with a fast, specialized one. The previous method using `JSON.stringify` introduced a 20-50ms latency bottleneck; the new implementation uses a targeted string concatenation method to achieve the same payload reduction in about 10ms.
2025-07-01 10:13:49 -07:00
ByteAtATime
4a36997bb2
perf(reconciler): optimize data payload with prop templating
Implements a props templating system to the sidecar reconciler to significantly reduce the initial data payload size. The system now identifies repeating property sets, defines them as a template once, and then applies this template to multiple components, avoiding redundant data transmission. By writing the payload to a log file, we see that initial payload size for the Pokémon extension decreases from 150k to 30k lines
2025-07-01 09:55:42 -07:00
ByteAtATime
7d5441f538
feat(ipc): add compression for large stdout payloads
This commit implements  zlib compression for large messages sent from the Node.js sidecar to the frontend. A threshold prevents small messages from incurring compression overhead, and a flag in the length-prefix header signals whether a payload is compressed, avoiding protocol changes. By adding a log to the sidecar service, we can measure that the rolling average from loading the Pokémon plugin decreases from 140ms to about 110ms.
2025-06-30 15:58:17 -07:00
ByteAtATime
5b064d5b66
feat(sidecar): use current plugin name in cache namespace
This commit moves the current plugin details, previously in api/index.ts, to the state.ts file. This way, it can be accessed in the cache.ts file, which uses it as the "namespace", used to create the cache data directory.
2025-06-30 09:23:58 -07:00
ByteAtATime
e90e0de6be
feat(components): add focus and reset commands for form elements
This commit introduces the `FOCUS_ELEMENT` and `RESET_ELEMENT` message schemas and implements corresponding focus and reset functionalities in form components. The imperative bus is utilized to handle these commands, allowing for improved interaction with form elements like TextField, TextArea, and Dropdown.

It also fixes the `onSubmit` logic to pass the values of the form as a single argument, a mapping from IDs to values, as defined in the documentation.
2025-06-29 18:08:06 -07:00
ByteAtATime
af205594a2
feat(form): add LinkAccessory component to form structure 2025-06-29 16:44:22 -07:00
ByteAtATime
5ddba9d8fe
feat(actions): add ActionSubmitForm to action components 2025-06-29 16:44:15 -07:00
ByteAtATime
ec74ac81c1
feat(api): add keyboard shortcuts module
This commit introduces a new `keyboard.ts` module that defines key equivalents, modifiers, and common keyboard shortcuts for the application. The `Keyboard` object is exported for use in other parts of the codebase, enhancing keyboard navigation capabilities.
2025-06-29 16:27:54 -07:00
ByteAtATime
640ef53118
feat(ai): implement environment.canAccess(AI)
This commit replaces the stub in `environment.canAccess(AI)`. The access status is now determined by the backend when a command is launched and is passed to the sidecar process. This allows the `canAccess` function within the plugin's environment to synchronously return the correct access status. In the future, we should probably avoid hardcoding it in the parameter somehow.
2025-06-27 18:52:58 -07:00
ByteAtATime
5c4218ab4a
fix(ai): expose model enum 2025-06-27 18:33:44 -07:00
ByteAtATime
5dafd76912
fix(ai): refactor AI model settings and fallback logic
This commit moves default model mappings into the backend, making it the single source of truth. The `get_ai_settings` command now merges user-defined settings with these defaults, so the UI always receives a complete and correct configuration. The model selection logic in `ai_ask_stream` was also simplified to use the merged settings, which fixes a bug where the system would use a global fallback instead of the correct model-specific default. Additionally, the `set_ai_settings` command now only persists user overrides, keeping the configuration file clean.
2025-06-27 18:27:53 -07:00
ByteAtATime
87751b30ca
feat(ai): implement AI API
This commit introduces a new AI module that includes schemas for AI requests and responses, as well as event handling for streaming AI responses. It adds functions to manage AI API keys, log usage, and handle streaming data from the AI service.
2025-06-27 15:58:05 -07:00
ByteAtATime
99f6319a7e
feat(deeplink): implement command deeplinks
This commit adds support for deeplinks starting with `raycast://extension`, which run a specific command in an extension. It adds the `author` and `owner` fields in the PluginInfo schema, updates the plugin discovery process to include these fields, and implements a new CommandDeeplinkConfirm component for confirming command execution from deep links. Additionally, it modifies the builtin command names, titles, as well as their plugin names and titles to correctly reflect Raycast's implementation. This means that the deeplinks should be interoperable.
2025-06-26 20:33:54 -07:00
ByteAtATime
a561534075
fix(preferences): pass all command preferences to setCurrentPlugin
Previously, we were passing in only the plugin preferences. This means that when calling `getPreferenceValues`, none of the command preferences would be returned. This commit changes it to return *all* command preferences -- I do not think it will cause any problems, but we'll see I guess ¯\_(ツ)_/¯
2025-06-25 22:01:54 -07:00
ByteAtATime
1bdb0f534e
feat(settings): Implement remaining preference types
This commit introduces support for all remaining preference types as specified in the API, including password, checkbox, appPicker, file, and directory. Eventually, we will probably have to somehow make the password preferences encrypted.
2025-06-25 20:14:21 -07:00
ByteAtATime
f2191cbdb4
chore: remove placeholder preference values 2025-06-25 15:31:55 -07:00
ByteAtATime
8218e39ae7
refactor(sidecar): create shared RPC module for async requests
This commit introduces a new `rpc.ts` module to centralize the asynchronous request/response logic between the sidecar and the main Tauri process. Previously, files like `clipboard.ts`, `environment.ts`, and `browserExtension.ts` each had their own duplicate implementation for managing pending requests and timeouts. By abstracting this boilerplate into a single RPC utility, we eliminate redundant code, reduce the surface area for bugs, and simplify the creation of future native API bridges.
2025-06-24 09:52:41 -07:00
ByteAtATime
bda11b7ddc
feat: add image mask options and update related schemas and styles 2025-06-23 18:47:40 -07:00
ByteAtATime
afa6fc8235
feat: add inset property to Grid components for customizable padding
This aligns the grid with Raycast's API, specifically allowing it to work with the Spotify Search command (among others, of course)
2025-06-23 18:40:24 -07:00
ByteAtATime
9c1ee6efe4
feat: implement system utilities API
This commit introduces new system message schemas and corresponding commands for managing applications, including fetching applications, getting the default application, retrieving the frontmost application, showing an application in Finder, and trashing files.
2025-06-23 18:12:52 -07:00
ByteAtATime
418c23cb0a
fix(sidecar): simplify require statement in plugin.ts
Originally, removing the literal require call seems to have completely removed the "require" logic from the code, giving a "require is not defined" error. This commit fixes it by reverting to the previous literal `require()` call.
2025-06-23 18:08:35 -07:00
ByteAtATime
f0d05a13c8
chore: fix lint errors 2025-06-23 13:32:25 -07:00
ByteAtATime
b423178e67
chore(sidecar): fix lint errors
Most errors were related to usage of the `any` type.
2025-06-23 12:31:10 -07:00
ByteAtATime
5f1f00d0ae
feat: overhaul preferences page with tree view and search
This commit completely redesigns the extension settings page to support both extension-level and command-level preferences. The UI now features a searchable, tree-like view that clearly displays the hierarchy of extensions and their configurable commands, making navigation more intuitive. This new structure allows users to more easily locate and manage the specific settings they need.
2025-06-22 20:13:42 -07:00
ByteAtATime
9550f2b441
fix(sidecar): add custom imports for react and react/jsx-runtime packages
During build, the build step removes the above packages. This commit explicitly adds them in at build time
2025-06-22 16:00:31 -07:00
ByteAtATime
28d1605bba
feat: add hud API
This commit adds the HUD API, allowing extensions to display temporary, non-interactive messages on the screen. The implementation adds a `show_hud` Tauri command that manages a dedicated, borderless Svelte window. This window is dynamically resized to fit its content and is automatically hidden after two seconds.
2025-06-22 09:04:10 -07:00
ByteAtATime
41c880f9d5
feat: add pluginTitle to PluginInfo schema and display title instead of "name" in list 2025-06-19 20:48:30 -07:00
ByteAtATime
5b0dfd7b36
feat: implement basic oauth api 2025-06-19 19:26:07 -07:00
ByteAtATime
3c3566136a
feat: implement Clipboard API 2025-06-19 11:23:05 -07:00
ByteAtATime
f7939e5c9b
feat: implement browser extension apis
This commit implements the full api for the Raycast browser extension. It introduces a WebSocket server in the Tauri backend to handle JSON-RPC communication with the companion browser extension. The sidecar now exposes the BrowserExtension module with getTabs and getContent methods, which proxy requests through the frontend to the new backend commands.
2025-06-18 21:50:46 -07:00
ByteAtATime
36abe58a8a
refactor: improve plugin loading and icon resolution
Updated the plugin loading logic to throw an error if no plugin path is specified. Enhanced the icon resolution function to use path.join for constructing asset paths, and removed hardcoded paths from the DropdownItem component. Introduced a context for assetsPath in the main page to streamline asset management across components.
2025-06-17 21:38:12 -07:00
ByteAtATime
92b13f650d
feat: remove hardcoded paths in sidecar
Added a new config module to manage directory paths for data, cache, support, plugins, preferences, and assets.
2025-06-17 21:13:59 -07:00
ByteAtATime
95e7ae16bc
feat: implement toast notifications system
Added schemas for toast notifications, including show, update, and hide actions. Integrated toast handling into the sidecar's command processing and UI components, allowing for interactive user feedback. Introduced a new Toast API for creating and managing toast instances.
2025-06-17 18:27:21 -07:00
ByteAtATime
0c94e973a0
feat: implement getSelectedFinderItems functionality
Added schemas and message handling for the new get-selected-finder-items command. Implemented the logic to retrieve selected items from the Finder on macOS, Windows, and Linux, enhancing the application's ability to interact with the file system.
2025-06-17 14:28:51 -07:00
ByteAtATime
a5a39a5b7d
feat: implement getSelectedText function
Previously, this function was a shell that always rejected. This commit implements the schemas for a new get-selected-text command and updates the SidecarMessageWithPluginsSchema to include the new message type.
2025-06-17 12:01:50 -07:00
ByteAtATime
a15db4946c
feat: add open function to api
Add OpenMessageSchema and OpenPayloadSchema for handling messages to open an application. Decided to implement actual opening functionality in frontend for Tauri's security model
2025-06-16 22:00:17 -07:00
ByteAtATime
907051e883
feat: implement no-view plugins
Added a mode parameter to the plugin execution flow, allowing plugins to run in 'view' or 'no-view' modes. Updated plugin runner to not pass plugin function into React if it is of type `no-view`
2025-06-16 21:32:07 -07:00
ByteAtATime
3e0fb8fca3
feat: implement preferences management for plugins
Added functionality to manage plugin preferences, including getting and setting preferences through the sidecar. Introduced a PreferencesStore to handle preference persistence and retrieval. Updated relevant components to support preference interactions, enhancing user experience in plugin settings.
2025-06-15 14:14:16 -07:00
ByteAtATime
c096ee5397
refactor: simplify module requiring in plugin.ts 2025-06-15 13:04:44 -07:00
ByteAtATime
b4b6ea231f feat: implement plugin management
Added a request-plugin-list action to the sidecar, which sends plugins to the frontend. Implemented plugin list as a separate view. Plugins now interoperable with Raycast (by copying the `dist` folder). Command discovery implemented by reading `package.json`.
2025-06-15 12:48:00 -07:00
ByteAtATime
78671e1943 feat: add basic form field components 2025-06-15 10:10:35 -07:00