mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 07:04:29 +00:00
chore: sync workspace changes
This commit is contained in:
parent
8a91b8e9aa
commit
6aa591bd91
13 changed files with 237 additions and 26 deletions
|
|
@ -21,20 +21,33 @@ const INSPECTOR_URL = "https://inspect.sandboxagent.dev";
|
|||
export function buildInspectorUrl({
|
||||
baseUrl,
|
||||
token,
|
||||
headers,
|
||||
}: {
|
||||
baseUrl: string;
|
||||
token?: string;
|
||||
headers?: Record<string, string>;
|
||||
}): string {
|
||||
const normalized = normalizeBaseUrl(ensureUrl(baseUrl));
|
||||
const params = new URLSearchParams({ url: normalized });
|
||||
if (token) {
|
||||
params.set("token", token);
|
||||
}
|
||||
if (headers && Object.keys(headers).length > 0) {
|
||||
params.set("headers", JSON.stringify(headers));
|
||||
}
|
||||
return `${INSPECTOR_URL}?${params.toString()}`;
|
||||
}
|
||||
|
||||
export function logInspectorUrl({ baseUrl, token }: { baseUrl: string; token?: string }): void {
|
||||
console.log(`Inspector: ${buildInspectorUrl({ baseUrl, token })}`);
|
||||
export function logInspectorUrl({
|
||||
baseUrl,
|
||||
token,
|
||||
headers,
|
||||
}: {
|
||||
baseUrl: string;
|
||||
token?: string;
|
||||
headers?: Record<string, string>;
|
||||
}): void {
|
||||
console.log(`Inspector: ${buildInspectorUrl({ baseUrl, token, headers })}`);
|
||||
}
|
||||
|
||||
type HeaderOptions = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue