Remove Electron menu

This commit is contained in:
Alex Gleason committed 2025-10-23 23:05:21 -05:00
1 parent 52f8a99654
commit 0d2055dd01
4 files changed
+34 -2

No files matched your search

+2 -1
View File
@@ -65,8 +65,9 @@ See [REAL_TERMINAL.md](./REAL_TERMINAL.md) for details.
## Native Window Management
- **Resizable windows** with native OS controls
- **Clean interface** - No default menu bar (File/Edit/View/etc.)
- **Frameless app** - Shakespeare UI fills the entire window
- **Multiple windows** support (planned)
- **Native menus** and keyboard shortcuts
- **System tray integration** (planned)
- **OS notifications** (planned)
+10
View File
@@ -38,6 +38,16 @@ electron/
└── README.md # This file
```
## UI Configuration
The Electron build has been configured for a clean, minimal interface:
- **No default menu bar**: The standard File/Edit/View/Window/Help menu is removed
- **Frameless app**: Shakespeare's UI is the entire window
- **Native window controls**: Standard minimize/maximize/close buttons remain
This provides a more app-like experience focused on the Shakespeare interface.
## Development
Run Shakespeare in Electron development mode:
+18
View File
@@ -101,6 +101,24 @@ await shellTool.execute({
});
```
### ANSI Code Stripping
Output from real shell commands is automatically cleaned for AI consumption:
- **ANSI color codes** are stripped (e.g., `\u001b[31m` for red text)
- **Cursor control sequences** are removed
- **Text formatting codes** are stripped (bold, italic, etc.)
- **Newlines and whitespace** are preserved
This ensures AI receives clean, parseable text without terminal formatting noise.
**Example:**
```
Input: \u001b[1m\u001b[32madded 142 packages\u001b[39m\u001b[22m in 3s
Output: added 142 packages in 3s
```
The Terminal UI still displays colored output for users - only AI tool output is stripped.
## Differences from Browser Mode
| Feature | Browser Mode | Electron Mode |
+4 -1
View File
@@ -1,4 +1,4 @@
import { app, BrowserWindow, ipcMain, shell } from 'electron';
import { app, BrowserWindow, ipcMain, shell, Menu } from 'electron';
import { spawn } from 'child_process';
import path from 'path';
import { fileURLToPath } from 'url';
@@ -15,6 +15,9 @@ const SHAKESPEARE_ROOT = path.join(os.homedir(), 'shakespeare');
let mainWindow;
function createWindow() {
// Remove the default menu (File, Edit, View, etc.)
Menu.setApplicationMenu(null);
// Create the browser window.
mainWindow = new BrowserWindow({
width: 1400,