wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
AiConnectionMonitor Class Reference

A sidebar that shows the raw HTTP traffic between wxMaxima and the configured AI provider – the AI Chat sidebar's equivalent of XmlInspector (which shows the wxMaxima<->Maxima socket traffic). More...

#include <AiConnectionMonitor.h>

Inheritance diagram for AiConnectionMonitor:
[legend]
Collaboration diagram for AiConnectionMonitor:
[legend]

Public Member Functions

 AiConnectionMonitor (wxWindow *parent, int id)
 
void Clear () override
 Remove all text from the display.
 
void Add_Request (const wxString &providerName, const wxString &requestBody)
 Record a request about to be sent to providerName.
 
void Add_Response (bool ok, const wxString &responseBodyOrDetail)
 Record the reply (or error detail) for the most recent request.
 

Detailed Description

A sidebar that shows the raw HTTP traffic between wxMaxima and the configured AI provider – the AI Chat sidebar's equivalent of XmlInspector (which shows the wxMaxima<->Maxima socket traffic).

Opened via the AI status bar icon's double-click (see StatusBar::AiStatus/wxMaxima's click handlers).

No redaction is needed here: an AiProvider's request/response bodies never contain the API key (grep confirms it's only ever placed in a request header*, via each provider's own AuthHeaders()), so the plain JSON text is safe to display as-is.

Unlike XmlInspector, this doesn't batch/defer via an idle-driven UpdateContents() – one AI chat turn is a single user-paced Send click, not a flood of small socket reads, so there is no performance reason to defer the write.


The documentation for this class was generated from the following files: