Skip to content

Latest commit

 

History

History
492 lines (415 loc) · 47.2 KB

README.md

File metadata and controls

492 lines (415 loc) · 47.2 KB

HelpChatAI for Delphi

License: Apache Latest release Delphi 10.4+ Platform: VCL and FMX Microsoft Edge WebView2 Windows 10 and 11

Delphi Support

Related links: https://www.embarcadero.com/ - https://learndelphi.org/


An in-app AI help assistant for your VCL and FireMonkey applications

Your users do not read the manual: they ask. HelpChatAI puts a chat bubble in the corner of your application, answers "how do I export this grid?" from your own documentation, and knows which screen the user is on while answering. F1 opens it, through the standard Delphi help system, so the HelpKeyword you already wrote keeps working.

Component Description
TVclHelpChatAI TVclHelpChatAI is the VCL component: drop it on the main form - or on any form that deserves an expert of its own - set Active, and you have the bubble, F1 contextual help and the chat panel (a WebView2 TEdgeBrowser), either in its own tool window or embedded in a container of yours. Colours follow the active VCL style. Available from Delphi 10.4 to Delphi 13
TFmxHelpChatAI TFmxHelpChatAI is the FireMonkey twin (Delphi 12+): same settings, same engine, the chat in a TWebBrowser. F1 through the host form's OnKeyDown, light/dark theme instead of VCL styles. Available only from Delphi 12 to Delphi 13

Documentation

The Project Site has thirty-seven pages of documentation, from an empty form to a working chat in the Quick Start to a step-by-step anatomy of a conversation. They cover the VCL and FireMonkey components and their component editor, the providers and the models (Claude, OpenAI, Gemini, local models), several assistants with their profiles, the documentation index, the actions and the skills, attachments, PDF and clipboard, languages, theming, the configuration and its check, running the engine on a server, and security and privacy - with a reference of every property and setting, and the FAQ.


How it works

  1. You build a documentation index (help-index.json) from the Markdown pages of your manual, with the HelpIndexBuilder tool.
  2. The user asks. The component adds the screen context — the active form, its caption, the HelpKeyword/HelpContext of the focused control, the active tab.
  3. A provider answers. docsearch finds the right page offline and quotes it, with no API key at all; claude, openai and gemini read the pages the retriever found and answer from those, citing the source and saying when they do not know.
  4. The reply streams into the panel token by token, rendered as safe HTML. Nothing ever runs on the UI thread, and the user can stop it.
  5. If you let it, the assistant can also act: you register the actions your application allows, and it calls them on the main thread, asking the user first when they change data. Some it already knows, as skills you only have to name: Settings.Skills := 'forms, commands, records, pages' lets it read and fill the form the user is on - every field with its label, type, rules and hint, data-aware ones included - press its buttons, find a record of its lists and show one of its tabs, always asking first and never saving: the user reviews and saves.
  6. And it can read a document the user hands it: a paper clip next to the question box takes a PDF, an image or a text file. Together with an action, that is a PDF filling a form without anybody retyping it. Off until you turn it on, because an attachment leaves the machine.
  7. What it answered does not stay in the panel. Every answer, the whole conversation and every page of the manual can be copied — as text and as HTML, so a table pasted into Word is still a table — or saved as a PDF, laid out by a stylesheet of yours and headed with the name of your application, the user and the page number.

The engine knows nothing about the UI: it runs inside your application or on a HelpChatAI server, chosen in a configuration file, so the model API key never has to reach the user's machine. When it has to, every key has two nodes in the configuration: ApiKey in clear, which you develop with and the IDE reads, and ApiKeyEncrypted, which your application writes with its own cipher and decrypts in OnDecryptSecret at run time. A file you deploy carries only the encrypted one.

Providers

Provider Needs Streams Actions
docsearch the documentation index, no key no no
claude ANTHROPIC_API_KEY yes yes
openai OPENAI_API_KEY, nothing for a local model yes yes
gemini GEMINI_API_KEY or GOOGLE_API_KEY yes yes

openai is wider than its name: Chat Completions is the API that Azure OpenAI, Groq, OpenRouter, Mistral, DeepSeek, Ollama and LM Studio also speak, so BaseUrl and Model are enough to point the same provider at any of them — including a model running on the user's own machine, where nothing leaves the PC.

More than one model

Models in helpchatai.json lists the models the user may switch between from the panel: each one has a name, a provider, and the model, endpoint and key it adds to that provider's section when they differ — three local models on one Ollama are three entries on openai. SelectedModel names the one in use at start; the choice made in the panel is remembered per user. The header shows the icon of the model in use (deduced from the model name, then from the endpoint, then from the provider; Icon overrides it), with name and model as the tooltip, and with more than one model a click on it opens the list. With no list, Provider alone is the one model and nothing can be switched.

{
  "SelectedModel": "Claude",
  "Models": [
    { "Name": "Claude", "Provider": "claude", "Model": "claude-haiku-5-5" },
    { "Name": "Gemini", "Provider": "gemini", "Model": "gemini-3.5-flash-lite" },
    { "Name": "Gemma (local)", "Provider": "openai", "Model": "gemma4:12b", "BaseUrl": "http://localhost:11434/v1" }
  ]
}

The icons of the providers and models are those of lobe-icons (MIT); the logos themselves are trademarks of their respective owners.

More than one assistant: profiles

A large application can have several assistants, each the expert of one part of it, and active at the same time: a general one on the main form, and one on the form of an important function - order entry, planning - with its own name, its own field of expertise and instructions, its own part of the manual, its own models and the actions only it may run.

  • One component per form, one Profile per assistant. The component lives on the form that owns it: its bubble is there, and F1 goes to the assistant of the active form - on a form with none (a dialog, a print preview), to the one whose form was active last. CurrentAssistant says which one that is. One help viewer and one message hook serve them all.
  • One configuration file, a root and a section per assistant. The root holds what every assistant shares (keys, endpoints, the catalogue of models); "Profiles" holds, under the Profile of each component, what that assistant changes, with the same keys. Within a file the profile wins over the root.
  • An expert knows an area of the manual. One manual, one index: the area of a page is its sub-folder (or the areas: of its front matter), and DocAreas says which areas an assistant answers from. The pages of no area belong to everybody.
  • Actions belong to the form that registers them, plus those the whole application shares (HelpChatSharedActions); AllowedActions in a profile narrows them, and can never add one the code did not register.
  • Two windows of the same profile are one assistant: one engine, one conversation, the index loaded once, while an action still fills the window it was asked from. Each profile keeps its own conversation, choices and window position.
{
  "Claude": { "ApiKey": "sk-ant-..." },
  "Models": [
    { "Name": "Claude", "Provider": "claude", "Model": "claude-haiku-5-5" },
    { "Name": "Gemma (local)", "Provider": "openai", "Model": "gemma4:12b",
      "BaseUrl": "http://localhost:11434/v1" }
  ],
  "Profiles": {
    "Orders": {
      "AssistantName": "Jack",
      "Expertise": "order management and shipping",
      "Instructions": "Help the user enter orders, their lines, discounts and shipping.",
      "DocAreas": ["Orders", "Customers"],
      "Models": ["Claude"],
      "AllowedActions": ["create_order", "open_screen"]
    }
  }
}

All of this is edited from the IDE too: Configuration..., the first verb of both component editors (and what a double click opens), shows every setting with the value in force and where it comes from - the library, the component, a file and its root or profile - and writes it to the profile, to the root of a file or to the component. Its pages follow what you are deciding: Appearance (the icon, the name, the greeting and the style sheet, beside a live preview of the chat in the light or the dark theme), Settings, Prompt (the texts the model is told, in the order it reads them, beside the prompt they build), Models, Profiles and Documents (the PDF). It edits keys in their clear node only, and never puts one in the form file. The VCL and FireMonkey editors are two native views over one controller.

Commands

A line that starts with / in the question box is a command, answered without the model: /who (assistant, model, provider, endpoint), /use name and /retry [name] (switch, ask again), /lang code (the language of the chat), /search words (the pages the answer would be grounded on), /pages and /doc page, /context (the screen F1 knows), /actions (what the assistant can do here), /skills (its skills, what each does), /check (the configuration check), /stats, /clear, /pdf, /copy, /attach, /help. EnabledCommands on the component is the set the panel accepts: all of them by default except /prompt, which shows the instructions and excerpts the last question went with, and /run action name=value, which runs a registered action by hand (with the usual confirmation). Every answer starts with what it answers, e.g. "Available actions (/actions):".

Everything the panel does can be done from code on the component: ExecuteCommand(hccActions) shows an answer in the panel (any command, enabled or not), ExplainCommand(hccActions) returns it as text without opening anything, and ClearConversation, SelectModel, Models, RetryLastQuestion, SaveConversationPdf, CopyLastAnswer and AttachFile do what their buttons do.

Setup for automatic installation of components

An "Installer" ready to use is located in the Release area: Download the Installer.

The Installer automatically detects your Delphi versions, installs sources, builds and installs packages and adds source paths.

Setup

To do it by hand instead:

  • open the group project of your version under packages/ — Delphi13, Delphi12, Delphi11 or Delphi10.4
  • build it and install dclHelpChatAIVcl (and dclHelpChatAIFmx, from Delphi 12), then add source and Ext/MarkdownProcessor/source to the library path.

packages/BuildAllPackages.ps1 builds them from a command line, every installed version or the ones named with -DelphiVersion D13,D12; BuildAllPackagesD13.ps1 (and D12, D11, D10.4) does one version.

Ship WebView2Loader.dll (Redist/WebView2/x86|x64) next to your executable; the WebView2 runtime itself is already part of Windows 11 and of every machine with Edge.

Installation with DPM (Delphi Package Manager)

The library is also published on delphi.dev as the package EtheaDev.HelpChatAI (Delphi 10.4 to 13, Win32 and Win64): you can install it with DPM, the Delphi Package Manager, as an alternative to the Setup. From the IDE, right click on your project in the Project Manager and choose Manage DPM Packages, or from the command line:

