CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat: inject voice commands, punctuation, and clause text into focused app #4735

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/inspiring-curie-xd4n0bmainopened Jun 21, 20260/5 tasks
ccantynzcommented Jun 21, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/voxlen/pull/66


Summary

  • Voice commands that produce output ("period", "new paragraph", "em dash", etc.) were updating the Voxlen panel but never typing into the active app (Word, email, etc.)
  • Clause library triggers (e.g. "insert indemnity clause") were adding text to the panel but not injecting it
  • Combined utterances like "hello period" — the "hello" part was never injected either

All three paths now call inject_text so the output lands in the focused application.

What changed

  • src/hooks/useTauriEvents.ts: autoInject is now computed once at the top of the transcription handler (before voice command processing). Voice command remainingText and output are queued and injected together. Clause and template text inject immediately after the segment is added. __LOG_TIME markers are excluded since they're billable-time signals, not text.

Test plan

  • Say "period" mid-dictation — a . should appear in the focused app
  • Say "hello period" — "hello." should appear in the focused app
  • Say "new paragraph" — two newlines should appear in the focused app
  • Trigger a clause by voice — full clause text should appear in the focused app
  • injectionMode: buffer still skips all injection (user reviews first)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ggw2m7nwT2HDNaQJqSX6Sp


Generated by Claude Code

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts