@wenathlan/extension 1.1.63 → 1.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +4 -3
  2. package/dist/index.d.ts +3 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +404 -1
  5. package/dist/index.js.map +4 -4
  6. package/dist/memory.d.ts +28 -1
  7. package/dist/memory.d.ts.map +1 -1
  8. package/dist/planreview.d.ts +87 -0
  9. package/dist/planreview.d.ts.map +1 -0
  10. package/dist/policy.d.ts +47 -0
  11. package/dist/policy.d.ts.map +1 -1
  12. package/dist/protocol.d.ts +135 -0
  13. package/dist/protocol.d.ts.map +1 -1
  14. package/dist/surfaces.d.ts +59 -0
  15. package/dist/surfaces.d.ts.map +1 -0
  16. package/dist/types.d.ts +181 -3
  17. package/dist/types.d.ts.map +1 -1
  18. package/dist/version.d.ts +1 -1
  19. package/extension/dist/background.js +669 -2
  20. package/extension/dist/background.js.map +4 -4
  21. package/extension/dist/dashboardpage.html +13 -0
  22. package/extension/dist/dashboardpage.js +129 -0
  23. package/extension/dist/dashboardpage.js.map +7 -0
  24. package/extension/dist/manifest.json +5 -2
  25. package/extension/dist/offscreen.js +1 -0
  26. package/extension/dist/offscreen.js.map +2 -2
  27. package/extension/dist/optionspage.html +14 -0
  28. package/extension/dist/optionspage.js +118 -0
  29. package/extension/dist/optionspage.js.map +7 -0
  30. package/extension/dist/pagebridge.js.map +1 -1
  31. package/extension/dist/popup.html +4 -1
  32. package/extension/dist/popup.js +167 -0
  33. package/extension/dist/popup.js.map +3 -3
  34. package/extension/dist/sidepanel.html +7 -2
  35. package/extension/dist/sidepanel.js +279 -0
  36. package/extension/dist/sidepanel.js.map +2 -2
  37. package/extension/manifest.json +5 -2
  38. package/package.json +1 -1
@@ -1,7 +1,12 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
3
  <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Devthink review</title><link rel="stylesheet" href="style.css"></head>