dpm install EtheaDev.HelpChatAI <path of your project>.dproj

DPM downloads the package, builds it for the Delphi version and the platforms of your project and adds it to the project. Its dependencies are installed automatically: EtheaDev.MarkdownProcessor from delphi.dev and Indy from your Delphi installation.

Supported Delphi versions

Framework Versions Verified
Engine (RTL only) Delphi 10.4 Sydney → 13 Florence packages built with each compiler
VCL (TEdgeBrowser) Delphi 10.4 → 13 built on all four, run on 13
FMX (TWebBrowser) Delphi 12 → 13 built on both, run on Windows

FireMonkey compiles for macOS, iOS and Android, but only Windows has been tried so far.

Packages

One folder per Delphi version, the same .dpk for all of them.

Package Requires Contents
HelpChatAI (runtime) rtl, dbrtl, MarkdownProcessor the engine, the index builder, the panel page, the rules of the skills
HelpChatAIServer (runtime) HelpChatAI, Indy the transports: local server, remote server, remote client, host channel
HelpChatAIVcl (runtime) HelpChatAIServer, vcl, vclwinx, vcledge, dbrtl, vcldb TVclHelpChatAI, the chat control, VCL style theming, the VCL skills
dclHelpChatAIVcl (design-time) HelpChatAIVcl, designide palette, splash and About box, component editor with the configuration editor and the live preview, property editors
HelpChatAIFmx (runtime) HelpChatAIServer, fmx, dbrtl TFmxHelpChatAI and its chat control, the FireMonkey skills
dclHelpChatAIFmx (design-time) HelpChatAIFmx, designide palette, component editor with the configuration editor, the live preview and the configuration check

Demo and tests

CRM Demo is the Windows 10 CRM demo of Embarcadero with HelpChatAI in it: a real little application — leads, accounts, proposals — with a manual of sixteen pages in CRM Demo\Help and the assistant answering from it. Press F1 on any screen, or ask it to open a screen, create a lead or prepare a proposal. All of them name the four skills too, so they can fill, on any window, the fields no action was written for.

There are four demos: the application in both frameworks, each in two editions, all sharing one data module, one database and one manual, located in CRM Demo:

Project Delphi What it is
VCL VCL_CRMDemo.dproj 10.4→13 The whole application, with one assistant: seven pages, the lead and proposal windows, and all four actions
FMX FMX_CRMDemo.dproj 12→13 The same application in FireMonkey: the seven pages, the lead, proposal and draft windows, and the same four actions
VCL, multi-assistant VCL_CRMDemo_MultiAgent.dproj 10.4→13 The same sources with MULTIAGENT defined: a general assistant on the main form and a Sales one on the lead window, each answering from its own area of the manual, and an action (draft_proposal) that only the Sales assistant may use
FMX, multi-assistant FMX_CRMDemo_MultiAgent.dproj 12→13 The same two assistants in FireMonkey

Start from the plain editions; the multi-assistant ones show profiles at work, and that the configuration, not the code, decides which assistant may use an action.

None of them keeps the API key in clear: CRM Demo\common\uAppSecret.pas encrypts it with DCPcrypt (an svn:external of the demo, no package of the library requires it) and the License activation window asks for it the first time, when no key is found anywhere. Tools\ResetDemoKey.ps1 puts that back to "no key", to show it again.

CRM Demo\BuildAllDemos.ps1 builds all four with every Delphi it finds, Win32 and Win64: twenty-four builds, and the FireMonkey ones are reported N/A below Delphi 12 rather than failed.

Test/Delphi13/HelpChatAITests.dproj is a DUnitX suite of 616 tests that runs without network: store, worker pool, cancellation, index scoring and the areas of a manual, Markdown safety, profiles and the configuration editor's controller, several assistants on real forms and the engine they share, the skills on real forms over an in-memory data set, the SSE parsing and request building of each model provider, the configuration check, both transports over real HTTP, the actions from a real worker thread, the secrets of the settings and the printable document - the last two of which write a real PDF with the WebView2 runtime of the machine, and skip themselves where there is none.

Test\Bin\Win32\HelpChatAITests.exe --exitbehavior:Continue

Release Notes

20 Nov 2026: ver. 2.1.0

  • Actions and skills with a remote engine: the application declares them to its session, the model on the server calls them, and each call comes back to run in the application - its main thread, its confirmation dialog - with only the outcome going to the server. Nothing changes in the code that registers them; it needs the host channel
  • Server: ClientActions ("ClientActions": false in helpchatai-server.json) refuses the actions of the clients, and AllowedActions of the server's configuration narrows them, per profile
  • Configuration editor: the hint of the provider key shows no character of a key of eight characters or fewer
  • VCL skills read LiveBindings, as the FireMonkey ones do: a control a link binds is a field of its TField, a grid it fills is a list, and a TBindNavigator never offers Post, nor moves while a record is being edited
  • The screen context is the form the user is working on, also when the chat has the focus (it was the host form), and it follows the user while the panel is open
  • The language rule says it in so many words: reply in the language of the chat even when the user writes in another one
  • CRM demos: the actions of the assistant are declared once, in common\uCRMActions, and what they do to the data is in the data module; each main form keeps only the visual part

