Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/cli/ai/inspector/inspector-inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* The inspector is a self-contained vanilla-DOM widget defined in
* `./page-script.ts` — no React, no esm.sh, no external dependencies, no
* page-CSS conflicts. The user clicks elements, types comments, and clicks
* "Done" to send everything back to the CLI via `window.__studioAnnotateDone`.
* "Send to agent" to return everything via `window.__studioAnnotateDone`.
*/

import { launchChromiumWithInstall } from 'cli/ai/browser-utils';
Expand Down Expand Up @@ -72,7 +72,7 @@ export interface AnnotationDoneResult {
}

/**
* Block until the user clicks "Done" in the inspector toolbar, then return
* Block until the user clicks "Send to agent" in the inspector toolbar, then return
* the annotations. Reads from `window.__studioAnnotateDone` which the page
* script populates from its in-memory state and localStorage.
*/
Expand Down Expand Up @@ -103,7 +103,7 @@ export async function waitForAnnotationsDone(

// Auto-close the browser once we've captured the annotations. This
// makes the lifecycle unambiguous from the user's point of view —
// clicking "Done" closes the window — and removes the failure mode
// clicking "Send to agent" closes the window — and removes the failure mode
// where a user re-annotates after the agent has already moved on, with
// the new payload sitting on `window.__studioAnnotateDone` but nobody
// polling for it. To start another round, the user just re-runs the
Expand Down Expand Up @@ -132,7 +132,7 @@ export async function openAnnotationBrowser( siteUrl: string ): Promise< string
try {
await inspectorPage.bringToFront();
await injectInspector( inspectorPage );
return 'Inspector reattached to the open browser. Click "Annotate" to pick an element, then "Done" when finished.';
return 'Inspector reattached to the open browser. Click "Annotate" to pick an element, then "Send to agent" when finished.';
} catch {
await shutdownBrowser();
}
Expand Down Expand Up @@ -194,5 +194,5 @@ export async function openAnnotationBrowser( siteUrl: string ): Promise< string

installProcessExitHook();

return `Annotation browser opened at ${ siteUrl }. Click "Annotate" in the bottom-right toolbar, click an element, type your feedback, then click "Done" when you're finished.`;
return `Annotation browser opened at ${ siteUrl }. Click "Annotate" in the bottom-right toolbar, click an element, type your feedback, then click "Send to agent" when you're finished.`;
}
Loading