Features

AI Sidebar

8 min read
AI Sidebar

AI Sidebar

Your writing just got three expert assistants. The AI Sidebar in RiteMark gives you instant access to the Ritemark Agent for quick text edits, Claude Code for deep document restructuring, and OpenAI Codex for code-aware writing tasks. Switch between them with a dropdown, and they all share the same unified interface.

Claude Code agent in the AI sidebar


Three Agents, One Sidebar

The AI Sidebar hosts three different AI assistants, each with its own strengths. You pick the right tool for the job, and they all work directly with your documents.

Ritemark Agent is the built-in assistant. It's perfect for quick text operations like rephrasing paragraphs, finding and replacing text, or inserting new content at specific positions. No setup required beyond an OpenAI API key.

Claude Code is Anthropic's autonomous coding agent, but it works just as well for writing. Use it when you need to restructure entire documents, research topics and expand sections, or make complex multi-file changes. It reads your files, understands context, and executes changes directly.

OpenAI Codex is OpenAI's coding agent. It's particularly strong for technical documentation, code-heavy content, and API docs. Requires a ChatGPT Plus, Pro, Team, or Business subscription.

To switch agents, click the dropdown at the top of the AI sidebar and select the one you need. Each agent remembers its own conversation history, so you can switch back and forth without losing context.


Plan Mode

Sometimes you want to see what the AI intends to do before it does it. That's where Plan Mode comes in.

Type "plan first" or "show me the plan" in your prompt, and the agent will outline its intended actions as numbered steps. You'll see exactly what changes it plans to make before any files are touched.

Once you review the plan, you have two options: Approve to let the agent proceed, or Reject to cancel and try a different approach. This gives you full control over complex operations.

Tip: Plan Mode is especially useful with Claude Code and Codex when you're asking for significant document restructuring. Review the plan to make sure it matches your intent before approving.


Interactive Questions

AI agents don't always have enough context to complete your request perfectly. Instead of guessing, they now ask clarifying questions mid-task.

When an agent needs more information, it pauses and presents you with selectable options. Pick the one that fits, or choose "Other" to type a custom response. This back-and-forth dialogue helps the agent understand exactly what you want.

For example, if you ask Claude Code to "improve this document," it might ask: "What aspect should I focus on?" with options like "Make it more concise," "Add more technical detail," or "Improve the structure."


File Context Menu

Getting files into your AI conversation is now as easy as right-clicking.

In the Explorer sidebar, right-click any file or folder and select "Send to AI Chat". The file appears as a context chip in your conversation, and the agent can read and reference it directly.

The active file chip automatically shows whichever document you're currently editing. This means the AI always knows what file you're working on without you having to specify it.

RiteMark uses smart deduplication to prevent the same file from being added multiple times. If you accidentally send the same file twice, it recognizes the duplicate and keeps your context window clean.

You can also drag and drop file paths directly into the chat input. All three agents support this workflow.


Context Window Protection

Every AI has a limited context window - the amount of text it can "remember" at once. RiteMark now helps you stay within those limits.

The usage bar at the top of the sidebar shows your estimated context usage. It turns yellow at 60% and red at 80%, giving you visual feedback as your conversation grows.

When you hit 70%, a warning banner appears suggesting you use /compact to summarize the conversation or start a fresh one. This keeps your AI responsive and prevents the dreaded mid-conversation memory loss.

If you push past the limit, RiteMark shows an overflow explanation with a clear "Start Fresh" button. No confusion about what went wrong - just a clear path forward.


Ritemark Agent Tools

The built-in Ritemark Agent includes specialized text editing tools that work with your selected text.

Rephrase Text

Select text in your document and ask the agent to rewrite it. Try prompts like "make this shorter," "more formal," or "simplify for a general audience." The agent rewrites just the selected portion while preserving everything else.

Find and Replace

Replace every occurrence of a word or phrase across your document. Type something like "replace 'user' with 'customer'" and the agent handles all instances at once.

Insert Text

Add new content at specific positions. Ask to "add a summary at the start" or "insert a bullet list after the introduction." The agent figures out the right location and inserts your content.


Setting Up Each Agent

Ritemark Agent

The built-in assistant works with your OpenAI API key. If you haven't set one up yet, head to Set Up AI for instructions. Once configured, Ritemark Agent is ready to use immediately.

Claude Code

Claude Code requires a one-time installation:

  1. Open the terminal in RiteMark (View menu or the >_ icon)
  2. Install the CLI: npm install -g @anthropic-ai/claude-code
  3. Run claude and follow the authentication prompts
  4. Select "Claude Code" from the agent dropdown in the sidebar

Claude Code uses your Anthropic account. You can sign up at anthropic.com if you don't have one.

As of v1.5.0, there is a dedicated Claude Account section in Settings where you can see your authentication method, CLI version, and billing source at a glance. Settings and the AI sidebar sync in real time, so any status change appears immediately in both places. On Windows, binary detection issues that affected earlier versions have been fixed, including .cmd/.exe shim resolution.

OpenAI Codex

Codex requires both CLI installation and a paid ChatGPT subscription:

  1. Install the CLI: npm install -g @openai/codex
  2. Go to RiteMark Settings and sign in with your ChatGPT account (OAuth)
  3. Select "Codex" from the agent dropdown

Note: Codex requires ChatGPT Plus, Pro, Team, or Business. Free ChatGPT accounts won't work.

Starting with v1.5.0, a dedicated ChatGPT Account section in Settings shows your email, plan, and connection status. OAuth login handling has been improved for more reliable sign-in.


Quick Reference

Agent Best For Setup Required
Ritemark Agent Quick text edits, rephrasing OpenAI API key
Claude Code Document restructuring, research CLI + Anthropic account
OpenAI Codex Technical docs, code-heavy content CLI + ChatGPT Plus/Pro
Feature How to Use
Switch agents Dropdown at top of sidebar
Plan Mode Type "plan first" or "show me the plan"
Add file context Right-click file, "Send to AI Chat"
Check context usage Look at usage bar at top
Start fresh Click "Start Fresh" or type /compact

Privacy

Your text is sent to the respective AI provider for processing - OpenAI for the Ritemark Agent and Codex, Anthropic for Claude Code. Your API keys and OAuth tokens are stored securely on your machine. RiteMark has no servers, so no data passes through us.


Troubleshooting

If an agent isn't responding, check these common issues:

Ritemark Agent shows "AI Offline" - Verify your internet connection and that your OpenAI API key is configured in Settings.

Claude Code not appearing - Make sure you've installed the CLI (npm install -g @anthropic-ai/claude-code) and authenticated by running claude in the terminal.

Codex login spinner stuck - Try signing out in Settings and signing back in. If OAuth fails silently, check that you have an active ChatGPT Plus/Pro/Team/Business subscription. In v1.5.0, OAuth handling has been improved to reduce silent failures.

Claude Code not working on Windows - Earlier versions had binary detection issues where .cmd/.exe shims were not resolved correctly, causing "spawn EINVAL" errors. Upgrade to v1.5.0 to fix this. After updating, check Settings -> Claude Account to confirm that Claude Code shows as connected.

Codex not working on Windows - The same binary detection fix in v1.5.0 applies to Codex. Check Settings -> ChatGPT Account for connection status.

Context window warning - Your conversation is getting long. Use /compact to summarize or start a fresh conversation.

Tip: Settings now shows real-time agent status for all three agents. If something looks wrong, the Account sections in Settings are the first place to check.

For more help, see Common Issues.


AI Sidebar