18 Nov 2026: ver. 2.0.0

  • A review of the whole library before 2.0, with no new features: the defects it found are fixed, and the suite grew to 612 tests
  • Security: a key is never sent to another address than its own (no HTTP redirect is followed); a saved PDF loads no image from outside; the remote server refuses an oversized request before asking for the key
  • Models: a reply cut at the limit of tokens says so, and MaxTokens is 4096 by default (it was 1024); a long conversation no longer fails from the 26th question on; the refusals of compatible servers and of the OpenAI models that do not reason are handled
  • Skills and actions: reading a screen never saves or moves a record being edited, and a field shown as a password is neither searched nor reported; a call whose arguments were cut is not run; the confirmation fits the screen, with Yes and No in the language of the chat
  • Panel: a question waits for the file still going up; a reply that will not arrive shows an error; a reload keeps the question being written and the open documentation page
  • Remote server: a panel left open loads again on a new session; the console server saves the conversations when its window is closed
  • VCL and FireMonkey: the chat window opened from a dialog of a dialog, a HostForm that is destroyed, the PDF export, the design-time preview and the floating bubble; FireMonkey keeps ImageIndex and ImageName in step and has a file dialog for ConfigFileName
  • Configuration editor: it opens on the Models page while no model is configured, and that page takes the API key of the provider too; no Icon field (deduced, one written by hand stays) and no stub among the providers; it remembers its size, position and page across restarts of the IDE; an empty configuration file is a new one - Save creates it, and at run time it is no error
  • Changes in behaviour: a picture attached may not exceed 3.6 MB; a remote session no longer runs /check, and an anonymous conversation is not written to disk; a relative ConversationFile is resolved against the executable; the configuration editor refuses a text that is not a whole number
  • Files that change name, so that their conversation starts empty once: those of a profile written in a non-Latin alphabet, and on a remote server those of a user id longer than about 58 characters
  • The index builder encodes spaces and parentheses in the link of a page (Price%20list.md): rebuild an index that has such file names

17 Nov 2026: ver. 1.13.0

  • The question is translated for the search: with a DocLanguage different from the chat, the model in use turns it into search terms in the language of the manual (TranslateSearch, on by default; SearchTermsPrompt) - the right page among the 3 for 20 Italian questions of 21, against 12
  • The language of the chat decides the language of the answer, whatever language the question is in (LanguageRule)
  • /prompt: a title over each box, and the search terms of the question
  • THelpChatProviderBase.CompleteText: one short request, for a provider of the application
  • Logging: Settings.LogLevel (llNone, llInfo, llDetail, llDebug) and OnLogEvent on both components; HelpChatOnLog for code with no component. The CRM demos write it to a file with Logify
  • 551 tests

16 Nov 2026: ver. 1.12.0

  • Skills: ready-made sets of actions an assistant gets by naming them in Settings.Skills - forms, commands, records and pages, in the VCL and in FireMonkey (LiveBindings included); /skills lists them. HelpChatAI requires dbrtl, HelpChatAIVcl dbrtl and vcldb
  • Configuration editor: the skills are ticks, with their actions and description
  • BubbleStayOnTop: the bubble of the main form stays in front of every form, modal ones included, and may be dragged outside the form (VCL, and FMX on Windows)
  • Assign on both components; the design-time preview copies every property, the icon included
  • The lists of models and languages in the panel work from the keyboard and scroll
  • Actions.Add returns the action; THelpChatAction.OnDisplay for a readable confirmation
  • Fixed: the preview of the Appearance page was empty until something changed
  • Fixed: claude sends the thinking of the model back with the results of its actions: the Claude 5.5 models think by default
  • Prompt caching: the system prompt stays the same and now, the screen and the excerpts go with the question (claude, openai, gemini), so the tools, the rules and the conversation are read from the cache of the service (claude: -31% input billed on the benchmark); Claude.PromptCaching, NowRule, HelpChatOnTokenUsage
  • IdentityRule no longer says now: NowRule does (a rule with %1:s still gets it)
  • CRM demos: the bubble of the main form stays in front; the VCL one has no custom title bar, and restoring its maximized window keeps it on the screen
  • 527 tests

15 Nov 2026: ver. 1.11.0

  • The texts of the prompt are properties of Settings (SystemPrompt, IdentityRule, ExpertiseIntro, ExpertiseRule, LanguageRule, DocLanguageRule)
  • OnBuildSystemPrompt: the last word on the system prompt of each request
  • HelpChatSetMsg: replace any message of the library, without a resource DLL
  • Configuration editor: six pages, every published setting, a live preview of the panel and of the prompt
  • Six more built-in icons, ten in all (THelpChatAssistantIcon)
  • 491 tests

