sgiant-ai-widget 1.2.0 → 1.3.0
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.
- package/dist/icons.d.ts +4 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +4 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +201 -7
- package/dist/index.js.map +1 -1
- package/dist/labels.d.ts +12 -0
- package/dist/labels.d.ts.map +1 -1
- package/dist/labels.js +12 -0
- package/dist/labels.js.map +1 -1
- package/dist/mark-motion.d.ts +43 -0
- package/dist/mark-motion.d.ts.map +1 -0
- package/dist/mark-motion.js +169 -0
- package/dist/mark-motion.js.map +1 -0
- package/dist/sgiant-ai-widget-charts.global.js +1 -1
- package/dist/sgiant-ai-widget.global.js +91 -32
- package/dist/sgiant-ai-widget.global.js.map +4 -4
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +70 -11
- package/dist/styles.js.map +1 -1
- package/package.json +1 -1
package/dist/icons.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ export declare const AVATAR_SVG = "<svg viewBox=\"0 0 24 24\" class=\"sgiant-aiw
|
|
|
3
3
|
export declare const ICON_HISTORY = "<svg viewBox=\"0 0 24 24\" width=\"17\" height=\"17\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 3v5h5\"/><path d=\"M3.05 13A9 9 0 1 0 6 5.3L3 8\"/><path d=\"M12 7v5l3 2\"/></svg>";
|
|
4
4
|
export declare const ICON_EXPAND = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M15 3h6v6\"/><path d=\"M9 21H3v-6\"/><path d=\"M21 3l-7 7\"/><path d=\"M3 21l7-7\"/></svg>";
|
|
5
5
|
export declare const ICON_COLLAPSE = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 14h6v6\"/><path d=\"M20 10h-6V4\"/><path d=\"M14 10l7-7\"/><path d=\"M3 21l7-7\"/></svg>";
|
|
6
|
+
/** Auto-apply: a bolt — "this happens without you pressing anything". */
|
|
7
|
+
export declare const ICON_BOLT = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M13 2 4 14h7l-1 8 9-12h-7l1-8Z\"/></svg>";
|
|
8
|
+
/** The automation explainer: a question mark in a circle. */
|
|
9
|
+
export declare const ICON_HELP_CIRCLE = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.7\"/><path d=\"M12 17h.01\"/></svg>";
|
|
6
10
|
export declare const ICON_COMPASS = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><polygon points=\"16.2 7.8 13.4 13.4 7.8 16.2 10.6 10.6 16.2 7.8\"/></svg>";
|
|
7
11
|
export declare const ICON_ADVANCED = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"/><line x1=\"10\" y1=\"4\" x2=\"10\" y2=\"20\"/></svg>";
|
|
8
12
|
export declare const ICON_CHEVRON_R = "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"/></svg>";
|
package/dist/icons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,WAAW,oVAGO,CAAC;AAQhC,eAAO,MAAM,UAAU,yLAA6K,CAAC;AAGrM,eAAO,MAAM,YAAY,2RAAmQ,CAAC;AAC7R,eAAO,MAAM,WAAW,gSAAsQ,CAAC;AAC/R,eAAO,MAAM,aAAa,iSAAuQ,CAAC;AAElS,eAAO,MAAM,YAAY,2SAAiR,CAAC;AAE3S,eAAO,MAAM,aAAa,2SAAuQ,CAAC;AAClS,eAAO,MAAM,cAAc,uOAAmN,CAAC;AAE/O,eAAO,MAAM,aAAa,8UAAgT,CAAC;AAE3U,eAAO,MAAM,SAAS,sTAA0R,CAAC;AAEjT,eAAO,MAAM,SAAS,qSAA+Q,CAAC;AACtS,eAAO,MAAM,aAAa,4ZAA0X,CAAC;AAGrZ,eAAO,MAAM,SAAS,gOAAoM,CAAC;AAG3N,eAAO,MAAM,WAAW,6UAAyT,CAAC;AAGlV,eAAO,MAAM,SAAS,kRAA4P,CAAC;AACnR,eAAO,MAAM,UAAU,sQAAgP,CAAC;AACxQ,eAAO,MAAM,WAAW,0OAAsN,CAAC;AAC/O,eAAO,MAAM,WAAW,yOAAqN,CAAC;AAE9O,eAAO,MAAM,aAAa,8XAAwW,CAAC;AACnY,eAAO,MAAM,eAAe,6XAAuW,CAAC"}
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,WAAW,oVAGO,CAAC;AAQhC,eAAO,MAAM,UAAU,yLAA6K,CAAC;AAGrM,eAAO,MAAM,YAAY,2RAAmQ,CAAC;AAC7R,eAAO,MAAM,WAAW,gSAAsQ,CAAC;AAC/R,eAAO,MAAM,aAAa,iSAAuQ,CAAC;AAElS,yEAAyE;AACzE,eAAO,MAAM,SAAS,2NAAyM,CAAC;AAChO,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,uSAA6Q,CAAC;AAC3S,eAAO,MAAM,YAAY,2SAAiR,CAAC;AAE3S,eAAO,MAAM,aAAa,2SAAuQ,CAAC;AAClS,eAAO,MAAM,cAAc,uOAAmN,CAAC;AAE/O,eAAO,MAAM,aAAa,8UAAgT,CAAC;AAE3U,eAAO,MAAM,SAAS,sTAA0R,CAAC;AAEjT,eAAO,MAAM,SAAS,qSAA+Q,CAAC;AACtS,eAAO,MAAM,aAAa,4ZAA0X,CAAC;AAGrZ,eAAO,MAAM,SAAS,gOAAoM,CAAC;AAG3N,eAAO,MAAM,WAAW,6UAAyT,CAAC;AAGlV,eAAO,MAAM,SAAS,kRAA4P,CAAC;AACnR,eAAO,MAAM,UAAU,sQAAgP,CAAC;AACxQ,eAAO,MAAM,WAAW,0OAAsN,CAAC;AAC/O,eAAO,MAAM,WAAW,yOAAqN,CAAC;AAE9O,eAAO,MAAM,aAAa,8XAAwW,CAAC;AACnY,eAAO,MAAM,eAAe,6XAAuW,CAAC"}
|
package/dist/icons.js
CHANGED
|
@@ -55,6 +55,10 @@ export const ICON_HISTORY = `<svg viewBox="0 0 24 24" width="17" height="17" fil
|
|
|
55
55
|
export const ICON_EXPAND = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>`;
|
|
56
56
|
export const ICON_COLLAPSE = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="M14 10l7-7"/><path d="M3 21l7-7"/></svg>`;
|
|
57
57
|
// Compass — the auto-navigate ("drive me there") toggle.
|
|
58
|
+
/** Auto-apply: a bolt — "this happens without you pressing anything". */
|
|
59
|
+
export const ICON_BOLT = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2 4 14h7l-1 8 9-12h-7l1-8Z"/></svg>`;
|
|
60
|
+
/** The automation explainer: a question mark in a circle. */
|
|
61
|
+
export const ICON_HELP_CIRCLE = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.7"/><path d="M12 17h.01"/></svg>`;
|
|
58
62
|
export const ICON_COMPASS = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><polygon points="16.2 7.8 13.4 13.4 7.8 16.2 10.6 10.6 16.2 7.8"/></svg>`;
|
|
59
63
|
// Advanced view: a panel split into a sidebar + main area (Copilot ⇆ live app).
|
|
60
64
|
export const ICON_ADVANCED = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2"/><line x1="10" y1="4" x2="10" y2="20"/></svg>`;
|
package/dist/icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.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,CAAC,MAAM,WAAW,GAAG,kNAAkN,CAAC;AAC9O,qFAAqF;AACrF,MAAM,CAAC,MAAM,aAAa,GAAG,qWAAqW,CAAC;AACnY,MAAM,CAAC,MAAM,eAAe,GAAG,oWAAoW,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -368,6 +368,65 @@ export interface AiChatWidgetOptions {
|
|
|
368
368
|
* navigation is enabled (org/admin/marketing).
|
|
369
369
|
*/
|
|
370
370
|
autoNavOption?: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* How long the launcher sits untouched before it starts to doze — a pair of
|
|
373
|
+
* drifting zeds, and nothing else.
|
|
374
|
+
*
|
|
375
|
+
* NOT the resting state. Resting must stay still: the launcher redraw exists
|
|
376
|
+
* because the old one "stacked eight simultaneous effects at rest, so an
|
|
377
|
+
* unread reply and an idle corner animated about equally — it was loud at rest
|
|
378
|
+
* and had nothing left to say". Dozing is a DIFFERENT state that a person has
|
|
379
|
+
* to earn by leaving, so a still corner remains the normal case and an unread
|
|
380
|
+
* badge still means something.
|
|
381
|
+
*
|
|
382
|
+
* Any pointer, key, focus or scroll wakes it, as does opening the panel or any
|
|
383
|
+
* state that is not resting. 0 disables it entirely. Default 60s.
|
|
384
|
+
*/
|
|
385
|
+
dozeAfterMs?: number;
|
|
386
|
+
/**
|
|
387
|
+
* The mark leans toward the pointer, and its eyes follow — in the launcher,
|
|
388
|
+
* in the chat header, everywhere it is drawn.
|
|
389
|
+
*
|
|
390
|
+
* It reads optional hooks out of whatever `avatarSvg` you supply and skips
|
|
391
|
+
* what is missing: `.pl` / `.pr` for eyes, `.ping` / `.glint` for parallax
|
|
392
|
+
* layers. A mark with none of them still gets the tilt.
|
|
393
|
+
*
|
|
394
|
+
* Off under prefers-reduced-motion and on coarse pointers, without asking.
|
|
395
|
+
*/
|
|
396
|
+
markMotion?: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* How the mark follows the pointer. "spring" (default) eases with overshoot,
|
|
399
|
+
* which suits a mark with specular highlights and curved form. "stepped"
|
|
400
|
+
* snaps to a grid and never rotates — for a flat, heavy mark, where easing a
|
|
401
|
+
* highlight that does not exist reads as borrowed vocabulary.
|
|
402
|
+
*/
|
|
403
|
+
markMotionMode?: "spring" | "stepped";
|
|
404
|
+
/**
|
|
405
|
+
* Offer an "auto-apply" toggle, and decide what it is allowed to apply.
|
|
406
|
+
*
|
|
407
|
+
* A PREDICATE, NOT A BOOLEAN, and that is the design. The widget does not know
|
|
408
|
+
* which of a host's write tools are recoverable: saving a WordPress DRAFT and
|
|
409
|
+
* publishing a page arrive here as the same shape. Only the host knows, so the
|
|
410
|
+
* host says — a proposal is auto-applied ONLY when the toggle is on AND this
|
|
411
|
+
* returns true for it. Everything else keeps its Apply button unchanged.
|
|
412
|
+
*
|
|
413
|
+
* WHAT IT WILL NEVER DO, whatever this returns: run an in-app ACTION carrying
|
|
414
|
+
* a `confirm`, or an `operate` action (filling or clicking on the user's
|
|
415
|
+
* behalf). Those are confirm-gated by construction and this option does not
|
|
416
|
+
* reach them. Auto-apply covers PROPOSALS only.
|
|
417
|
+
*
|
|
418
|
+
* Off by default, browser-local, per user. Omit it and no toggle appears and
|
|
419
|
+
* nothing is ever auto-applied — which is what every host had before this.
|
|
420
|
+
*/
|
|
421
|
+
autoApplyOption?: (name: string, args: Record<string, unknown>) => boolean;
|
|
422
|
+
/**
|
|
423
|
+
* Offer a "How automation works" panel in the More menu, explaining what the
|
|
424
|
+
* automation toggles do and — more usefully — what they will never do.
|
|
425
|
+
* Defaults to true whenever either toggle is offered: a switch that changes
|
|
426
|
+
* what an assistant may do on your behalf should explain itself where it is
|
|
427
|
+
* thrown, not in documentation nobody opens.
|
|
428
|
+
*/
|
|
429
|
+
automationHelp?: boolean;
|
|
371
430
|
/**
|
|
372
431
|
* ADVANCED VIEW. When `getAdvancedUrl` is provided, a header toggle opens a
|
|
373
432
|
* full-screen split: the chat on the left and the app in an <iframe> on the
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@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mBAAmB,GACxB,kBAAkB,CAirKpB"}
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,7 @@ export { PREFIX };
|
|
|
69
69
|
* can never drift onto different strings and silently produce a dead button.
|
|
70
70
|
*/
|
|
71
71
|
export const OPEN_ASSISTANT_EVENT = "sgiant:open-assistant";
|
|
72
|
+
import { startMarkMotion } from "./mark-motion.js";
|
|
72
73
|
export { buildThreadReplay } from "./replay.js";
|
|
73
74
|
// The directive vocabulary moved to `./specs.ts` (#320): what the model may
|
|
74
75
|
// emit inside `[[tag:{json}]]`, and the parsing of it. #306 calls this the
|
|
@@ -82,7 +83,7 @@ export { gateNavigationTarget } from "./safe-url.js";
|
|
|
82
83
|
// Every SVG this file draws now lives in `./icons.ts` (#320) — pure data,
|
|
83
84
|
// and the file an embedder must point at to replace the mark (#306:
|
|
84
85
|
// `avatarUrl` only accepts a bitmap today).
|
|
85
|
-
import { AVATAR_DEFS, AVATAR_SVG, ICON_HISTORY, ICON_EXPAND, ICON_COLLAPSE, ICON_COMPASS, ICON_ADVANCED, ICON_CHEVRON_R, ICON_DOWNLOAD, ICON_FLAG, ICON_BELL, ICON_BELL_OFF, ICON_MORE, ICON_ATTACH, ICON_EDIT, ICON_REGEN, ICON_THUMB_UP, ICON_THUMB_DOWN, } from "./icons.js";
|
|
86
|
+
import { AVATAR_DEFS, AVATAR_SVG, ICON_HISTORY, ICON_EXPAND, ICON_COLLAPSE, ICON_COMPASS, ICON_BOLT, ICON_HELP_CIRCLE, ICON_ADVANCED, ICON_CHEVRON_R, ICON_DOWNLOAD, ICON_FLAG, ICON_BELL, ICON_BELL_OFF, ICON_MORE, ICON_ATTACH, ICON_EDIT, ICON_REGEN, ICON_THUMB_UP, ICON_THUMB_DOWN, } from "./icons.js";
|
|
86
87
|
/**
|
|
87
88
|
* Warn a host about a malformed frame — once per reason, per page.
|
|
88
89
|
*
|
|
@@ -393,7 +394,9 @@ export function createAiChatWidget(opts) {
|
|
|
393
394
|
function applyLauncher() {
|
|
394
395
|
const dot = bubble.querySelector(`.${PREFIX}-bubble-dot`);
|
|
395
396
|
const label = bubble.querySelector(`.${PREFIX}-bubble-label`);
|
|
396
|
-
|
|
397
|
+
// "resting" is the ABSENCE of the others, so it never carried a class —
|
|
398
|
+
// and a state you cannot select is a state you cannot decorate.
|
|
399
|
+
for (const s of ["resting", "unread", "working", "offline", "parked"]) {
|
|
397
400
|
bubble.classList.toggle(`${PREFIX}-bubble-${s}`, launcher.state === s);
|
|
398
401
|
}
|
|
399
402
|
bubble.classList.toggle(`${PREFIX}-bubble-pill`, launcher.variant === "pill");
|
|
@@ -410,11 +413,55 @@ export function createAiChatWidget(opts) {
|
|
|
410
413
|
? L("openBubbleUnread", { name, count: launcher.count })
|
|
411
414
|
: L("openBubble", { name }));
|
|
412
415
|
}
|
|
416
|
+
// Assigned once the panel exists. A no-op until then, because `panel` is
|
|
417
|
+
// declared BELOW this point and reaching it eagerly would be a temporal dead
|
|
418
|
+
// zone — the same trap that took the whole widget down earlier in this file's
|
|
419
|
+
// history when a toggle read `advanced` while the menu was being built.
|
|
420
|
+
let wake = () => { };
|
|
413
421
|
function setLauncher(next) {
|
|
414
422
|
Object.assign(launcher, next);
|
|
415
423
|
applyLauncher();
|
|
424
|
+
wake();
|
|
416
425
|
}
|
|
417
426
|
const panel = el("div", `${PREFIX}-panel`);
|
|
427
|
+
// DOZING — earned by absence, not shown by default. See `dozeAfterMs`.
|
|
428
|
+
const dozeAfter = opts.dozeAfterMs ?? 60000;
|
|
429
|
+
let dozeTimer = null;
|
|
430
|
+
function doze() {
|
|
431
|
+
// Only a RESTING, closed launcher may doze. A working or unread one has
|
|
432
|
+
// something to say, and saying it while asleep is a contradiction.
|
|
433
|
+
if (launcher.state !== "resting" || panel.style.display !== "none")
|
|
434
|
+
return;
|
|
435
|
+
bubble.classList.add(`${PREFIX}-bubble-dozing`);
|
|
436
|
+
}
|
|
437
|
+
wake = () => {
|
|
438
|
+
bubble.classList.remove(`${PREFIX}-bubble-dozing`);
|
|
439
|
+
if (dozeTimer)
|
|
440
|
+
clearTimeout(dozeTimer);
|
|
441
|
+
dozeTimer = dozeAfter > 0 ? setTimeout(doze, dozeAfter) : null;
|
|
442
|
+
};
|
|
443
|
+
// The mark's physics, for EVERY copy of it — launcher and chat header alike.
|
|
444
|
+
// It lived in an example page first, which meant the demo mark followed the
|
|
445
|
+
// cursor while the identical mark in the chat header sat still.
|
|
446
|
+
let motion = null;
|
|
447
|
+
if (opts.markMotion !== false) {
|
|
448
|
+
motion = startMarkMotion(() => {
|
|
449
|
+
const hosts = [bubble];
|
|
450
|
+
panel
|
|
451
|
+
.querySelectorAll(`.${PREFIX}-avatar`)
|
|
452
|
+
.forEach((n) => hosts.push(n));
|
|
453
|
+
return hosts;
|
|
454
|
+
}, { mode: opts.markMotionMode ?? "spring" });
|
|
455
|
+
}
|
|
456
|
+
if (dozeAfter > 0) {
|
|
457
|
+
// On the DOCUMENT and passive: a wake-up that only fired over the launcher
|
|
458
|
+
// itself would let the corner sleep while its owner worked two inches away,
|
|
459
|
+
// and the widget must not be the reason a page scrolls badly.
|
|
460
|
+
for (const ev of ["pointerdown", "pointermove", "keydown", "scroll", "focusin"]) {
|
|
461
|
+
document.addEventListener(ev, wake, { passive: true });
|
|
462
|
+
}
|
|
463
|
+
wake();
|
|
464
|
+
}
|
|
418
465
|
// Theme: the stylesheet is written entirely against --aiw-* custom
|
|
419
466
|
// properties, with light defaults + a prefers-color-scheme:dark token block
|
|
420
467
|
// baked into the sheet. Only what the host EXPLICITLY passed goes inline on
|
|
@@ -882,24 +929,139 @@ export function createAiChatWidget(opts) {
|
|
|
882
929
|
}
|
|
883
930
|
// Auto-navigate toggle — a BROWSER-LOCAL setting: when on, Copilot follows its
|
|
884
931
|
// own navigation suggestions automatically (no confirm button). Off by default.
|
|
932
|
+
// DECLARED HERE, not with the rest of the advanced-view state further down.
|
|
933
|
+
// The auto-navigate toggle reads it while the header menu is being built, and
|
|
934
|
+
// a `let` declared after that point is in its temporal dead zone at that
|
|
935
|
+
// moment — accessing it threw "Cannot access 'advanced' before
|
|
936
|
+
// initialization" and took the WHOLE widget down on mount, not just the
|
|
937
|
+
// toggle. Caught by opening the examples page; no test asserted the widget
|
|
938
|
+
// mounts with these options set, which is the more useful gap.
|
|
939
|
+
let advanced = false;
|
|
885
940
|
const AUTONAV_KEY = `${ns}:autonav`;
|
|
886
941
|
let autoNav = readFlag(AUTONAV_KEY);
|
|
942
|
+
// Auto-apply: proposals the host has classified as safe are applied without
|
|
943
|
+
// the user pressing Apply. Off by default and browser-local, like auto-nav.
|
|
944
|
+
const AUTOAPPLY_KEY = `${ns}:autoapply`;
|
|
945
|
+
let autoApply = readFlag(AUTOAPPLY_KEY);
|
|
946
|
+
let syncAutomation = () => { };
|
|
887
947
|
if (opts.autoNavOption) {
|
|
888
948
|
const autoNavItem = menuItem(L("autoNavigate"));
|
|
889
949
|
autoNavItem.ico.innerHTML = ICON_COMPASS;
|
|
890
950
|
const syncAutoNav = () => {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
951
|
+
// ADVANCED MODE PINS IT ON, and now says so instead of lying about it.
|
|
952
|
+
// Advanced has always auto-run pure navigation unconditionally — the guard
|
|
953
|
+
// downstream reads `(autoNav || advanced)` — so a toggle showing "off"
|
|
954
|
+
// there was describing behaviour that was not happening. Pinned and
|
|
955
|
+
// disabled is the honest rendering of what the code already does.
|
|
956
|
+
const pinned = advanced;
|
|
957
|
+
autoNavItem.setState(pinned || autoNav);
|
|
958
|
+
autoNavItem.btn.disabled = pinned;
|
|
959
|
+
autoNavItem.btn.title = pinned
|
|
960
|
+
? L("autoNavPinnedHint")
|
|
961
|
+
: autoNav
|
|
962
|
+
? L("autoNavOnHint")
|
|
963
|
+
: L("autoNavOffHint");
|
|
895
964
|
};
|
|
896
965
|
syncAutoNav();
|
|
897
966
|
autoNavItem.btn.addEventListener("click", () => {
|
|
967
|
+
if (advanced)
|
|
968
|
+
return;
|
|
898
969
|
autoNav = !autoNav;
|
|
899
970
|
writeFlag(AUTONAV_KEY, autoNav);
|
|
900
971
|
syncAutoNav();
|
|
901
972
|
});
|
|
902
973
|
moreMenu.appendChild(autoNavItem.btn);
|
|
974
|
+
const prevNav = syncAutomation;
|
|
975
|
+
syncAutomation = () => {
|
|
976
|
+
prevNav();
|
|
977
|
+
syncAutoNav();
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
// Auto-apply — PROPOSALS ONLY, and only those the host says are safe. Never
|
|
981
|
+
// pinned by advanced mode: advanced makes the assistant faster at moving
|
|
982
|
+
// around, which is not a reason to let it write without being asked.
|
|
983
|
+
if (opts.autoApplyOption) {
|
|
984
|
+
const autoApplyItem = menuItem(L("autoApply"));
|
|
985
|
+
autoApplyItem.ico.innerHTML = ICON_BOLT;
|
|
986
|
+
const syncAutoApply = () => {
|
|
987
|
+
autoApplyItem.setState(autoApply);
|
|
988
|
+
autoApplyItem.btn.title = autoApply
|
|
989
|
+
? L("autoApplyOnHint")
|
|
990
|
+
: L("autoApplyOffHint");
|
|
991
|
+
};
|
|
992
|
+
syncAutoApply();
|
|
993
|
+
autoApplyItem.btn.addEventListener("click", () => {
|
|
994
|
+
autoApply = !autoApply;
|
|
995
|
+
writeFlag(AUTOAPPLY_KEY, autoApply);
|
|
996
|
+
syncAutoApply();
|
|
997
|
+
});
|
|
998
|
+
moreMenu.appendChild(autoApplyItem.btn);
|
|
999
|
+
const prevApply = syncAutomation;
|
|
1000
|
+
syncAutomation = () => {
|
|
1001
|
+
prevApply();
|
|
1002
|
+
syncAutoApply();
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
// "How automation works" — the explainer.
|
|
1006
|
+
//
|
|
1007
|
+
// WHY IT IS IN THE MENU AND NOT IN DOCS. These two switches change what an
|
|
1008
|
+
// assistant may do on someone's behalf. The person deciding is standing in a
|
|
1009
|
+
// dropdown, not reading a manual, and "Auto-apply — on/off" tells them nothing
|
|
1010
|
+
// about what is still going to ask them first. The panel is deliberately
|
|
1011
|
+
// heavier on what NEVER happens than on what does: that is the part a person
|
|
1012
|
+
// needs to trust the switch, and the part they cannot infer from the label.
|
|
1013
|
+
const offersAutomation = Boolean(opts.autoNavOption || opts.autoApplyOption);
|
|
1014
|
+
if (offersAutomation && opts.automationHelp !== false) {
|
|
1015
|
+
const helpItem = menuItem(L("automationHelp"));
|
|
1016
|
+
helpItem.ico.innerHTML = ICON_HELP_CIRCLE;
|
|
1017
|
+
// No on/off state — it is a door, not a switch.
|
|
1018
|
+
helpItem.btn.querySelector(`.${PREFIX}-menu-state`)?.remove();
|
|
1019
|
+
helpItem.btn.addEventListener("click", () => {
|
|
1020
|
+
// `setMenu(false)`, not a class the menu does not use. The first version
|
|
1021
|
+
// removed `-more-open` from the wrapper; the menu is opened by toggling
|
|
1022
|
+
// `-menu-open` on the MENU, so the dropdown stayed up on top of the panel
|
|
1023
|
+
// it had just opened. Nothing threw — it just looked wrong, which is why
|
|
1024
|
+
// it took opening the page to see.
|
|
1025
|
+
setMenu(false);
|
|
1026
|
+
const sheet = el("div", `${PREFIX}-automation`);
|
|
1027
|
+
const card = el("div", `${PREFIX}-automation-card`);
|
|
1028
|
+
const h = el("h3", `${PREFIX}-automation-title`);
|
|
1029
|
+
h.textContent = L("automationHelpTitle");
|
|
1030
|
+
card.appendChild(h);
|
|
1031
|
+
const lines = [];
|
|
1032
|
+
if (opts.autoNavOption) {
|
|
1033
|
+
lines.push(advanced ? L("automationHelpNavPinned") : L("automationHelpNav"));
|
|
1034
|
+
}
|
|
1035
|
+
if (opts.autoApplyOption)
|
|
1036
|
+
lines.push(L("automationHelpApply"));
|
|
1037
|
+
lines.push(L("automationHelpNever"));
|
|
1038
|
+
lines.push(L("automationHelpLocal"));
|
|
1039
|
+
for (const text of lines) {
|
|
1040
|
+
const para = el("p", `${PREFIX}-automation-line`);
|
|
1041
|
+
para.textContent = text;
|
|
1042
|
+
card.appendChild(para);
|
|
1043
|
+
}
|
|
1044
|
+
const close = el("button", `${PREFIX}-automation-close`);
|
|
1045
|
+
close.type = "button";
|
|
1046
|
+
close.textContent = L("automationHelpClose");
|
|
1047
|
+
const dismiss = () => sheet.remove();
|
|
1048
|
+
close.addEventListener("click", dismiss);
|
|
1049
|
+
// Click-outside and Escape both close it — a panel that traps someone who
|
|
1050
|
+
// opened it out of curiosity teaches them not to open things.
|
|
1051
|
+
sheet.addEventListener("click", (e) => {
|
|
1052
|
+
if (e.target === sheet)
|
|
1053
|
+
dismiss();
|
|
1054
|
+
});
|
|
1055
|
+
sheet.addEventListener("keydown", (e) => {
|
|
1056
|
+
if (e.key === "Escape")
|
|
1057
|
+
dismiss();
|
|
1058
|
+
});
|
|
1059
|
+
card.appendChild(close);
|
|
1060
|
+
sheet.appendChild(card);
|
|
1061
|
+
panel.appendChild(sheet);
|
|
1062
|
+
close.focus();
|
|
1063
|
+
});
|
|
1064
|
+
moreMenu.appendChild(helpItem.btn);
|
|
903
1065
|
}
|
|
904
1066
|
// The "More" menu holds the secondary controls; drop it into the header after
|
|
905
1067
|
// the primary actions (new chat / history), before expand + close.
|
|
@@ -2206,6 +2368,24 @@ export function createAiChatWidget(opts) {
|
|
|
2206
2368
|
// Restore an unsent draft from a prior session; keep it in sync as they type.
|
|
2207
2369
|
input.value = loadDraft();
|
|
2208
2370
|
input.addEventListener("input", () => saveDraft(input.value));
|
|
2371
|
+
// WHILE YOU TYPE, IT WATCHES WHAT YOU TYPE. The mark stops following the
|
|
2372
|
+
// pointer and looks at the composer instead — the small courtesy of appearing
|
|
2373
|
+
// to read over your shoulder, and a clearer signal than any spinner that the
|
|
2374
|
+
// thing is attending to you rather than to the page.
|
|
2375
|
+
//
|
|
2376
|
+
// Released on blur and when the field empties, so the mark goes back to the
|
|
2377
|
+
// cursor rather than staring at an empty box forever.
|
|
2378
|
+
const watchComposer = () => {
|
|
2379
|
+
if (!motion)
|
|
2380
|
+
return;
|
|
2381
|
+
const r = input.getBoundingClientRect();
|
|
2382
|
+
motion.attend(input.value.trim() || document.activeElement === input
|
|
2383
|
+
? { x: r.left + r.width * 0.18, y: r.top + r.height / 2 }
|
|
2384
|
+
: null);
|
|
2385
|
+
};
|
|
2386
|
+
input.addEventListener("input", watchComposer);
|
|
2387
|
+
input.addEventListener("focus", watchComposer);
|
|
2388
|
+
input.addEventListener("blur", () => motion?.attend(null));
|
|
2209
2389
|
const sendBtn = el("button", `${PREFIX}-send`);
|
|
2210
2390
|
sendBtn.type = "submit";
|
|
2211
2391
|
sendBtn.textContent = L("send");
|
|
@@ -2623,7 +2803,6 @@ export function createAiChatWidget(opts) {
|
|
|
2623
2803
|
// that Copilot drives via the agent bridge. Navigation moves the FRAME; on-page
|
|
2624
2804
|
// actions (highlight/fill/click) run INSIDE the frame over postMessage, so they
|
|
2625
2805
|
// hit the app the user is watching — not the parent shell behind the overlay.
|
|
2626
|
-
let advanced = false;
|
|
2627
2806
|
let advancedFull = false;
|
|
2628
2807
|
let paneCollapsed = false;
|
|
2629
2808
|
let transport = null;
|
|
@@ -3845,6 +4024,21 @@ export function createAiChatWidget(opts) {
|
|
|
3845
4024
|
wrap.appendChild(row);
|
|
3846
4025
|
log.appendChild(wrap);
|
|
3847
4026
|
scrollDown(true);
|
|
4027
|
+
// AUTO-APPLY — three conditions, all required, and each one is a decision.
|
|
4028
|
+
//
|
|
4029
|
+
// 1. the user turned it on. Off by default, browser-local, theirs.
|
|
4030
|
+
// 2. the HOST says this particular write is safe to apply unasked. The
|
|
4031
|
+
// widget cannot tell a draft from a publish — they arrive here as the
|
|
4032
|
+
// same shape — so it never guesses; no predicate means nothing applies.
|
|
4033
|
+
// 3. the card asks the user for NOTHING. `fields` are inputs the assistant
|
|
4034
|
+
// explicitly requested; applying past them would answer a question that
|
|
4035
|
+
// was put to the person, using whatever the model guessed.
|
|
4036
|
+
//
|
|
4037
|
+
// The card is still rendered and still says what happened. Auto-apply
|
|
4038
|
+
// removes a click, not the record of the change.
|
|
4039
|
+
if (autoApply && !fields.length && opts.autoApplyOption?.(name, args)) {
|
|
4040
|
+
apply.click();
|
|
4041
|
+
}
|
|
3848
4042
|
}
|
|
3849
4043
|
/**
|
|
3850
4044
|
* Stream-loss recovery. The api runs a turn to completion and persists the
|