Skip to content

macOS: Focus Terminal App Intent#8961

Merged
mitchellh merged 9 commits intoghostty-org:mainfrom
himura467:app-intent-terminal-focus
Sep 30, 2025
Merged

macOS: Focus Terminal App Intent#8961
mitchellh merged 9 commits intoghostty-org:mainfrom
himura467:app-intent-terminal-focus

Conversation

@himura467
Copy link
Copy Markdown
Contributor

Closes #8791
Discussion: #8657

Summary

This adds the FocusTerminalIntent App Intent and related function (focusSurface), allows external tools (such as Shortcuts/Siri) to programmatically move focus to a specific terminal window or tab.

Verification

This functionality has been tested across following scenarios, confirming correct focus behavior for:

  • Split Window
  • Tab Group
  • Quick Terminal

Note

It is not supported to move focus to a split that is hidden by a zoomed split. The same applies to the CloseTerminalIntent.

AI Disclosure

This pull request was made with assistance from Claude Code.
I reviewed all AI-generated code and wrote the final output manually.

@himura467 himura467 requested a review from a team as a code owner September 29, 2025 22:15
Copy link
Copy Markdown
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

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

Awesome. This looks good to me.

Just noting it so it's somewhere: with this in place, we can now implement the PRESENT_TERMINAL action too. I don't think this is used anywhere on the macOS side yet but it is an apprt action we haven't implemented.

@mitchellh mitchellh merged commit 0cc3728 into ghostty-org:main Sep 30, 2025
48 checks passed
@github-actions github-actions Bot added this to the 1.2.1 milestone Sep 30, 2025
@himura467 himura467 deleted the app-intent-terminal-focus branch September 30, 2025 22:24
@mitchellh mitchellh modified the milestones: 1.2.1, 1.3.0 Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: add focus terminal app intent

2 participants