Make the composer wrap and grow, and surface Launch at Login
Long prompts hit a single-line field before; the composer is now an NSTextView that wraps and grows up to seven lines, keeps Return as send, and uses Shift+Return for a newline. Launch at Login already existed in the menu bar icon's right-click menu, so it is now also a toggle in the sync panel where it is easier to find.
This commit is contained in:
@@ -13,7 +13,8 @@ clicking an item copies it back to the clipboard.
|
||||
`NSStatusItem Preferred Position Prompt`). Left click toggles the panel,
|
||||
right click shows the menu (accessibility state, launch at login, open data
|
||||
folder, quit). Contains the single-instance guard and `LoginItem`
|
||||
(`SMAppService`). Also sets `NSApp.mainMenu` with Hide Panel (Cmd+W) and Quit
|
||||
(`SMAppService`). The sync panel also carries a Launch at Login toggle (the
|
||||
app's only settings surface). Also sets `NSApp.mainMenu` with Hide Panel (Cmd+W) and Quit
|
||||
(Cmd+Q) — an accessory app shows no menu bar, but the main menu still
|
||||
services key equivalents, which is the only way to quit from the keyboard
|
||||
while the panel has focus. `applicationShouldHandleReopen` shows the panel so
|
||||
@@ -37,6 +38,13 @@ clicking an item copies it back to the clipboard.
|
||||
light mode keeps the system window colour. `Theme.background` is also handed
|
||||
to the `NSPanel` so the strip under the transparent titlebar matches, and the
|
||||
row colour stays slightly lighter than black so cards remain visible.
|
||||
- `Sources/Prompt/ComposerView.swift` — the chat-style composer
|
||||
(`NSViewRepresentable` around an `NSTextView`): wraps long prompts, grows to
|
||||
fit up to seven lines, then scrolls. Return submits, Shift+Return inserts a
|
||||
newline, Esc forwards to the panel (clear selection, else hide). Height is
|
||||
measured from the text and pushed into a `height` binding the panel applies
|
||||
as a frame — a representable cannot resize itself through
|
||||
`intrinsicContentSize` once SwiftUI offers a larger size.
|
||||
- `Sources/Prompt/PanelView.swift` — the panel UI. Header (workspace switcher,
|
||||
search, add photos), item list, composer. There is no in-header close button:
|
||||
the window's own close button hides the panel. Composer `# Name` creates/
|
||||
|
||||
Reference in New Issue
Block a user