Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions apps/desktop/src-tauri/src/deeplink_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ pub enum DeepLinkAction {
OpenSettings {
page: Option<String>,
},
// add Pause Recording, Resume Recording, Toggle Pause Recording, Take Screenshot, SetCamera, & SetMicrophone
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

violates NO COMMENTS policy in CLAUDE.md and AGENTS.md

Suggested change
// add Pause Recording, Resume Recording, Toggle Pause Recording, Take Screenshot, SetCamera, & SetMicrophone
PauseRecording,

Context Used: Context from dashboard - CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 35:35

Comment:
violates NO COMMENTS policy in CLAUDE.md and AGENTS.md

```suggestion
    PauseRecording,
```

**Context Used:** Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=9a906542-f1fe-42c1-89a2-9f252d96d9f0))

How can I resolve this? If you propose a fix, please make it concise.

PauseRecording,
ResumeRecording,
TogglePauseRecording,
TakeScreenshot{
target: ScreenCaptureTarget
},
SetCamera{
camera_id: Option<DeviceOrModelID>
},
SetMicrophone{
mic_label: Option<String>
}
}

pub fn handle(app_handle: &AppHandle, urls: Vec<Url>) {
Expand Down Expand Up @@ -152,6 +165,34 @@ impl DeepLinkAction {
DeepLinkAction::OpenSettings { page } => {
crate::show_window(app.clone(), ShowCapWindow::Settings { page }).await
}
// Pause Recording
DeepLinkAction::PauseRecording => {
crate::recording::pause_recording(app.clone(), app.state()).await
}
// Resume Recording
DeepLinkAction::ResumeRecording => {
crate::recording::resume_recording(app.clone(), app.state()).await
}
// Toggle Pause Recording
DeepLinkAction::TogglePauseRecording => {
crate::recording::toggle_pause_recording(app.clone(), app.state()).await
}
// Take Screenshot
DeepLinkAction::TakeScreenshot{ target } => {
crate::recording::take_screenshot(app.clone(), app.state(), target).await.map(|_| ())
}
// Set Camera
DeepLinkAction::SetCamera{ camera_id } => {
let camera_id = camera_id.ok_or_else(|| "camera_id is required".to_string())?;
let state = app.state::<ArcLock<App>>();
crate::set_camera_input(app.clone(), state.clone(), Some(camera_id), None).await
}
// Set Microphone
DeepLinkAction::SetMicrophone{ mic_label } => {
let label = mic_label.ok_or_else(|| "mic_label is required".to_string())?;
Comment thread
daviddprtma marked this conversation as resolved.
let state = app.state::<ArcLock<App>>();
crate::set_mic_input(state.clone(), Some(mic_label)).await
Comment thread
daviddprtma marked this conversation as resolved.
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

violates NO COMMENTS policy - inline comments on lines 168, 172, 176, 180, 184, and 190 must be removed per CLAUDE.md and AGENTS.md

Suggested change
// Pause Recording
DeepLinkAction::PauseRecording => {
crate::recording::pause_recording(app.clone(), app.state()).await
}
// Resume Recording
DeepLinkAction::ResumeRecording => {
crate::recording::resume_recording(app.clone(), app.state()).await
}
// Toggle Pause Recording
DeepLinkAction::TogglePauseRecording => {
crate::recording::toggle_pause_recording(app.clone(), app.state()).await
}
// Take Screenshot
DeepLinkAction::TakeScreenshot{ target } => {
crate::recording::take_screenshot(app.clone(), app.state(), target).await.map(|_| ())
}
// Set Camera
DeepLinkAction::SetCamera{ camera_id } => {
let camera_id = camera_id.ok_or_else(|| "camera_id is required".to_string())?;
let state = app.state::<ArcLock<App>>();
crate::set_camera_input(app.clone(), state.clone(), Some(camera_id), None).await
}
// Set Microphone
DeepLinkAction::SetMicrophone{ mic_label } => {
let label = mic_label.ok_or_else(|| "mic_label is required".to_string())?;
let state = app.state::<ArcLock<App>>();
crate::set_mic_input(state.clone(), Some(mic_label)).await
}
DeepLinkAction::PauseRecording => {
crate::recording::pause_recording(app.clone(), app.state()).await
}
DeepLinkAction::ResumeRecording => {
crate::recording::resume_recording(app.clone(), app.state()).await
}
DeepLinkAction::TogglePauseRecording => {
crate::recording::toggle_pause_recording(app.clone(), app.state()).await
}
DeepLinkAction::TakeScreenshot{ target } => {
crate::recording::take_screenshot(app.clone(), app.state(), target).await.map(|_| ())
}
DeepLinkAction::SetCamera{ camera_id } => {
let camera_id = camera_id.ok_or_else(|| "camera_id is required".to_string())?;
let state = app.state::<ArcLock<App>>();
crate::set_camera_input(app.clone(), state.clone(), Some(camera_id), None).await
}
DeepLinkAction::SetMicrophone{ mic_label } => {
let label = mic_label.ok_or_else(|| "mic_label is required".to_string())?;
let state = app.state::<ArcLock<App>>();
crate::set_mic_input(state.clone(), Some(mic_label)).await
}

Context Used: Context from dashboard - CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/deeplink_actions.rs
Line: 168:195

Comment:
violates NO COMMENTS policy - inline comments on lines 168, 172, 176, 180, 184, and 190 must be removed per CLAUDE.md and AGENTS.md

```suggestion
            DeepLinkAction::PauseRecording => {
                crate::recording::pause_recording(app.clone(), app.state()).await
            }
            DeepLinkAction::ResumeRecording => {
                crate::recording::resume_recording(app.clone(), app.state()).await
            }
            DeepLinkAction::TogglePauseRecording => {
                crate::recording::toggle_pause_recording(app.clone(), app.state()).await
            }
            DeepLinkAction::TakeScreenshot{ target } => {
                crate::recording::take_screenshot(app.clone(), app.state(), target).await.map(|_| ())
            }
            DeepLinkAction::SetCamera{ camera_id } => {
                let camera_id = camera_id.ok_or_else(|| "camera_id is required".to_string())?;
                let state = app.state::<ArcLock<App>>();
                crate::set_camera_input(app.clone(), state.clone(), Some(camera_id), None).await
            }
            DeepLinkAction::SetMicrophone{ mic_label } => {
                let label = mic_label.ok_or_else(|| "mic_label is required".to_string())?;
                let state = app.state::<ArcLock<App>>();
                crate::set_mic_input(state.clone(), Some(mic_label)).await
            }
```

**Context Used:** Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=9a906542-f1fe-42c1-89a2-9f252d96d9f0))

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

}
}
}
Loading