Skip to content

Commit 675ae46

Browse files
committed
Pythia version updated
1 parent ce911cb commit 675ae46

3 files changed

Lines changed: 36 additions & 3 deletions

File tree

docs/changelog.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
#### 2026 May 12 - version 0.9.3
1+
#### 2026 May 17 - version 0.9.3
2+
3+
- Update DelphiAnthropic dependency for the VCL_Anthropic demo
4+
5+
Replaced the DelphiAnthropic dependency used by the `VCL_Anthropic` demo from version `1.2.0` to version `1.3.0`. The demo remains integrated as a Pythia vendor implementation and now targets the updated Anthropic SDK surface.
6+
7+
<br>
8+
9+
- Adapt Anthropic context replay and beta handling
10+
11+
Updated `demos\VCL\pythia-anthropic\Demo.Anthropic.Context.pas` for the newer Anthropic beta behavior, including replay support aligned with the SDK 1.3 code-execution result blocks. The demo now uses a hybrid beta mode: SDK auto-detection via `TBetaHeaderManager` is preserved, while the vendor layer adds only the extra beta tokens still needed for legacy replay, skills, or Files API scenarios.
12+
13+
<br>
214

315
- Route dropped media files to the image list
416

@@ -65,4 +77,4 @@ Added a selection guard in `ChatSessionSelection` to prevent the currently activ
6577

6678
Fixed the layout between the main DOM area and the input bubble: the space occupied by the bubble at the bottom of the screen is now dynamically reserved, preventing content from appearing underneath it.
6779

68-
The DOM area remains in the normal page flow with the global WebView2 scroll. The bubble stays vertically centered when empty, moves correctly to the bottom once a conversation exists, and the layout remains responsive on window resize.
80+
The DOM area remains in the normal page flow with the global WebView2 scroll. The bubble stays vertically centered when empty, moves correctly to the bottom once a conversation exists, and the layout remains responsive on window resize.

source/Pythia.Webview2.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
interface
44

55
const
6-
VERSION = '0.9.0';
6+
VERSION = '0.9.3';
77
STATUS = 'first public release';
88

99
implementation

source/WVPythia.Vendors.Services.pas

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,17 @@ TStateBuffer = record
174174
AudioResults: TArray<string>;
175175
VideoResults: TArray<string>;
176176

177+
{--- File ids harvested live from the streamed tool-result blocks
178+
(e.g. bash_code_execution_tool_result). Populated through
179+
AddOutputFileId from the vendor service's OnProgress handler,
180+
so the post-stream finalize path doesn't have to re-parse the
181+
raw JSON to discover what needs to be downloaded. }
182+
OutputFileIds: TArray<string>;
183+
177184
procedure AddStreamedText(const Value: string);
178185
procedure AddStreamedThinking(const Value: string);
179186
procedure AddJsonResponse(const Value: string);
187+
procedure AddOutputFileId(const Value: string);
180188

181189
class function FromState(const AState: TInputPromptState): TStateBuffer; static;
182190
class operator Implicit(const AState: TInputPromptState): TStateBuffer;
@@ -440,6 +448,19 @@ procedure TStateBuffer.AddJsonResponse(const Value: string);
440448
JsonResponse := JsonResponse + #10 + Value;
441449
end;
442450

451+
procedure TStateBuffer.AddOutputFileId(const Value: string);
452+
begin
453+
var Id := Value.Trim;
454+
if Id.IsEmpty then
455+
Exit;
456+
457+
for var Existing in OutputFileIds do
458+
if SameText(Existing, Id) then
459+
Exit;
460+
461+
OutputFileIds := OutputFileIds + [Id];
462+
end;
463+
443464
procedure TStateBuffer.AddStreamedText(const Value: string);
444465
begin
445466
TextBuffer := TextBuffer + Value;

0 commit comments

Comments
 (0)