feat(cli): add --auto-submit flag to force Enter/Ctrl+Enter/Cmd+Enter…#1099
Open
benys wants to merge 1 commit intocjpais:mainfrom
Open
feat(cli): add --auto-submit flag to force Enter/Ctrl+Enter/Cmd+Enter…#1099benys wants to merge 1 commit intocjpais:mainfrom
benys wants to merge 1 commit intocjpais:mainfrom
Conversation
… after transcription
There was a problem hiding this comment.
Pull request overview
Adds a per-invocation transcription context to allow CLI/signal-triggered transcriptions to override auto-submit behavior (e.g., force Enter/Ctrl+Enter/Cmd+Enter) without changing persisted settings.
Changes:
- Introduces
TranscriptionContextto carry per-run overrides through the transcription pipeline. - Threads
TranscriptionContextfrom CLI/signal inputs through the coordinator into action stop/paste. - Extends CLI with
--auto-submit[=<key>]and applies override during paste.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src-tauri/src/transcription_coordinator.rs |
Carries TranscriptionContext through lifecycle state and forwards it into action.stop(). |
src-tauri/src/signal_handle.rs |
Updates external trigger helper to accept/pass TranscriptionContext. |
src-tauri/src/shortcut/handler.rs |
Updates coordinator/action stop calls to supply a default TranscriptionContext. |
src-tauri/src/settings.rs |
Adds TranscriptionContext struct for per-invocation overrides. |
src-tauri/src/lib.rs |
Parses --auto-submit from single-instance args and passes context into CLI-triggered transcription. |
src-tauri/src/clipboard.rs |
Updates paste API to accept context and apply auto-submit override selection. |
src-tauri/src/cli.rs |
Adds --auto-submit clap flag with constrained values and optional argument. |
src-tauri/src/actions.rs |
Extends ShortcutAction::stop() to accept context and passes it into paste. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+477
to
+482
| if let Some(pos) = args.iter().position(|a| a == "--auto-submit") { | ||
| let key = args | ||
| .get(pos + 1) | ||
| .filter(|s| !s.starts_with("--")) | ||
| .map(|s| s.as_str()) | ||
| .unwrap_or("enter"); |
Comment on lines
+95
to
+97
| Stage::Recording(id, _) if id == &binding_id => { | ||
| let ctx = take_recording_context(&mut stage); | ||
| stop(&app, &mut stage, &binding_id, &hotkey_string, ctx); |
Comment on lines
+655
to
+662
| let (auto_submit, auto_submit_key) = match context.auto_submit_override { | ||
| Some(key) => (true, key), | ||
| None => (settings.auto_submit, settings.auto_submit_key), | ||
| }; | ||
|
|
||
| if should_send_auto_submit(auto_submit, paste_method) { | ||
| std::thread::sleep(Duration::from_millis(50)); | ||
| send_return_key(&mut enigo, settings.auto_submit_key)?; | ||
| send_return_key(&mut enigo, auto_submit_key)?; |
DylanBricar
added a commit
to DylanBricar/Phonara
that referenced
this pull request
Mar 20, 2026
- SHA256 download verification to prevent corrupt partial download loops (cjpais#1095) - Secondary transcription shortcut with independent language setting (cjpais#1106) - Double-click tray icon to show main window (cjpais#369) - CLI --auto-submit flag to force enter after transcription (cjpais#1099) - OCR template context via ${OCR} variable in post-processing prompts (cjpais#770)
DylanBricar
added a commit
to DylanBricar/Phonara
that referenced
this pull request
Mar 20, 2026
- Save recordings before transcription to prevent data loss on crash (cjpais#1024) - Linux Wayland titlebar: disable decorations for custom titlebar (cjpais#1042) - Add change_secondary_selected_language_setting command (cjpais#1106 gap) - Fix CLI --auto-submit key type being ignored (cjpais#1099 bug)
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.
Please confirm you have done the following:
Human Written Description
I keep auto-submit disabled in settings by default, but for certain my automation I need to selectively trigger an Enter keypress after transcription via CLI.
Also I prepared new struct - for future extend settings.
Related Issues/Discussions
Extends #147
Testing
I used this new CLI in my linux setup
AI Assistance
If AI was used: