Skip to content

The agent that grows with you

fix(desktop): expose native text replacement controls

brooklyn!410c281756b4
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 20d7cc8951c..dbcc386d0a3 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -18,6 +18,7 @@ import {
globalShortcut,
ipcMain,
Menu,
+ type MenuItemConstructorOptions,
nativeTheme,
powerMonitor,
powerSaveBlocker,
@@ -7085,7 +7086,7 @@ function sendWindowStateChanged(nextIsFullscreen?: boolean, target = mainWindow)
}
function buildApplicationMenu() {
- const template = []
+ const template: MenuItemConstructorOptions[] = []
const checkForUpdatesItem = {
label: 'Check for Updates…',
@@ -7152,7 +7153,16 @@ function buildApplicationMenu() {
// terminal, preview, and other editable surfaces that need the strip.
{ role: 'pasteAndMatchStyle' },
{ role: 'delete' },
- { role: 'selectAll' }
+ { role: 'selectAll' },
+ ...(IS_MAC
+ ? ([
+ { type: 'separator' },
+ {
+ label: 'Substitutions',
+ submenu: [{ role: 'showSubstitutions' }, { type: 'separator' }, { role: 'toggleTextReplacement' }]
+ }
+ ] satisfies MenuItemConstructorOptions[])
+ : [])
]
})
template.push({