diff options
| author | Igor Soarez <igor@soarez.org> | 2026-09-13 18:30:51 +0100 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-14 12:19:26 +0100 |
| commit | 792336dfef913291358f2312cd82c55944d18199 (patch) | |
| tree | 623af861c7a41d1afc865e3945b7b9b37036e778 /src/index.ts | |
| parent | c8fd7b7078da841d5537aee9334291887445889f (diff) | |
feat(prompt): say which Chrome browser_* drives
The prompt told the model it drives "the user's running instance". With this
fork's default that is wrong: it is castle's shared Chrome, signed out of every
account. It now matters which is which, because pi-chrome's chrome_* tools
drive the user's signed-in Brave, and the model has to route between the two.
getBrowserSystemPrompt() takes the resolved target and describes it: castle's
shared browser for the built-in default, the user's own Chrome for local, the
endpoint otherwise.
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts index 152c94d..e4d23f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -261,8 +261,9 @@ export default function browserHarnessExtension(pi: ExtensionAPI): void { }); pi.on("before_agent_start", async (event) => { + const target = resolveCdpTarget(process.env, await readTarget()); return { - systemPrompt: event.systemPrompt + getBrowserSystemPrompt(client?.status().alive ?? false), + systemPrompt: event.systemPrompt + getBrowserSystemPrompt(client?.status().alive ?? false, target), }; }); } |