14 Nov 2026: ver. 1.10.0

  • Expertise: the field the assistant knows beyond the manual
  • The system prompt opens with the name of the assistant, the date and the time
  • CRM demos: a multi-assistant edition (*_CRMDemo_MultiAgent)
  • Test HelpChat... on the FireMonkey component too; the preview keeps a conversation per project
  • VCL: ImageIndex and ImageName kept in step; the preview window sized for its monitor
  • A component just dropped on a form no longer stores the default settings in the form file
  • 478 tests

13 Nov 2026: ver. 1.9.0

  • Configuration editor reviewed: the In use column always shows the value in force, styled as in the Object Inspector; a control per kind of setting; Remove from the component
  • The bubble can be dragged anywhere on its form and is found there again (BubbleDraggable, ResetBubblePosition)
  • 475 tests

13 Nov 2026: ver. 1.8.0

  • OnModelChanged on both components: the user switched model in the panel (the badge, or /use), or code did with SelectModel. The local server raises the UI command model (HELPCHAT_UI_MODEL) for it, the way it raises language
  • RunSettings is public on both components: the settings in force, with the model the user picked applied - what to read to know which model, provider and key the assistant is using now
  • The panel offers only the models that could answer: a model of the list whose provider reports something missing (claude and gemini with no key, openai with no key unless its endpoint is on this machine or a private network, docsearch with no index) is left out, except the one in use; at start the engine never picks such a model while another can answer. HelpChatModelIsConfigured is the test, Models on the components and the engine apply it, SelectModel still accepts any model of the list, and the page asks for the list again when it gets the focus
  • openai wants a key for every endpoint on the internet, not only for api.openai.com: only a server on this machine or on a private network (HelpChatIsLocalEndpoint) is spared, so a model on Groq or OpenRouter without its key is reported by the configuration check and not offered in the panel
  • The github icon, for a model of the catalogue that names it
  • New default models, the best for in-app help in the benchmark (Test\LLMBench): claude-haiku-5-5 (was claude-haiku-4-5) and gemini-3.5-flash-lite (was gemini-3.8-flash, four times slower and no more accurate); gpt-6-luna stays. A configuration that names its model is not affected
  • openai speaks the Responses API to OpenAI itself: in Chat Completions the GPT-6 models refuse actions with their reasoning on, which broke every question with actions on the default gpt-6-luna - and gpt-6.1-sol refuses them in every combination. With Responses they reason and act together; the requests stay stateless (store: false), the encrypted reasoning of a round going back with the results of its actions. OpenAI.Api (responses, chat, empty = by the endpoint) forces one; every other service (Ollama, Groq, OpenRouter, Azure) keeps Chat Completions, where a refusal that asks for reasoning_effort: 'none' is answered by repeating the round with it (AsksForNoReasoning)
  • The automatic source line is no longer added to a refusal: only a page the words of the question reach by themselves is cited by the engine, not one the screen alone brought - asked about the weather on the Dashboard, a model declined naming the Dashboard, and the Dashboard became the source of a refusal
  • CRM demos: a catalogue of their own (Claude, Gemini, OpenAI), so each developer sees the services they have a key for. The License activation window opens when the model in use has no key - at startup and when the user switches to a model that has none - and offers a field for each service (Claude, Gemini, OpenAI), the one of the model in use in bold: the user registers that key and any other, and a field left empty changes nothing. The provider decides whether a key is missing, so docsearch and a local server never ask; the key goes to the section of the provider, or to the entry of the catalogue when that model has an endpoint of its own. Tools\ResetDemoKey.ps1 warns about every key variable, not only ANTHROPIC_API_KEY
  • 464 tests

11 Nov 2026: ver. 1.7.1

  • Compatibility with Delphi 13.2

11 Nov 2026: ver. 1.7.0

  • Several assistants in one application, each the expert of one part of it, active at the same time: one component per form, and the component lives on the form that owns it - its bubble, its window, its F1
  • F1 goes to the assistant of the active form; on a form that has none (a dialog, a print preview) to the one whose form was active last. One help viewer and one message hook serve every assistant of the process; CurrentAssistant (class function) and ResolvedHostForm on both components. In FireMonkey each component keeps chaining the OnKeyDown of its own form, and HandleKeyDown from a form without an assistant reaches the current one
  • Profile on both components and "Profiles" in helpchatai.json: one configuration file, a root every assistant shares and a section per assistant with the same keys, applied on top of the root. AssistantName may be set in the configuration and prevails over the property
  • Instructions (what the assistant is, added to the system prompt after the built-in rules) and SystemPrompt move to the root of the settings: switching model no longer changes the expert
  • What the panel switches between is a model: Settings.Assistants / Assistant become Models / SelectedModel, and SelectAssistant, Assistants, THelpChatAssistantInfo become SelectModel, Models, THelpChatModelInfo. In a profile a model may be just the name of one of the catalogue at the root
  • One engine per profile (THelpChatEngines): two windows of the same profile share one conversation and load the index once. The actions of a component travel with each of its questions (IHelpChatTransport.SetActions, THelpChatEngine.Send with AActions), so an action fills the window it was asked from
  • Conversation, model and language choice, and window position are kept per profile (helpchatai-conversation-<Profile>.json...); the default assistant keeps the file names it had
  • Areas of the manual: the area of a page is its sub-folder or the areas: of its front matter, HelpIndexBuilder writes them into the index, and Settings.DocAreas says which ones an assistant answers from. Pages of no area belong to everybody; a manual without sub-folders gives the index it always gave
  • Actions of one assistant and of all: HelpChatSharedActions holds the actions every assistant may use (UseSharedActions on the components), and Settings.AllowedActions narrows own and shared alike - a configuration can take an action away, never add one
  • Every secret has two nodes: ApiKey in clear, which the developer writes and the IDE reads, and ApiKeyEncrypted, which the application writes and decrypts in OnDecryptSecret at run time, where it wins when present. The same for a model of the catalogue, Remote.AppKey and Remote.UserToken. The CRM demos write ApiKeyEncrypted
  • The configuration editor: Configuration..., the first verb of both component editors and what a double click opens, edits one configuration file at a time, at its root or in the profile, shows every setting with the value in force and where it comes from, and edits the catalogue of models and the profiles. Keys in their clear node only, masked, never into the form file. The VCL and FireMonkey editors are two native views over one controller (HelpChatAI.ConfigController); the VCL one follows the light or dark theme of the IDE
  • PanelStyleSheet on both components: a CSS file of the application, added to the page of the chat after its own - a radius, a spacing, a button hidden - without rebuilding the library. It reaches OnGetTheme as ATheme.StyleSheet, where code may change it or add CSS of its own, and travels with the theme, so it reaches a remote engine too. A named file that is not there stops the activation
  • Links read on every style: --hc-link (THelpChatTheme.Link) is the accent when it stands out from the assistant bubble, otherwise the accent moved towards the text until it does - Windows10 and Carbon used to show links nobody could see. The send button takes the colour of the user's bubble, which no longer vanishes into the footer
  • An × at the top right of every system bubble (the answer of a slash command, a notice) removes it from the chat
  • A key never follows a model to another address: a model of the catalogue served by another host than its section's endpoint, and with no key of its own, is called with no key at all, and the environment variable (OPENAI_API_KEY...) is read only while the endpoint is the service's own. Settings.ConfiguredProvider is what the configuration says, while Provider reads as the provider of the model in use
  • Two assistants may live on the same form; the confirmation of an action is one dialog per assistant (a question of another assistant opens over the open one, Asker in the request); the actions of an assistant that was deactivated answer "cancelled" at once (HostActive on the broker)
  • The steps of a reply (MaxToolRounds) are requests: with one, no action is declared to the model, and when the last one still asks for an action the reply says it was not run. Servers that speak the OpenAI API and end a tool turn with stop now run their actions; the API error names the service that answered it
  • The configuration check: the provider of the model in use, DocAreas against the areas of the index, a profile no configuration file defines (HelpChatCheckProfile), the names of AllowedActions nobody registered (HelpChatCheckActions, in /check), and the per-user file at design time too
  • The configuration editor never writes over a file it could not read (LoadError), a renamed model keeps its encrypted key, and the models a profile takes from another file or defines itself are shown and kept; it opens on the file the configuration comes from - no longer always on the one next to the executable, empty while everything was in the shared file - and has a Help button
  • A remote session the server expired is opened again by itself, and the panel reloads; the server says at its start when no OnAuthenticate is set. Remote sessions are no longer freed under a request that is using them
  • The profiles on a remote server: the client sends the Profile of the component, and the server answers with one engine per profile of its configuration, created by the first session that names it (OnProfileSettings; the console server takes the Profiles of helpchatai-server.json). A profile the server does not define gets its default engine; the same user has one conversation per assistant, and one file each with disk storage; /health lists the profiles running
  • The texts of the panel, of the commands and of the dialogs follow the language of their own assistant, not the last one that spoke; the header button and /who, /use, /retry say "model" in the six languages
  • areas: in the front matter may be a YAML block list, and an empty one means no area; a text attachment that contains a code fence can no longer close the one around it
  • Breaking changes: the host of a component is the form that owns it, no longer Application.MainForm (HostForm := Application.MainForm restores it); Assistants, Assistant and <Provider>.SystemPrompt in a configuration file raise an error that names the new key; the key properties (ApiKey, AppKey, UserToken) are public and no longer published, so a form file that stored one does not load it; OnDecryptSecret receives only the encrypted node, never a clear value nor the environment variable - an encrypted value kept in ApiKey moves to ApiKeyEncrypted; RawApiKey is now EnvironmentApiKey; a section whose BaseUrl is not the service's own no longer receives the key of the environment variable - write its ApiKey in the configuration (Azure OpenAI, a gateway); MaxToolRounds = 1 no longer offers actions
  • 452 tests