4
- <body><main class="wide"><header><p class="eyebrow">REVIEW GATE</p><h1>Plan before action</h1><p>Every browser operation remains blocked until the user reviews and approves it here.</p></header><label for="objective">Objective</label><textarea id="objective" rows="4" placeholder="Describe a browser task to turn into a reviewable plan."></textarea><div class="actions"><button id="localplan">Create local observation plan</button><button id="remoteplan" class="secondary">Ask configured endpoint</button><button id="diagnostic" class="secondary">Capture local diagnostics</button></div>
5
- <div class="actions"><input id="command" placeholder="Ask any connected model in plain language" aria-label="Natural language command"><button id="commandsend" class="secondary">Ask model</button><span id="intentbadge" class="muted"></span></div><p id="status" role="status">Loading session state.</p><p id="capabilitiestext" role="status" class="muted">Optional capabilities unknown.</p><section><h2>Current plan</h2><progress id="planprogress" max="1" value="0"></progress><div id="plan" class="panel"></div></section><section><h2>Clickable map</h2><ol id="map" class="audit maplist"></ol></section><section><h2>Navigation trail</h2><ol id="trail" class="audit"></ol></section><section><h2>Navigation state</h2><div id="navigation" class="panel"></div></section><section><h2>Tabs and windows</h2><div id="tabswindows" class="panel"></div></section><section><h2>Forms and data</h2><div id="forms" class="panel"></div></section><section><h2>Files and downloads</h2><div id="files" class="panel"></div></section><section><h2>Capture gallery</h2><div id="captures" class="panel"></div></section><section><h2>Media</h2><div id="media" class="panel"></div></section><section><h2>Network calls</h2><div id="calls" class="panel"></div></section><section><h2>Network view</h2><div id="netview" class="panel"></div></section><section><h2>Traffic control</h2><div id="traffic" class="panel"></div></section><section><h2>Run timeline</h2><div id="timeline" class="panel"></div></section><section><h2>Debugger</h2><div id="debugger" class="panel"></div></section><section><h2>Profiling</h2><div id="profiling" class="panel"></div></section><section><h2>Emulation</h2><div id="emulation" class="panel"></div></section><section><h2>Session grid</h2><div id="sessiongrid" class="panel"></div></section><section><h2>History search</h2><div id="historysearch" class="panel"></div></section><section><h2>Site notes</h2><div id="sitenotes" class="panel"></div></section><section><h2>Scratchpad</h2><div id="scratchpad" class="panel"></div></section><section><h2>Session memory</h2><div id="sessionmemory" class="panel"></div></section><section><h2>Workflows</h2><div id="workflows" class="panel"></div></section><section><h2>Workflow editor</h2><div id="workfloweditor" class="panel"></div></section><section><h2>Triggers</h2><div id="triggers" class="panel"></div></section><section><h2>Agent protocol</h2><div id="agentprotocol" class="panel"></div></section>
4
+ <body><main class="wide"><header><p class="eyebrow">REVIEW GATE</p><h1>Plan before action</h1><p>Every browser operation remains blocked until the user reviews and approves it here.</p></header><label for="objective">Objective</label><textarea id="objective" rows="4" placeholder="Describe a browser task to turn into a reviewable plan."></textarea><div class="actions"><button id="localplan">Create local observation plan</button><button id="remoteplan" class="secondary">Ask configured endpoint</button><button id="tasksubmit" class="secondary">Submit task goal</button><button id="diagnostic" class="secondary">Capture local diagnostics</button></div>
5
+ <nav class="actions" id="workspacetabs" aria-label="Workspace tabs"><button id="tabplan" data-tab="plan">Plan</button><button id="tabrun" data-tab="run" class="secondary">Run</button><button id="tabreview" data-tab="review" class="secondary">Review</button></nav>
6
+ <div class="actions"><input id="command" placeholder="Ask any connected model in plain language" aria-label="Natural language command"><button id="commandsend" class="secondary">Ask model</button><span id="intentbadge" class="muted"></span></div>
7
+ <div class="actions"><input id="paletteinput" placeholder="Command palette (ctrl+.)" aria-label="Command palette search"><button id="paletteopen" class="secondary">Palette</button></div><div id="palettematches" class="panel"></div><p id="status" role="status">Loading session state.</p><p id="capabilitiestext" role="status" class="muted">Optional capabilities unknown.</p><section><h2>Current plan</h2><progress id="planprogress" max="1" value="0"></progress><div id="plan" class="panel"></div></section>
8
+ <section><h2>Plan cards</h2><div id="plancards" class="panel"></div></section>
9
+ <section><h2>Steps timeline</h2><div id="stepstimeline" class="panel"></div></section>
10
+ <section><h2>Log stream</h2><div id="logstream" class="panel"></div></section><section><h2>Clickable map</h2><ol id="map" class="audit maplist"></ol></section><section><h2>Navigation trail</h2><ol id="trail" class="audit"></ol></section><section><h2>Navigation state</h2><div id="navigation" class="panel"></div></section><section><h2>Tabs and windows</h2><div id="tabswindows" class="panel"></div></section><section><h2>Forms and data</h2><div id="forms" class="panel"></div></section><section><h2>Files and downloads</h2><div id="files" class="panel"></div></section><section><h2>Capture gallery</h2><div id="captures" class="panel"></div></section><section><h2>Media</h2><div id="media" class="panel"></div></section><section><h2>Network calls</h2><div id="calls" class="panel"></div></section><section><h2>Network view</h2><div id="netview" class="panel"></div></section><section><h2>Traffic control</h2><div id="traffic" class="panel"></div></section><section><h2>Run timeline</h2><div id="timeline" class="panel"></div></section><section><h2>Debugger</h2><div id="debugger" class="panel"></div></section><section><h2>Profiling</h2><div id="profiling" class="panel"></div></section><section><h2>Emulation</h2><div id="emulation" class="panel"></div></section><section><h2>Session grid</h2><div id="sessiongrid" class="panel"></div></section><section><h2>History search</h2><div id="historysearch" class="panel"></div></section><section><h2>Site notes</h2><div id="sitenotes" class="panel"></div></section><section><h2>Scratchpad</h2><div id="scratchpad" class="panel"></div></section><section><h2>Session memory</h2><div id="sessionmemory" class="panel"></div></section><section><h2>Workflows</h2><div id="workflows" class="panel"></div></section><section><h2>Workflow editor</h2><div id="workfloweditor" class="panel"></div></section><section><h2>Triggers</h2><div id="triggers" class="panel"></div></section><section><h2>Agent protocol</h2><div id="agentprotocol" class="panel"></div></section>
6
11
  <section><h2>Models</h2><div id="models" class="panel"></div></section><section><h2>Agents</h2><div id="agents" class="panel"></div></section><section><h2>Execution environments</h2><div id="environments" class="panel"></div></section><section><h2>Security</h2><div id="security" class="panel"></div></section><section><h2>Console diff</h2><div id="consolediff" class="panel"></div></section><section><h2>Datasets</h2><div id="datasets" class="panel"></div></section><section><h2>Consent banners</h2><div id="banners" class="panel"></div></section><section><h2>Accessibility tree</h2><div id="a11y" class="panel"></div></section><section><h2>Reader view</h2><div id="reader" class="panel"></div></section><section><h2>Detected shapes</h2><ol id="detections" class="audit maplist"></ol></section><section><h2>Watch stream</h2><ol id="stream" class="audit"></ol></section><section><h2>Snapshot diffs</h2><div id="diffs" class="panel"></div></section><section><h2>Derived selectors</h2><ol id="selectors" class="audit maplist"></ol></section><section><h2>Structured diagnostics</h2><ul id="diagnostics" class="audit"></ul></section><section><h2>Local audit</h2><ol id="audit" class="audit"></ol></section></main><script type="module" src="sidepanel.js"></script></body>
