Skip to content

Add shared worker support to french-bistro demo - #224

Merged
beaufortfrancois merged 5 commits into
mainfrom
sharedworker
Jun 16, 2026
Merged

beaufortfrancois merged 5 commits into
mainfrom
sharedworker

Conversation

@beaufortfrancois

Copy link
Copy Markdown
Collaborator

With index.html?sharedworker, the demo now uses a SharedWorker to manage the AI agent's state and message history. This is particularly useful for maintaining continuity across page navigations (e.g., when combined with ?crossdocument). It is possible thanks to extendedLifetime: true.

@beaufortfrancois

Copy link
Copy Markdown
Collaborator Author

Please let me know what you think.

@Kulikowski

Copy link
Copy Markdown
Collaborator

Chat seems to be not responding when I ask it to fill the form, let's say I want to add manual updates, then I cannot use chat to ask for anything, imho not a blocker for 1st version

@Kulikowski Kulikowski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments, let's merge and continue discussions around it

Comment thread demos/french-bistro/agent.js Resolved
Comment thread demos/french-bistro/agent-worker.js Resolved
@beaufortfrancois

Copy link
Copy Markdown
Collaborator Author

Chat seems to be not responding when I ask it to fill the form, let's say I want to add manual updates, then I cannot use chat to ask for anything, imho not a blocker for 1st version

How do you ask it to fill the form? I've tried Can you please book a table at Le Petit Bistro for my birthday dinner for 4 people on 2026-06-20 at 19:30, requesting a terrace seat under the name Jane Doe at 555-019-2834? and it worked just fine for me.

@Kulikowski

Copy link
Copy Markdown
Collaborator

Chat seems to be not responding when I ask it to fill the form, let's say I want to add manual updates, then I cannot use chat to ask for anything, imho not a blocker for 1st version

How do you ask it to fill the form? I've tried Can you please book a table at Le Petit Bistro for my birthday dinner for 4 people on 2026-06-20 at 19:30, requesting a terrace seat under the name Jane Doe at 555-019-2834? and it worked just fine for me.

When tools is executing the input is disabled until I confirm reservation

@beaufortfrancois

beaufortfrancois commented Jun 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

I've tried to fix this locally properly (for too long) until I remembered we (I) didn't add AbortSignal support for declarative tools execution. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/script_tools/model_context.cc;l=447;drc=41b46c6717161ecc7aaf9cf5db98a0e987b9249d

@beaufortfrancois

Copy link
Copy Markdown
Collaborator Author

I'll merge this and will fix this demo once Chromium has implemented proper support for cancelling execution of declarative tools.

@beaufortfrancois
beaufortfrancois merged commit ecf6be1 into main Jun 16, 2026
7 checks passed
@beaufortfrancois
beaufortfrancois deleted the sharedworker branch July 1, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants