Files
oai-swift/oAI/Resources/oAI.help
rune 634b83f284 Add HTML and PDF conversation export
Top item on the roadmap ranking from 2026-07-27 — multi-modal export
alongside the existing Markdown/JSON. New ConversationExportService
consolidates the two previously-duplicated Markdown builders
(ChatViewModel and ConversationListView had separate copies of the
same **User**/**Assistant** + --- format) and adds:

- A hand-rolled Markdown->HTML renderer scoped to what actually shows
  up in chat messages (headers, bold/italic, inline code, fenced code
  blocks, lists, blockquotes, links, horizontal rules) rather than
  full CommonMark/GFM — no existing markdown-to-HTML utility existed
  in the codebase, and swift-markdown-ui is SwiftUI-view-only with no
  HTML-string export API. Content is HTML-escaped before any markdown
  substitution so example code containing "<div>" etc renders as
  visible text, not live markup.
- PDF via an offscreen WKWebView loading that same HTML and calling
  the official createPDF(configuration:) API (macOS 11+) — no new
  project/framework linkage needed, WebKit is a system framework.

Wired into every place Markdown export already existed: File menu
(Export as HTML.../PDF...), /export slash command (now md|html|pdf|json),
and a new Export submenu (Markdown/HTML/PDF) on each conversation row's
context menu in the advanced conversation list, replacing the old
single-format swipe-only export. Help docs and InputBar autocomplete
updated to match.
2026-07-29 07:47:57 +02:00
..

oAI Help Book

This folder contains the Apple Help Book for oAI.

Adding to Xcode Project

  1. Add the help folder to your project:

    • In Xcode, right-click on the Resources folder in the Project Navigator
    • Select "Add Files to 'oAI'..."
    • Select the oAI.help folder
    • Important: Check "Create folder references" (NOT "Create groups")
    • Click "Add"
  2. Configure the help book in build settings:

    • Select your oAI target in Xcode
    • Go to the "Info" tab
    • Add a new key: CFBundleHelpBookName with value: oAI Help
    • Add another key: CFBundleHelpBookFolder with value: oAI.help
  3. Build and test:

    • Build the app (⌘B)
    • Run the app (⌘R)
    • Press ⌘? or select Help → oAI Help to open the help

Structure

oAI.help/
├── Contents/
│   ├── Info.plist              # Help book metadata
│   └── Resources/
│       └── en.lproj/
│           ├── index.html      # Main help page
│           └── styles.css      # Stylesheet
└── README.md                   # This file

Features

  • Comprehensive coverage of all oAI features
  • Searchable via macOS Help menu search
  • Dark mode support
  • Organized by topic with table of contents
  • Keyboard shortcuts reference
  • Command reference with examples
  • Follows Apple Human Interface Guidelines

Customization

To update the help content:

  1. Edit Contents/Resources/en.lproj/index.html
  2. Update styles in Contents/Resources/en.lproj/styles.css
  3. Rebuild the app

Troubleshooting

If help doesn't open:

  • Make sure you added the folder as a "folder reference" (blue folder icon in Xcode)
  • Check that CFBundleHelpBookName and CFBundleHelpBookFolder are set in Info
  • Clean build folder (⇧⌘K) and rebuild

Adding More Pages

To add additional help pages:

  1. Create new HTML files in Contents/Resources/en.lproj/
  2. Link to them from index.html
  3. Include proper meta tags for searchability:
    <meta name="AppleTitle" content="Page Title">
    <meta name="keywords" content="keyword1, keyword2">