Releases: prxshetty/margin
Releases · prxshetty/margin
Release list
Images, Cue/Rewrite/Imagine, workspace profiles
Notes:
Margin can now generate and place images inline, the selection bubble grew into a full editor surface, and workspaces became something you switch between instead of something you link once.
AI images
- Images are markdown-native: shift-drag the corner to resize (aspect ratio locked), align left/center/right, caption them, and they flow with the text. Existing image assets pick this up with no migration.
- Generation runs through a provider abstraction — Gemini via the Interactions API, and ComfyUI workflows (SDXL Turbo, text and image-to-image) with the workflow JSON editable in Settings.
- Generate from the slash menu, the native file picker, the bubble menu, or the dialog. Pick a style, submit inline, and the image lands where your selection was.
- Built-in styles are customizable: override any of them and the override wins. Per-provider base URL, so a proxy or a local endpoint works like a hosted one.
- History lists every generation with per-entry deletion, and switches provider and style correctly when the underlying models change.
- Gemini errors now describe the actual envelope shape instead of "no image returned", so a misconfigured key is diagnosable from the message.
Editor-first bubble: Cue, Rewrite, Imagine
- The selection bubble is the primary surface: node selector, formatting, link, then Cue / Rewrite / Imagine.
- Cue hands the selection to the assistant. Rewrite opens a prompt that skips the planner. Imagine turns the selection into an image prompt and generates inline — no dialog.
- The prompt morphs out of the button you clicked, expands to a taller view for multi-line instructions, and shows a scoped loading ring while streaming. Collapsed and expanded share padding so the caret never jumps.
- "Imagine again" reuses the same anchor and style without retyping the prompt.
- A prompt belongs to the selection it was opened for. Click away or select something else and it closes instead of showing stale input.
- Links open on a plain click, in a new tab. Editor selection is never lost to a stray click.
Workspaces: profiles, switching, and one validator
- Multiple workspace profiles in the sidebar, with a switcher. Linking a new workspace and recording its profile is a single settings write, so rapid creates can't clobber each other.
- Creation validation is centralized in one resolver used by every caller: absolute parent, single-segment name, no dotted path segments, sensitive-prefix blocklist (a subpath check, so ~/.ssh/somewhere is caught too), never the filesystem root or $HOME, and the target must be empty or new. The API endpoint translates the error to a 400 rather than reimplementing the rules.
- Folder create, rename, and delete from the sidebar, plus git undo in the edit dialog.
Settings, rebuilt
- Searchable settings shell with shared primitives and per-tab icons; General, Appearance, Context, Endpoints, Harness, and Imagine each redesigned.
- Endpoints is manage-only, with an in-panel flyout for picking the active endpoint. The .env auto-import is gone — Settings is the single source of truth.
- Endpoints carry a vision flag and a thinking badge, shown wherever endpoints are listed, so you can tell an image-capable model from one that isn't before a request fails.
- Harness model lists refreshed to current models.
Workspace activity
- The stats card reports what you actually check: files, chats, images, and when you were last active, with a 14-day chats+images chart behind it.
- Scaffold manifests like chapters/CHAPTERS.md no longer inflate the file count.
Interface
- File tree with folder icons, straight guide spines, and disclosure chevrons; folder and file labels stay aligned whether or not a folder has children.
- Layout dropdown checkmarks, transparent sidebar and assist headers, monochrome harness and bubble icons, brand glyphs for the link and image marks.
- Toasts have an explicit dismiss button, and the bubble keeps its padding when the prompt expands.
Docs
- Workspaces, images, and the bubble/slash menus are covered in the writing guide; endpoints documentation covers the new vision and thinking flags.
BYOA - Opencode, Claude Code, Codex, Agy
Notes:
Margin can now drive the agent you already pay for instead of only calling an API endpoint. Pick OpenCode, Claude Code, Codex, or Antigravity per message or as your default; the agent edits your workspace directly while you keep writing, then its changes land as a diff you accept or reject.
Agent harnesses
- Four supported runtimes with auto-detection, custom executable paths, and per-harness model pickers (live lists where the CLI offers one, built-ins where it doesn't).
- Live progress in the Assist panel: streamed text and reasoning plus one row per file read, edited, or created; new files appear in the sidebar as they land.
- No editor lock — your keystrokes are snapshotted and three-way merged at paragraph level; conflicts keep your version and say so.
- Harness edit runs now receive past conversation and recent edits, bounded by Session Memory.
Writing bubble - Select text for an inline bubble: node selector, formatting, add-to-margin, and a Rewrite field that skips the planner for fast focused edits and follows your default harness.
Settings, restructured - Prompts live in Context now (Writer, Planner, Chat, Harness Edit), ordered: prompts, session memory, reference files, document structure.
- Removed the redundant Additional Context box — persistent style rules belong in the prompts. Migrate yours over; old values are ignored, nothing breaks.
- Verbosity is labeled endpoint-only; the document outline toggle disables while a harness is the default (harnesses read the workspace themselves).
Landing refresh