-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: Add new deeplink actions and Raycast extension placeholder (Algora #1540) #1801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,18 @@ pub enum DeepLinkAction { | |
| }, | ||
| OpenSettings { | ||
| page: Option<String>, | ||
|
|
||
| }, | ||
|
|
||
|
|
||
| PauseRecording, | ||
| ResumeRecording, | ||
| SwitchCamera, | ||
| SwitchMicrophone, | ||
| CaptureScreenshot} | ||
| } | ||
|
|
||
|
|
||
| pub fn handle(app_handle: &AppHandle, urls: Vec<Url>) { | ||
| trace!("Handling deep actions for: {:?}", &urls); | ||
|
|
||
|
|
@@ -49,6 +58,7 @@ pub fn handle(app_handle: &AppHandle, urls: Vec<Url>) { | |
| ActionParseFromUrlError::Invalid => { | ||
| eprintln!("Invalid deep link format \"{}\"", &url) | ||
| } | ||
|
|
||
| // Likely login action, not handled here. | ||
| ActionParseFromUrlError::NotAction => {} | ||
| }) | ||
|
|
@@ -149,10 +159,28 @@ impl DeepLinkAction { | |
| } | ||
| DeepLinkAction::OpenEditor { project_path } => { | ||
| crate::open_project_from_path(Path::new(&project_path), app.clone()) | ||
| DeepLinkAction::PauseRecording => { | ||
| crate::recording::pause_recording(app.clone(), app.state()).await.map(|_| ()) | ||
| } | ||
| DeepLinkAction::ResumeRecording => { | ||
| crate::recording::resume_recording(app.clone(), app.state()).await.map(|_| ()) | ||
| } | ||
| DeepLinkAction::SwitchCamera => { | ||
| Ok(()) | ||
| } | ||
| DeepLinkAction::SwitchMicrophone => { | ||
| Ok(()) | ||
| } | ||
| DeepLinkAction::CaptureScreenshot => { | ||
| Ok(()) | ||
|
Comment on lines
+168
to
+175
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 168-175
Comment:
**Silent no-ops for advertised deeplink actions**
`SwitchCamera`, `SwitchMicrophone`, and `CaptureScreenshot` all return `Ok(())` immediately with no side effects. A caller sending `cap://action?value={"switch_camera":...}` will receive a success response while nothing happens, making these deeplinks silently misleading. If they are intentional stubs, that should be acknowledged in the PR or tracked as follow-up work, since the bounty description lists them as actions to implement.
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
| DeepLinkAction::OpenSettings { page } => { | ||
| crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await | ||
| } | ||
| } | ||
|
|
||
| } | ||
| DeepLinkAction::OpenSettings { page } => { | ||
| crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await | ||
| } | ||
|
|
||
| } | ||
| } | ||
|
Comment on lines
160
to
185
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 160-185
Comment:
**`execute` match expression is structurally invalid**
The `OpenEditor` arm's block is opened at line 160–161 but is never closed before the `PauseRecording` arm starts at line 162. The new arms are pasted _inside_ the `OpenEditor` block rather than after it. Additionally, the `CaptureScreenshot` arm block (line 174) is never closed, and the `OpenSettings` arm (line 177) is placed inside it. The original `OpenSettings` arm has also been deleted from its correct position. This entire section will not compile.
How can I resolve this? If you propose a fix, please make it concise. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Raycast Extension | ||
|
|
||
| This directory contains a Raycast extension for Cap. It is a placeholder for future commands such as start/stop/pause/resume recording, switch camera or microphone, and capture screenshots. Implementation will be provided later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
CaptureScreenshotvariant is immediately followed by}with no separator or comma, causing the closing brace to close the enum body on line 42. A second orphaned}then appears on line 43, which is a hard syntax error. The compiler will reject the file before any logic runs.Prompt To Fix With AI