7
12
  </html>
@@ -7249,4 +7249,283 @@ function rendersessioninterface(context) {
7249
7249
  renderscratchpad(view);
7250
7250
  rendersessionmemory(view);
7251
7251
  }
7252
+ var tasksubmitbutton = document.querySelector("#tasksubmit");
7253
+ var plancardsroot = document.querySelector("#plancards");
7254
+ var stepstimelineroot = document.querySelector("#stepstimeline");
7255
+ var logstreamroot = document.querySelector("#logstream");
7256
+ var logstreampaused = false;
7257
+ var logstreamfilter = {};
7258
+ function applyworkspacetabs(active) {
7259
+ const plantitles = ["Current plan", "Clickable map", "Detected shapes", "Derived selectors", "Structured diagnostics"];
7260
+ const reviewtitles = ["Plan cards", "Steps timeline", "Log stream", "Local audit", "Session grid", "History search", "Site notes", "Scratchpad", "Session memory", "Security", "Console diff", "Datasets", "Consent banners", "Accessibility tree", "Reader view", "Snapshot diffs", "Agent protocol", "Models"];
7261
+ for (const section of Array.from(document.querySelectorAll("main > section"))) {
7262
+ const title = section.querySelector("h2")?.textContent?.trim() ?? "";
7263
+ const tab = plantitles.includes(title) ? "plan" : reviewtitles.includes(title) ? "review" : "run";
7264
+ section.hidden = tab !== active;
7265
+ }
7266
+ for (const tab of ["plan", "run", "review"]) {
7267
+ const element = document.querySelector(`#tab${tab}`);
7268
+ if (element) element.className = tab === active ? "" : "secondary";
7269
+ }
7270
+ }
7271
+ for (const tab of ["plan", "run", "review"]) {
7272
+ document.querySelector(`#tab${tab}`)?.addEventListener("click", () => applyworkspacetabs(tab));
7273
+ }
7274
+ applyworkspacetabs("plan");
7275
+ tasksubmitbutton?.addEventListener("click", () => {
7276
+ const text = objective?.value ?? "";
7277
+ if (text.trim() === "") {
7278
+ status("Describe the goal first; the proposal flow needs its natural language task.", true);
7279
+ return;
7280
+ }
7281
+ void (async () => {
7282
+ status("The taskinput goal routes through the proposal flow; the plan generates.");
7283
+ const result = await request({ kind: "surface", task: { submit: { text, surface: "sidepanel" } } });
7284
+ status(`The taskinput goal became the plan ${result.plan?.id ?? ""}; review its plancards below.`);
7285
+ await refresh();
7286
+ await rendersurfacereview();
7287
+ })().catch((error) => status(error instanceof Error ? error.message : String(error), true));
7288
+ });
7289
+ async function renderplancards() {
7290
+ if (!plancardsroot) return;
7291
+ try {
7292
+ const result = await request({ kind: "surface", review: { groups: true } });
7293
+ plancardsroot.replaceChildren();
7294
+ if (result.cards.length === 0) {
7295
+ plancardsroot.textContent = "No plan exists yet; submit a task goal and the proposed steps render their cards here.";
7296
+ return;
7297
+ }
7298
+ for (const group of result.groups) {
7299
+ const heading = document.createElement("h3");
7300
+ heading.textContent = `${group.risk} steps${group.expanded ? " (expanded)" : ""}`;
7301
+ plancardsroot.append(heading);
7302
+ for (const card of group.cards) {
7303
+ const item = document.createElement("div");
7304
+ item.className = "panel";
7305
+ const label = document.createElement("strong");
7306
+ label.textContent = `${card.stepid} \xB7 ${card.kind} \xB7 ${card.environment}`;
7307
+ const summary = document.createElement("p");
7308
+ summary.textContent = card.summary;
7309
+ const options2 = document.createElement("p");
7310
+ options2.className = "muted";
7311
+ options2.textContent = card.options === "" ? "No reviewed options." : `Options: ${card.options}`;
7312
+ item.append(label, summary, options2);
7313
+ for (const correction of card.corrections) item.append(Object.assign(document.createElement("p"), { className: "muted", textContent: `Correction memory (${correction.source}): ${correction.reason}` }));
7314
+ if (card.editable) {
7315
+ item.append(button("Approve step", () => resolveStep(card.stepid, "approve")));
7316
+ item.append(" ", button("Reject step", () => resolveStep(card.stepid, "reject")));
7317
+ item.append(" ", button("Edit step", () => editStep(card.stepid)));
7318
+ }
7319
+ if (card.risk === "sensitive") item.append(" ", button("Diff preview", () => diffPreview(card.stepid)));
7320
+ plancardsroot.append(item);
7321
+ }
7322
+ }
7323
+ } catch (error) {
7324
+ plancardsroot.textContent = error instanceof Error ? error.message : String(error);
7325
+ }
7326
+ }
7327
+ async function resolveStep(stepid, resolution) {
7328
+ const result = await request({ kind: "surface", approve: { resolve: { stepid, resolution, surface: "sidepanel" } } });
7329
+ status(`The step ${result.resolution.stepid} resolved with a ${result.resolution.resolution}; the resolution landed in the immutable log.`);
7330
+ await refresh();
7331
+ await rendersurfacereview();
7332
+ }
7333
+ async function editStep(stepid) {
7334
+ if (!plancardsroot) return;
7335
+ const editor = document.createElement("div");
7336
+ editor.className = "panel";
7337
+ const input = document.createElement("textarea");
7338
+ input.rows = 4;
7339
+ input.value = '{ "kind": "click", "summary": "Describe the corrected step." }';
7340
+ const save = button("Save edit", async () => {
7341
+ const result = await request({ kind: "surface", approve: { resolve: { stepid, resolution: "edit", edited: input.value, surface: "sidepanel" } } });
7342
+ status(`The step ${result.resolution.stepid} carries the edited shape and the correction memory recorded the change.`);
7343
+ editor.remove();
7344
+ await refresh();
7345
+ await rendersurfacereview();
7346
+ });
7347
+ editor.append(input, save);
7348
+ plancardsroot.append(editor);
7349
+ }
7350
+ async function diffPreview(stepid) {
7351
+ const before = {};
7352
+ try {
7353
+ const preview = await request({ kind: "preview", stepid });
7354
+ if (preview.resolvedtarget?.selector !== void 0) before.selector = preview.resolvedtarget.selector;
7355
+ if (preview.resolvedtarget?.text !== void 0) before.text = preview.resolvedtarget.text;
7356
+ if (preview.resolvedtarget?.mode !== void 0) before.mode = preview.resolvedtarget.mode;
7357
+ } catch {
7358
+ }
7359
+ const result = await request({ kind: "surface", diff: { preview: { stepid, before } } });
7360
+ const detail = result.preview.changes.map((change) => `${change.kind} ${change.field}${change.before !== void 0 ? ` from ${change.before}` : ""}${change.after !== void 0 ? ` to ${change.after}` : ""}`).join("; ");
7361
+ const masked = Object.entries(result.preview.maskverdicts).map(([field, verdict]) => `${field}: ${verdict}`).join("; ");
7362
+ status(`Diff preview of ${stepid} (${result.preview.provenance}): ${detail === "" ? "no field changes" : detail}${masked === "" ? "" : ` \u2014 masked: ${masked}`}`);
7363
+ }
7364
+ async function renderstepstimeline() {
7365
+ if (!stepstimelineroot) return;
7366
+ try {
7367
+ const result = await request({ kind: "surface", timeline: { nodes: true } });
7368
+ stepstimelineroot.replaceChildren();
7369
+ if (result.nodes.length === 0) {
7370
+ stepstimelineroot.textContent = "No plan runs yet; the timeline derives its nodes from progress records with no new state.";
7371
+ return;
7372
+ }
7373
+ const list = document.createElement("ol");
7374
+ list.className = "audit";
7375
+ for (const node of result.nodes) {
7376
+ const item = document.createElement("li");
7377
+ item.id = node.anchor.slice(1);
7378
+ const badge = node.active ? " \u25B6" : "";
7379
+ const duration = node.durationms !== void 0 ? ` \xB7 ${node.durationms}ms` : "";
7380
+ const environment = node.environment !== void 0 ? ` \xB7 ${node.environment}` : "";
7381
+ item.textContent = `${node.stepid} ${node.kind} \u2014 ${node.status}${duration}${environment}${badge}${node.resultsummary !== void 0 ? ` \u2014 ${node.resultsummary}` : ""}`;
7382
+ if (node.status === "waiting") item.append(" ", button("Diff preview at the gate wait", () => diffPreview(node.stepid)));
7383
+ if (node.active) item.scrollIntoView({ block: "nearest" });
7384
+ list.append(item);
7385
+ }
7386
+ stepstimelineroot.append(list);
7387
+ } catch (error) {
7388
+ stepstimelineroot.textContent = error instanceof Error ? error.message : String(error);
7389
+ }
7390
+ }
7391
+ async function renderlogstream() {
7392
+ if (!logstreamroot) return;
7393
+ try {
7394
+ const result = await request({ kind: "surface", logstream: { read: { filters: logstreamfilter } } });
7395
+ logstreamroot.replaceChildren();
7396
+ const controls = document.createElement("div");
7397
+ controls.className = "actions";
7398
+ const pause = button(logstreampaused ? "Resume stream" : "Pause stream", async () => {
7399
+ logstreampaused = !logstreampaused;
7400
+ await renderlogstream();
7401
+ });
7402
+ const levelselect = document.createElement("select");
7403
+ for (const level of ["", "error", "warn", "info", "log", "debug", "trace"]) {
7404
+ const option = document.createElement("option");
7405
+ option.value = level;
7406
+ option.textContent = level === "" ? "all levels" : level;
7407
+ levelselect.append(option);
7408
+ }
7409
+ levelselect.value = logstreamfilter.level ?? "";
7410
+ levelselect.addEventListener("change", () => {
7411
+ const level = levelselect.value;
7412
+ logstreamfilter = { ...logstreamfilter, ...level !== "" ? { level } : {} };
7413
+ void renderlogstream();
7414
+ });
7415
+ const copy = button("Copy verified excerpt", async () => {
7416
+ const excerpt = await request({ kind: "surface", logstream: { excerpt: {} } });
7417
+ await navigator.clipboard?.writeText(excerpt.excerpt).catch(() => {
7418
+ });
7419
+ status(excerpt.reason);
7420
+ });
7421
+ const chain = document.createElement("span");
7422
+ chain.className = "muted";
7423
+ chain.textContent = result.chain.valid ? `chain verified \xB7 ${result.total} events` : `chain broken: ${result.chain.reason}`;
7424
+ controls.append(pause, levelselect, copy, chain);
7425
+ const list = document.createElement("ol");
7426
+ list.className = "audit";
7427
+ for (const event of logstreampaused ? [] : result.events) {
7428
+ const item = document.createElement("li");
7429
+ item.textContent = `[${new Date(event.at).toLocaleTimeString()}] ${event.level} ${event.source}${event.stepid !== void 0 ? ` step ${event.stepid}` : ""} ${event.origin} \u2014 ${event.summary}${event.masked ? ` (${event.maskverdict})` : ""}`;
7430
+ list.append(item);
7431
+ }
7432
+ if (logstreampaused) list.append(Object.assign(document.createElement("li"), { textContent: "The live stream pauses while the run continues; the full history stays in memory." }));
7433
+ logstreamroot.append(controls, list);
7434
+ } catch (error) {
7435
+ logstreamroot.textContent = error instanceof Error ? error.message : String(error);
7436
+ }
7437
+ }
7438
+ async function rendersurfacereview() {
7439
+ await renderplancards();
7440
+ await renderstepstimeline();
7441
+ await renderlogstream();
7442
+ }
7443
+ void rendersurfacereview().catch(() => {
7444
+ });
7445
+ var surfacechannel = typeof BroadcastChannel === "function" ? new BroadcastChannel("devthinksurfaces") : void 0;
7446
+ surfacechannel?.addEventListener("message", (event) => {
7447
+ const frame = event.data;
7448
+ if (frame?.channel === "logstream") {
7449
+ if (!logstreampaused) void renderlogstream().catch(() => {
7450
+ });
7451
+ return;
7452
+ }
7453
+ void refresh().catch(() => {
7454
+ });
7455
+ void rendersurfacereview().catch(() => {
7456
+ });
7457
+ });
7458
+ var paletteinputnode = document.querySelector("#paletteinput");
7459
+ var palettematchespanel = document.querySelector("#palettematches");
7460
+ async function renderworkspacepalette() {
7461
+ if (!palettematchespanel) return;
7462
+ try {
7463
+ const result = await request({ kind: "surface", palette: { query: { text: paletteinputnode?.value ?? "" } } });
7464
+ palettematchespanel.replaceChildren();
7465
+ for (const match of result.matches.slice(0, 6)) {
7466
+ const item = document.createElement("button");
7467
+ item.type = "button";
7468
+ item.className = "secondary";
7469
+ item.textContent = `${match.entry.label} (${match.entry.action.surface})`;
7470
+ item.title = match.reason;
7471
+ item.addEventListener("click", () => {
7472
+ void runworkspacepalette(match.entry.action.command).catch((error) => status(error instanceof Error ? error.message : String(error), true));
7473
+ });
7474
+ palettematchespanel.append(item, " ");
7475
+ }
7476
+ if (result.matches.length === 0) palettematchespanel.textContent = "No command matches; the palette lists only the actions the current capability set allows.";
7477
+ } catch (error) {
7478
+ palettematchespanel.textContent = error instanceof Error ? error.message : String(error);
7479
+ }
7480
+ }
7481
+ async function runworkspacepalette(command) {
7482
+ await request({ kind: "surface", palette: { used: { command } } });
7483
+ if (command === "opendashboardpage" || command === "historysearch") {
7484
+ await chrome.tabs.create({ url: chrome.runtime.getURL("dashboardpage.html") });
7485
+ status("The dashboardpage opened in a new tab.");
7486
+ return;
7487
+ }
7488
+ if (command === "openoptionspage") {
7489
+ await chrome.tabs.create({ url: chrome.runtime.getURL("optionspage.html") });
7490
+ status("The optionspage opened in a new tab.");
7491
+ return;
7492
+ }
7493
+ if (command === "opentransparencypage") {
7494
+ await chrome.tabs.create({ url: chrome.runtime.getURL("transparencypage.html") });
7495
+ status("The transparencypage opened in a new tab.");
7496
+ return;
7497
+ }
7498
+ if (command === "replayonboarding") {
7499
+ await request({ kind: "surface", onboarding: { replay: true } });
7500
+ status("The onboarding walkthrough replays on the next popup open.");
7501
+ return;
7502
+ }
7503
+ if (command === "copyauditexcerpt") {
7504
+ const result = await request({ kind: "surface", logstream: { excerpt: {} } });
7505
+ await navigator.clipboard?.writeText(result.excerpt).catch(() => {
7506
+ });
7507
+ status("The verified range copied as an audit excerpt.");
7508
+ return;
7509
+ }
7510
+ const route = await request({ kind: "surface", bus: { action: { surface: "sidepanel", command } } });
7511
+ status(route.route.reason);
7512
+ await refresh();
7513
+ await rendersurfacereview();
7514
+ }
7515
+ paletteinputnode?.addEventListener("input", () => {
7516
+ void renderworkspacepalette();
7517
+ });
7518
+ document.querySelector("#paletteopen")?.addEventListener("click", () => {
7519
+ paletteinputnode?.focus();
7520
+ void renderworkspacepalette();
7521
+ });
7522
+ document.addEventListener("keydown", (event) => {
7523
+ if (event.ctrlKey && event.key === ".") {
7524
+ event.preventDefault();
7525
+ paletteinputnode?.focus();
7526
+ void renderworkspacepalette();
7527
+ }
7528
+ });
7529
+ void renderworkspacepalette().catch(() => {
7530
+ });
7252
7531
  //# sourceMappingURL=sidepanel.js.map