macOS: distinguish debug AppIntent title
Making things easier when debugging AppIntentpull/12026/head
parent
4dcb09ada0
commit
c2507688e0
|
|
@ -3,7 +3,11 @@ import AppIntents
|
|||
import GhosttyKit
|
||||
|
||||
struct CloseTerminalIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Close Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Close Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Close an existing terminal.")
|
||||
|
||||
@Parameter(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ import AppIntents
|
|||
/// App intent that invokes a command palette entry.
|
||||
@available(macOS 14.0, *)
|
||||
struct CommandPaletteIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Invoke Command Palette Action"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Invoke Command Palette Action"
|
||||
#endif
|
||||
|
||||
@Parameter(
|
||||
title: "Terminal",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ import AppIntents
|
|||
import GhosttyKit
|
||||
|
||||
struct FocusTerminalIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Focus Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Focus Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Move focus to an existing terminal.")
|
||||
|
||||
@Parameter(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ import AppIntents
|
|||
|
||||
/// App intent that retrieves details about a specific terminal.
|
||||
struct GetTerminalDetailsIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Get Details of Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Get Details of Terminal"
|
||||
#endif
|
||||
|
||||
@Parameter(
|
||||
title: "Detail",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ import AppIntents
|
|||
|
||||
/// App intent to input text in a terminal.
|
||||
struct InputTextIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Input Text to Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Input Text to Terminal"
|
||||
#endif
|
||||
|
||||
@Parameter(
|
||||
title: "Text",
|
||||
|
|
@ -46,7 +50,11 @@ struct InputTextIntent: AppIntent {
|
|||
|
||||
/// App intent to trigger a keyboard event.
|
||||
struct KeyEventIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Send Keyboard Event to Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Send Keyboard Event to Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Simulate a keyboard event. This will not handle text encoding; use the 'Input Text' action for that.")
|
||||
|
||||
@Parameter(
|
||||
|
|
@ -111,7 +119,11 @@ struct KeyEventIntent: AppIntent {
|
|||
|
||||
/// App intent to trigger a mouse button event.
|
||||
struct MouseButtonIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Send Mouse Button Event to Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Send Mouse Button Event to Terminal"
|
||||
#endif
|
||||
|
||||
@Parameter(
|
||||
title: "Button",
|
||||
|
|
@ -173,7 +185,11 @@ struct MouseButtonIntent: AppIntent {
|
|||
|
||||
/// App intent to send a mouse position event.
|
||||
struct MousePosIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Send Mouse Position Event to Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Send Mouse Position Event to Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Send a mouse position event to the terminal. This reports the cursor position for mouse tracking.")
|
||||
|
||||
@Parameter(
|
||||
|
|
@ -236,7 +252,11 @@ struct MousePosIntent: AppIntent {
|
|||
|
||||
/// App intent to send a mouse scroll event.
|
||||
struct MouseScrollIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Send Mouse Scroll Event to Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Send Mouse Scroll Event to Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Send a mouse scroll event to the terminal with configurable precision and momentum.")
|
||||
|
||||
@Parameter(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@ import AppKit
|
|||
import AppIntents
|
||||
|
||||
struct KeybindIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Invoke a Keybind Action"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Invoke a Keybind Action"
|
||||
#endif
|
||||
|
||||
@Parameter(
|
||||
title: "Terminal",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@ import GhosttyKit
|
|||
/// This requires macOS 15 or greater because we use features of macOS 15 here.
|
||||
@available(macOS 15.0, *)
|
||||
struct NewTerminalIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] New Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "New Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Create a new terminal.")
|
||||
|
||||
@Parameter(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@ import AppKit
|
|||
import AppIntents
|
||||
|
||||
struct QuickTerminalIntent: AppIntent {
|
||||
#if DEBUG
|
||||
static var title: LocalizedStringResource = "[DEBUG] Open the Quick Terminal"
|
||||
#else
|
||||
static var title: LocalizedStringResource = "Open the Quick Terminal"
|
||||
#endif
|
||||
static var description = IntentDescription("Open the Quick Terminal. If it is already open, then do nothing.")
|
||||
|
||||
#if compiler(>=6.2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue