@ai-ecoverse/slicc-spectrum 1.77.1 → 1.78.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/README.md +5 -5
- package/dist/slicc-dummy.js +48 -1
- package/dist/slicc-dummy.js.map +2 -2
- package/dist/slicc-ui.js +321 -153
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/agents.d.ts +3 -0
- package/dist/types/app/approvals.d.ts +6 -4
- package/dist/types/dummy/approvals.d.ts +1 -1
- package/dist/types/model/types.d.ts +37 -3
- package/package.json +4 -4
package/dist/slicc-ui.js
CHANGED
|
@@ -8638,12 +8638,12 @@ var o41 = class extends a10 {
|
|
|
8638
8638
|
};
|
|
8639
8639
|
e25("swc-icon-view-grid", o41);
|
|
8640
8640
|
|
|
8641
|
-
// node_modules/@adobe/spectrum-wc-icons/dist/
|
|
8641
|
+
// node_modules/@adobe/spectrum-wc-icons/dist/ChevronRight.js
|
|
8642
8642
|
function e71() {
|
|
8643
|
-
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="
|
|
8643
|
+
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M7.75 16.465a.748.748 0 0 1-.54-1.27l4.999-5.197-4.986-5.184a.75.75 0 0 1 .02-1.06.75.75 0 0 1 1.06.021L13.79 9.48c.28.29.28.749 0 1.039l-5.5 5.716a.75.75 0 0 1-.54.23"/></svg>';
|
|
8644
8644
|
}
|
|
8645
8645
|
|
|
8646
|
-
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-
|
|
8646
|
+
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-chevron-right.js
|
|
8647
8647
|
var o42 = class extends a10 {
|
|
8648
8648
|
static get styles() {
|
|
8649
8649
|
return [t40];
|
|
@@ -8654,7 +8654,25 @@ var o42 = class extends a10 {
|
|
|
8654
8654
|
`;
|
|
8655
8655
|
}
|
|
8656
8656
|
};
|
|
8657
|
-
e25("swc-icon-
|
|
8657
|
+
e25("swc-icon-chevron-right", o42);
|
|
8658
|
+
|
|
8659
|
+
// node_modules/@adobe/spectrum-wc-icons/dist/Close.js
|
|
8660
|
+
function e72() {
|
|
8661
|
+
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="m11.06 10 5.207-5.206a.75.75 0 1 0-1.06-1.06L10 8.938 4.793 3.733a.75.75 0 1 0-1.06 1.06L8.939 10l-5.206 5.206a.75.75 0 1 0 1.06 1.06L10 11.062l5.207 5.206a.75.75 0 0 0 1.06 0 .75.75 0 0 0 0-1.06z"/></svg>';
|
|
8662
|
+
}
|
|
8663
|
+
|
|
8664
|
+
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-close.js
|
|
8665
|
+
var o43 = class extends a10 {
|
|
8666
|
+
static get styles() {
|
|
8667
|
+
return [t40];
|
|
8668
|
+
}
|
|
8669
|
+
render() {
|
|
8670
|
+
return b`
|
|
8671
|
+
${o16(e72())}
|
|
8672
|
+
`;
|
|
8673
|
+
}
|
|
8674
|
+
};
|
|
8675
|
+
e25("swc-icon-close", o43);
|
|
8658
8676
|
|
|
8659
8677
|
// src/app/base.ts
|
|
8660
8678
|
var ModelElement = class extends i2 {
|
|
@@ -8950,10 +8968,10 @@ var s8 = class {
|
|
|
8950
8968
|
};
|
|
8951
8969
|
|
|
8952
8970
|
// node_modules/@spectrum-web-components/button-group/src/button-group.css.js
|
|
8953
|
-
var
|
|
8971
|
+
var o44 = i`
|
|
8954
8972
|
:host{--spectrum-buttongroup-spacing:var(--mod-buttongroup-spacing,var(--mod-buttongroup-spacing-horizontal,var(--spectrum-spacing-300)));--spectrum-buttongroup-display:flex;--spectrum-buttongroup-flex-direction:row;--spectrum-buttongroup-justify-content:var(--mod-buttongroup-justify-content,normal)}:host([size=s]){--spectrum-buttongroup-spacing:var(--mod-buttongroup-spacing,var(--mod-buttongroup-spacing-horizontal,var(--spectrum-spacing-200)))}:host([vertical]){--mod-buttongroup-spacing:var(--mod-buttongroup-spacing-vertical);--spectrum-buttongroup-display:inline-flex;--spectrum-buttongroup-flex-direction:column}:host{display:var(--spectrum-buttongroup-display);flex-direction:var(--spectrum-buttongroup-flex-direction);gap:var(--spectrum-buttongroup-spacing);justify-content:var(--spectrum-buttongroup-justify-content);flex-wrap:wrap}::slotted(*){flex-shrink:0}:host([vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-flex-grow:1;--spectrum-actionbutton-label-text-align:left}:host([vertical]:dir(rtl)) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:right}
|
|
8955
8973
|
`;
|
|
8956
|
-
var button_group_css_default =
|
|
8974
|
+
var button_group_css_default = o44;
|
|
8957
8975
|
|
|
8958
8976
|
// node_modules/@spectrum-web-components/button-group/src/ButtonGroup.js
|
|
8959
8977
|
var a11 = Object.defineProperty;
|
|
@@ -9059,20 +9077,20 @@ function h5(a23, r40) {
|
|
|
9059
9077
|
}
|
|
9060
9078
|
}), t90;
|
|
9061
9079
|
}
|
|
9062
|
-
var
|
|
9080
|
+
var o45 = class o46 extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
9063
9081
|
constructor() {
|
|
9064
9082
|
super(...arguments);
|
|
9065
9083
|
this.resizeController = new s8(this, { callback: () => {
|
|
9066
9084
|
this.shouldManageTabOrderForScrolling();
|
|
9067
9085
|
} });
|
|
9068
9086
|
this._variant = "";
|
|
9069
|
-
this.labelledbyId = `sp-dialog-label-${
|
|
9087
|
+
this.labelledbyId = `sp-dialog-label-${o46.instanceCount++}`;
|
|
9070
9088
|
this.shouldManageTabOrderForScrolling = () => {
|
|
9071
9089
|
if (!this.contentElement) return;
|
|
9072
9090
|
const { offsetHeight: e122, scrollHeight: t90 } = this.contentElement;
|
|
9073
9091
|
e122 < t90 ? this.contentElement.tabIndex = 0 : this.contentElement.removeAttribute("tabindex");
|
|
9074
9092
|
};
|
|
9075
|
-
this.describedbyId = `sp-dialog-description-${
|
|
9093
|
+
this.describedbyId = `sp-dialog-description-${o46.instanceCount++}`;
|
|
9076
9094
|
}
|
|
9077
9095
|
static get styles() {
|
|
9078
9096
|
return [alert_dialog_css_default];
|
|
@@ -9145,17 +9163,17 @@ var o44 = class o45 extends FocusVisiblePolyfillMixin(SpectrumElement) {
|
|
|
9145
9163
|
`;
|
|
9146
9164
|
}
|
|
9147
9165
|
};
|
|
9148
|
-
|
|
9149
|
-
var AlertDialog =
|
|
9166
|
+
o45.instanceCount = 0, l13([e(".content")], o45.prototype, "contentElement", 2), l13([n({ type: String, reflect: true })], o45.prototype, "variant", 1);
|
|
9167
|
+
var AlertDialog = o45;
|
|
9150
9168
|
|
|
9151
9169
|
// node_modules/@spectrum-web-components/alert-dialog/sp-alert-dialog.js
|
|
9152
9170
|
defineElement("sp-alert-dialog", AlertDialog);
|
|
9153
9171
|
|
|
9154
9172
|
// node_modules/@spectrum-web-components/icon/src/spectrum-icon-asterisk.css.js
|
|
9155
|
-
var
|
|
9173
|
+
var e73 = i`
|
|
9156
9174
|
.spectrum-UIIcon-Asterisk75{--spectrum-icon-size:var(--spectrum-asterisk-icon-size-75)}.spectrum-UIIcon-Asterisk100{--spectrum-icon-size:var(--spectrum-asterisk-icon-size-100)}.spectrum-UIIcon-Asterisk200{--spectrum-icon-size:var(--spectrum-asterisk-icon-size-200)}.spectrum-UIIcon-Asterisk300{--spectrum-icon-size:var(--spectrum-asterisk-icon-size-300)}
|
|
9157
9175
|
`;
|
|
9158
|
-
var spectrum_icon_asterisk_css_default =
|
|
9176
|
+
var spectrum_icon_asterisk_css_default = e73;
|
|
9159
9177
|
|
|
9160
9178
|
// node_modules/@spectrum-web-components/icons-ui/src/icons-s2/Asterisk100.js
|
|
9161
9179
|
var Asterisk100Icon = ({ width: l24 = 24, height: t90 = 24, hidden: e122 = false, title: r40 = "Asterisk100" } = {}) => tag`<svg
|
|
@@ -9208,7 +9226,7 @@ var field_label_css_default = t44;
|
|
|
9208
9226
|
// node_modules/@spectrum-web-components/field-label/src/FieldLabel.js
|
|
9209
9227
|
var c15 = Object.defineProperty;
|
|
9210
9228
|
var d12 = Object.getOwnPropertyDescriptor;
|
|
9211
|
-
var
|
|
9229
|
+
var o47 = (n37, l24, e122, i26) => {
|
|
9212
9230
|
for (var t90 = i26 > 1 ? void 0 : i26 ? d12(l24, e122) : l24, s19 = n37.length - 1, r40; s19 >= 0; s19--) (r40 = n37[s19]) && (t90 = (i26 ? r40(l24, e122, t90) : r40(t90)) || t90);
|
|
9213
9231
|
return i26 && t90 && c15(l24, e122, t90), t90;
|
|
9214
9232
|
};
|
|
@@ -9268,16 +9286,16 @@ var FieldLabel = class extends SizedMixin(SpectrumElement, { noDefaultSize: true
|
|
|
9268
9286
|
this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${randomID()}`), e122.has("for") && (this.resolvedElement.selector = this.for ? `#${this.for}` : ""), (e122.has("id") || e122.has(elementResolverUpdatedSymbol)) && this.manageTarget();
|
|
9269
9287
|
}
|
|
9270
9288
|
};
|
|
9271
|
-
|
|
9289
|
+
o47([n({ type: Boolean, reflect: true })], FieldLabel.prototype, "disabled", 2), o47([n({ type: String })], FieldLabel.prototype, "id", 2), o47([n({ type: String })], FieldLabel.prototype, "for", 2), o47([n({ type: Boolean, reflect: true })], FieldLabel.prototype, "required", 2), o47([e("slot")], FieldLabel.prototype, "slotEl", 2), o47([n({ type: String, reflect: true, attribute: "side-aligned" })], FieldLabel.prototype, "sideAligned", 2);
|
|
9272
9290
|
|
|
9273
9291
|
// node_modules/@spectrum-web-components/field-label/sp-field-label.js
|
|
9274
9292
|
defineElement("sp-field-label", FieldLabel);
|
|
9275
9293
|
|
|
9276
9294
|
// node_modules/@spectrum-web-components/help-text/src/help-text.css.js
|
|
9277
|
-
var
|
|
9295
|
+
var e74 = i`
|
|
9278
9296
|
@media (forced-colors:active){:host{--highcontrast-helptext-content-color-default:CanvasText;--highcontrast-helptext-icon-color-default:CanvasText}:host,.text,.icon{forced-color-adjust:none}}:host{--spectrum-helptext-content-color-default:var(--spectrum-neutral-subdued-content-color-default);--spectrum-helptext-icon-color-default:var(--spectrum-neutral-subdued-content-color-default);min-block-size:var(--mod-helptext-min-height,var(--spectrum-helptext-min-height));font-size:var(--mod-helptext-font-size,var(--spectrum-helptext-font-size));color:var(--highcontrast-helptext-content-color-default,var(--mod-helptext-content-color-default,var(--spectrum-helptext-content-color-default)));display:flex}:host([size=s]){--spectrum-helptext-min-height:var(--spectrum-component-height-75);--spectrum-helptext-icon-size:var(--spectrum-workflow-icon-size-75);--spectrum-helptext-font-size:var(--spectrum-font-size-75);--spectrum-helptext-text-to-visual:var(--spectrum-text-to-visual-75);--spectrum-helptext-top-to-workflow-icon:var(--spectrum-help-text-top-to-workflow-icon-small);--spectrum-helptext-bottom-to-workflow-icon:var(--spectrum-helptext-top-to-workflow-icon)}:host,:host{--spectrum-helptext-min-height:var(--spectrum-component-height-75);--spectrum-helptext-icon-size:var(--spectrum-workflow-icon-size-100);--spectrum-helptext-font-size:var(--spectrum-font-size-75);--spectrum-helptext-text-to-visual:var(--spectrum-text-to-visual-75);--spectrum-helptext-top-to-workflow-icon:var(--spectrum-help-text-top-to-workflow-icon-medium);--spectrum-helptext-bottom-to-workflow-icon:var(--spectrum-helptext-top-to-workflow-icon)}:host([size=l]){--spectrum-helptext-min-height:var(--spectrum-component-height-100);--spectrum-helptext-icon-size:var(--spectrum-workflow-icon-size-200);--spectrum-helptext-font-size:var(--spectrum-font-size-100);--spectrum-helptext-text-to-visual:var(--spectrum-text-to-visual-100);--spectrum-helptext-top-to-workflow-icon:var(--spectrum-help-text-top-to-workflow-icon-large);--spectrum-helptext-bottom-to-workflow-icon:var(--spectrum-helptext-top-to-workflow-icon)}:host([size=xl]){--spectrum-helptext-min-height:var(--spectrum-component-height-200);--spectrum-helptext-icon-size:var(--spectrum-workflow-icon-size-300);--spectrum-helptext-font-size:var(--spectrum-font-size-200);--spectrum-helptext-text-to-visual:var(--spectrum-text-to-visual-200);--spectrum-helptext-top-to-workflow-icon:var(--spectrum-help-text-top-to-workflow-icon-extra-large);--spectrum-helptext-bottom-to-workflow-icon:var(--spectrum-helptext-top-to-workflow-icon)}:host([variant=neutral]){--spectrum-helptext-content-color-default:var(--spectrum-neutral-subdued-content-color-default);--spectrum-helptext-icon-color-default:var(--spectrum-neutral-subdued-content-color-default)}:host([variant=negative]){--spectrum-helptext-content-color-default:var(--spectrum-negative-color-900);--spectrum-helptext-icon-color-default:var(--spectrum-negative-color-900)}:host([disabled]){--spectrum-helptext-content-color-default:var(--spectrum-disabled-content-color);--spectrum-helptext-icon-color-default:var(--spectrum-disabled-content-color)}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--mod-helptext-line-height:var(--mod-helptext-line-height-cjk,var(--spectrum-cjk-line-height-100))}.icon{inline-size:var(--mod-helptext-icon-size,var(--spectrum-helptext-icon-size));block-size:var(--mod-helptext-icon-size,var(--spectrum-helptext-icon-size));flex-shrink:0;margin-inline-end:var(--mod-helptext-text-to-visual,var(--spectrum-helptext-text-to-visual));padding-block-start:var(--mod-helptext-top-to-workflow-icon,var(--spectrum-helptext-top-to-workflow-icon));padding-block-end:var(--mod-helptext-bottom-to-workflow-icon,var(--spectrum-helptext-bottom-to-workflow-icon))}.text{line-height:var(--mod-helptext-line-height,var(--spectrum-line-height-100));padding-block-start:var(--mod-helptext-top-to-text,var(--spectrum-helptext-top-to-text));padding-block-end:var(--mod-helptext-bottom-to-text,var(--spectrum-helptext-bottom-to-text))}:host([variant=neutral]) .text{color:var(--highcontrast-helptext-content-color-default,var(--mod-helptext-content-color-default,var(--spectrum-helptext-content-color-default)))}:host([variant=neutral]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--mod-helptext-icon-color-default,var(--spectrum-helptext-icon-color-default)))}:host([variant=negative]) .text{color:var(--highcontrast-helptext-content-color-default,var(--mod-helptext-content-color-default,var(--spectrum-helptext-content-color-default)))}:host([variant=negative]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--mod-helptext-icon-color-default,var(--spectrum-helptext-icon-color-default)))}:host([disabled]) .text{color:var(--highcontrast-helptext-content-color-default,var(--mod-helptext-content-color-default,var(--spectrum-helptext-content-color-default)))}:host([disabled]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--mod-helptext-icon-color-default,var(--spectrum-helptext-icon-color-default)))}:host{--spectrum-helptext-top-to-text:var(--system-helptext-top-to-text);--spectrum-helptext-bottom-to-text:var(--system-helptext-bottom-to-text)}:host([size=s]){--spectrum-helptext-top-to-text:var(--system-helptext-top-to-text-small);--spectrum-helptext-bottom-to-text:var(--system-helptext-bottom-to-text-small)}:host([size=l]){--spectrum-helptext-top-to-text:var(--system-helptext-top-to-text-large);--spectrum-helptext-bottom-to-text:var(--system-helptext-bottom-to-text-large)}:host([size=xl]){--spectrum-helptext-top-to-text:var(--system-helptext-top-to-text-extra-large);--spectrum-helptext-bottom-to-text:var(--system-helptext-bottom-to-text-extra-large)}
|
|
9279
9297
|
`;
|
|
9280
|
-
var help_text_css_default =
|
|
9298
|
+
var help_text_css_default = e74;
|
|
9281
9299
|
|
|
9282
9300
|
// node_modules/@spectrum-web-components/help-text/src/HelpText.js
|
|
9283
9301
|
var c16 = Object.defineProperty;
|
|
@@ -9557,7 +9575,7 @@ function prompt(options) {
|
|
|
9557
9575
|
var t45 = i`@keyframes swc-fills-rotate{0%{transform:rotate(var(--swc-progress-circle-rotate-start, -90deg))}to{transform:rotate(var(--swc-progress-circle-rotate-end, 270deg))}}@keyframes swc-dashoffset-animation{0%,to{stroke-dashoffset:75px}30%{stroke-dashoffset:var(--swc-progress-circle-dashoffset-30, 20px)}}:host{display:inline-block;align-self:center;justify-self:center;place-self:center}*{box-sizing:border-box}.swc-ProgressCircle{--_swc-progress-circle-size: var(--swc-progress-circle-size, var(--swc-progress-circle-size-medium));--_swc-progress-circle-track-border-color: var(--swc-progress-circle-track-border-color, var(--swc-gray-300));--_swc-progress-circle-fill-border-color: var(--swc-progress-circle-fill-border-color, var(--swc-accent-color-900));--_swc-progress-circle-thickness: var(--swc-progress-circle-thickness, var(--swc-progress-circle-thickness-medium));display:inline-block;position:relative;inline-size:var(--_swc-progress-circle-size);block-size:var(--_swc-progress-circle-size);direction:ltr;transform:translateZ(0)}.swc-ProgressCircle-fill,.swc-ProgressCircle-track{inline-size:var(--_swc-progress-circle-size);block-size:var(--_swc-progress-circle-size)}.swc-ProgressCircle-track{stroke:var(--_swc-progress-circle-track-border-color);stroke-width:var(--_swc-progress-circle-thickness)}.swc-ProgressCircle-fill{stroke:var(--_swc-progress-circle-fill-border-color);stroke-width:var(--_swc-progress-circle-thickness);transform:rotate(-90deg);transform-origin:center}.swc-ProgressCircle--indeterminate .swc-ProgressCircle-fill{transform-origin:center;animation:swc-fills-rotate 1s cubic-bezier(.6,.1,.3,.9) infinite,swc-dashoffset-animation 1s cubic-bezier(.25,.1,.25,1.3) infinite;will-change:transform}:host([size=\"s\"]){--swc-progress-circle-size: var(--swc-progress-circle-size-small);--swc-progress-circle-thickness: var(--swc-progress-circle-thickness-small)}:host([size=\"l\"]){--swc-progress-circle-size: var(--swc-progress-circle-size-large);--swc-progress-circle-thickness: var(--swc-progress-circle-thickness-large)}.swc-ProgressCircle:where(.swc-ProgressCircle--staticWhite){--swc-progress-circle-track-border-color: var(--swc-transparent-white-300);--swc-progress-circle-fill-border-color: var(--swc-transparent-white-900)}.swc-ProgressCircle:where(.swc-ProgressCircle--staticBlack){--swc-progress-circle-track-border-color: var(--swc-transparent-black-300);--swc-progress-circle-fill-border-color: var(--swc-transparent-black-900)}@media(prefers-reduced-motion:reduce){.swc-ProgressCircle--indeterminate .swc-ProgressCircle-fill{--swc-progress-circle-dashoffset-30: 0;--swc-progress-circle-rotate-start: 0deg;--swc-progress-circle-rotate-end: 360deg;animation-duration:15s;animation-timing-function:linear,linear}}@media(forced-colors:active){.swc-ProgressCircle{--swc-progress-circle-fill-border-color: Highlight;@media(prefers-color-scheme:dark){--swc-progress-circle-track-border-color: var(--swc-transparent-white-300)}@media(prefers-color-scheme:light){--swc-progress-circle-track-border-color: var(--swc-transparent-black-300)}}}`;
|
|
9558
9576
|
|
|
9559
9577
|
// node_modules/@adobe/spectrum-wc-core/dist/components/progress-circle/ProgressCircle.types.js
|
|
9560
|
-
var
|
|
9578
|
+
var e75 = [
|
|
9561
9579
|
"s",
|
|
9562
9580
|
"m",
|
|
9563
9581
|
"l"
|
|
@@ -9566,7 +9584,7 @@ var t46 = ["white", "black"];
|
|
|
9566
9584
|
|
|
9567
9585
|
// node_modules/@adobe/spectrum-wc-core/dist/components/progress-circle/ProgressCircle.base.js
|
|
9568
9586
|
var u16;
|
|
9569
|
-
var d13 = class
|
|
9587
|
+
var d13 = class e76 extends i12(i9, { validSizes: e75 }) {
|
|
9570
9588
|
constructor(...e122) {
|
|
9571
9589
|
super(...e122), this.label = "", this.progress = null, this.languageResolver = new i10(this);
|
|
9572
9590
|
}
|
|
@@ -9591,11 +9609,11 @@ var d13 = class e75 extends i12(i9, { validSizes: e74 }) {
|
|
|
9591
9609
|
}).format(((e122 = this.progress) == null ? 0 : e122) / 100);
|
|
9592
9610
|
}
|
|
9593
9611
|
warnDeprecatedLightDomChildren() {
|
|
9594
|
-
r9(this,
|
|
9612
|
+
r9(this, e76.hasMeaningfulLightDomChildren(this), `<${this.localName}> no longer has a default slot. Light DOM children are not rendered and are not used for an accessible name. Use the "label" attribute or property, or "aria-label" / "aria-labelledby" on the host instead.`, "https://spectrum-web-components.adobe.com/?path=/docs/components-progress-circle--docs", { level: "deprecation" });
|
|
9595
9613
|
}
|
|
9596
9614
|
willUpdate(t90) {
|
|
9597
9615
|
if (t90.has("progress") && this.progress !== null) {
|
|
9598
|
-
let t91 =
|
|
9616
|
+
let t91 = e76.clampProgress(this.progress);
|
|
9599
9617
|
t91 !== this.progress && (this.progress = t91);
|
|
9600
9618
|
}
|
|
9601
9619
|
super.willUpdate(t90);
|
|
@@ -9604,7 +9622,7 @@ var d13 = class e75 extends i12(i9, { validSizes: e74 }) {
|
|
|
9604
9622
|
super.firstUpdated(e122), this.setAttribute("role", "progressbar");
|
|
9605
9623
|
}
|
|
9606
9624
|
updated(t90) {
|
|
9607
|
-
if (super.updated(t90), t90.has("progress") && (this.progress !== null && this.progress >= 0 ? (this.setAttribute("aria-valuemin", "0"), this.setAttribute("aria-valuemax", "100"), this.setAttribute("aria-valuenow", String(this.progress)), this.setAttribute("aria-valuetext", this.formatProgress())) : (this.removeAttribute("aria-valuemin"), this.removeAttribute("aria-valuemax"), this.removeAttribute("aria-valuenow"), this.removeAttribute("aria-valuetext"))), this.progress !== null && t90.has(e27) && this.setAttribute("aria-valuetext", this.formatProgress()), t90.has("label") && (this.label.length ? this.setAttribute("aria-label", this.label) : t90.get("label") === this.getAttribute("aria-label") && this.removeAttribute("aria-label")), t90.has("label") && !this.hasAccessibleName() && (this.setAttribute("aria-label",
|
|
9625
|
+
if (super.updated(t90), t90.has("progress") && (this.progress !== null && this.progress >= 0 ? (this.setAttribute("aria-valuemin", "0"), this.setAttribute("aria-valuemax", "100"), this.setAttribute("aria-valuenow", String(this.progress)), this.setAttribute("aria-valuetext", this.formatProgress())) : (this.removeAttribute("aria-valuemin"), this.removeAttribute("aria-valuemax"), this.removeAttribute("aria-valuenow"), this.removeAttribute("aria-valuetext"))), this.progress !== null && t90.has(e27) && this.setAttribute("aria-valuetext", this.formatProgress()), t90.has("label") && (this.label.length ? this.setAttribute("aria-label", this.label) : t90.get("label") === this.getAttribute("aria-label") && this.removeAttribute("aria-label")), t90.has("label") && !this.hasAccessibleName() && (this.setAttribute("aria-label", e76.DEFAULT_LABEL), r9(this, true, `<${this.localName}> requires an accessible name. A default label of "${e76.DEFAULT_LABEL}" has been applied, but a more specific label should be provided via:`, "https://spectrum-web-components.adobe.com/?path=/docs/components-progress-circle--docs", {
|
|
9608
9626
|
type: "accessibility",
|
|
9609
9627
|
issues: [
|
|
9610
9628
|
'value supplied to the "label" attribute, which will be displayed visually as part of the element, or',
|
|
@@ -9688,40 +9706,40 @@ l14 = u17, l14.STATIC_COLORS = t46, e12([n({
|
|
|
9688
9706
|
e25("swc-progress-circle", u17);
|
|
9689
9707
|
|
|
9690
9708
|
// node_modules/@adobe/spectrum-wc-icons/dist/AlertTriangle.js
|
|
9691
|
-
function
|
|
9709
|
+
function e77() {
|
|
9692
9710
|
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M10 15.123a.9.9 0 0 1-.627-.228.956.956 0 0 1 0-1.285.87.87 0 0 1 .626-.234c.237-.01.466.08.633.247a.86.86 0 0 1 .242.627.88.88 0 0 1-.228.639.86.86 0 0 1-.647.234M10 11.75a.75.75 0 0 1-.75-.75V7a.75.75 0 0 1 1.5 0v4a.75.75 0 0 1-.75.75"/><path fill="var(--swc-icon-color, currentColor)" d="M16.733 18H3.267c-.8 0-1.523-.41-1.933-1.098s-.427-1.518-.046-2.222L8.02 2.232a2.248 2.248 0 0 1 3.958 0l6.733 12.448c.381.704.364 1.535-.046 2.222S17.534 18 16.733 18M10 2.553a.73.73 0 0 0-.66.392L2.607 15.393a.74.74 0 0 0 .016.74.74.74 0 0 0 .644.367h13.466a.74.74 0 0 0 .644-.366.74.74 0 0 0 .016-.741L10.66 2.945a.73.73 0 0 0-.66-.392"/></svg>';
|
|
9693
9711
|
}
|
|
9694
9712
|
|
|
9695
9713
|
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-alert-triangle.js
|
|
9696
|
-
var
|
|
9714
|
+
var o48 = class extends a10 {
|
|
9697
9715
|
static get styles() {
|
|
9698
9716
|
return [t40];
|
|
9699
9717
|
}
|
|
9700
9718
|
render() {
|
|
9701
9719
|
return b`
|
|
9702
|
-
${o16(
|
|
9720
|
+
${o16(e77())}
|
|
9703
9721
|
`;
|
|
9704
9722
|
}
|
|
9705
9723
|
};
|
|
9706
|
-
e25("swc-icon-alert-triangle",
|
|
9724
|
+
e25("swc-icon-alert-triangle", o48);
|
|
9707
9725
|
|
|
9708
9726
|
// node_modules/@adobe/spectrum-wc-icons/dist/UserFollowing.js
|
|
9709
|
-
function
|
|
9727
|
+
function e78() {
|
|
9710
9728
|
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M15 10.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9m2.4 3.35L15.09 17a.623.623 0 0 1-.968.048l-1.439-1.599a.625.625 0 0 1 .93-.836l.924 1.028 1.855-2.53a.625.625 0 1 1 1.007.74M2.274 18.752a.75.75 0 0 1-.733-.91c.596-2.73 3.313-5.025 6.608-5.58a.75.75 0 0 1 .249 1.48c-2.706.455-4.923 2.273-5.391 4.42a.75.75 0 0 1-.733.59m7.726-7.9c-2.485 0-4.507-2.153-4.507-4.8s2.022-4.8 4.507-4.8 4.507 2.153 4.507 4.8-2.022 4.8-4.507 4.8m0-8.1c-1.658 0-3.007 1.48-3.007 3.3s1.349 3.3 3.007 3.3 3.007-1.48 3.007-3.3-1.349-3.3-3.007-3.3"/></svg>';
|
|
9711
9729
|
}
|
|
9712
9730
|
|
|
9713
9731
|
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-user-following.js
|
|
9714
|
-
var
|
|
9732
|
+
var o49 = class extends a10 {
|
|
9715
9733
|
static get styles() {
|
|
9716
9734
|
return [t40];
|
|
9717
9735
|
}
|
|
9718
9736
|
render() {
|
|
9719
9737
|
return b`
|
|
9720
|
-
${o16(
|
|
9738
|
+
${o16(e78())}
|
|
9721
9739
|
`;
|
|
9722
9740
|
}
|
|
9723
9741
|
};
|
|
9724
|
-
e25("swc-icon-user-following",
|
|
9742
|
+
e25("swc-icon-user-following", o49);
|
|
9725
9743
|
|
|
9726
9744
|
// src/app/follow.ts
|
|
9727
9745
|
var lights = {
|
|
@@ -9961,40 +9979,40 @@ var SliccFollow = class extends ModelElement {
|
|
|
9961
9979
|
};
|
|
9962
9980
|
|
|
9963
9981
|
// node_modules/@adobe/spectrum-wc-icons/dist/AlertDiamond.js
|
|
9964
|
-
function
|
|
9982
|
+
function e79() {
|
|
9965
9983
|
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M10 18.795a2.24 2.24 0 0 1-1.591-.66l-6.545-6.544a2.254 2.254 0 0 1 0-3.182l6.545-6.545c.849-.85 2.333-.85 3.182 0l6.545 6.545a2.254 2.254 0 0 1 0 3.182l-6.545 6.545c-.425.425-.99.659-1.591.659m0-16.09c-.2 0-.389.078-.53.22L2.925 9.47a.75.75 0 0 0 0 1.06l6.545 6.545a.77.77 0 0 0 1.06 0l6.545-6.545a.75.75 0 0 0 0-1.06L10.53 2.925a.75.75 0 0 0-.53-.22"/><path fill="var(--swc-icon-color, currentColor)" d="M10 14.998a.9.9 0 0 1-.627-.228.956.956 0 0 1 0-1.285.87.87 0 0 1 .626-.234c.237-.01.466.08.633.247a.86.86 0 0 1 .242.627.88.88 0 0 1-.228.639.86.86 0 0 1-.647.234M10 11.625a.75.75 0 0 1-.75-.75v-5a.75.75 0 0 1 1.5 0v5a.75.75 0 0 1-.75.75"/></svg>';
|
|
9966
9984
|
}
|
|
9967
9985
|
|
|
9968
9986
|
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-alert-diamond.js
|
|
9969
|
-
var
|
|
9987
|
+
var o50 = class extends a10 {
|
|
9970
9988
|
static get styles() {
|
|
9971
9989
|
return [t40];
|
|
9972
9990
|
}
|
|
9973
9991
|
render() {
|
|
9974
9992
|
return b`
|
|
9975
|
-
${o16(
|
|
9993
|
+
${o16(e79())}
|
|
9976
9994
|
`;
|
|
9977
9995
|
}
|
|
9978
9996
|
};
|
|
9979
|
-
e25("swc-icon-alert-diamond",
|
|
9997
|
+
e25("swc-icon-alert-diamond", o50);
|
|
9980
9998
|
|
|
9981
9999
|
// node_modules/@adobe/spectrum-wc-icons/dist/FolderAdd.js
|
|
9982
|
-
function
|
|
10000
|
+
function e80() {
|
|
9983
10001
|
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M8.373 15.498H3.25a.75.75 0 0 1-.75-.75v-8.25h14.25a.75.75 0 0 1 .75.75V9.07a.75.75 0 0 0 1.5 0V7.248c0-1.24-1.01-2.25-2.25-2.25h-5.964a.75.75 0 0 1-.566-.258L8.515 2.773a2.25 2.25 0 0 0-1.7-.775H3.25C2.01 1.998 1 3.008 1 4.248v10.5c0 1.24 1.01 2.25 2.25 2.25h5.123a.75.75 0 0 0 0-1.5m-5.123-12h3.565a.75.75 0 0 1 .567.258l1.076 1.242H2.5v-.75a.75.75 0 0 1 .75-.75"/><path fill="var(--swc-icon-color, currentColor)" d="M15 10.498a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9m2.5 5.125h-1.875v1.875a.625.625 0 1 1-1.25 0v-1.875H12.5a.625.625 0 1 1 0-1.25h1.875v-1.875a.625.625 0 1 1 1.25 0v1.875H17.5a.625.625 0 1 1 0 1.25"/></svg>';
|
|
9984
10002
|
}
|
|
9985
10003
|
|
|
9986
10004
|
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-folder-add.js
|
|
9987
|
-
var
|
|
10005
|
+
var o51 = class extends a10 {
|
|
9988
10006
|
static get styles() {
|
|
9989
10007
|
return [t40];
|
|
9990
10008
|
}
|
|
9991
10009
|
render() {
|
|
9992
10010
|
return b`
|
|
9993
|
-
${o16(
|
|
10011
|
+
${o16(e80())}
|
|
9994
10012
|
`;
|
|
9995
10013
|
}
|
|
9996
10014
|
};
|
|
9997
|
-
e25("swc-icon-folder-add",
|
|
10015
|
+
e25("swc-icon-folder-add", o51);
|
|
9998
10016
|
|
|
9999
10017
|
// src/app/search.ts
|
|
10000
10018
|
var searchCss = i`
|
|
@@ -10822,24 +10840,6 @@ var SliccFreezer = class extends ModelElement {
|
|
|
10822
10840
|
}
|
|
10823
10841
|
};
|
|
10824
10842
|
|
|
10825
|
-
// node_modules/@adobe/spectrum-wc-icons/dist/ChevronRight.js
|
|
10826
|
-
function e80() {
|
|
10827
|
-
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M7.75 16.465a.748.748 0 0 1-.54-1.27l4.999-5.197-4.986-5.184a.75.75 0 0 1 .02-1.06.75.75 0 0 1 1.06.021L13.79 9.48c.28.29.28.749 0 1.039l-5.5 5.716a.75.75 0 0 1-.54.23"/></svg>';
|
|
10828
|
-
}
|
|
10829
|
-
|
|
10830
|
-
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-chevron-right.js
|
|
10831
|
-
var o51 = class extends a10 {
|
|
10832
|
-
static get styles() {
|
|
10833
|
-
return [t40];
|
|
10834
|
-
}
|
|
10835
|
-
render() {
|
|
10836
|
-
return b`
|
|
10837
|
-
${o16(e80())}
|
|
10838
|
-
`;
|
|
10839
|
-
}
|
|
10840
|
-
};
|
|
10841
|
-
e25("swc-icon-chevron-right", o51);
|
|
10842
|
-
|
|
10843
10843
|
// node_modules/@adobe/spectrum-wc-icons/dist/Copy.js
|
|
10844
10844
|
function e81() {
|
|
10845
10845
|
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="var(--swc-icon-color, currentColor)" d="M11.75 18h-7.5C3.01 18 2 16.99 2 15.75v-7.5C2 7.01 3.01 6 4.25 6a.75.75 0 0 1 0 1.5.75.75 0 0 0-.75.75v7.5c0 .413.337.75.75.75h7.5c.413 0 .75-.337.75-.75a.75.75 0 0 1 1.5 0c0 1.24-1.01 2.25-2.25 2.25m-5-13A.75.75 0 0 1 6 4.25C6 3.01 7.01 2 8.25 2a.75.75 0 0 1 0 1.5.75.75 0 0 0-.75.75.75.75 0 0 1-.75.75M13 3.5h-2A.75.75 0 0 1 11 2h2a.75.75 0 0 1 0 1.5"/><path fill="var(--swc-icon-color, currentColor)" d="M13 14h-2a.75.75 0 0 1 0-1.5h2a.75.75 0 0 1 0 1.5m2.75 0a.75.75 0 0 1 0-1.5c.413 0 .75-.337.75-.75a.75.75 0 0 1 1.5 0c0 1.24-1.01 2.25-2.25 2.25m1.5-9a.75.75 0 0 1-.75-.75.75.75 0 0 0-.75-.75.75.75 0 0 1 0-1.5C16.99 2 18 3.01 18 4.25a.75.75 0 0 1-.75.75m0 4.75A.75.75 0 0 1 16.5 9V7A.75.75 0 0 1 18 7v2a.75.75 0 0 1-.75.75m-10.5 0A.75.75 0 0 1 6 9V7a.75.75 0 0 1 1.5 0v2a.75.75 0 0 1-.75.75M8.25 14C7.01 14 6 12.99 6 11.75a.75.75 0 0 1 1.5 0c0 .413.337.75.75.75a.75.75 0 0 1 0 1.5"/></svg>';
|
|
@@ -11427,17 +11427,25 @@ var statusOrder = ["working", "thinking", "waiting", "error", "idle"];
|
|
|
11427
11427
|
function scoopSummary(scoops) {
|
|
11428
11428
|
if (scoops.length === 0) return "";
|
|
11429
11429
|
const counts = statusOrder.map((status2) => [status2, scoops.filter((scoop) => scoop.status === status2).length]).filter(([, count]) => count > 0).map(([status2, count]) => `${count} ${statusLabel[status2].toLowerCase()}`);
|
|
11430
|
-
return `${scoops
|
|
11430
|
+
return `${scoopCount(scoops)}: ${counts.join(", ")}`;
|
|
11431
|
+
}
|
|
11432
|
+
function scoopCount(scoops) {
|
|
11433
|
+
return `${scoops.length} scoop${scoops.length === 1 ? "" : "s"}`;
|
|
11434
|
+
}
|
|
11435
|
+
function scoopBrief(scoops) {
|
|
11436
|
+
if (scoops.length === 0) return "";
|
|
11437
|
+
const busy = statusOrder.filter((status2) => status2 !== "idle").map((status2) => [status2, scoops.filter((scoop) => scoop.status === status2).length]).filter(([, count]) => count > 0).map(([status2, count]) => `${count} ${statusLabel[status2].toLowerCase()}`);
|
|
11438
|
+
return [scoopCount(scoops), busy.join(", ")].filter(Boolean).join(" \xB7 ");
|
|
11431
11439
|
}
|
|
11432
11440
|
function unreadCount(unread) {
|
|
11433
|
-
return unread >
|
|
11441
|
+
return unread > 99 ? "99+" : String(unread);
|
|
11434
11442
|
}
|
|
11435
11443
|
function fillShown(fill2) {
|
|
11436
11444
|
return fill2 >= 0.5;
|
|
11437
11445
|
}
|
|
11438
11446
|
var SliccAgents = class extends ModelElement {
|
|
11439
11447
|
static properties = { ...ModelElement.properties, errors: { state: true } };
|
|
11440
|
-
#expanded =
|
|
11448
|
+
#expanded = /* @__PURE__ */ new Set();
|
|
11441
11449
|
#pointer = false;
|
|
11442
11450
|
#modality = (event2) => {
|
|
11443
11451
|
this.#pointer = event2.type === "pointerdown";
|
|
@@ -11474,21 +11482,22 @@ var SliccAgents = class extends ModelElement {
|
|
|
11474
11482
|
}
|
|
11475
11483
|
li {
|
|
11476
11484
|
--row-background: var(--swc-background-layer-1-color);
|
|
11477
|
-
--row-head: 1lh;
|
|
11478
|
-
--row-description: calc(2 * 1.4 * var(--swc-font-size-75));
|
|
11479
11485
|
position: relative;
|
|
11480
11486
|
display: grid;
|
|
11481
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
11482
|
-
grid-template-areas:
|
|
11483
|
-
|
|
11484
|
-
|
|
11487
|
+
grid-template-columns: var(--swc-component-height-75) minmax(0, 1fr) auto;
|
|
11488
|
+
grid-template-areas:
|
|
11489
|
+
'toggle head fill'
|
|
11490
|
+
'toggle description strip'
|
|
11491
|
+
'toggle ribbon ribbon'
|
|
11492
|
+
'toggle error error';
|
|
11493
|
+
align-items: start;
|
|
11485
11494
|
column-gap: var(--swc-spacing-100);
|
|
11486
|
-
padding: var(--swc-spacing-75) var(--swc-spacing-200);
|
|
11495
|
+
padding: var(--swc-spacing-75) var(--swc-spacing-200) var(--swc-spacing-75) var(--swc-spacing-100);
|
|
11487
11496
|
background: var(--row-background);
|
|
11488
11497
|
cursor: pointer;
|
|
11489
11498
|
}
|
|
11490
11499
|
li.scoop {
|
|
11491
|
-
padding-inline-start: calc(var(--swc-spacing-
|
|
11500
|
+
padding-inline-start: calc(var(--swc-spacing-100) + var(--swc-spacing-300));
|
|
11492
11501
|
}
|
|
11493
11502
|
li:hover {
|
|
11494
11503
|
--row-background: var(--swc-gray-100);
|
|
@@ -11496,40 +11505,66 @@ var SliccAgents = class extends ModelElement {
|
|
|
11496
11505
|
li[aria-selected='true'] {
|
|
11497
11506
|
--row-background: var(--swc-gray-200);
|
|
11498
11507
|
}
|
|
11508
|
+
li[aria-selected='true']::before {
|
|
11509
|
+
content: '';
|
|
11510
|
+
position: absolute;
|
|
11511
|
+
inset-block: 0;
|
|
11512
|
+
inset-inline-start: 0;
|
|
11513
|
+
inline-size: var(--swc-spacing-75);
|
|
11514
|
+
background: var(--swc-accent-color-900);
|
|
11515
|
+
}
|
|
11499
11516
|
li:focus-visible {
|
|
11500
11517
|
outline: var(--swc-focus-indicator-thickness) solid var(--swc-focus-indicator-color);
|
|
11501
11518
|
outline-offset: calc(-1 * var(--swc-focus-indicator-thickness));
|
|
11502
11519
|
}
|
|
11520
|
+
.toggle {
|
|
11521
|
+
grid-area: toggle;
|
|
11522
|
+
align-self: start;
|
|
11523
|
+
}
|
|
11524
|
+
.toggle swc-icon-chevron-right:dir(rtl) {
|
|
11525
|
+
transform: scaleX(-1);
|
|
11526
|
+
}
|
|
11527
|
+
.toggle[data-open] swc-icon-chevron-right {
|
|
11528
|
+
transform: rotate(90deg);
|
|
11529
|
+
}
|
|
11503
11530
|
.head {
|
|
11504
11531
|
grid-area: head;
|
|
11532
|
+
align-self: center;
|
|
11505
11533
|
display: flex;
|
|
11506
11534
|
align-items: center;
|
|
11507
11535
|
gap: var(--swc-spacing-75);
|
|
11508
11536
|
min-inline-size: 0;
|
|
11537
|
+
min-block-size: var(--swc-component-height-75);
|
|
11509
11538
|
}
|
|
11510
11539
|
.head > * {
|
|
11511
11540
|
flex: none;
|
|
11512
11541
|
}
|
|
11513
11542
|
.marker {
|
|
11543
|
+
--status-color: var(--swc-gray-600);
|
|
11514
11544
|
flex: none;
|
|
11515
11545
|
display: inline-flex;
|
|
11516
11546
|
align-items: center;
|
|
11517
11547
|
justify-content: center;
|
|
11548
|
+
box-sizing: border-box;
|
|
11518
11549
|
inline-size: var(--swc-spacing-200);
|
|
11519
11550
|
block-size: var(--swc-spacing-200);
|
|
11520
11551
|
border-radius: var(--swc-corner-radius-full);
|
|
11521
|
-
|
|
11522
|
-
font-variant-numeric: tabular-nums;
|
|
11523
|
-
line-height: 1;
|
|
11552
|
+
background: var(--status-color);
|
|
11524
11553
|
}
|
|
11525
11554
|
.marker.unread {
|
|
11526
|
-
|
|
11555
|
+
--status-color: var(--swc-accent-background-color-default);
|
|
11527
11556
|
inline-size: auto;
|
|
11528
|
-
min-inline-size: var(--swc-spacing-
|
|
11529
|
-
|
|
11530
|
-
|
|
11557
|
+
min-inline-size: var(--swc-spacing-300);
|
|
11558
|
+
block-size: var(--swc-spacing-300);
|
|
11559
|
+
padding-inline: var(--swc-spacing-75);
|
|
11531
11560
|
color: var(--swc-white);
|
|
11561
|
+
font-size: var(--swc-font-size-50);
|
|
11562
|
+
font-variant-numeric: tabular-nums;
|
|
11532
11563
|
font-weight: var(--swc-bold-font-weight);
|
|
11564
|
+
line-height: var(--swc-line-height-100);
|
|
11565
|
+
}
|
|
11566
|
+
.marker.unread[data-status='error'] {
|
|
11567
|
+
--status-color: var(--swc-negative-background-color-default);
|
|
11533
11568
|
}
|
|
11534
11569
|
.name {
|
|
11535
11570
|
flex: 0 1 auto;
|
|
@@ -11543,12 +11578,13 @@ var SliccAgents = class extends ModelElement {
|
|
|
11543
11578
|
}
|
|
11544
11579
|
.title {
|
|
11545
11580
|
grid-area: description;
|
|
11581
|
+
align-self: start;
|
|
11546
11582
|
display: -webkit-box;
|
|
11547
11583
|
-webkit-box-orient: vertical;
|
|
11548
11584
|
-webkit-line-clamp: 2;
|
|
11549
11585
|
overflow: hidden;
|
|
11550
11586
|
overflow-wrap: anywhere;
|
|
11551
|
-
line-height:
|
|
11587
|
+
line-height: var(--swc-line-height-100);
|
|
11552
11588
|
font-size: var(--swc-font-size-75);
|
|
11553
11589
|
color: var(--swc-neutral-subdued-content-color-default);
|
|
11554
11590
|
}
|
|
@@ -11558,40 +11594,48 @@ var SliccAgents = class extends ModelElement {
|
|
|
11558
11594
|
.ribbon {
|
|
11559
11595
|
grid-area: ribbon;
|
|
11560
11596
|
display: flex;
|
|
11597
|
+
flex-wrap: wrap;
|
|
11561
11598
|
align-items: center;
|
|
11562
|
-
gap: var(--swc-spacing-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
}
|
|
11569
|
-
.status[data-status='thinking'],
|
|
11570
|
-
.status[data-status='working'],
|
|
11571
|
-
.segment[data-status='thinking'],
|
|
11572
|
-
.segment[data-status='working'] {
|
|
11573
|
-
background: var(--swc-informative-visual-color);
|
|
11599
|
+
gap: var(--swc-spacing-100);
|
|
11600
|
+
min-inline-size: 0;
|
|
11601
|
+
margin-block-start: var(--swc-spacing-75);
|
|
11602
|
+
font-size: var(--swc-font-size-75);
|
|
11603
|
+
line-height: var(--swc-line-height-100);
|
|
11604
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
11574
11605
|
}
|
|
11575
|
-
.
|
|
11576
|
-
|
|
11577
|
-
|
|
11606
|
+
.segments {
|
|
11607
|
+
display: flex;
|
|
11608
|
+
flex-wrap: wrap;
|
|
11609
|
+
gap: var(--swc-spacing-50);
|
|
11610
|
+
min-inline-size: 0;
|
|
11578
11611
|
}
|
|
11579
|
-
.
|
|
11580
|
-
|
|
11581
|
-
background: var(--swc-negative-visual-color);
|
|
11612
|
+
.summary {
|
|
11613
|
+
min-inline-size: 0;
|
|
11582
11614
|
}
|
|
11583
11615
|
.segment {
|
|
11616
|
+
--status-color: var(--swc-gray-600);
|
|
11584
11617
|
flex: none;
|
|
11585
11618
|
inline-size: var(--swc-spacing-200);
|
|
11586
|
-
block-size: var(--swc-spacing-
|
|
11619
|
+
block-size: var(--swc-spacing-75);
|
|
11587
11620
|
border-radius: var(--swc-corner-radius-full);
|
|
11621
|
+
background: var(--status-color);
|
|
11622
|
+
}
|
|
11623
|
+
[data-status='thinking'],
|
|
11624
|
+
[data-status='working'] {
|
|
11625
|
+
--status-color: var(--swc-informative-color-900);
|
|
11626
|
+
}
|
|
11627
|
+
[data-status='waiting'] {
|
|
11628
|
+
--status-color: var(--swc-notice-color-900);
|
|
11629
|
+
}
|
|
11630
|
+
[data-status='error'] {
|
|
11631
|
+
--status-color: var(--swc-negative-color-900);
|
|
11588
11632
|
}
|
|
11589
11633
|
.fill {
|
|
11590
11634
|
grid-area: fill;
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
align-self: start;
|
|
11635
|
+
align-self: center;
|
|
11636
|
+
justify-self: end;
|
|
11594
11637
|
font-size: var(--swc-font-size-75);
|
|
11638
|
+
line-height: var(--swc-line-height-100);
|
|
11595
11639
|
font-variant-numeric: tabular-nums;
|
|
11596
11640
|
color: var(--swc-neutral-subdued-content-color-default);
|
|
11597
11641
|
}
|
|
@@ -11604,13 +11648,10 @@ var SliccAgents = class extends ModelElement {
|
|
|
11604
11648
|
font-weight: var(--swc-bold-font-weight);
|
|
11605
11649
|
}
|
|
11606
11650
|
.drop-cell {
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11651
|
+
grid-area: strip;
|
|
11652
|
+
align-self: center;
|
|
11653
|
+
justify-self: end;
|
|
11610
11654
|
display: flex;
|
|
11611
|
-
align-items: center;
|
|
11612
|
-
padding-inline: var(--swc-spacing-100);
|
|
11613
|
-
background: var(--row-background);
|
|
11614
11655
|
opacity: 0;
|
|
11615
11656
|
}
|
|
11616
11657
|
li:hover .drop-cell,
|
|
@@ -11637,16 +11678,27 @@ var SliccAgents = class extends ModelElement {
|
|
|
11637
11678
|
opacity: 1;
|
|
11638
11679
|
}
|
|
11639
11680
|
}
|
|
11681
|
+
@media (forced-colors: active) {
|
|
11682
|
+
.marker,
|
|
11683
|
+
.segment,
|
|
11684
|
+
li[aria-selected='true']::before {
|
|
11685
|
+
forced-color-adjust: none;
|
|
11686
|
+
background: CanvasText;
|
|
11687
|
+
}
|
|
11688
|
+
.marker.unread,
|
|
11689
|
+
li[aria-selected='true']::before {
|
|
11690
|
+
background: Highlight;
|
|
11691
|
+
color: HighlightText;
|
|
11692
|
+
}
|
|
11693
|
+
}
|
|
11640
11694
|
`
|
|
11641
11695
|
];
|
|
11642
11696
|
subscribe(model) {
|
|
11643
|
-
|
|
11644
|
-
this.#expanded = focused2?.kind === "scoop" ? focused2.parentId : null;
|
|
11697
|
+
this.#reveal(model);
|
|
11645
11698
|
return [
|
|
11646
11699
|
model.agent.on("agents", () => this.requestUpdate()),
|
|
11647
11700
|
model.agent.on("active", () => {
|
|
11648
|
-
|
|
11649
|
-
if (next) this.#expanded = next.kind === "cone" ? next.id : next.parentId;
|
|
11701
|
+
this.#reveal(model);
|
|
11650
11702
|
this.requestUpdate();
|
|
11651
11703
|
}),
|
|
11652
11704
|
watchTitles(model, () => this.requestUpdate()),
|
|
@@ -11661,16 +11713,18 @@ var SliccAgents = class extends ModelElement {
|
|
|
11661
11713
|
for (const type of types) globalThis.removeEventListener(type, this.#modality, true);
|
|
11662
11714
|
};
|
|
11663
11715
|
}
|
|
11664
|
-
#
|
|
11665
|
-
|
|
11716
|
+
#reveal(model) {
|
|
11717
|
+
const focused2 = model.agent.list().find((agent) => agent.id === model.agent.active());
|
|
11718
|
+
const cone = focused2?.kind === "cone" ? focused2.id : focused2?.parentId;
|
|
11719
|
+
if (cone) this.#expanded.add(cone);
|
|
11666
11720
|
}
|
|
11667
|
-
#select(
|
|
11668
|
-
this.model?.agent.select(id);
|
|
11721
|
+
#select(agent) {
|
|
11722
|
+
this.model?.agent.select(agent.id);
|
|
11723
|
+
if (agent.kind === "cone") this.#toggle(agent, true);
|
|
11669
11724
|
}
|
|
11670
|
-
#
|
|
11671
|
-
|
|
11672
|
-
this.#
|
|
11673
|
-
if (agent.kind === "cone") this.#expanded = open ? agent.id : null;
|
|
11725
|
+
#toggle(agent, open = !this.#expanded.has(agent.id)) {
|
|
11726
|
+
if (open) this.#expanded.add(agent.id);
|
|
11727
|
+
else this.#expanded.delete(agent.id);
|
|
11674
11728
|
this.requestUpdate();
|
|
11675
11729
|
}
|
|
11676
11730
|
focus() {
|
|
@@ -11697,17 +11751,17 @@ var SliccAgents = class extends ModelElement {
|
|
|
11697
11751
|
if (!agent) return;
|
|
11698
11752
|
if (event2.key === "Enter" || event2.key === " ") {
|
|
11699
11753
|
event2.preventDefault();
|
|
11700
|
-
this.#
|
|
11754
|
+
this.#select(agent);
|
|
11701
11755
|
} else if (event2.key === "ArrowRight" && this.#scoops(agent).length > 0) {
|
|
11702
11756
|
event2.preventDefault();
|
|
11703
|
-
if (this.#expanded
|
|
11704
|
-
else this.#
|
|
11757
|
+
if (this.#expanded.has(agent.id)) items[index + 1].focus();
|
|
11758
|
+
else this.#toggle(agent, true);
|
|
11705
11759
|
} else if (event2.key === "ArrowLeft" && agent.kind === "scoop") {
|
|
11706
11760
|
event2.preventDefault();
|
|
11707
11761
|
items.find((item2) => item2.dataset.id === agent.parentId)?.focus();
|
|
11708
|
-
} else if (event2.key === "ArrowLeft" && this.#expanded
|
|
11762
|
+
} else if (event2.key === "ArrowLeft" && this.#expanded.has(agent.id)) {
|
|
11709
11763
|
event2.preventDefault();
|
|
11710
|
-
this.#
|
|
11764
|
+
this.#toggle(agent, false);
|
|
11711
11765
|
} else if (event2.key === "Delete") {
|
|
11712
11766
|
if (this.#droppable(agent)) {
|
|
11713
11767
|
event2.preventDefault();
|
|
@@ -11774,7 +11828,7 @@ var SliccAgents = class extends ModelElement {
|
|
|
11774
11828
|
><swc-action-button
|
|
11775
11829
|
id=${id}
|
|
11776
11830
|
class="drop"
|
|
11777
|
-
size="
|
|
11831
|
+
size="m"
|
|
11778
11832
|
quiet
|
|
11779
11833
|
tabindex=${selected ? "0" : "-1"}
|
|
11780
11834
|
data-action="drop"
|
|
@@ -11795,7 +11849,7 @@ var SliccAgents = class extends ModelElement {
|
|
|
11795
11849
|
><swc-action-button
|
|
11796
11850
|
id=${id}
|
|
11797
11851
|
class="drop"
|
|
11798
|
-
size="
|
|
11852
|
+
size="m"
|
|
11799
11853
|
quiet
|
|
11800
11854
|
tabindex=${selected ? "0" : "-1"}
|
|
11801
11855
|
data-action="delete-cone"
|
|
@@ -11810,17 +11864,36 @@ var SliccAgents = class extends ModelElement {
|
|
|
11810
11864
|
}
|
|
11811
11865
|
#ribbon(scoops) {
|
|
11812
11866
|
if (scoops.length === 0) return A;
|
|
11813
|
-
return b`<span class="ribbon" aria-hidden="true">${scoops.map(
|
|
11867
|
+
return b`<span class="ribbon"><span class="segments" aria-hidden="true">${scoops.map(
|
|
11814
11868
|
(scoop) => b`<span class="segment" data-status=${scoop.status}></span>`
|
|
11815
|
-
)}</span>`;
|
|
11869
|
+
)}</span><span class="summary">${scoopBrief(scoops)}</span></span>`;
|
|
11816
11870
|
}
|
|
11817
|
-
#
|
|
11871
|
+
#disclosure(agent, scoops, open) {
|
|
11872
|
+
if (scoops.length === 0) return A;
|
|
11873
|
+
return b`<swc-action-button
|
|
11874
|
+
class="toggle"
|
|
11875
|
+
size="s"
|
|
11876
|
+
quiet
|
|
11877
|
+
tabindex="-1"
|
|
11878
|
+
aria-hidden="true"
|
|
11879
|
+
data-action="toggle-cone"
|
|
11880
|
+
?data-open=${open}
|
|
11881
|
+
@mousedown=${(event2) => event2.preventDefault()}
|
|
11882
|
+
@click=${(event2) => {
|
|
11883
|
+
event2.stopPropagation();
|
|
11884
|
+
this.#toggle(agent);
|
|
11885
|
+
}}
|
|
11886
|
+
><swc-icon-chevron-right slot="icon"></swc-icon-chevron-right
|
|
11887
|
+
></swc-action-button>`;
|
|
11888
|
+
}
|
|
11889
|
+
#row(agent, active, anchor) {
|
|
11818
11890
|
const selected = agent.id === active;
|
|
11891
|
+
const current = agent.id === anchor;
|
|
11819
11892
|
const error = this.errors[agent.id];
|
|
11820
11893
|
const model = this.model;
|
|
11821
11894
|
const title = agentTitle(model, agent);
|
|
11822
11895
|
const scoops = this.#scoops(agent);
|
|
11823
|
-
const open = this.#expanded
|
|
11896
|
+
const open = this.#expanded.has(agent.id);
|
|
11824
11897
|
const unread = selected ? 0 : agent.unread;
|
|
11825
11898
|
const label = `${coneLabel(model, agent)}: ${statusLabel[agent.status]}, ${percent(agent.contextFill)} context${unread ? `, ${unread} unread` : ""}${error ? `. ${error}` : ""}`;
|
|
11826
11899
|
const summary = scoopSummary(scoops);
|
|
@@ -11835,13 +11908,14 @@ var SliccAgents = class extends ModelElement {
|
|
|
11835
11908
|
aria-controls=${open && scoops.length ? scoops.map((scoop) => `row-${scoop.id}`).join(" ") : A}
|
|
11836
11909
|
aria-label=${label}
|
|
11837
11910
|
aria-description=${summary || A}
|
|
11838
|
-
tabindex=${
|
|
11911
|
+
tabindex=${current ? "0" : "-1"}
|
|
11839
11912
|
aria-keyshortcuts=${this.#droppable(agent) || this.#deletable(agent) ? "Delete" : A}
|
|
11840
11913
|
title=${summary ? `${label}. ${summary}` : label}
|
|
11841
|
-
@click=${() => this.#
|
|
11914
|
+
@click=${() => this.#select(agent)}
|
|
11842
11915
|
>
|
|
11916
|
+
${this.#disclosure(agent, scoops, open)}
|
|
11843
11917
|
<div class="head">
|
|
11844
|
-
${unread ? b`<span class="marker unread" aria-hidden="true">${unreadCount(unread)}</span>` : b`<span class="marker status" data-status=${agent.status} aria-hidden="true"></span>`}
|
|
11918
|
+
${unread ? b`<span class="marker unread" data-status=${agent.status} aria-hidden="true">${unreadCount(unread)}</span>` : b`<span class="marker status" data-status=${agent.status} aria-hidden="true"></span>`}
|
|
11845
11919
|
<span class="name">${agent.name}</span>
|
|
11846
11920
|
</div>
|
|
11847
11921
|
${fillShown(agent.contextFill) ? b`<span class="fill" data-variant=${meterVariant2(agent.contextFill)}>${percent(agent.contextFill)}</span>` : A}
|
|
@@ -11865,15 +11939,26 @@ var SliccAgents = class extends ModelElement {
|
|
|
11865
11939
|
</swc-action-button>
|
|
11866
11940
|
</div>`;
|
|
11867
11941
|
}
|
|
11942
|
+
updated() {
|
|
11943
|
+
for (const tip of this.renderRoot.querySelectorAll("swc-tooltip")) {
|
|
11944
|
+
tip.triggerElement = tip.previousElementSibling;
|
|
11945
|
+
}
|
|
11946
|
+
}
|
|
11868
11947
|
render() {
|
|
11869
11948
|
const list5 = this.model?.agent.list() ?? [];
|
|
11870
11949
|
const active = this.model?.agent.active() ?? "";
|
|
11871
11950
|
const errors = Object.values(this.errors);
|
|
11872
11951
|
const rows = ordered(list5).filter(
|
|
11873
|
-
(agent) => agent.kind === "cone" || agent.parentId
|
|
11952
|
+
(agent) => agent.kind === "cone" || this.#expanded.has(agent.parentId)
|
|
11874
11953
|
);
|
|
11954
|
+
const shown4 = rows.find((agent) => agent.id === active);
|
|
11955
|
+
const anchor = shown4 ? active : list5.find((agent) => agent.id === active)?.parentId ?? "";
|
|
11875
11956
|
return b`<div class="list"><ul role="tree" aria-label="Cones and scoops" @keydown=${this.#keydown} @focusin=${this.#focusin} @focusout=${this.#focusout}>
|
|
11876
|
-
${
|
|
11957
|
+
${c(
|
|
11958
|
+
rows,
|
|
11959
|
+
(agent) => agent.id,
|
|
11960
|
+
(agent) => this.#row(agent, active, anchor)
|
|
11961
|
+
)}
|
|
11877
11962
|
</ul></div>${this.#actions()}
|
|
11878
11963
|
<div class="sr" role="status">${errors.at(-1) ?? ""}</div>`;
|
|
11879
11964
|
}
|
|
@@ -33932,13 +34017,40 @@ function origin() {
|
|
|
33932
34017
|
const active = focused();
|
|
33933
34018
|
return active?.closest("slicc-terminal") ?? active;
|
|
33934
34019
|
}
|
|
33935
|
-
var inCwd = (approval) => approval.alwaysScope === "cwd" && !!approval.cwd;
|
|
34020
|
+
var inCwd = (approval) => approval.kind === "sudo" && approval.alwaysScope === "cwd" && !!approval.cwd;
|
|
33936
34021
|
function alwaysHint(approval) {
|
|
33937
34022
|
return inCwd(approval) ? `Always allow lets ${approval.requester.name} run exactly this command with sudo, in ${approval.cwd}, without asking again.` : `Always allow lets ${approval.requester.name} run exactly this command with sudo without asking again.`;
|
|
33938
34023
|
}
|
|
34024
|
+
function guestAsking(approval) {
|
|
34025
|
+
return approval.kind === "guest-message" ? `${approval.requester.name} wants to send this to ${approval.agentName ?? "this cone"}:` : `${approval.agentName ?? "This cone"} wants to run ${approval.tool} for ${approval.requester.name}:`;
|
|
34026
|
+
}
|
|
34027
|
+
function guestWaiting(approval) {
|
|
34028
|
+
return approval.kind === "guest-message" ? `${approval.requester.name}'s message to ${approval.agentName ?? "this cone"} waits for approval on the device in control.` : `${approval.agentName ?? "This cone"} wants to run ${approval.tool} for ${approval.requester.name}, which waits for approval on the device in control.`;
|
|
34029
|
+
}
|
|
34030
|
+
var clear = { certain: null, maybe: null };
|
|
34031
|
+
function rulesOf(approval) {
|
|
34032
|
+
return approval.kind === "sudo" ? secretRules(approval.command, approval.cwd) : clear;
|
|
34033
|
+
}
|
|
33939
34034
|
function waiting2(model, now) {
|
|
33940
34035
|
return [...model?.approvals?.list() ?? []].filter((approval) => approval.expiresAt > now).sort((a23, b13) => a23.createdAt - b13.createdAt);
|
|
33941
34036
|
}
|
|
34037
|
+
var titles = {
|
|
34038
|
+
sudo: {
|
|
34039
|
+
ask: "Allow sudo?",
|
|
34040
|
+
elsewhere: "Answered in another tab",
|
|
34041
|
+
expired: "Sudo request timed out"
|
|
34042
|
+
},
|
|
34043
|
+
"guest-message": {
|
|
34044
|
+
ask: "Allow a guest\u2019s message?",
|
|
34045
|
+
elsewhere: "Answered elsewhere",
|
|
34046
|
+
expired: "Guest message timed out"
|
|
34047
|
+
},
|
|
34048
|
+
"guest-tool": {
|
|
34049
|
+
ask: "Allow a guest\u2019s tool call?",
|
|
34050
|
+
elsewhere: "Answered elsewhere",
|
|
34051
|
+
expired: "Guest tool call timed out"
|
|
34052
|
+
}
|
|
34053
|
+
};
|
|
33942
34054
|
function gone(reason) {
|
|
33943
34055
|
return reason === "expired" ? "expired" : "elsewhere";
|
|
33944
34056
|
}
|
|
@@ -33956,6 +34068,7 @@ var SliccApprovals = class extends ModelElement {
|
|
|
33956
34068
|
#showing = null;
|
|
33957
34069
|
#pending = /* @__PURE__ */ new Set();
|
|
33958
34070
|
#done = /* @__PURE__ */ new Set();
|
|
34071
|
+
#closed = /* @__PURE__ */ new Set();
|
|
33959
34072
|
#port;
|
|
33960
34073
|
#ended = /* @__PURE__ */ new Map();
|
|
33961
34074
|
#timer = null;
|
|
@@ -33974,6 +34087,9 @@ var SliccApprovals = class extends ModelElement {
|
|
|
33974
34087
|
:host {
|
|
33975
34088
|
display: contents;
|
|
33976
34089
|
}
|
|
34090
|
+
sp-alert-dialog {
|
|
34091
|
+
display: grid;
|
|
34092
|
+
}
|
|
33977
34093
|
.command {
|
|
33978
34094
|
margin: var(--swc-spacing-200) 0 0;
|
|
33979
34095
|
padding: var(--swc-spacing-200) var(--swc-spacing-300);
|
|
@@ -33986,7 +34102,24 @@ var SliccApprovals = class extends ModelElement {
|
|
|
33986
34102
|
max-block-size: 8lh;
|
|
33987
34103
|
overflow: auto;
|
|
33988
34104
|
}
|
|
34105
|
+
.guest {
|
|
34106
|
+
margin-block-start: var(--swc-spacing-200);
|
|
34107
|
+
padding: var(--swc-spacing-200) var(--swc-spacing-300);
|
|
34108
|
+
border: var(--swc-border-width-100) solid var(--swc-gray-300);
|
|
34109
|
+
border-radius: var(--swc-corner-radius-medium-default);
|
|
34110
|
+
white-space: pre-wrap;
|
|
34111
|
+
overflow-wrap: anywhere;
|
|
34112
|
+
max-block-size: 12lh;
|
|
34113
|
+
overflow: auto;
|
|
34114
|
+
}
|
|
34115
|
+
.files {
|
|
34116
|
+
margin: var(--swc-spacing-200) 0 0;
|
|
34117
|
+
padding-inline-start: var(--swc-spacing-400);
|
|
34118
|
+
font-size: var(--swc-font-size-75);
|
|
34119
|
+
overflow-wrap: anywhere;
|
|
34120
|
+
}
|
|
33989
34121
|
.cwd,
|
|
34122
|
+
.verdict,
|
|
33990
34123
|
.hint,
|
|
33991
34124
|
.timer,
|
|
33992
34125
|
.more {
|
|
@@ -34042,6 +34175,7 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34042
34175
|
this.failure = null;
|
|
34043
34176
|
this.#pending.clear();
|
|
34044
34177
|
this.#done.clear();
|
|
34178
|
+
this.#closed.clear();
|
|
34045
34179
|
this.#ended.clear();
|
|
34046
34180
|
}
|
|
34047
34181
|
if (!port) return [];
|
|
@@ -34076,8 +34210,9 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34076
34210
|
async decide(approval, decision2) {
|
|
34077
34211
|
const port = this.model?.approvals;
|
|
34078
34212
|
if (!port?.decide || this.busy || decision2 !== "deny" && !this.#armed) return;
|
|
34079
|
-
const verdict =
|
|
34080
|
-
if (decision2 === "always" && (verdict.certain
|
|
34213
|
+
const verdict = rulesOf(approval);
|
|
34214
|
+
if (decision2 === "always" && (approval.kind !== "sudo" || verdict.certain || verdict.maybe))
|
|
34215
|
+
return;
|
|
34081
34216
|
this.busy = decision2;
|
|
34082
34217
|
this.failure = null;
|
|
34083
34218
|
this.#pending.add(approval.id);
|
|
@@ -34095,7 +34230,7 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34095
34230
|
}
|
|
34096
34231
|
}
|
|
34097
34232
|
#current() {
|
|
34098
|
-
return this.model?.approvals?.decide ? waiting2(this.model, this.now) : [];
|
|
34233
|
+
return this.model?.approvals?.decide ? waiting2(this.model, this.now).filter(({ id }) => !this.#closed.has(id)) : [];
|
|
34099
34234
|
}
|
|
34100
34235
|
willUpdate(changed) {
|
|
34101
34236
|
super.willUpdate(changed);
|
|
@@ -34119,7 +34254,7 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34119
34254
|
const all2 = this.model?.approvals?.list() ?? [];
|
|
34120
34255
|
this.#tick(this.isConnected && all2.length > 0);
|
|
34121
34256
|
const dialog = this.renderRoot.querySelector("dialog");
|
|
34122
|
-
const key2 = dialog ? `${dialog.dataset.approval}:${dialog.dataset.gone ?? ""}` : "";
|
|
34257
|
+
const key2 = dialog ? `${dialog.dataset.approval}:${dialog.dataset.gone ?? ""}:${dialog.hasAttribute("data-rejected")}` : "";
|
|
34123
34258
|
if (key2 === this.#shown) return;
|
|
34124
34259
|
if (dialog && !this.#shown) this.#trigger = origin();
|
|
34125
34260
|
this.#shown = key2;
|
|
@@ -34136,9 +34271,15 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34136
34271
|
this.gone = null;
|
|
34137
34272
|
this.#showing = null;
|
|
34138
34273
|
}
|
|
34274
|
+
#dismiss(approval) {
|
|
34275
|
+
this.#done.add(approval.id);
|
|
34276
|
+
this.#closed.add(approval.id);
|
|
34277
|
+
this.failure = null;
|
|
34278
|
+
}
|
|
34139
34279
|
#cancel(event2, approval) {
|
|
34140
34280
|
event2.preventDefault();
|
|
34141
34281
|
if (this.gone) this.close();
|
|
34282
|
+
else if (this.failure?.id === approval.id) this.#dismiss(approval);
|
|
34142
34283
|
else void this.decide(approval, "deny");
|
|
34143
34284
|
}
|
|
34144
34285
|
#button(approval, decision2, label, variant) {
|
|
@@ -34156,12 +34297,31 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34156
34297
|
#dialog(approval, key2, content) {
|
|
34157
34298
|
return i17(
|
|
34158
34299
|
key2,
|
|
34159
|
-
b`<dialog role="alertdialog" aria-labelledby="title" aria-describedby="asking" data-approval=${approval.id} data-kind=${approval.kind} data-requester=${approval.requester.kind} data-gone=${this.gone?.reason ?? A} @cancel=${(event2) => this.#cancel(event2, approval)}>${content}</dialog>`
|
|
34300
|
+
b`<dialog role="alertdialog" aria-labelledby="title" aria-describedby="asking" data-approval=${approval.id} data-kind=${approval.kind} data-requester=${approval.requester.kind} data-gone=${this.gone?.reason ?? A} data-rejected=${!this.gone && this.failure?.id === approval.id ? "" : A} @cancel=${(event2) => this.#cancel(event2, approval)}>${content}</dialog>`
|
|
34160
34301
|
);
|
|
34161
34302
|
}
|
|
34162
34303
|
#request(approval) {
|
|
34163
|
-
|
|
34164
|
-
|
|
34304
|
+
if (approval.kind === "sudo")
|
|
34305
|
+
return b`<p id="asking">${asking(approval)}:</p>
|
|
34306
|
+
<pre class="command" data-command>${sudo(approval)}</pre>`;
|
|
34307
|
+
if (approval.kind === "guest-tool")
|
|
34308
|
+
return b`<p id="asking">${guestAsking(approval)}</p>
|
|
34309
|
+
<pre class="command" data-summary>${approval.summary}</pre>`;
|
|
34310
|
+
const files = approval.attachments ?? [];
|
|
34311
|
+
return b`<p id="asking">${guestAsking(approval)}</p>
|
|
34312
|
+
<div class="guest" data-guest-text>${approval.text}</div>
|
|
34313
|
+
${files.length ? b`<ul class="files" data-attachments>${files.map((file) => b`<li>${file.name} · ${file.mimeType} · ${size3(file.size)}</li>`)}</ul>` : A}`;
|
|
34314
|
+
}
|
|
34315
|
+
#verdict(approval) {
|
|
34316
|
+
const verdict = approval.kind === "sudo" ? void 0 : approval.verdict;
|
|
34317
|
+
return verdict ? b`<p class="verdict" data-verdict=${verdict.decision}>The automatic check would ${verdict.decision} this: ${verdict.reason}</p>` : A;
|
|
34318
|
+
}
|
|
34319
|
+
#actions(approval, rejected, always) {
|
|
34320
|
+
if (rejected)
|
|
34321
|
+
return b`<swc-button slot="button" variant="secondary" fill-style="outline" data-action="close" @click=${() => this.#dismiss(approval)}>Close</swc-button>`;
|
|
34322
|
+
return b`${this.#button(approval, "deny", "Deny", "secondary")}
|
|
34323
|
+
${always ? this.#button(approval, "always", inCwd(approval) ? "Always allow in this directory" : "Always allow", "secondary") : A}
|
|
34324
|
+
${this.#button(approval, "once", "Allow once", "accent")}`;
|
|
34165
34325
|
}
|
|
34166
34326
|
render() {
|
|
34167
34327
|
if (this.gone) {
|
|
@@ -34169,8 +34329,8 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34169
34329
|
return this.#dialog(
|
|
34170
34330
|
approval2,
|
|
34171
34331
|
`gone:${approval2.id}`,
|
|
34172
|
-
b`<sp-alert-dialog variant="information">
|
|
34173
|
-
<h2 id="title" slot="heading">${reason
|
|
34332
|
+
b`<sp-alert-dialog variant="information" data-approval-kind=${approval2.kind}>
|
|
34333
|
+
<h2 id="title" slot="heading">${titles[approval2.kind][reason]}</h2>
|
|
34174
34334
|
${this.#request(approval2)}
|
|
34175
34335
|
${reason === "expired" ? b`<p class="timer" data-timer>Denied because nobody answered in time.</p>` : A}
|
|
34176
34336
|
<swc-button slot="button" variant="secondary" fill-style="outline" data-action="close" @click=${() => this.close()}>Close</swc-button>
|
|
@@ -34182,24 +34342,23 @@ var SliccApprovals = class extends ModelElement {
|
|
|
34182
34342
|
const [approval, ...rest] = held ? [held, ...list5.filter(({ id }) => id !== held.id)] : list5;
|
|
34183
34343
|
if (!approval) return A;
|
|
34184
34344
|
const failure2 = this.failure?.id === approval.id ? this.failure.message : "";
|
|
34185
|
-
const verdict =
|
|
34345
|
+
const verdict = rulesOf(approval);
|
|
34186
34346
|
const rules = verdict.certain ?? verdict.maybe;
|
|
34187
|
-
const always = approval.always && !rules;
|
|
34347
|
+
const always = approval.kind === "sudo" && approval.always && !rules;
|
|
34348
|
+
const hint2 = approval.kind === "sudo" && always ? alwaysHint(approval) : "";
|
|
34188
34349
|
return this.#dialog(
|
|
34189
34350
|
approval,
|
|
34190
34351
|
approval.id,
|
|
34191
|
-
b`<sp-alert-dialog variant="warning">
|
|
34192
|
-
<h2 id="title" slot="heading"
|
|
34352
|
+
b`<sp-alert-dialog variant="warning" data-approval-kind=${approval.kind}>
|
|
34353
|
+
<h2 id="title" slot="heading">${titles[approval.kind].ask}</h2>
|
|
34193
34354
|
${this.#request(approval)}
|
|
34194
|
-
${approval
|
|
34355
|
+
${this.#verdict(approval)}
|
|
34356
|
+
${approval.kind === "sudo" && approval.cwd ? b`<p class="cwd">In ${approval.cwd}</p>` : A}
|
|
34195
34357
|
${rules ? b`<div class="rules" data-secret-rules=${rules}><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><p>${verdict.certain ? b`<strong>This changes secret rules.</strong> It names <code>${rules}</code>, where SLICC keeps which secrets programs may use and where they may be sent.` : b`<strong>This may change secret rules.</strong> SLICC can't tell where <code>${rules}</code> leads, and it could reach the files where SLICC keeps which secrets programs may use and where they may be sent.`} Allow it only if you asked for this change.</p></div>` : A}
|
|
34196
|
-
${
|
|
34197
|
-
${failure2 ? b`<p class="problem" role="alert" data-error><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${failure2}</span></p>` :
|
|
34198
|
-
<p class="timer" data-timer>Denied automatically in ${countdown(approval.expiresAt - this.now)}.</p>
|
|
34358
|
+
${hint2 ? b`<p class="hint">${hint2}</p>` : A}
|
|
34359
|
+
${failure2 ? b`<p class="problem" role="alert" data-error><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${failure2}</span></p>` : b`<p class="timer" data-timer>Denied automatically in ${countdown(approval.expiresAt - this.now)}.</p>`}
|
|
34199
34360
|
${rest.length ? b`<p class="more" data-more>${rest.length === 1 ? "1 more request is waiting." : `${rest.length} more requests are waiting.`}</p>` : A}
|
|
34200
|
-
${this.#
|
|
34201
|
-
${always ? this.#button(approval, "always", inCwd(approval) ? "Always allow in this directory" : "Always allow", "secondary") : A}
|
|
34202
|
-
${this.#button(approval, "once", "Allow once", "accent")}
|
|
34361
|
+
${this.#actions(approval, !!failure2, always)}
|
|
34203
34362
|
</sp-alert-dialog>`
|
|
34204
34363
|
);
|
|
34205
34364
|
}
|
|
@@ -39730,7 +39889,16 @@ var SliccNotices = class extends ModelElement {
|
|
|
39730
39889
|
</div>`;
|
|
39731
39890
|
}
|
|
39732
39891
|
#approval(approval) {
|
|
39733
|
-
|
|
39892
|
+
if (approval.kind !== "sudo")
|
|
39893
|
+
return b`<div class="notice" role="status" data-approval-notice=${approval.id} data-approval-kind=${approval.kind} data-tone="warning">
|
|
39894
|
+
<swc-icon-alert-triangle></swc-icon-alert-triangle>
|
|
39895
|
+
<div class="text">
|
|
39896
|
+
<span class="title">${approval.kind === "guest-message" ? "Waiting for approval of a guest\u2019s message" : "Waiting for approval of a guest\u2019s tool call"}</span>
|
|
39897
|
+
<p>${guestWaiting(approval)}</p>
|
|
39898
|
+
<p>Denied automatically at ${deadline(approval.expiresAt)}.</p>
|
|
39899
|
+
</div>
|
|
39900
|
+
</div>`;
|
|
39901
|
+
return b`<div class="notice" role="status" data-approval-notice=${approval.id} data-approval-kind="sudo" data-tone="warning">
|
|
39734
39902
|
<swc-icon-alert-triangle></swc-icon-alert-triangle>
|
|
39735
39903
|
<div class="text">
|
|
39736
39904
|
<span class="title">Waiting for sudo approval</span>
|