@ai-ecoverse/slicc-spectrum 1.102.0 → 1.103.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 +33 -6
- package/dist/{chunk-3IV5AAUZ.js → chunk-7O5TLOZV.js} +57 -11
- package/dist/chunk-7O5TLOZV.js.map +7 -0
- package/dist/slicc-dummy.js +120 -9
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-kernel-model.js +1 -1
- package/dist/slicc-ui.js +498 -168
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/messages.d.ts +5 -1
- package/dist/types/app/settings.d.ts +2 -2
- package/dist/types/app/sign-in.d.ts +19 -0
- package/dist/types/app/updates.d.ts +17 -1
- package/dist/types/dummy/fixtures.d.ts +7 -1
- package/dist/types/dummy/index.d.ts +3 -3
- package/dist/types/dummy/settings.d.ts +5 -3
- package/dist/types/dummy/updates.d.ts +2 -1
- package/dist/types/dummy.d.ts +1 -1
- package/dist/types/model/types.d.ts +17 -1
- package/package.json +3 -3
- package/dist/chunk-3IV5AAUZ.js.map +0 -7
package/dist/slicc-ui.js
CHANGED
|
@@ -10435,6 +10435,9 @@ var o55 = class extends a10 {
|
|
|
10435
10435
|
};
|
|
10436
10436
|
e25("swc-icon-new", o55);
|
|
10437
10437
|
|
|
10438
|
+
// node_modules/@adobe/spectrum-wc/dist/link.css
|
|
10439
|
+
var link_default = '/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Standalone link presentation for native `<a href>` elements.\n *\n * Default anchor appearance inside `.swc-Typography--prose` and\n * `.swc-Typography--links` ships with `typography.css` (generated). Import this\n * stylesheet when authors need explicit BEM modifiers on anchors.\n *\n */\n\n.swc-Link {\n inline-size: -moz-fit-content;\n inline-size: fit-content;\n font-family: var(--swc-sans-font-family-stack);\n font-size: var(--swc-font-size-100);\n font-style: normal;\n font-weight: 400;\n line-height: 1.30;\n color: var(--swc-link-text-color-default, var(--swc-accent-color-900));\n -webkit-text-decoration: underline;\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 1px;\n transition: color 130ms ease-in-out;\n\n &:hover {\n color: var(--swc-link-text-color-hover, var(--swc-accent-color-1000));\n }\n\n &:active {\n color: var(--swc-link-text-color-down, var(--swc-accent-color-1000));\n }\n\n &:focus-visible {\n color: var(--swc-link-text-color-focus, var(--swc-accent-color-1000));\n border-radius: 4px;\n outline: 2px solid var(--swc-link-focus-indicator-color, var(--swc-blue-800));\n outline-offset: 2px;\n }\n\n &:lang(ja),\n &:lang(zh),\n &:lang(ko) {\n line-height: 1.50;\n }\n}\n\n.swc-Link--standalone {\n font-weight: 500;\n}\n\n.swc-Link--secondary {\n --swc-link-text-color-default: var(--swc-gray-800);\n --swc-link-text-color-hover: var(--swc-gray-900);\n --swc-link-text-color-down: var(--swc-gray-900);\n --swc-link-text-color-focus: var(--swc-gray-900);\n}\n\n.swc-Link--staticWhite {\n --swc-link-text-color-default: var(--swc-white);\n --swc-link-text-color-hover: var(--swc-white);\n --swc-link-text-color-down: var(--swc-white);\n --swc-link-text-color-focus: var(--swc-white);\n --swc-link-focus-indicator-color: var(--swc-white);\n}\n\n.swc-Link--staticBlack {\n --swc-link-text-color-default: var(--swc-black);\n --swc-link-text-color-hover: var(--swc-black);\n --swc-link-text-color-down: var(--swc-black);\n --swc-link-text-color-focus: var(--swc-black);\n --swc-link-focus-indicator-color: var(--swc-black);\n}\n\n.swc-Link--quiet.swc-Link--standalone {\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.swc-Link--quiet.swc-Link--standalone:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n';
|
|
10440
|
+
|
|
10438
10441
|
// src/app/command.ts
|
|
10439
10442
|
var toShow = "Show the full command to allow it.";
|
|
10440
10443
|
var toScroll = "Scroll to the end of the command to allow it.";
|
|
@@ -21436,6 +21439,94 @@ var markdownCss = i`
|
|
|
21436
21439
|
}
|
|
21437
21440
|
`;
|
|
21438
21441
|
|
|
21442
|
+
// node_modules/@adobe/spectrum-wc-icons/dist/Copy.js
|
|
21443
|
+
function e98() {
|
|
21444
|
+
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>';
|
|
21445
|
+
}
|
|
21446
|
+
|
|
21447
|
+
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-copy.js
|
|
21448
|
+
var o64 = class extends a10 {
|
|
21449
|
+
static get styles() {
|
|
21450
|
+
return [t40];
|
|
21451
|
+
}
|
|
21452
|
+
render() {
|
|
21453
|
+
return b`
|
|
21454
|
+
${o16(e98())}
|
|
21455
|
+
`;
|
|
21456
|
+
}
|
|
21457
|
+
};
|
|
21458
|
+
e25("swc-icon-copy", o64);
|
|
21459
|
+
|
|
21460
|
+
// src/app/reach.ts
|
|
21461
|
+
var command = "curl -fsSL https://get.sliccy.ai/slicc | sh";
|
|
21462
|
+
var startCommand = "slicc";
|
|
21463
|
+
var nodeCommand = "npx sliccy@next";
|
|
21464
|
+
var reachStyles = i`
|
|
21465
|
+
.command {
|
|
21466
|
+
display: flex;
|
|
21467
|
+
align-items: center;
|
|
21468
|
+
gap: var(--swc-spacing-100);
|
|
21469
|
+
padding: var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-200);
|
|
21470
|
+
border-radius: var(--swc-corner-radius-medium-default);
|
|
21471
|
+
background: var(--swc-background-layer-1-color);
|
|
21472
|
+
}
|
|
21473
|
+
code {
|
|
21474
|
+
flex: 1;
|
|
21475
|
+
min-width: 0;
|
|
21476
|
+
overflow-wrap: break-word;
|
|
21477
|
+
word-break: normal;
|
|
21478
|
+
font-family: var(--swc-code-font-family-stack);
|
|
21479
|
+
font-size: var(--swc-font-size-75);
|
|
21480
|
+
color: var(--swc-code-color);
|
|
21481
|
+
user-select: all;
|
|
21482
|
+
}
|
|
21483
|
+
.commands {
|
|
21484
|
+
display: grid;
|
|
21485
|
+
gap: var(--swc-spacing-100);
|
|
21486
|
+
}
|
|
21487
|
+
.commands p {
|
|
21488
|
+
margin: 0;
|
|
21489
|
+
font-size: var(--swc-font-size-75);
|
|
21490
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
21491
|
+
}
|
|
21492
|
+
`;
|
|
21493
|
+
function block2(text5, copied, copy, first2 = false) {
|
|
21494
|
+
const done2 = copied === text5;
|
|
21495
|
+
return b`<div class="command" data-command=${text5}>
|
|
21496
|
+
<code>${breakable(text5)}</code>
|
|
21497
|
+
<swc-action-button size="s" quiet data-action=${first2 ? "copy-command" : A} accessible-label=${done2 ? "Copied" : `Copy ${text5}`} @click=${() => copy(text5)}>
|
|
21498
|
+
<swc-icon-copy slot="icon"></swc-icon-copy>${done2 ? "Copied" : "Copy"}
|
|
21499
|
+
</swc-action-button>
|
|
21500
|
+
</div>`;
|
|
21501
|
+
}
|
|
21502
|
+
function breakable(text5) {
|
|
21503
|
+
return text5.split("/").map(
|
|
21504
|
+
(part2, index2, parts3) => b`${part2}${index2 < parts3.length - 1 ? b`/<wbr />` : A}`
|
|
21505
|
+
);
|
|
21506
|
+
}
|
|
21507
|
+
function reach({ intro, extensionUrl, copied, uncopied, copy }) {
|
|
21508
|
+
return b`<p>${intro}</p>
|
|
21509
|
+
${extensionUrl ? b`<p><a class="swc-Link" href=${extensionUrl} target="_blank" rel="noopener noreferrer" data-action="install-extension">Install the Chrome extension</a></p>` : A}
|
|
21510
|
+
<p>To run slicc, enter this in a terminal:</p>
|
|
21511
|
+
<div class="commands">
|
|
21512
|
+
${block2(command, copied, copy, true)}
|
|
21513
|
+
${block2(startCommand, copied, copy)}
|
|
21514
|
+
</div>
|
|
21515
|
+
<div class="commands" data-commands="node">
|
|
21516
|
+
<p>With Node:</p>
|
|
21517
|
+
${block2(nodeCommand, copied, copy)}
|
|
21518
|
+
</div>
|
|
21519
|
+
${uncopied ? b`<div class="error" role="alert" data-error="copy"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>Couldn’t copy. Select the command and copy it.</span></div>` : A}`;
|
|
21520
|
+
}
|
|
21521
|
+
async function copyText(text5) {
|
|
21522
|
+
try {
|
|
21523
|
+
await globalThis.navigator.clipboard.writeText(text5);
|
|
21524
|
+
return true;
|
|
21525
|
+
} catch {
|
|
21526
|
+
return false;
|
|
21527
|
+
}
|
|
21528
|
+
}
|
|
21529
|
+
|
|
21439
21530
|
// src/app/sign-in.ts
|
|
21440
21531
|
var continuing = "Continue in the sign-in window that opened.";
|
|
21441
21532
|
var closed = "Closed the sign-in window? Cancel, then Log in again.";
|
|
@@ -21463,6 +21554,116 @@ var SignInWaits = class {
|
|
|
21463
21554
|
this.#since.delete(key2);
|
|
21464
21555
|
}
|
|
21465
21556
|
};
|
|
21557
|
+
var signInCopy = { shownFor: 2e3 };
|
|
21558
|
+
var SignInCopies = class {
|
|
21559
|
+
#copied = /* @__PURE__ */ new Map();
|
|
21560
|
+
#update;
|
|
21561
|
+
constructor(update) {
|
|
21562
|
+
this.#update = update;
|
|
21563
|
+
}
|
|
21564
|
+
state(key2) {
|
|
21565
|
+
return this.#copied.get(key2)?.state;
|
|
21566
|
+
}
|
|
21567
|
+
async copy(key2, code3) {
|
|
21568
|
+
let state2 = "done";
|
|
21569
|
+
try {
|
|
21570
|
+
await globalThis.navigator.clipboard.writeText(code3);
|
|
21571
|
+
} catch {
|
|
21572
|
+
state2 = "failed";
|
|
21573
|
+
}
|
|
21574
|
+
const entry = { state: state2 };
|
|
21575
|
+
this.#copied.set(key2, entry);
|
|
21576
|
+
this.#update();
|
|
21577
|
+
setTimeout(() => {
|
|
21578
|
+
if (this.#copied.get(key2) !== entry) return;
|
|
21579
|
+
this.#copied.delete(key2);
|
|
21580
|
+
this.#update();
|
|
21581
|
+
}, signInCopy.shownFor);
|
|
21582
|
+
}
|
|
21583
|
+
};
|
|
21584
|
+
var signInHosts = /* @__PURE__ */ new Map([
|
|
21585
|
+
["openai-codex", ["auth.openai.com"]],
|
|
21586
|
+
["xai", ["accounts.x.ai"]],
|
|
21587
|
+
["kimi-coding", ["www.kimi.com"]]
|
|
21588
|
+
]);
|
|
21589
|
+
function signInPage(id, url) {
|
|
21590
|
+
let page;
|
|
21591
|
+
try {
|
|
21592
|
+
page = new URL(url);
|
|
21593
|
+
} catch {
|
|
21594
|
+
return null;
|
|
21595
|
+
}
|
|
21596
|
+
const plain3 = page.protocol === "https:" && !page.username && !page.password && !page.port;
|
|
21597
|
+
return plain3 && signInHosts.get(id)?.includes(page.hostname) ? page.href : null;
|
|
21598
|
+
}
|
|
21599
|
+
var unknownPage = "This sign-in page isn\u2019t one SLICC knows. Check the address before you go there.";
|
|
21600
|
+
function pageLink(url, known) {
|
|
21601
|
+
if (known)
|
|
21602
|
+
return b`<a class="swc-Link swc-Link--standalone swc-Link--quiet" href=${known} target="_blank" rel="noopener noreferrer" data-action="open-sign-in">Open the sign-in page</a>`;
|
|
21603
|
+
if (!url) return A;
|
|
21604
|
+
return b`<p class="unknown" data-id="sign-in-unknown"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${unknownPage}</span></p>
|
|
21605
|
+
<span class="address" data-id="sign-in-url">${breakable(url)}</span>`;
|
|
21606
|
+
}
|
|
21607
|
+
var copyLabels = { done: "Copied", failed: "Couldn\u2019t copy" };
|
|
21608
|
+
function codeBlock(code3, copied, copy, size4) {
|
|
21609
|
+
const label = copied ? copyLabels[copied] : "Copy";
|
|
21610
|
+
return b`<p class="enter">Enter this code on the sign-in page:</p>
|
|
21611
|
+
<div class="code-row">
|
|
21612
|
+
<span class="code" data-id="sign-in-code">${code3}</span>
|
|
21613
|
+
<swc-action-button size=${size4} quiet data-action="copy-sign-in-code" accessible-label=${copied ? label : "Copy the code"} @click=${() => copy(code3)}><swc-icon-copy slot="icon"></swc-icon-copy>${label}</swc-action-button>
|
|
21614
|
+
<span class="sr" role="status">${copied ? label : ""}</span>
|
|
21615
|
+
</div>`;
|
|
21616
|
+
}
|
|
21617
|
+
function signInDetails(id, signIn, copied, copy, size4 = "m") {
|
|
21618
|
+
if (!(signIn?.code || signIn?.url)) return A;
|
|
21619
|
+
return b`<div class="sign-in" data-sign-in>
|
|
21620
|
+
${signIn.code ? codeBlock(signIn.code, copied, copy, size4) : A}
|
|
21621
|
+
${pageLink(signIn.url, signInPage(id, signIn.url))}
|
|
21622
|
+
</div>`;
|
|
21623
|
+
}
|
|
21624
|
+
var signInCss = i`
|
|
21625
|
+
.sign-in {
|
|
21626
|
+
display: grid;
|
|
21627
|
+
justify-items: start;
|
|
21628
|
+
gap: var(--swc-spacing-75);
|
|
21629
|
+
}
|
|
21630
|
+
.sign-in .enter {
|
|
21631
|
+
margin: 0;
|
|
21632
|
+
}
|
|
21633
|
+
.sign-in .code-row {
|
|
21634
|
+
display: flex;
|
|
21635
|
+
flex-wrap: wrap;
|
|
21636
|
+
align-items: center;
|
|
21637
|
+
gap: var(--swc-spacing-100);
|
|
21638
|
+
}
|
|
21639
|
+
.sign-in .unknown {
|
|
21640
|
+
display: flex;
|
|
21641
|
+
align-items: flex-start;
|
|
21642
|
+
gap: var(--swc-spacing-75);
|
|
21643
|
+
margin: 0;
|
|
21644
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
21645
|
+
--swc-icon-color: var(--swc-notice-visual-color);
|
|
21646
|
+
}
|
|
21647
|
+
.sign-in .unknown swc-icon-alert-triangle {
|
|
21648
|
+
flex: none;
|
|
21649
|
+
margin-block-start: var(--swc-spacing-50);
|
|
21650
|
+
}
|
|
21651
|
+
.sign-in .address {
|
|
21652
|
+
font-family: var(--swc-code-font-family-stack);
|
|
21653
|
+
color: var(--swc-neutral-content-color-default);
|
|
21654
|
+
overflow-wrap: anywhere;
|
|
21655
|
+
user-select: text;
|
|
21656
|
+
}
|
|
21657
|
+
.sign-in .code {
|
|
21658
|
+
font-family: var(--swc-code-font-family-stack);
|
|
21659
|
+
font-size: var(--swc-heading-size-s);
|
|
21660
|
+
font-weight: var(--swc-bold-font-weight);
|
|
21661
|
+
line-height: var(--swc-heading-line-height);
|
|
21662
|
+
color: var(--swc-neutral-content-color-default);
|
|
21663
|
+
overflow-wrap: anywhere;
|
|
21664
|
+
user-select: all;
|
|
21665
|
+
}
|
|
21666
|
+
`;
|
|
21466
21667
|
|
|
21467
21668
|
// src/app/messages.ts
|
|
21468
21669
|
var alone = { calls: [], live: false };
|
|
@@ -21604,6 +21805,7 @@ function errorCard(item2, handlers) {
|
|
|
21604
21805
|
${resolved ? A : b`<span class="sr">Error: </span>`}<span class="lead">${title}</span>
|
|
21605
21806
|
${text5 ? b`<span class="detail" role=${login ? "status" : A}>${text5}</span>` : A}
|
|
21606
21807
|
${fix ? b`<div class="fix" aria-live="off">${fixButton(fix, item2, handlers, login)}</div>` : A}
|
|
21808
|
+
${signing ? signInDetails(item2.account, login.signIn, login.copied, (code3) => handlers.copySignIn?.(item2.account, id, code3), "s") : A}
|
|
21607
21809
|
${failure2 ? b`<div class="help" data-error="login"><sp-help-text size="s" variant="negative" icon>${failure2}</sp-help-text><swc-action-button size="s" quiet data-action="settings" @click=${() => handlers.action("settings", item2.id, item2.account)}>Open settings</swc-action-button></div>` : A}
|
|
21608
21810
|
</div>`;
|
|
21609
21811
|
}
|
|
@@ -22012,6 +22214,7 @@ function assistant(message, name, model, handlers, showThinking, suggestion = nu
|
|
|
22012
22214
|
action: (action, _id, account) => handlers.action(action, message.id, account),
|
|
22013
22215
|
login: (account) => handlers.login?.(account, message.id),
|
|
22014
22216
|
cancelLogin: (account) => handlers.cancelLogin?.(account, message.id),
|
|
22217
|
+
copySignIn: (account, _id, code3) => handlers.copySignIn?.(account, message.id, code3),
|
|
22015
22218
|
dropping: () => handlers.dropping(message.id)
|
|
22016
22219
|
},
|
|
22017
22220
|
showThinking
|
|
@@ -22778,6 +22981,9 @@ var messageCss = i`
|
|
|
22778
22981
|
.error-card swc-button {
|
|
22779
22982
|
white-space: nowrap;
|
|
22780
22983
|
}
|
|
22984
|
+
.error-card .sign-in {
|
|
22985
|
+
grid-column: 2 / -1;
|
|
22986
|
+
}
|
|
22781
22987
|
.error-card .help {
|
|
22782
22988
|
grid-column: 2 / -1;
|
|
22783
22989
|
display: flex;
|
|
@@ -23912,13 +24118,13 @@ var SliccComposer = class extends ThemedElement {
|
|
|
23912
24118
|
globalThis.removeEventListener("blur", this.#release);
|
|
23913
24119
|
clearValues(this.renderRoot);
|
|
23914
24120
|
const kept3 = this.#waiting.draft?.attachments;
|
|
23915
|
-
const
|
|
24121
|
+
const held2 = [
|
|
23916
24122
|
this.attachments === kept3 ? [] : this.attachments,
|
|
23917
24123
|
...[...this.#drafts.values()].map((draft2) => draft2.attachments)
|
|
23918
24124
|
];
|
|
23919
|
-
if (
|
|
24125
|
+
if (held2.flat().some((attachment2) => attachment2.url?.startsWith("blob:")))
|
|
23920
24126
|
this.#abandon = setTimeout(() => {
|
|
23921
|
-
for (const attachments of
|
|
24127
|
+
for (const attachments of held2) release(attachments);
|
|
23922
24128
|
}, linger);
|
|
23923
24129
|
}
|
|
23924
24130
|
updated(changed2) {
|
|
@@ -24581,10 +24787,10 @@ ${this.value}` : text5;
|
|
|
24581
24787
|
if (!hold2) return A;
|
|
24582
24788
|
const locked = hold2.reason === "locked";
|
|
24583
24789
|
const vault = this.model?.vault;
|
|
24584
|
-
const
|
|
24790
|
+
const held2 = hold2.held === 1 ? "1 tool result held" : `${hold2.held} tool results held`;
|
|
24585
24791
|
return b`<div class="hold" role="status" data-hold=${hold2.reason}>
|
|
24586
24792
|
${locked ? b`<swc-icon-lock size="s" aria-hidden="true"></swc-icon-lock>` : b`<swc-progress-circle size="s" label="Waiting" aria-hidden="true"></swc-progress-circle>`}
|
|
24587
|
-
<span class="text">${locked ? "Unlock the vault to continue" : "Waiting for the vault"}${hold2.held ? b`<span class="held"> · ${
|
|
24793
|
+
<span class="text">${locked ? "Unlock the vault to continue" : "Waiting for the vault"}${hold2.held ? b`<span class="held"> · ${held2}</span>` : A}</span>
|
|
24588
24794
|
${locked && vault ? b`<slicc-vault-button
|
|
24589
24795
|
data-action="unlock-vault"
|
|
24590
24796
|
.vault=${vault}
|
|
@@ -24628,18 +24834,18 @@ ${this.value}` : text5;
|
|
|
24628
24834
|
#starter(message) {
|
|
24629
24835
|
const lost2 = message.lost ?? [];
|
|
24630
24836
|
const empty5 = !(message.text || message.attachments.length);
|
|
24631
|
-
const
|
|
24632
|
-
const alert = empty5 ||
|
|
24837
|
+
const held2 = !empty5 && lost2.length > 0;
|
|
24838
|
+
const alert = empty5 || held2;
|
|
24633
24839
|
const files = message.attachments.length;
|
|
24634
|
-
return b`<li class="queued" data-id=${message.id} data-mode="starting" ?data-unsent=${empty5} ?data-held=${
|
|
24840
|
+
return b`<li class="queued" data-id=${message.id} data-mode="starting" ?data-unsent=${empty5} ?data-held=${held2}>
|
|
24635
24841
|
${alert ? b`<swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>` : b`<swc-icon-clock size="s" aria-hidden="true"></swc-icon-clock>`}
|
|
24636
24842
|
${message.text ? A : b`<swc-icon-file size="xs" aria-hidden="true"></swc-icon-file>`}
|
|
24637
24843
|
<span class="body">
|
|
24638
|
-
<span class="text"><span class="sr">${
|
|
24639
|
-
${lost2.length ? b`<span class="lost" data-lost title=${names(lost2)}><span class="sr">, </span>${
|
|
24844
|
+
<span class="text"><span class="sr">${held2 ? "Held: " : "Queued: "}</span>${message.text || names(message.attachments) || names(lost2)}</span>
|
|
24845
|
+
${lost2.length ? b`<span class="lost" data-lost title=${names(lost2)}><span class="sr">, </span>${held2 ? notKept(lost2) : "Not kept after reload"}${lost2.length > 1 ? b`<span class="sr"> (${names(lost2)})</span>` : A}</span>` : A}
|
|
24640
24846
|
</span>
|
|
24641
24847
|
${message.text && files ? b`<span class="next" data-files><swc-icon-file size="xs" aria-hidden="true"></swc-icon-file><span class="sr">, </span>${files === 1 ? "1 file" : `${files} files`}</span>` : A}
|
|
24642
|
-
${
|
|
24848
|
+
${held2 ? b`<swc-action-button size="s" quiet data-action="restore-starting" accessible-label=${`Put back: ${message.text}`} @click=${() => this.#putBack(message)}>Put back</swc-action-button>` : b`<span class="next">${empty5 ? "Not sent. Attach the files again." : "Sent when the agent starts"}</span>`}
|
|
24643
24849
|
<swc-close-button size="s" data-action="unqueue" accessible-label=${alert ? "Dismiss" : "Remove from queue"} @click=${() => this.#unwait(message.id)}></swc-close-button>
|
|
24644
24850
|
</li>`;
|
|
24645
24851
|
}
|
|
@@ -24687,7 +24893,7 @@ ${this.value}` : text5;
|
|
|
24687
24893
|
const canSend = !!this.value.trim() || this.attachments.some((attachment2) => !attachment2.error);
|
|
24688
24894
|
const pushToTalk = this.model?.settings.get().pushToTalk ?? false;
|
|
24689
24895
|
const talk = !!speech();
|
|
24690
|
-
const
|
|
24896
|
+
const held2 = this.#held();
|
|
24691
24897
|
const starting = this.#starting();
|
|
24692
24898
|
const back = new Set(
|
|
24693
24899
|
this.attachments.filter((attachment2) => !attachment2.error).map((attachment2) => attachment2.name)
|
|
@@ -24707,8 +24913,8 @@ ${this.value}` : text5;
|
|
|
24707
24913
|
send-label=${busy ? "Steer" : "Send"}
|
|
24708
24914
|
max-rows="10"
|
|
24709
24915
|
?generating=${busy && !canSend}
|
|
24710
|
-
?disabled=${!!
|
|
24711
|
-
placeholder=${
|
|
24916
|
+
?disabled=${!!held2}
|
|
24917
|
+
placeholder=${held2 ? `Reconnecting to ${held2}\u2026` : starting ? starting : suggestion ? `${suggestion} (Tab)` : `Message ${agent?.name ?? ""}`}
|
|
24712
24918
|
.value=${l(this.value)}
|
|
24713
24919
|
@keydown=${this.#keys}
|
|
24714
24920
|
@swc-prompt-field-input=${this.#input}
|
|
@@ -25248,6 +25454,8 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25248
25454
|
markdownCss,
|
|
25249
25455
|
messageCss,
|
|
25250
25456
|
clampCss,
|
|
25457
|
+
r(link_default),
|
|
25458
|
+
signInCss,
|
|
25251
25459
|
i`
|
|
25252
25460
|
:host {
|
|
25253
25461
|
position: relative;
|
|
@@ -25518,6 +25726,9 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25518
25726
|
action: (action, messageId, account) => this.#action(action, messageId, account),
|
|
25519
25727
|
login: (account, messageId) => this.#loginState(account, messageId),
|
|
25520
25728
|
cancelLogin: (account, messageId) => this.#cancelLogin(account, messageId),
|
|
25729
|
+
copySignIn: (account, messageId, code3) => {
|
|
25730
|
+
void this.#copies.copy(`${messageId}:${account}`, code3);
|
|
25731
|
+
},
|
|
25521
25732
|
dropping: (messageId) => failedTurns(this.model.agent.messages(this.#id()), messageId).length,
|
|
25522
25733
|
open: (path2) => this.dispatchEvent(
|
|
25523
25734
|
new CustomEvent("open-file", { detail: { path: path2 }, bubbles: true, composed: true })
|
|
@@ -25798,6 +26009,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25798
26009
|
}
|
|
25799
26010
|
#logins = /* @__PURE__ */ new Map();
|
|
25800
26011
|
#waits = new SignInWaits(() => this.requestUpdate());
|
|
26012
|
+
#copies = new SignInCopies(() => this.requestUpdate());
|
|
25801
26013
|
#loginState(accountId, messageId) {
|
|
25802
26014
|
const settings = this.model.settings;
|
|
25803
26015
|
const account = settings.accounts().find((candidate) => candidate.id === accountId);
|
|
@@ -25806,7 +26018,14 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
25806
26018
|
const window2 = account?.auth === "oauth";
|
|
25807
26019
|
const key2 = `${messageId}:${accountId}`;
|
|
25808
26020
|
if (account?.status === "signing-in" || local2?.pending)
|
|
25809
|
-
return {
|
|
26021
|
+
return {
|
|
26022
|
+
state: "signing-in",
|
|
26023
|
+
cancel,
|
|
26024
|
+
window: window2,
|
|
26025
|
+
waited: window2 && this.#waits.waited(key2),
|
|
26026
|
+
signIn: account?.status === "signing-in" ? account.signIn : void 0,
|
|
26027
|
+
copied: this.#copies.state(key2)
|
|
26028
|
+
};
|
|
25810
26029
|
this.#waits.done(key2);
|
|
25811
26030
|
if (account?.status === "connected") return { state: "connected", provider: account.provider };
|
|
25812
26031
|
return { state: "idle", error: local2?.error };
|
|
@@ -26074,22 +26293,22 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
26074
26293
|
};
|
|
26075
26294
|
|
|
26076
26295
|
// node_modules/@adobe/spectrum-wc-icons/dist/FolderAdd.js
|
|
26077
|
-
function
|
|
26296
|
+
function e99() {
|
|
26078
26297
|
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>';
|
|
26079
26298
|
}
|
|
26080
26299
|
|
|
26081
26300
|
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-folder-add.js
|
|
26082
|
-
var
|
|
26301
|
+
var o65 = class extends a10 {
|
|
26083
26302
|
static get styles() {
|
|
26084
26303
|
return [t40];
|
|
26085
26304
|
}
|
|
26086
26305
|
render() {
|
|
26087
26306
|
return b`
|
|
26088
|
-
${o16(
|
|
26307
|
+
${o16(e99())}
|
|
26089
26308
|
`;
|
|
26090
26309
|
}
|
|
26091
26310
|
};
|
|
26092
|
-
e25("swc-icon-folder-add",
|
|
26311
|
+
e25("swc-icon-folder-add", o65);
|
|
26093
26312
|
|
|
26094
26313
|
// src/app/search.ts
|
|
26095
26314
|
var searchCss = i`
|
|
@@ -26768,7 +26987,7 @@ var SliccFileView = class extends ThemedElement {
|
|
|
26768
26987
|
var t83 = i`:host([indeterminate]) .swc-LinearProgress-fill{inline-size:100%;min-inline-size:0;transform-origin:left;transition:none;animation:indeterminate-loop-ltr 1s cubic-bezier(.45,0,.4,1) infinite;will-change:transform;&:dir(rtl){animation-name:indeterminate-loop-rtl}}@keyframes indeterminate-loop-ltr{0%{transform:translate(-70%) scaleX(.7)}to{transform:translate(100%) scaleX(.7)}}@keyframes indeterminate-loop-rtl{0%{transform:translate(100%) scaleX(.7)}to{transform:translate(-70%) scaleX(.7)}}@media(prefers-reduced-motion:reduce){:host([indeterminate]) .swc-LinearProgress-fill{animation-duration:15s;animation-timing-function:linear}}`;
|
|
26769
26988
|
|
|
26770
26989
|
// node_modules/@adobe/spectrum-wc-core/dist/components/progress-bar/ProgressBar.base.js
|
|
26771
|
-
var
|
|
26990
|
+
var o66 = class extends m3(i12(i9, {
|
|
26772
26991
|
validSizes: s6,
|
|
26773
26992
|
defaultSize: "m"
|
|
26774
26993
|
})) {
|
|
@@ -26779,10 +26998,10 @@ var o65 = class extends m3(i12(i9, {
|
|
|
26779
26998
|
e24([n({
|
|
26780
26999
|
type: Boolean,
|
|
26781
27000
|
reflect: true
|
|
26782
|
-
})],
|
|
27001
|
+
})], o66.prototype, "indeterminate", void 0);
|
|
26783
27002
|
|
|
26784
27003
|
// node_modules/@adobe/spectrum-wc/dist/components/progress-bar/ProgressBar.js
|
|
26785
|
-
var
|
|
27004
|
+
var o67 = class extends o66 {
|
|
26786
27005
|
static get styles() {
|
|
26787
27006
|
return [t26, t83];
|
|
26788
27007
|
}
|
|
@@ -26831,25 +27050,7 @@ var o66 = class extends o65 {
|
|
|
26831
27050
|
};
|
|
26832
27051
|
|
|
26833
27052
|
// node_modules/@adobe/spectrum-wc/dist/components/progress-bar/swc-progress-bar.js
|
|
26834
|
-
e25("swc-progress-bar",
|
|
26835
|
-
|
|
26836
|
-
// node_modules/@adobe/spectrum-wc-icons/dist/Copy.js
|
|
26837
|
-
function e99() {
|
|
26838
|
-
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>';
|
|
26839
|
-
}
|
|
26840
|
-
|
|
26841
|
-
// node_modules/@adobe/spectrum-wc-icons/dist/swc-icon-copy.js
|
|
26842
|
-
var o67 = class extends a10 {
|
|
26843
|
-
static get styles() {
|
|
26844
|
-
return [t40];
|
|
26845
|
-
}
|
|
26846
|
-
render() {
|
|
26847
|
-
return b`
|
|
26848
|
-
${o16(e99())}
|
|
26849
|
-
`;
|
|
26850
|
-
}
|
|
26851
|
-
};
|
|
26852
|
-
e25("swc-icon-copy", o67);
|
|
27053
|
+
e25("swc-progress-bar", o67);
|
|
26853
27054
|
|
|
26854
27055
|
// src/app/disclosure.ts
|
|
26855
27056
|
var chevron = b`<swc-icon-chevron-right class="chevron" size="s" aria-hidden="true"></swc-icon-chevron-right>`;
|
|
@@ -27641,76 +27842,6 @@ var SliccFreezer = class extends ModelElement {
|
|
|
27641
27842
|
}
|
|
27642
27843
|
};
|
|
27643
27844
|
|
|
27644
|
-
// src/app/reach.ts
|
|
27645
|
-
var command = "curl -fsSL https://get.sliccy.ai/slicc | sh";
|
|
27646
|
-
var startCommand = "slicc";
|
|
27647
|
-
var nodeCommand = "npx sliccy@next";
|
|
27648
|
-
var reachStyles = i`
|
|
27649
|
-
.command {
|
|
27650
|
-
display: flex;
|
|
27651
|
-
align-items: center;
|
|
27652
|
-
gap: var(--swc-spacing-100);
|
|
27653
|
-
padding: var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-75) var(--swc-spacing-200);
|
|
27654
|
-
border-radius: var(--swc-corner-radius-medium-default);
|
|
27655
|
-
background: var(--swc-background-layer-1-color);
|
|
27656
|
-
}
|
|
27657
|
-
code {
|
|
27658
|
-
flex: 1;
|
|
27659
|
-
min-width: 0;
|
|
27660
|
-
overflow-wrap: break-word;
|
|
27661
|
-
word-break: normal;
|
|
27662
|
-
font-family: var(--swc-code-font-family-stack);
|
|
27663
|
-
font-size: var(--swc-font-size-75);
|
|
27664
|
-
color: var(--swc-code-color);
|
|
27665
|
-
user-select: all;
|
|
27666
|
-
}
|
|
27667
|
-
.commands {
|
|
27668
|
-
display: grid;
|
|
27669
|
-
gap: var(--swc-spacing-100);
|
|
27670
|
-
}
|
|
27671
|
-
.commands p {
|
|
27672
|
-
margin: 0;
|
|
27673
|
-
font-size: var(--swc-font-size-75);
|
|
27674
|
-
color: var(--swc-neutral-subdued-content-color-default);
|
|
27675
|
-
}
|
|
27676
|
-
`;
|
|
27677
|
-
function block2(text5, copied, copy, first2 = false) {
|
|
27678
|
-
const done2 = copied === text5;
|
|
27679
|
-
return b`<div class="command" data-command=${text5}>
|
|
27680
|
-
<code>${breakable(text5)}</code>
|
|
27681
|
-
<swc-action-button size="s" quiet data-action=${first2 ? "copy-command" : A} accessible-label=${done2 ? "Copied" : `Copy ${text5}`} @click=${() => copy(text5)}>
|
|
27682
|
-
<swc-icon-copy slot="icon"></swc-icon-copy>${done2 ? "Copied" : "Copy"}
|
|
27683
|
-
</swc-action-button>
|
|
27684
|
-
</div>`;
|
|
27685
|
-
}
|
|
27686
|
-
function breakable(text5) {
|
|
27687
|
-
return text5.split("/").map(
|
|
27688
|
-
(part2, index2, parts3) => b`${part2}${index2 < parts3.length - 1 ? b`/<wbr />` : A}`
|
|
27689
|
-
);
|
|
27690
|
-
}
|
|
27691
|
-
function reach({ intro, extensionUrl, copied, uncopied, copy }) {
|
|
27692
|
-
return b`<p>${intro}</p>
|
|
27693
|
-
${extensionUrl ? b`<p><a class="swc-Link" href=${extensionUrl} target="_blank" rel="noopener noreferrer" data-action="install-extension">Install the Chrome extension</a></p>` : A}
|
|
27694
|
-
<p>To run slicc, enter this in a terminal:</p>
|
|
27695
|
-
<div class="commands">
|
|
27696
|
-
${block2(command, copied, copy, true)}
|
|
27697
|
-
${block2(startCommand, copied, copy)}
|
|
27698
|
-
</div>
|
|
27699
|
-
<div class="commands" data-commands="node">
|
|
27700
|
-
<p>With Node:</p>
|
|
27701
|
-
${block2(nodeCommand, copied, copy)}
|
|
27702
|
-
</div>
|
|
27703
|
-
${uncopied ? b`<div class="error" role="alert" data-error="copy"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>Couldn’t copy. Select the command and copy it.</span></div>` : A}`;
|
|
27704
|
-
}
|
|
27705
|
-
async function copyText(text5) {
|
|
27706
|
-
try {
|
|
27707
|
-
await globalThis.navigator.clipboard.writeText(text5);
|
|
27708
|
-
return true;
|
|
27709
|
-
} catch {
|
|
27710
|
-
return false;
|
|
27711
|
-
}
|
|
27712
|
-
}
|
|
27713
|
-
|
|
27714
27845
|
// src/app/monitor.ts
|
|
27715
27846
|
function sparkline(points, width = 120, height = 28) {
|
|
27716
27847
|
if (points.length < 2) return "";
|
|
@@ -28990,9 +29121,6 @@ var o74 = class extends a10 {
|
|
|
28990
29121
|
};
|
|
28991
29122
|
e25("swc-icon-visibility-off", o74);
|
|
28992
29123
|
|
|
28993
|
-
// node_modules/@adobe/spectrum-wc/dist/link.css
|
|
28994
|
-
var link_default = '/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Standalone link presentation for native `<a href>` elements.\n *\n * Default anchor appearance inside `.swc-Typography--prose` and\n * `.swc-Typography--links` ships with `typography.css` (generated). Import this\n * stylesheet when authors need explicit BEM modifiers on anchors.\n *\n */\n\n.swc-Link {\n inline-size: -moz-fit-content;\n inline-size: fit-content;\n font-family: var(--swc-sans-font-family-stack);\n font-size: var(--swc-font-size-100);\n font-style: normal;\n font-weight: 400;\n line-height: 1.30;\n color: var(--swc-link-text-color-default, var(--swc-accent-color-900));\n -webkit-text-decoration: underline;\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 1px;\n transition: color 130ms ease-in-out;\n\n &:hover {\n color: var(--swc-link-text-color-hover, var(--swc-accent-color-1000));\n }\n\n &:active {\n color: var(--swc-link-text-color-down, var(--swc-accent-color-1000));\n }\n\n &:focus-visible {\n color: var(--swc-link-text-color-focus, var(--swc-accent-color-1000));\n border-radius: 4px;\n outline: 2px solid var(--swc-link-focus-indicator-color, var(--swc-blue-800));\n outline-offset: 2px;\n }\n\n &:lang(ja),\n &:lang(zh),\n &:lang(ko) {\n line-height: 1.50;\n }\n}\n\n.swc-Link--standalone {\n font-weight: 500;\n}\n\n.swc-Link--secondary {\n --swc-link-text-color-default: var(--swc-gray-800);\n --swc-link-text-color-hover: var(--swc-gray-900);\n --swc-link-text-color-down: var(--swc-gray-900);\n --swc-link-text-color-focus: var(--swc-gray-900);\n}\n\n.swc-Link--staticWhite {\n --swc-link-text-color-default: var(--swc-white);\n --swc-link-text-color-hover: var(--swc-white);\n --swc-link-text-color-down: var(--swc-white);\n --swc-link-text-color-focus: var(--swc-white);\n --swc-link-focus-indicator-color: var(--swc-white);\n}\n\n.swc-Link--staticBlack {\n --swc-link-text-color-default: var(--swc-black);\n --swc-link-text-color-hover: var(--swc-black);\n --swc-link-text-color-down: var(--swc-black);\n --swc-link-text-color-focus: var(--swc-black);\n --swc-link-focus-indicator-color: var(--swc-black);\n}\n\n.swc-Link--quiet.swc-Link--standalone {\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.swc-Link--quiet.swc-Link--standalone:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n';
|
|
28995
|
-
|
|
28996
29124
|
// src/app/guests.ts
|
|
28997
29125
|
var hour = 36e5;
|
|
28998
29126
|
var day3 = 24 * hour;
|
|
@@ -35619,15 +35747,29 @@ function pinVersion(item2, pin) {
|
|
|
35619
35747
|
if (pin.base === null) return [pin.range === version2 ? version2 : `${pin.range} \u2192 ${version2}`];
|
|
35620
35748
|
return [version2, pin.base === version2 ? "the version seven ships" : `seven ships ${pin.base}`];
|
|
35621
35749
|
}
|
|
35750
|
+
function held(item2) {
|
|
35751
|
+
if (!item2.withheld) return item2;
|
|
35752
|
+
return {
|
|
35753
|
+
...item2,
|
|
35754
|
+
offered: item2.version,
|
|
35755
|
+
state: item2.state === "outdated" ? "installed" : item2.state,
|
|
35756
|
+
actions: item2.actions.filter((action) => action !== "install" && action !== "update")
|
|
35757
|
+
};
|
|
35758
|
+
}
|
|
35622
35759
|
function placed(item2) {
|
|
35623
35760
|
const installs = item2.installs ?? [];
|
|
35624
|
-
if (!installs.length) return item2;
|
|
35761
|
+
if (!installs.length) return held(item2);
|
|
35625
35762
|
const version2 = item2.version ?? installs[0].version;
|
|
35626
35763
|
const newer2 = item2.offered !== null && item2.offered !== version2;
|
|
35627
35764
|
const state2 = item2.state === "available" ? newer2 ? "outdated" : "installed" : item2.state;
|
|
35628
35765
|
const owned = installs.some((install) => install.manager === "panel");
|
|
35629
35766
|
const hidden = new Set(owned ? ["install"] : ["install", "remove"]);
|
|
35630
|
-
return {
|
|
35767
|
+
return held({
|
|
35768
|
+
...item2,
|
|
35769
|
+
version: version2,
|
|
35770
|
+
state: state2,
|
|
35771
|
+
actions: item2.actions.filter((action) => !hidden.has(action))
|
|
35772
|
+
});
|
|
35631
35773
|
}
|
|
35632
35774
|
var elsewhere = (item2) => (item2.installs ?? []).filter((install) => install.manager !== "panel");
|
|
35633
35775
|
function installText(install, version2) {
|
|
@@ -35645,6 +35787,44 @@ function actionLabel2(item2, action) {
|
|
|
35645
35787
|
if (action === "remove" && shared2(item2)) return `Remove the panel\u2019s copy of ${item2.label}`;
|
|
35646
35788
|
return `${packageActions[action]} ${item2.label}`;
|
|
35647
35789
|
}
|
|
35790
|
+
var plainLimit = 300;
|
|
35791
|
+
var entities = {
|
|
35792
|
+
amp: "&",
|
|
35793
|
+
lt: "<",
|
|
35794
|
+
gt: ">",
|
|
35795
|
+
quot: '"',
|
|
35796
|
+
apos: "'",
|
|
35797
|
+
nbsp: " ",
|
|
35798
|
+
copy: "\xA9",
|
|
35799
|
+
reg: "\xAE",
|
|
35800
|
+
trade: "\u2122",
|
|
35801
|
+
hellip: "\u2026",
|
|
35802
|
+
ndash: "\u2013",
|
|
35803
|
+
mdash: "\u2014",
|
|
35804
|
+
lsquo: "\u2018",
|
|
35805
|
+
rsquo: "\u2019",
|
|
35806
|
+
ldquo: "\u201C",
|
|
35807
|
+
rdquo: "\u201D"
|
|
35808
|
+
};
|
|
35809
|
+
var decoded = (text5) => text5.replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi, (entity, name) => {
|
|
35810
|
+
if (name[0] !== "#") return entities[name.toLowerCase()] ?? entity;
|
|
35811
|
+
const hex = /^#x/i.test(name);
|
|
35812
|
+
const code3 = Number.parseInt(name.slice(hex ? 2 : 1), hex ? 16 : 10);
|
|
35813
|
+
return code3 > 0 && code3 <= 1114111 ? String.fromCodePoint(code3) : entity;
|
|
35814
|
+
});
|
|
35815
|
+
function stripped(text5) {
|
|
35816
|
+
const target = String.raw`\(((?:[^()]|\([^()]*\))*)\)`;
|
|
35817
|
+
return decoded(text5).replace(/^[ \t]*(?:`{3,}|~{3,}).*$/gm, "").replace(/^[ \t]*(?:#{1,6}[ \t]+|>[ \t]?|[-*+][ \t]+|\d+[.)][ \t]+)+/gm, "").replace(/<!--[\s\S]*?-->/g, "").replace(/<\/?[a-z][^>]*>/gi, "").replace(new RegExp(String.raw`!\[([^\]]*)\]${target}`, "g"), "$1").replace(new RegExp(String.raw`\[([^\]]*)\]${target}`, "g"), "$1").replace(/(`+)([^\n]+?)\1(?!`)/g, "$2").replace(/(\*\*|__)(?=\S)(.+?)\1/g, "$2").replace(/\*(?=\S)([^*\n]+?)\*/g, "$1").replace(/(^|[^\w])_(?=\S)([^_\n]+?)_(?![\w])/g, "$1$2");
|
|
35818
|
+
}
|
|
35819
|
+
function plain2(text5, limit2 = plainLimit) {
|
|
35820
|
+
const flat = [...stripped(text5).replace(/\s+/g, " ").trim()];
|
|
35821
|
+
return flat.length > limit2 ? `${flat.slice(0, limit2 - 1).join("").trimEnd()}\u2026` : flat.join("");
|
|
35822
|
+
}
|
|
35823
|
+
function withheldText(reason, prefix = "Not offered") {
|
|
35824
|
+
const text5 = plain2(reason, 200).replace(/\.$/, "");
|
|
35825
|
+
return `${prefix}: ${text5}${text5.endsWith("\u2026") ? "" : "."}`;
|
|
35826
|
+
}
|
|
35827
|
+
var unreachable = (items) => items.some((item2) => item2.registry === "unreachable");
|
|
35648
35828
|
var packageRunning = /* @__PURE__ */ new Set(["installing", "updating", "removing"]);
|
|
35649
35829
|
var list5 = (names2) => new Intl.ListFormat("en", { type: "conjunction" }).format(names2);
|
|
35650
35830
|
function requiresText(item2, all3) {
|
|
@@ -35743,6 +35923,9 @@ function whatsNew(releases, from, to, name) {
|
|
|
35743
35923
|
const range3 = releases.filter((release3) => newer(release3.version, from) > 0 && newer(release3.version, to) <= 0).sort((a23, b13) => newer(b13.version, a23.version)).map((release3) => releaseNotes(release3, name));
|
|
35744
35924
|
return range3.some((entry) => entry.body) ? range3 : [];
|
|
35745
35925
|
}
|
|
35926
|
+
var npmPage = (name) => `https://www.npmjs.com/package/${name.split("/").map(
|
|
35927
|
+
(part2) => part2.startsWith("@") ? `@${encodeURIComponent(part2.slice(1))}` : encodeURIComponent(part2)
|
|
35928
|
+
).join("/")}`;
|
|
35746
35929
|
var secure = (url) => /^https:\/\//i.test(url);
|
|
35747
35930
|
var installed2 = (releases, version2) => releases?.find((release3) => newer(release3.version, version2) === 0 && secure(release3.url));
|
|
35748
35931
|
var snapshot = (items) => new Map(items.map(({ id, state: state2, error }) => [id, { state: state2, error }]));
|
|
@@ -35799,10 +35982,13 @@ var SliccUpdates = class extends ModelElement {
|
|
|
35799
35982
|
pending: { state: true },
|
|
35800
35983
|
failures: { state: true },
|
|
35801
35984
|
busy: { state: true },
|
|
35802
|
-
problems: { state: true }
|
|
35985
|
+
problems: { state: true },
|
|
35986
|
+
refreshing: { state: true },
|
|
35987
|
+
still: { state: true }
|
|
35803
35988
|
};
|
|
35804
35989
|
#logs = new ViewSet(this, "updates");
|
|
35805
35990
|
#reached = /* @__PURE__ */ new Map();
|
|
35991
|
+
#retryHeld = false;
|
|
35806
35992
|
constructor() {
|
|
35807
35993
|
super();
|
|
35808
35994
|
this.pending = /* @__PURE__ */ new Set();
|
|
@@ -35972,8 +36158,35 @@ var SliccUpdates = class extends ModelElement {
|
|
|
35972
36158
|
grid-area: description;
|
|
35973
36159
|
margin: 0;
|
|
35974
36160
|
overflow: hidden;
|
|
35975
|
-
|
|
35976
|
-
|
|
36161
|
+
display: -webkit-box;
|
|
36162
|
+
-webkit-box-orient: vertical;
|
|
36163
|
+
-webkit-line-clamp: 2;
|
|
36164
|
+
overflow-wrap: anywhere;
|
|
36165
|
+
}
|
|
36166
|
+
[data-registry] > .description,
|
|
36167
|
+
.withheld {
|
|
36168
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
36169
|
+
}
|
|
36170
|
+
.withheld {
|
|
36171
|
+
font-size: var(--swc-font-size-75);
|
|
36172
|
+
line-height: var(--swc-line-height-200);
|
|
36173
|
+
overflow-wrap: anywhere;
|
|
36174
|
+
}
|
|
36175
|
+
.rows > li[data-registry='unreachable'] {
|
|
36176
|
+
grid-template-areas: 'name buttons';
|
|
36177
|
+
}
|
|
36178
|
+
.registry {
|
|
36179
|
+
display: flex;
|
|
36180
|
+
flex-wrap: wrap;
|
|
36181
|
+
align-items: center;
|
|
36182
|
+
gap: var(--swc-spacing-100) var(--swc-spacing-200);
|
|
36183
|
+
margin-block-end: var(--swc-spacing-100);
|
|
36184
|
+
}
|
|
36185
|
+
.registry .hint {
|
|
36186
|
+
margin: 0;
|
|
36187
|
+
}
|
|
36188
|
+
#packages:focus {
|
|
36189
|
+
outline: none;
|
|
35977
36190
|
}
|
|
35978
36191
|
.rows > li > .meta {
|
|
35979
36192
|
justify-content: flex-start;
|
|
@@ -36109,12 +36322,6 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36109
36322
|
.rows > li {
|
|
36110
36323
|
grid-template-areas: 'name buttons' 'description description';
|
|
36111
36324
|
}
|
|
36112
|
-
.description {
|
|
36113
|
-
display: -webkit-box;
|
|
36114
|
-
-webkit-box-orient: vertical;
|
|
36115
|
-
-webkit-line-clamp: 2;
|
|
36116
|
-
white-space: normal;
|
|
36117
|
-
}
|
|
36118
36325
|
}
|
|
36119
36326
|
`
|
|
36120
36327
|
];
|
|
@@ -36123,6 +36330,8 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36123
36330
|
this.failures = /* @__PURE__ */ new Map();
|
|
36124
36331
|
this.busy = /* @__PURE__ */ new Map();
|
|
36125
36332
|
this.problems = /* @__PURE__ */ new Map();
|
|
36333
|
+
this.refreshing = false;
|
|
36334
|
+
this.still = false;
|
|
36126
36335
|
this.#reached.clear();
|
|
36127
36336
|
const port = model.updates;
|
|
36128
36337
|
if (!port) return [];
|
|
@@ -36198,6 +36407,42 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36198
36407
|
}
|
|
36199
36408
|
}
|
|
36200
36409
|
}
|
|
36410
|
+
async refreshPackages() {
|
|
36411
|
+
const port = this.model?.updates;
|
|
36412
|
+
if (!port?.refreshPackages || this.refreshing) return;
|
|
36413
|
+
this.refreshing = true;
|
|
36414
|
+
this.still = false;
|
|
36415
|
+
try {
|
|
36416
|
+
await port.refreshPackages();
|
|
36417
|
+
} catch {
|
|
36418
|
+
} finally {
|
|
36419
|
+
if (this.model?.updates === port) {
|
|
36420
|
+
this.refreshing = false;
|
|
36421
|
+
this.still = unreachable(port.packages?.() ?? []);
|
|
36422
|
+
}
|
|
36423
|
+
}
|
|
36424
|
+
}
|
|
36425
|
+
willUpdate(changed2) {
|
|
36426
|
+
super.willUpdate(changed2);
|
|
36427
|
+
const active = this.shadowRoot?.activeElement;
|
|
36428
|
+
this.#retryHeld = active?.dataset.action === "retry-registry";
|
|
36429
|
+
}
|
|
36430
|
+
updated(changed2) {
|
|
36431
|
+
super.updated(changed2);
|
|
36432
|
+
if (this.#retryHeld && !this.renderRoot.querySelector('[data-action="retry-registry"]'))
|
|
36433
|
+
this.renderRoot.querySelector("#packages")?.focus();
|
|
36434
|
+
for (const row of this.renderRoot.querySelectorAll("li[data-id]")) {
|
|
36435
|
+
const description = row.querySelector(".description");
|
|
36436
|
+
for (const button of row.querySelectorAll(
|
|
36437
|
+
".buttons swc-button"
|
|
36438
|
+
))
|
|
36439
|
+
void button.updateComplete.then(() => {
|
|
36440
|
+
const inner = button.shadowRoot?.querySelector("button");
|
|
36441
|
+
if (inner)
|
|
36442
|
+
inner.ariaDescribedByElements = description && !row.dataset.registry ? [description] : [];
|
|
36443
|
+
});
|
|
36444
|
+
}
|
|
36445
|
+
}
|
|
36201
36446
|
#prune(kind, items, busy) {
|
|
36202
36447
|
const live = new Set(items.filter(busy).map((item2) => `${kind}:${item2.id}`));
|
|
36203
36448
|
for (const key2 of this.#reached.keys()) {
|
|
@@ -36297,7 +36542,7 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36297
36542
|
return b`<a class="swc-Link swc-Link--standalone" href=${release3.url} target="_blank" rel="noopener noreferrer" data-action="release-notes" aria-label=${`${label} ${version2} release notes`}>Release notes</a>`;
|
|
36298
36543
|
}
|
|
36299
36544
|
if (!npm) return A;
|
|
36300
|
-
return b`<a class="swc-Link swc-Link--standalone" href=${
|
|
36545
|
+
return b`<a class="swc-Link swc-Link--standalone" href=${npmPage(npm)} target="_blank" rel="noopener noreferrer" data-action="npm-page" aria-label=${`npm page for ${label} ${version2}`}>npm page</a>`;
|
|
36301
36546
|
}
|
|
36302
36547
|
#version(item2, meta) {
|
|
36303
36548
|
const text5 = meta ? b`<span data-npm-meta>${meta}</span>` : b`<span class="version">${item2.from ?? "Not installed"}${item2.to && item2.to !== item2.from ? b` → ${item2.to}` : A}</span>`;
|
|
@@ -36348,12 +36593,13 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36348
36593
|
}
|
|
36349
36594
|
const version2 = item2.version === null ? item2.offered : item2.offered && item2.offered !== item2.version ? `${item2.version} \u2192 ${item2.offered}` : item2.version;
|
|
36350
36595
|
const download2 = item2.size !== void 0 && (item2.version === null || item2.offered !== item2.version);
|
|
36596
|
+
const bytes = download2 ? `${size3(item2.size)}${item2.unpacked ? " on disk" : ""}` : "";
|
|
36351
36597
|
const requires = requiresText(item2, all3);
|
|
36352
36598
|
return b`<p class="meta">
|
|
36353
36599
|
${version2 ? b`<span class="version">${version2}</span>` : A}
|
|
36354
36600
|
${shared2(item2) ? b`<span data-install="panel">the panel’s copy</span>` : A}
|
|
36355
36601
|
${elsewhere(item2).map((install) => b`<span data-install>${installText(install, item2.version)}</span>`)}
|
|
36356
|
-
${download2 ? b`<span>${
|
|
36602
|
+
${download2 ? b`<span data-size>${bytes}</span>` : A}
|
|
36357
36603
|
${requires ? b`<span data-requires>${requires}</span>` : A}
|
|
36358
36604
|
${this.#packageLink(item2)}
|
|
36359
36605
|
</p>`;
|
|
@@ -36377,10 +36623,11 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36377
36623
|
#package(item2, all3, act2) {
|
|
36378
36624
|
const light = packageLight(item2);
|
|
36379
36625
|
const busy = this.busy.get(item2.id);
|
|
36380
|
-
const
|
|
36626
|
+
const actions2 = item2.registry ? item2.actions.filter((action) => action !== "retry") : item2.actions;
|
|
36627
|
+
const shown4 = busy ? [busy] : act2 ? actions2 : [];
|
|
36381
36628
|
const error = this.problems.get(item2.id) ?? item2.error;
|
|
36382
36629
|
const managed = managedText(item2);
|
|
36383
|
-
return b`<li data-id=${item2.id} data-state=${item2.state}>
|
|
36630
|
+
return b`<li data-id=${item2.id} data-state=${item2.state} data-registry=${item2.registry ?? A}>
|
|
36384
36631
|
<div class="name">
|
|
36385
36632
|
<h3 title=${item2.package}>${item2.label}</h3>
|
|
36386
36633
|
${light ? b`<swc-status-light size="s" variant=${light[0]}>${light[1]}</swc-status-light>` : A}
|
|
@@ -36395,9 +36642,10 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36395
36642
|
@click=${() => void this.actPackage(item2.id, action)}
|
|
36396
36643
|
>${packageActions[action]}</swc-button>`
|
|
36397
36644
|
)}</div>
|
|
36398
|
-
|
|
36399
|
-
${
|
|
36400
|
-
${item2.
|
|
36645
|
+
${item2.registry === "unreachable" ? A : b`<p class="description">${item2.registry ? "Checking npm\u2026" : plain2(item2.description)}</p>`}
|
|
36646
|
+
${item2.withheld ? b`<p class="withheld" data-withheld>${withheldText(item2.withheld)}</p>` : item2.newer ? b`<p class="withheld" data-newer>${withheldText(item2.newer.reason, `${item2.newer.version} isn\u2019t offered yet`)}</p>` : A}
|
|
36647
|
+
${item2.registry === "unreachable" && item2.version === null ? A : this.#packageMeta(item2, all3)}
|
|
36648
|
+
${item2.notes?.length || managed ? b`<p class="notes" data-notes>${(item2.notes ?? []).map((note) => b`<span>${plain2(note)}</span>`)}${managed ? b`<span data-managed>${managed}</span>` : A}</p>` : A}
|
|
36401
36649
|
${item2.warnings?.length ? b`<p class="warnings" data-warnings>${item2.warnings.map(
|
|
36402
36650
|
(warning) => b`<span><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>${warning}</span>`
|
|
36403
36651
|
)}</p>` : A}
|
|
@@ -36420,6 +36668,24 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36420
36668
|
(item2) => this.#package(item2, all3, Boolean(port.actPackage))
|
|
36421
36669
|
)}</ul>`;
|
|
36422
36670
|
}
|
|
36671
|
+
#packagesHint(port, offered) {
|
|
36672
|
+
if (!unreachable(offered) && !this.refreshing)
|
|
36673
|
+
return b`<p class="hint">
|
|
36674
|
+
${offered.length ? "Tools for the agent and the terminal. Install the ones you need; you can remove them later." : "No optional packages are offered right now."}
|
|
36675
|
+
</p>`;
|
|
36676
|
+
return b`<div class="registry" data-registry="unreachable">
|
|
36677
|
+
<p class="hint">${this.refreshing ? "Checking npm\u2026" : "Couldn\u2019t reach npm, so versions and sizes aren\u2019t shown."}</p>
|
|
36678
|
+
${port.refreshPackages ? b`<swc-button
|
|
36679
|
+
size="s"
|
|
36680
|
+
variant="secondary"
|
|
36681
|
+
data-action="retry-registry"
|
|
36682
|
+
accessible-label="Retry reaching npm"
|
|
36683
|
+
?pending=${this.refreshing}
|
|
36684
|
+
@click=${() => void this.refreshPackages()}
|
|
36685
|
+
>Retry</swc-button>` : A}
|
|
36686
|
+
<span class="hidden" role="status" aria-live="polite" data-still>${this.still ? "Still couldn\u2019t reach npm." : ""}</span>
|
|
36687
|
+
</div>`;
|
|
36688
|
+
}
|
|
36423
36689
|
#packages(port) {
|
|
36424
36690
|
if (!port?.packages) return A;
|
|
36425
36691
|
const all3 = port.packages().map(placed);
|
|
@@ -36427,10 +36693,8 @@ var SliccUpdates = class extends ModelElement {
|
|
|
36427
36693
|
const yours = all3.filter((item2) => item2.origin === "user");
|
|
36428
36694
|
return b`<section data-section="packages" aria-labelledby="packages">
|
|
36429
36695
|
<swc-divider size="m"></swc-divider>
|
|
36430
|
-
<h2 id="packages">Optional packages</h2>
|
|
36431
|
-
|
|
36432
|
-
${offered.length ? "Tools for the agent and the terminal. Install the ones you need; you can remove them later." : "No optional packages are offered right now."}
|
|
36433
|
-
</p>
|
|
36696
|
+
<h2 id="packages" tabindex="-1">Optional packages</h2>
|
|
36697
|
+
${this.#packagesHint(port, offered)}
|
|
36434
36698
|
${offered.length ? this.#list(offered, all3, port) : A}
|
|
36435
36699
|
</section>
|
|
36436
36700
|
${yours.length ? b`<section data-section="user-packages" aria-labelledby="user-packages">
|
|
@@ -37031,7 +37295,7 @@ var SliccApp = class extends ThemedElement {
|
|
|
37031
37295
|
if (!dock2 || !this.#started) return;
|
|
37032
37296
|
const known = new Set(this.model?.agent.list().map((agent2) => agent2.id));
|
|
37033
37297
|
const agent = this.#active();
|
|
37034
|
-
const
|
|
37298
|
+
const held2 = !!agent && !!dock2.content("chat")?.shadowRoot?.activeElement;
|
|
37035
37299
|
this.panels.quietly(() => {
|
|
37036
37300
|
for (const id of chats(dock2)) {
|
|
37037
37301
|
if (!known.has(chatAgent(id))) dock2.close(id);
|
|
@@ -37051,7 +37315,7 @@ var SliccApp = class extends ThemedElement {
|
|
|
37051
37315
|
if (this.model && this.#offers("terminal"))
|
|
37052
37316
|
this.terminalPanels.sync(dock2, this.model.terminals, this.screen);
|
|
37053
37317
|
});
|
|
37054
|
-
if (agent &&
|
|
37318
|
+
if (agent && held2 && this.#offers("chat")) openChat(dock2, agent, this.screen, true);
|
|
37055
37319
|
}
|
|
37056
37320
|
#activated(event2) {
|
|
37057
37321
|
const { id } = event2.detail;
|
|
@@ -37525,9 +37789,9 @@ function ansi2(command3) {
|
|
|
37525
37789
|
const escape3 = /\\(?:x([0-9a-fA-F]{1,2})|u([0-9a-fA-F]{1,4})|U([0-9a-fA-F]{1,8})|([0-7]{1,3})|([\s\S]))/g;
|
|
37526
37790
|
return command3.replace(
|
|
37527
37791
|
/\$'((?:[^'\\]|\\[\s\S])*)'/g,
|
|
37528
|
-
(_9, body4) => `'${body4.replace(escape3, (_match, hex, short2, long, octal,
|
|
37792
|
+
(_9, body4) => `'${body4.replace(escape3, (_match, hex, short2, long, octal, plain3) => {
|
|
37529
37793
|
if (octal) return String.fromCharCode(Number.parseInt(octal, 8));
|
|
37530
|
-
if (
|
|
37794
|
+
if (plain3) return plain3;
|
|
37531
37795
|
return String.fromCodePoint(
|
|
37532
37796
|
Math.min(Number.parseInt(hex ?? short2 ?? long, 16), 1114111)
|
|
37533
37797
|
);
|
|
@@ -37624,9 +37888,9 @@ function reach2(command3, cwd) {
|
|
|
37624
37888
|
if (protects(start2, false)) return start2;
|
|
37625
37889
|
const cwds = /* @__PURE__ */ new Set([start2]);
|
|
37626
37890
|
const text5 = unglob(ansi2(command3.replace(/\\\n/g, "")));
|
|
37627
|
-
const
|
|
37891
|
+
const plain3 = text5.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word2) => word2.replace(/['"\\]/g, ""))));
|
|
37628
37892
|
const aware = shield(text5).split(separators).map((segment2) => commas(quoted(unshield(segment2))));
|
|
37629
|
-
const segments = JSON.stringify(aware) === JSON.stringify(
|
|
37893
|
+
const segments = JSON.stringify(aware) === JSON.stringify(plain3) ? plain3 : [...plain3, ...aware];
|
|
37630
37894
|
const whole = segments.some((words2) => words2.length > 0 && !trusted2(words2[0]));
|
|
37631
37895
|
for (const words2 of segments) {
|
|
37632
37896
|
const hit = scan2(words2, cwds, whole);
|
|
@@ -38042,9 +38306,9 @@ var SliccApprovals = class extends ModelElement {
|
|
|
38042
38306
|
</sp-alert-dialog>`
|
|
38043
38307
|
);
|
|
38044
38308
|
}
|
|
38045
|
-
const
|
|
38309
|
+
const held2 = this.#showing && this.#pending.has(this.#showing.id) ? this.#showing : null;
|
|
38046
38310
|
const list6 = this.#current();
|
|
38047
|
-
const [approval, ...rest] =
|
|
38311
|
+
const [approval, ...rest] = held2 ? [held2, ...list6.filter(({ id }) => id !== held2.id)] : list6;
|
|
38048
38312
|
if (!approval) return A;
|
|
38049
38313
|
const failure2 = this.failure?.id === approval.id ? this.failure.message : "";
|
|
38050
38314
|
const verdict = rulesOf(approval);
|
|
@@ -41904,6 +42168,8 @@ function words(message, word2) {
|
|
|
41904
42168
|
return new RegExp(`\\b${word2.replace(/[^a-z0-9 ]/gi, "\\$&")}\\b`, "i").test(message);
|
|
41905
42169
|
}
|
|
41906
42170
|
var popup = (account) => account.group === "mcp" && account.auth === "oauth";
|
|
42171
|
+
var dual = (account) => account.auth === "oauth" && account.secret === "api-key";
|
|
42172
|
+
var signInMethod = (account) => dual(account) ? { method: "sign-in" } : void 0;
|
|
41907
42173
|
var start = (options2, value) => options2.some((option2) => option2.value === value) ? value : options2[0]?.value ?? "";
|
|
41908
42174
|
var nothingToChoose = "Nothing to choose from yet. You can connect without it.";
|
|
41909
42175
|
var secretNames = { "api-key": "API key", token: "token" };
|
|
@@ -41933,6 +42199,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
41933
42199
|
developerError: { state: true }
|
|
41934
42200
|
};
|
|
41935
42201
|
#waits = new SignInWaits(() => this.requestUpdate());
|
|
42202
|
+
#copies = new SignInCopies(() => this.requestUpdate());
|
|
41936
42203
|
#landing = null;
|
|
41937
42204
|
#away = false;
|
|
41938
42205
|
#bases = /* @__PURE__ */ new Map();
|
|
@@ -41959,6 +42226,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
41959
42226
|
dialogFrame,
|
|
41960
42227
|
searchCss,
|
|
41961
42228
|
r(link_default),
|
|
42229
|
+
signInCss,
|
|
41962
42230
|
i`
|
|
41963
42231
|
:host {
|
|
41964
42232
|
display: block;
|
|
@@ -42073,6 +42341,15 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42073
42341
|
color: var(--swc-neutral-subdued-content-color-default);
|
|
42074
42342
|
font-size: var(--swc-font-size-75);
|
|
42075
42343
|
}
|
|
42344
|
+
.sign-in .enter {
|
|
42345
|
+
color: var(--swc-neutral-subdued-content-color-default);
|
|
42346
|
+
}
|
|
42347
|
+
.sign-in .enter,
|
|
42348
|
+
.sign-in .unknown,
|
|
42349
|
+
.sign-in .address,
|
|
42350
|
+
.sign-in .swc-Link {
|
|
42351
|
+
font-size: var(--swc-font-size-75);
|
|
42352
|
+
}
|
|
42076
42353
|
.switched {
|
|
42077
42354
|
grid-column: 2;
|
|
42078
42355
|
}
|
|
@@ -42126,6 +42403,20 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42126
42403
|
flex: none;
|
|
42127
42404
|
margin-block-start: var(--swc-spacing-50);
|
|
42128
42405
|
}
|
|
42406
|
+
.other-way {
|
|
42407
|
+
justify-self: start;
|
|
42408
|
+
padding: 0;
|
|
42409
|
+
border: 0;
|
|
42410
|
+
background: none;
|
|
42411
|
+
font-size: var(--swc-font-size-75);
|
|
42412
|
+
cursor: pointer;
|
|
42413
|
+
}
|
|
42414
|
+
@media (forced-colors: active) {
|
|
42415
|
+
.other-way {
|
|
42416
|
+
color: LinkText;
|
|
42417
|
+
text-decoration: underline;
|
|
42418
|
+
}
|
|
42419
|
+
}
|
|
42129
42420
|
.add {
|
|
42130
42421
|
margin-block-start: var(--swc-spacing-200);
|
|
42131
42422
|
margin-inline-start: calc(-1 * var(--swc-spacing-100));
|
|
@@ -42378,13 +42669,13 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42378
42669
|
const rest = [...this.pending].filter((candidate) => candidate !== id);
|
|
42379
42670
|
this.pending = new Set(on2 ? [...rest, id] : rest);
|
|
42380
42671
|
}
|
|
42381
|
-
async connect(id, secret, fields) {
|
|
42672
|
+
async connect(id, secret, fields, options2) {
|
|
42382
42673
|
this.#busy(id, true);
|
|
42383
42674
|
this.failure = null;
|
|
42384
42675
|
this.#cancelled.delete(id);
|
|
42385
42676
|
const settings = this.model?.settings;
|
|
42386
42677
|
try {
|
|
42387
|
-
await (fields ? settings?.connect(id, secret, fields) : secret === void 0 ? settings?.connect(id) : settings?.connect(id, secret));
|
|
42678
|
+
await (options2 ? settings?.connect(id, secret, fields, options2) : fields ? settings?.connect(id, secret, fields) : secret === void 0 ? settings?.connect(id) : settings?.connect(id, secret));
|
|
42388
42679
|
if (this.entering === id) this.entering = null;
|
|
42389
42680
|
if (this.adding?.id === id && this.#added(id)?.status === "connected") this.#finish(id);
|
|
42390
42681
|
} catch (error) {
|
|
@@ -42396,7 +42687,8 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42396
42687
|
}
|
|
42397
42688
|
#vault(account) {
|
|
42398
42689
|
const vault = this.model?.vault;
|
|
42399
|
-
|
|
42690
|
+
const keyed2 = account.auth === "api-key" || dual(account);
|
|
42691
|
+
return keyed2 && account.store === "vault" && vault?.put ? vault : null;
|
|
42400
42692
|
}
|
|
42401
42693
|
async keep(account, value, fields) {
|
|
42402
42694
|
const model = this.model;
|
|
@@ -42526,7 +42818,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42526
42818
|
return;
|
|
42527
42819
|
}
|
|
42528
42820
|
}
|
|
42529
|
-
await this.connect(id, secret, fields);
|
|
42821
|
+
await this.connect(id, secret, fields, dual(account) ? { method: "key" } : void 0);
|
|
42530
42822
|
if (this.failure?.id === id) {
|
|
42531
42823
|
this.#placeFailure(account, fields);
|
|
42532
42824
|
const back = forward ? this.#modelChange(name, changes2, "url", "old") : null;
|
|
@@ -42585,11 +42877,30 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42585
42877
|
}
|
|
42586
42878
|
#start(account) {
|
|
42587
42879
|
if (account.auth !== "api-key") {
|
|
42588
|
-
void this.connect(account.id);
|
|
42880
|
+
void this.connect(account.id, void 0, void 0, signInMethod(account));
|
|
42589
42881
|
return;
|
|
42590
42882
|
}
|
|
42591
42883
|
this.#enter(account);
|
|
42592
42884
|
}
|
|
42885
|
+
#useSignIn(account) {
|
|
42886
|
+
this.#cancel();
|
|
42887
|
+
void this.updateComplete.then(
|
|
42888
|
+
() => this.renderRoot.querySelector(
|
|
42889
|
+
`.account[data-id="${CSS.escape(account.id)}"] [data-action=connect]`
|
|
42890
|
+
)?.focus()
|
|
42891
|
+
);
|
|
42892
|
+
}
|
|
42893
|
+
#otherWay(account) {
|
|
42894
|
+
if (!dual(account) || account.status === "connected" || this.#signingIn(account) || this.pending.has(account.id))
|
|
42895
|
+
return A;
|
|
42896
|
+
const entering = this.entering === account.id;
|
|
42897
|
+
return b`<button
|
|
42898
|
+
type="button"
|
|
42899
|
+
class="swc-Link swc-Link--standalone swc-Link--quiet other-way"
|
|
42900
|
+
data-action=${entering ? "use-sign-in" : "use-key"}
|
|
42901
|
+
@click=${() => entering ? this.#useSignIn(account) : this.#enter(account)}
|
|
42902
|
+
>${entering ? "Sign in instead" : "Use an API key instead"}</button>`;
|
|
42903
|
+
}
|
|
42593
42904
|
#enter(account) {
|
|
42594
42905
|
this.failure = null;
|
|
42595
42906
|
this.problem = null;
|
|
@@ -42770,6 +43081,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42770
43081
|
}
|
|
42771
43082
|
#leave(account) {
|
|
42772
43083
|
const adding = this.adding?.id === account.id;
|
|
43084
|
+
if (dual(account) && !adding) return A;
|
|
42773
43085
|
return b`<swc-button size="m" variant="secondary" data-action=${adding ? "back" : "cancel"} @click=${() => adding ? this.#back() : this.#cancel()}>${adding ? "Back" : "Cancel"}</swc-button>`;
|
|
42774
43086
|
}
|
|
42775
43087
|
#saveLabel(account) {
|
|
@@ -42863,7 +43175,8 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42863
43175
|
return account.auth !== "api-key" || !!vault.put;
|
|
42864
43176
|
}
|
|
42865
43177
|
#records(account, vault) {
|
|
42866
|
-
if (account.auth === "api-key"
|
|
43178
|
+
if (account.auth === "api-key" || dual(account))
|
|
43179
|
+
return [[recordName(account), recordKind(account)]];
|
|
42867
43180
|
const server = serverOf(account);
|
|
42868
43181
|
const names2 = (vault.list()?.secrets ?? []).filter(
|
|
42869
43182
|
(secret) => secret.kind === "mcp" && secret.server === server && secret.state !== "removed"
|
|
@@ -42875,7 +43188,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42875
43188
|
const model = this.model;
|
|
42876
43189
|
const vault = model?.vault;
|
|
42877
43190
|
const vaulted = account.store === "vault" && !!vault?.remove;
|
|
42878
|
-
const key2 = vaulted && account.auth === "api-key";
|
|
43191
|
+
const key2 = vaulted && (account.auth === "api-key" || dual(account));
|
|
42879
43192
|
const signIn = vaulted && account.auth !== "api-key" && account.group === "mcp";
|
|
42880
43193
|
const stored2 = key2 || signIn ? vault : void 0;
|
|
42881
43194
|
const body4 = `Agents can\u2019t use ${account.provider} until you connect it again.${key2 ? " You can restore its key from Removed in Secrets for 30 days." : ""}`;
|
|
@@ -42919,7 +43232,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42919
43232
|
return this.picking ? "a provider is being added" : null;
|
|
42920
43233
|
}
|
|
42921
43234
|
#signingIn(account) {
|
|
42922
|
-
return account.status === "signing-in" || account.auth !== "api-key" && account.status !== "connected" && this.pending.has(account.id);
|
|
43235
|
+
return account.status === "signing-in" || account.auth !== "api-key" && account.status !== "connected" && this.entering !== account.id && this.pending.has(account.id);
|
|
42923
43236
|
}
|
|
42924
43237
|
#action(account) {
|
|
42925
43238
|
if (this.#signingIn(account) && this.model?.settings.cancel) {
|
|
@@ -42941,14 +43254,15 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42941
43254
|
@click=${() => this.#disconnect(account)}
|
|
42942
43255
|
>Disconnect</swc-button>`;
|
|
42943
43256
|
}
|
|
42944
|
-
const
|
|
43257
|
+
const signs = popup(account) || dual(account);
|
|
43258
|
+
const label = signs ? "Sign in" : account.status === "expired" ? "Reconnect" : "Connect";
|
|
42945
43259
|
const entering = this.entering === account.id;
|
|
42946
43260
|
const busy = this.#signingIn(account) || !entering && this.pending.has(account.id);
|
|
42947
43261
|
return b`<swc-button
|
|
42948
43262
|
size="m"
|
|
42949
43263
|
variant="secondary"
|
|
42950
43264
|
data-action="connect"
|
|
42951
|
-
accessible-label=${
|
|
43265
|
+
accessible-label=${signs ? `Sign in to ${account.provider}` : `${label} ${account.provider}`}
|
|
42952
43266
|
?pending=${busy}
|
|
42953
43267
|
?disabled=${entering || !!account.blocked}
|
|
42954
43268
|
@click=${() => this.#start(account)}
|
|
@@ -42976,9 +43290,14 @@ var SliccSettings = class extends ThemedElement {
|
|
|
42976
43290
|
<swc-status-light class="state" variant=${variant}>${label}</swc-status-light>
|
|
42977
43291
|
${this.#actions(account)}
|
|
42978
43292
|
</div>
|
|
42979
|
-
${this.#
|
|
43293
|
+
${this.#rowNotes(account)}
|
|
42980
43294
|
${this.#movedNote(account)}
|
|
42981
|
-
${this.adding?.id === account.id ? A : b`${this.#key(account)}${failure2}`}`;
|
|
43295
|
+
${this.adding?.id === account.id ? A : b`${this.#key(account)}${this.#otherKey(account)}${failure2}`}`;
|
|
43296
|
+
}
|
|
43297
|
+
#otherKey(account) {
|
|
43298
|
+
if (this.entering !== account.id) return A;
|
|
43299
|
+
const other = this.#otherWay(account);
|
|
43300
|
+
return other === A ? A : b`<div class="notes">${other}</div>`;
|
|
42982
43301
|
}
|
|
42983
43302
|
#actions(account) {
|
|
42984
43303
|
const moved2 = account.status === "connected" ? this.#moved(account) : null;
|
|
@@ -43029,7 +43348,7 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43029
43348
|
clearValues(this.renderRoot);
|
|
43030
43349
|
if (this.entering === account.id) this.entering = null;
|
|
43031
43350
|
const vault = model.vault;
|
|
43032
|
-
const keyed2 = account.store === "vault" && account.auth === "api-key" && !!vault?.remove;
|
|
43351
|
+
const keyed2 = account.store === "vault" && (account.auth === "api-key" || dual(account)) && !!vault?.remove;
|
|
43033
43352
|
if (keyed2 && !await this.#forget(account, vault)) return;
|
|
43034
43353
|
if (this.model !== model) return;
|
|
43035
43354
|
await this.#closeTip(`remove-${account.id}`);
|
|
@@ -43074,11 +43393,21 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43074
43393
|
}
|
|
43075
43394
|
return b`<p class="hint" role="status" data-signing>${signInText(this.#waits.waited(key2))}</p>`;
|
|
43076
43395
|
}
|
|
43396
|
+
#signInDetails(account) {
|
|
43397
|
+
if (account.status !== "signing-in") return A;
|
|
43398
|
+
return signInDetails(account.id, account.signIn, this.#copies.state(account.id), (code3) => {
|
|
43399
|
+
void this.#copies.copy(account.id, code3);
|
|
43400
|
+
});
|
|
43401
|
+
}
|
|
43077
43402
|
#rowNotes(account) {
|
|
43078
|
-
const
|
|
43079
|
-
const
|
|
43080
|
-
|
|
43081
|
-
|
|
43403
|
+
const offered = !!this.#offered();
|
|
43404
|
+
const adding = this.adding?.id === account.id;
|
|
43405
|
+
const notice = offered ? this.#notice(account) : A;
|
|
43406
|
+
const signing = offered && !adding ? this.#signingNote(account) : A;
|
|
43407
|
+
const details = adding ? A : this.#signInDetails(account);
|
|
43408
|
+
const other = this.entering === account.id ? A : this.#otherWay(account);
|
|
43409
|
+
if ([notice, signing, details, other].every((part2) => part2 === A)) return A;
|
|
43410
|
+
return b`<div class="notes">${notice}${signing}${details}${other}</div>`;
|
|
43082
43411
|
}
|
|
43083
43412
|
#openPicker() {
|
|
43084
43413
|
this.query = "";
|
|
@@ -43233,9 +43562,10 @@ var SliccSettings = class extends ThemedElement {
|
|
|
43233
43562
|
${signing ? this.#signingNote(account) : A}
|
|
43234
43563
|
<div class="buttons">
|
|
43235
43564
|
${cancel ? b`<swc-button size="m" variant="secondary" data-action="cancel-sign-in" @click=${() => this.#stopSigningIn(account)}>Cancel</swc-button>` : A}
|
|
43236
|
-
<swc-button size="m" variant="accent" data-action="sign-in" ?pending=${signing} ?disabled=${!!account.blocked} @click=${() => this.connect(account.id)}>${signing ? "Signing in\u2026" : "Sign in"}</swc-button>
|
|
43565
|
+
<swc-button size="m" variant="accent" data-action="sign-in" ?pending=${signing} ?disabled=${!!account.blocked} @click=${() => this.connect(account.id, void 0, void 0, signInMethod(account))}>${signing ? "Signing in\u2026" : "Sign in"}</swc-button>
|
|
43237
43566
|
${signing ? A : this.#leave(account)}
|
|
43238
|
-
</div
|
|
43567
|
+
</div>
|
|
43568
|
+
${this.#signInDetails(account)}`;
|
|
43239
43569
|
}
|
|
43240
43570
|
#localStep(account) {
|
|
43241
43571
|
return b`<p class="hint">SLICC connects to ${account.provider} on this device.</p>
|
|
@@ -43730,13 +44060,13 @@ var SliccSprinkle = class extends ThemedElement {
|
|
|
43730
44060
|
value: null
|
|
43731
44061
|
};
|
|
43732
44062
|
#hold(port, ask, id) {
|
|
43733
|
-
const
|
|
43734
|
-
this.#held =
|
|
44063
|
+
const held2 = { port, id, ready: false, value: null };
|
|
44064
|
+
this.#held = held2;
|
|
43735
44065
|
this.#frame = { key: "", doc: "" };
|
|
43736
44066
|
const settle2 = (value) => {
|
|
43737
|
-
|
|
43738
|
-
|
|
43739
|
-
if (this.#held ===
|
|
44067
|
+
held2.value = value ?? null;
|
|
44068
|
+
held2.ready = true;
|
|
44069
|
+
if (this.#held === held2) this.requestUpdate();
|
|
43740
44070
|
};
|
|
43741
44071
|
ask.call(port, id, "getState", []).then(settle2, () => settle2(null));
|
|
43742
44072
|
}
|