9 Nov 2026: ver. 1.6.0

  • Six languages: Spanish, French, German and Portuguese join English and Italian (THelpChatLanguage), every string of the library translated - the panel, the engine messages, the answers of the commands, the texts of the confirmation of an action, the PDF
  • The language of the chat is chosen in the panel: the flag of the language in use in the header, next to the icon of the assistant, and the list of the languages - each with its flag (circle-flags, MIT) and its own name - on a click. The panel reloads in the new language and keeps the conversation; the choice is remembered per user in helpchatai-state.json, and only once the user has made one
  • /lang lists the languages, /lang de (or Deutsch, or german) switches
  • Settings.Languages: the languages the user may pick (all six by default; with fewer than two there is no flag). Settings.Language is resolved among them
  • Settings.DocLanguage: the language the documentation is written in. When it differs from the language of the chat, the model is told to explain in the language of the user and write the names of screens, buttons and fields exactly as the manual spells them, so that the user finds them on the screen. The CRM demos set it to English
  • The language rule of the system prompt now reads "The language of this chat is ...": it is the language the user chose, no longer necessarily the one of the application
  • Languages, ActiveLanguage and SelectLanguage on both components; GET /api/languages and POST /api/language/select on the server (read-only on a remote one, where the engine is everybody's); HelpChatLanguageCode, HelpChatLanguageName, HelpChatLanguageNativeName, HelpChatLanguageFromCode and HelpChatFlagSvg for code of your own
  • An empty AssistantName reaches the page as it is, so the default name follows the language of the chat as well
  • The console server takes any language code in --lang
  • Test\LLMBench: --retrieval writes the ranking of the documentation search for a set of questions, and Test\LLMBench\embeddings measures a semantic search against it (Italian, English and paraphrased questions; four embedding models on Ollama). Nothing in the library changes yet: the report is in results/embeddings-v1.md
  • 362 tests

7 Nov 2026: ver. 1.5.0

  • More than one assistant: Assistants in helpchatai.json (name, provider, model, endpoint, key, icon), Assistant for the one in use, and the switch from the panel: the icon of the model in the header, name and model in its tooltip, the list on a click. The choice is remembered per user. GET /api/assistants and POST /api/assistant/select on the server (read-only on a remote one)
  • HelpChatAI.Icons: the icons of the providers and models (lobe-icons, MIT) as SVG in HelpChatAI.Providers.res, deduced from the model name, the endpoint or the provider
  • The configuration check reports every assistant of the list, not only the one in use
  • The system prompt cites a page with a Markdown link it copies (Source: [Title](Page.md)), cites only the pages it used and none when the documentation does not cover the question; the actions rule asks only for the required parameters and forbids a tool as part of an answer. Measured on five models with Test\LLMBench: citations went from 6-7/8 to 8/8 on four of them
  • The engine adds the source line itself (Source: [Leads](Leads.md)) when an answer uses a page of the documentation without linking it: with the same prompt a model cited 8/8 in one run and 6/8 in the next, and now the link is certain
  • Test\LLMBench: a console benchmark of the providers on the manual of the CRM demo (three local Ollama models, claude, gemini), one model after the other, with a Markdown report
  • Slash commands in the question box (/who, /use, /retry, /search, /pages, /doc, /context, /actions, /check, /stats, /clear, /pdf, /copy, /attach, /help, and /prompt and /run when enabled): EnabledCommands on the components, HelpChatAI.Commands, GET /api/commands and POST /api/command. Every answer starts with its heading ("Available actions (/actions):")
  • Everything the panel does, from code: ExecuteCommand (any command, enabled or not), ExplainCommand, ClearConversation, SelectAssistant, Assistants, RetryLastQuestion, SaveConversationPdf, CopyLastAnswer and AttachFile on both components
  • The VCL bubble is antialiased: a layered window drawn with GDI+ from Windows 8 on, a window region as before elsewhere
  • The header of the panel: larger buttons, the icon of the assistant as the last one on the right, no close button of its own (the window has one)
  • The CRM demos link HelpChatAI.Provider.OpenAI as well
  • 352 tests

6 Nov 2026: ver. 1.4.0

  • Actions ask for confirmation by default: Confirm is now True in Actions.Add, and an action that changes nothing says so with False
  • New confirmation dialog, in the VCL (Vcl.HelpChatAI.ConfirmDialog, a form with a DFM) and in FireMonkey (FMX.HelpChatAI.ConfirmDialog, on the desktop): follows the style of the application, the values labelled and in bold, No as the default button, closes as No after 30 seconds, one dialog at a time
  • Your own dialog: a form implementing IVclHelpChatConfirmDialog or IFmxHelpChatConfirmDialog, named with RegisterVclHelpChatConfirmDialog / RegisterFmxHelpChatConfirmDialog
  • A refusal ends the plan: after the user says no, every later action of the same reply is refused without asking, and the model is told so
  • Hardening against prompt injection: the screen label is cut to one short line before entering the system prompt, the values shown to the user are one line each and cut short, and the model is told that what a tool, a document or an excerpt says is data, never an instruction
  • Fixed: an action confirmed after the timeout of the model call ran anyway, on a request already freed
  • HelpChatActionConfirmText, THelpChatAction.ParamLabel and THelpChatActionArgs.ToDisplayPairs, for a dialog of your own
  • The CRM demos look the company up before creating a lead and create it on request (create_account)
  • 316 tests

6 Nov 2026: ver. 1.3.1

  • Installation with DPM (Delphi Package Manager): the package EtheaDev.HelpChatAI on delphi.dev
  • Fixed: a white page under a light VCL style, where the chat used to take the grey of the forms
  • Fixed: a shadow under the header and over the footer, so that a bubble at the edge no longer melts into them
  • Fixed: bubble colours of the user and of the assistant, where the style gives the same colour to both
  • The CRM demo offers the Windows10 style as well
  • 309 tests

2 Nov 2026: ver. 1.3.0

  • Save an answer, the whole conversation or a page of the manual as PDF, with your own header and footer and the page number (Settings.Pdf, PdfStyleSheet, OnPdfInfo)
  • Copy the same three to the clipboard, as text and as HTML at once
  • export_pdf: with Settings.Pdf.Action the assistant can write a document and hand it over (off by default)
  • OnDecryptSecret: the API key and the credentials of a remote engine can stay encrypted in the configuration; the CRM demo shows one way of doing it, DCPcrypt and a License activation window
  • Rebuild documentation index... on the component editor: help-index.json without the command-line tool
  • Each component is offered in its own Tool Palette only, VCL on VCL and FireMonkey on FireMonkey
  • The system prompt carries today's date, so a document the model writes is dated
  • The save dialog is the one of Windows (IFileSaveDialog)
  • Fixed: the PDF came out with no margins at all, because of an @page rule of our own print stylesheet
  • With a remote engine the PDF buttons answer "not available in this application" (HTTP 501); copying works there
  • 305 tests

30 Oct 2026: ver. 1.2.0

  • Attachments: a PDF, an image or a text file handed to the assistant from the paper clip or dropped on the panel (Settings.Attachments, off by default, with limits on count and size); a .docx or an .xlsx is refused by name, because no model reads one
  • An attachment belongs to the conversation: it travels with every later question, and the bytes never reach the conversation file on disk
  • Fixed: a page reload emptied the bar of the attachments while the documents kept going out with every question
  • CRM Demo\Docs holds two documents to try it with, and both demos accept attachments
  • 271 tests

27 Oct 2026: ver. 1.1.1

  • The library did not change: the FireMonkey demo is now the whole application - lead, proposal and draft windows over the same bind sources, the same three actions, F1 in each of them
  • The proposal document moved to CRM Demo\common\uProposalReport.pas, plain RTL, so the two demos build the same invoice from the same code

27 Oct 2026: ver. 1.1.0

  • Caption and AssistantName on both components; empty - the default - means the word of the current language, so an Italian application reads "Aiuto" and "Assistente" without anybody writing them
  • The header of the panel shows the icon of the bubble next to the name
  • The icons of the assistant moved to the engine (HelpChatAI.Assistant), where both frameworks reach them
  • FireMonkey caught up with the VCL: the bubble is round and wears the icon, and Images, ImageIndex and ImageName are published there too
  • Fixed: the FMX bubble was placed outside the window on the first resize, and a relative DocIndexFile was resolved against the current directory instead of the executable
  • Two sample applications, CRM Demo\VCL and CRM Demo\FMX, sharing one data module and one manual
  • 246 tests, and a build matrix of 12: VCL on Delphi 10.4 to 13, FMX on 12 and 13, Win32 and Win64

25 Oct 2026: ver. 1.0.0

  • First release: in-app AI help chat for VCL (Delphi 10.4+) and FMX (Delphi 12+) applications
  • Engine (RTL only) with the providers docsearch (local documentation index, no key needed), claude (Anthropic), openai (Chat Completions, and with it Azure, Groq, OpenRouter, Mistral, Ollama...) and gemini (Google): all three models stream and can call the actions of the application, grounded on the documentation and on the screen context
  • TVclHelpChatAI (TEdgeBrowser) and TFmxHelpChatAI (TWebBrowser): chat bubble, F1 contextual help, chat panel embeddable in any container, colours from the VCL style
  • An assistant that acts: the application registers the actions it may call, with confirmation for the ones that change data
  • Question dictation, design-time live preview and configuration check
  • HelpChatAI server: engine, index and API key on a server, remote transport chosen in the configuration file
  • HelpIndexBuilder: builds the documentation index (help-index.json) from a folder of Markdown files
  • Packages for Delphi 10.4, 11, 12 and 13, DUnitX tests and installer
  • A sample application with the component in it: the Windows 10 CRM demo of Embarcadero, with a manual of its own, F1 on every screen and three actions the assistant can run

License

Apache License 2.0 — Copyright (c) 2026 Ethea S.r.l.

The Ethea MarkdownProcessor, which the engine package requires, keeps its own license (Apache 2.0 / BSD, see Delphi-MarkdownProcessor).