@@ -541,6 +541,22 @@ struct AntiGravity {
541541 ParsedColor bgColor;
542542};
543543
544+ // appearance of the AI chat sidebar, shared by all backends
545+ struct AIChat {
546+ // font of the chat messages; empty uses Segoe UI
547+ Str fontName;
548+ // font size of the chat messages in pixels; 0 means the default (13)
549+ int fontSize;
550+ // line-height multiplier for chat text (e.g. 1.6); 0 means the default
551+ // (1.5). values from 1 to 3 are accepted
552+ float lineSpacing;
553+ // space inside a message box in pixels; -1 means the default (8)
554+ int messagePadding;
555+ // if true, your questions and the replies are shown in message boxes;
556+ // if false, as plain text separated by lines
557+ bool bubbles;
558+ };
559+
544560// customization options for the ebook UI (EPUB, MOBI, FB2, PDB and
545561// plain text)
546562struct EBookUI {
@@ -1000,6 +1016,8 @@ struct Settings {
10001016 CodexBuild codexBuild;
10011017 // settings for the Antigravity chat sidebar
10021018 AntiGravity antiGravity;
1019+ // appearance of the AI chat sidebar, shared by all backends
1020+ AIChat aiChat;
10031021 // customization options for the ebook UI (EPUB, MOBI, FB2, PDB and
10041022 // plain text)
10051023 EBookUI eBookUI;
@@ -1610,6 +1628,24 @@ static const StructInfo gAntiGravityInfo = {
16101628 " (agy cannot prompt for permissions with -p)\0 background color of the Antigravity chat panel" ,
16111629 false };
16121630
1631+ static const FieldInfo gAIChatFields [] = {
1632+ {offsetof (AIChat, fontName), SettingType::String, (intptr_t )" " },
1633+ {offsetof (AIChat, fontSize), SettingType::Int, 0 },
1634+ {offsetof (AIChat, lineSpacing), SettingType::Float, (intptr_t )" 0" },
1635+ {offsetof (AIChat, messagePadding), SettingType::Int, -1 },
1636+ {offsetof (AIChat, bubbles), SettingType::Bool, true },
1637+ };
1638+ static const StructInfo gAIChatInfo = {
1639+ sizeof (AIChat),
1640+ 5 ,
1641+ gAIChatFields ,
1642+ " FontName\0 FontSize\0 LineSpacing\0 MessagePadding\0 Bubbles" ,
1643+ " font of the chat messages; empty uses Segoe UI\0 font size of the chat messages in pixels; 0 means the default "
1644+ " (13)\0 line-height multiplier for chat text (e.g. 1.6); 0 means the default (1.5). values from 1 to 3 are "
1645+ " accepted\0 space inside a message box in pixels; -1 means the default (8)\0 if true, your questions and the replies "
1646+ " are shown in message boxes; if false, as plain text separated by lines" ,
1647+ false };
1648+
16131649static const FieldInfo gAnnotationsFields [] = {
16141650 {offsetof (Annotations, highlightColor), SettingType::Color, (intptr_t )" #ffff00" },
16151651 {offsetof (Annotations, underlineColor), SettingType::Color, (intptr_t )" #8bf05d" },
@@ -2275,6 +2311,8 @@ static const FieldInfo gSettingsFields[] = {
22752311 {(size_t )-1 , SettingType::Comment, 0 },
22762312 {offsetof (Settings, antiGravity), SettingType::Struct, (intptr_t )&gAntiGravityInfo },
22772313 {(size_t )-1 , SettingType::Comment, 0 },
2314+ {offsetof (Settings, aiChat), SettingType::Struct, (intptr_t )&gAIChatInfo },
2315+ {(size_t )-1 , SettingType::Comment, 0 },
22782316 {offsetof (Settings, aiChatSidebarDx), SettingType::Int, 0 , true },
22792317 {(size_t )-1 , SettingType::Comment, 0 },
22802318 {offsetof (Settings, translateToLang), SettingType::String, (intptr_t )" " , true },
@@ -2324,7 +2362,7 @@ static const FieldInfo gSettingsFields[] = {
23242362};
23252363static const StructInfo gSettingsInfo = {
23262364 sizeof (Settings),
2327- 165 ,
2365+ 167 ,
23282366 gSettingsFields ,
23292367 " \0\0 DefaultDisplayMode\0 DefaultZoom\0 DisableJavaScript\0 AllowExternalImages\0 EnableTeXEnhancements\0 EscToExit\0 Ful"
23302368 " lPathInTitle\0 InverseSearchCmdLine\0 LazyLoading\0 MainWindowBackground\0 NoHomeTab\0 HomePageSortByFrequentlyRead\0 Ho"
@@ -2342,11 +2380,11 @@ static const StructInfo gSettingsInfo = {
23422380 " ntSize\0 UIFontSize\0 DisableAntiAlias\0 EngineeringDrawingEnhance\0 DisableAutoLinks\0 UseSysColors\0 UseTabs\0 Selectio"
23432381 " nToolbar\0 SelectionToolbarLayout\0 TabsMru\0 CtrlTabSimple\0 ZoomLevels\0 ZoomIncrement\0\0 FixedPageUI\0\0 EBookUI\0\0 C"
23442382 " omicBookUI\0\0 ImageUI\0\0 ChmUI\0\0 MarkdownUI\0\0 HtmlUI\0\0 ClaudeCode\0\0 GrokBuild\0\0 CodexBuild\0\0 AntiGravity\0\0 "
2345- " AIChatSidebarDx \0\0 TranslateToLang\0 TranslateFromLang\0 TranslateEngine\0\0 Annotations\0\0 ExternalViewers\0\0 Forwar "
2346- " dSearch \0\0 PrinterDefaults\0\0 Fullscreen\0\0 SelectionHandlers\0\0 TextSnippets\0\0 Shortcuts\0\0 Themes\0\0 TabGroups "
2347- " \0\0 CustomScreenDPI\0\0\0 DefaultPasswords\0 UiLanguage\0 VersionToSkip\0 WindowState\0 WindowPos\0 SearchUIWindowPos \0 A "
2348- " nnotationsWindowShowNote \ 0 HelpWindowPos\0 FileStates\0 SessionData\0 ReopenOnce\0 TimeOfLastUpdateCheck\0 OpenCountWeek "
2349- " \0 PropWinPos\0 CheckForUpdates\0\0 " ,
2383+ " AIChat \0\0 AIChatSidebarDx \0\ 0 TranslateToLang\0 TranslateFromLang\0 TranslateEngine\0\0 Annotations\0\0 ExternalViewers"
2384+ " \0\0 ForwardSearch \0\ 0 PrinterDefaults\0\0 Fullscreen\0\0 SelectionHandlers\0\0 TextSnippets\0\0 Shortcuts\0\0 Themes\0\0 "
2385+ " TabGroups \0\0 CustomScreenDPI\0\0\0 DefaultPasswords\0 UiLanguage\0 VersionToSkip\0 WindowState\0 WindowPos\0 SearchUIWin "
2386+ " dowPos \0 AnnotationsWindowShowNote \ 0 HelpWindowPos\0 FileStates\0 SessionData\0 ReopenOnce\0 TimeOfLastUpdateCheck\0 Open "
2387+ " CountWeek \0 PropWinPos\0 CheckForUpdates\0\0 " ,
23502388 " \0\0 default layout of pages. valid values: automatic, single page, facing, book view, continuous, continuous "
23512389 " facing, continuous book view, page aspect. page aspect (3.7+): first open of a PDF, XPS, DjVu, PostScript or DVI "
23522390 " file uses page 1 — taller than wide is continuous + fit width, wider than tall is single page + fit page; a "
@@ -2469,11 +2507,12 @@ static const StructInfo gSettingsInfo = {
24692507 " otherwise WebView2 browser view is used when available\0\0 customization options for HTML UI. If UseFixedPageUI is "
24702508 " true, MuPDF is used; otherwise WebView2 browser view is used when available\0\0 settings for the Claude Code chat "
24712509 " sidebar\0\0 settings for the Grok Build chat sidebar\0\0 settings for the OpenAI Codex chat sidebar\0\0 settings for "
2472- " the Antigravity chat sidebar\0\0 width of the AI chat sidebar (0 = use default); shared by Claude Code, Grok "
2473- " Build, and OpenAI Codex (internal)\0\0 remembered destination language for selection translation; empty uses OS UI "
2474- " language\0 remembered source language for selection translation; empty means Auto\0 remembered engine for Translate "
2475- " Selection: Google, DeepL, Grok Build, Claude Code, OpenAI Codex or Antigravity\0\0 default values for annotations "
2476- " in PDF documents\0\0 list of additional external viewers for various file types. See [docs for more "
2510+ " the Antigravity chat sidebar\0\0 appearance of the AI chat sidebar, shared by all backends\0\0 width of the AI chat "
2511+ " sidebar (0 = use default); shared by Claude Code, Grok Build, and OpenAI Codex (internal)\0\0 remembered "
2512+ " destination language for selection translation; empty uses OS UI language\0 remembered source language for "
2513+ " selection translation; empty means Auto\0 remembered engine for Translate Selection: Google, DeepL, Grok Build, "
2514+ " Claude Code, OpenAI Codex or Antigravity\0\0 default values for annotations in PDF documents\0\0 list of additional "
2515+ " external viewers for various file types. See [docs for more "
24772516 " information](https://www.sumatrapdfreader.org/docs/Customize-external-viewers)\0\0 customization options for how "
24782517 " forward search results are shown (used from LaTeX editors)\0\0 these override the default settings in the Print "
24792518 " dialog\0\0 options for fullscreen mode\0\0 list of handlers for selected text, shown in context menu when text "
0 commit comments