@workflow-code/cli 0.2.4-20261013003.codex-studio-integration → 0.2.4-20261013005.codex-studio-integration
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/web/kanban-workspace.css +199 -12
- package/dist/web/kanban-workspace.js +224 -27
- package/dist/web/resource-preview.css +199 -12
- package/dist/web/resource-preview.js +38 -0
- package/dist/web/theme.css +11 -1
- package/dist/web/worker.mjs +1 -0
- package/dist/web/workflow-ui.css +199 -12
- package/dist/web/workflow-ui.js +227 -31
- package/dist/web/workflow-workspace.css +199 -12
- package/dist/web/workflow-workspace.js +225 -29
- package/dist/{web-JXC3WIJK.js → web-H4CP4OQC.js} +38 -0
- package/package.json +1 -1
|
@@ -16136,6 +16136,44 @@
|
|
|
16136
16136
|
"{0}{1} \xB7 {2} items": "\u5DF2{0}{1} \xB7 {2} \u9879",
|
|
16137
16137
|
"{1} in {0}": "{0} \u4E2D {1}",
|
|
16138
16138
|
"Account balance ${0}": "\u8D26\u6237\u4F59\u989D ${0}",
|
|
16139
|
+
"Account balance": "\u8D26\u6237\u4F59\u989D",
|
|
16140
|
+
"AI usage": "AI \u7528\u91CF",
|
|
16141
|
+
All: "\u5168\u90E8",
|
|
16142
|
+
"Basic information": "\u57FA\u672C\u4FE1\u606F",
|
|
16143
|
+
Declarations: "\u58F0\u660E",
|
|
16144
|
+
"Default name": "\u9ED8\u8BA4\u540D\u79F0",
|
|
16145
|
+
"Entrypoints granted": "\u5165\u53E3\u8C03\u7528\u6388\u6743",
|
|
16146
|
+
"Knowledge read granted": "\u77E5\u8BC6\u5E93\u8BFB\u53D6\u6388\u6743",
|
|
16147
|
+
"Knowledge write granted": "\u77E5\u8BC6\u5E93\u5199\u5165\u6388\u6743",
|
|
16148
|
+
"KV read granted": "KV \u8BFB\u53D6\u6388\u6743",
|
|
16149
|
+
"KV write granted": "KV \u5199\u5165\u6388\u6743",
|
|
16150
|
+
"Limit reached": "\u989D\u5EA6\u5DF2\u7528\u5C3D",
|
|
16151
|
+
"Loading usage...": "\u6B63\u5728\u52A0\u8F7D\u7528\u91CF...",
|
|
16152
|
+
Local: "\u672C\u5730",
|
|
16153
|
+
"Local and server": "\u672C\u5730\u4E0E\u670D\u52A1\u5668",
|
|
16154
|
+
"Local path": "\u672C\u5730\u8DEF\u5F84",
|
|
16155
|
+
"Localized names": "\u591A\u8BED\u8A00\u540D\u79F0",
|
|
16156
|
+
"Multiple languages": "\u591A\u8BED\u8A00",
|
|
16157
|
+
"Multiple platforms": "\u591A\u5E73\u53F0",
|
|
16158
|
+
"Not allowed": "\u4E0D\u5141\u8BB8",
|
|
16159
|
+
"Not available": "\u6682\u65E0\u6570\u636E",
|
|
16160
|
+
"Not declared": "\u672A\u58F0\u660E",
|
|
16161
|
+
"Platform independent": "\u5E73\u53F0\u65E0\u5173",
|
|
16162
|
+
"Platform support": "\u5E73\u53F0\u652F\u6301",
|
|
16163
|
+
Prefixes: "\u524D\u7F00",
|
|
16164
|
+
"Project declarations": "\u9879\u76EE\u58F0\u660E",
|
|
16165
|
+
"Project information": "\u9879\u76EE\u4FE1\u606F",
|
|
16166
|
+
"Project type": "\u9879\u76EE\u7C7B\u578B",
|
|
16167
|
+
"Project UUID": "\u9879\u76EE UUID",
|
|
16168
|
+
"Related project: {0}": "\u5173\u8054\u9879\u76EE\uFF1A{0}",
|
|
16169
|
+
"Storage location": "\u5B58\u50A8\u4F4D\u7F6E",
|
|
16170
|
+
"Usage unavailable": "\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u7528\u91CF",
|
|
16171
|
+
Used: "\u5DF2\u4F7F\u7528",
|
|
16172
|
+
Version: "\u7248\u672C",
|
|
16173
|
+
"Working directory": "\u5DE5\u4F5C\u76EE\u5F55",
|
|
16174
|
+
"{0} (default)": "{0}\uFF08\u9ED8\u8BA4\uFF09",
|
|
16175
|
+
"{0} remaining": "\u5269\u4F59 {0}",
|
|
16176
|
+
"{0} usage": "{0}\u7528\u91CF",
|
|
16139
16177
|
"Add attachment": "\u6DFB\u52A0\u9644\u4EF6",
|
|
16140
16178
|
"Agent run": "Agent \u8FD0\u884C",
|
|
16141
16179
|
"All chats": "\u5168\u90E8\u804A\u5929",
|
|
@@ -19614,6 +19652,17 @@ ${state2.user?.avatarUrl ?? ""}`;
|
|
|
19614
19652
|
}
|
|
19615
19653
|
|
|
19616
19654
|
// src/web/workflow-types.ts
|
|
19655
|
+
var projectTypeLabels = {
|
|
19656
|
+
get conversation() {
|
|
19657
|
+
return t2("Conversation");
|
|
19658
|
+
},
|
|
19659
|
+
get workflow() {
|
|
19660
|
+
return t2("Workflow");
|
|
19661
|
+
},
|
|
19662
|
+
get kanban() {
|
|
19663
|
+
return t2("Kanban");
|
|
19664
|
+
}
|
|
19665
|
+
};
|
|
19617
19666
|
function workflowParameters(project, entrypointId2) {
|
|
19618
19667
|
return project.entrypoints.find((entry) => entry.id === entrypointId2) ?? project;
|
|
19619
19668
|
}
|
|
@@ -19769,11 +19818,20 @@ ${state2.user?.avatarUrl ?? ""}`;
|
|
|
19769
19818
|
const label = document.createElement("span");
|
|
19770
19819
|
label.className = "param-action-label";
|
|
19771
19820
|
const view = { action, button, label };
|
|
19821
|
+
if (action.kind === "quick" && action.id === "ai") {
|
|
19822
|
+
button.classList.add("param-action-ai");
|
|
19823
|
+
button.append(icon("sparkle"));
|
|
19824
|
+
}
|
|
19772
19825
|
if (action.kind === "auxiliary") {
|
|
19773
19826
|
button.append(icon("settings"));
|
|
19774
19827
|
view.count = document.createElement("small");
|
|
19775
19828
|
}
|
|
19776
19829
|
button.append(label);
|
|
19830
|
+
if (action.kind === "quick") {
|
|
19831
|
+
view.summary = document.createElement("span");
|
|
19832
|
+
view.summary.className = "param-action-summary";
|
|
19833
|
+
button.append(view.summary);
|
|
19834
|
+
}
|
|
19777
19835
|
if (view.count) {
|
|
19778
19836
|
button.append(view.count);
|
|
19779
19837
|
}
|
|
@@ -19830,14 +19888,17 @@ ${state2.user?.avatarUrl ?? ""}`;
|
|
|
19830
19888
|
view.button.hidden = fields2.length === 0;
|
|
19831
19889
|
view.button.disabled = disabled2 || (action.kind === "auxiliary" ? loading : fields2.every((field) => states[field.name]?.disabled === true || this.visibleOptions(field).length === 0));
|
|
19832
19890
|
const summaries = action.summary?.map((name) => fields2.find((field) => field.name === name)).filter((field) => !!field && !!values[field.name]?.length).map((field) => parameterSelectionLabel(field, values[field.name], states[field.name])) ?? [];
|
|
19833
|
-
view.label.textContent = action.
|
|
19891
|
+
view.label.textContent = action.label;
|
|
19892
|
+
if (view.summary) {
|
|
19893
|
+
view.summary.textContent = summaries.join(" \xB7 ");
|
|
19894
|
+
view.summary.hidden = !summaries.length;
|
|
19895
|
+
}
|
|
19834
19896
|
if (view.count) {
|
|
19835
19897
|
view.count.textContent = String(fields2.length);
|
|
19836
19898
|
}
|
|
19837
19899
|
view.button.setAttribute("aria-busy", String(loading));
|
|
19838
19900
|
}
|
|
19839
|
-
view.button.title = view.label.textContent
|
|
19840
|
-
view.button.ariaLabel = view.label.textContent || "";
|
|
19901
|
+
view.button.title = view.button.ariaLabel = [view.label.textContent, view.summary?.textContent].filter(Boolean).join(": ");
|
|
19841
19902
|
}
|
|
19842
19903
|
if (this.active) {
|
|
19843
19904
|
if (disabled2 || this.active.button.hidden) {
|
|
@@ -21333,6 +21394,89 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21333
21394
|
}
|
|
21334
21395
|
};
|
|
21335
21396
|
|
|
21397
|
+
// src/web/ui/project-information.ts
|
|
21398
|
+
function access(rule) {
|
|
21399
|
+
if (rule?.mode === "all") {
|
|
21400
|
+
return t2("All");
|
|
21401
|
+
}
|
|
21402
|
+
if (rule?.mode === "none") {
|
|
21403
|
+
return t2("Not allowed");
|
|
21404
|
+
}
|
|
21405
|
+
if (rule?.mode === "prefixes") {
|
|
21406
|
+
return `${t2("Prefixes")}: ${rule.prefixes.join(", ")}`;
|
|
21407
|
+
}
|
|
21408
|
+
return t2("Not declared");
|
|
21409
|
+
}
|
|
21410
|
+
function projectInformation(project) {
|
|
21411
|
+
const info = project.projectInfo;
|
|
21412
|
+
const storage = { local: t2("Local"), server: t2("Server"), both: t2("Local and server") };
|
|
21413
|
+
const declarations = { multilingual: t2("Multiple languages"), multiplatform: t2("Multiple platforms") };
|
|
21414
|
+
const platforms = { macos: "macOS", windows: "Windows", web: "Web" };
|
|
21415
|
+
const sections = [{
|
|
21416
|
+
title: t2("Basic information"),
|
|
21417
|
+
expanded: true,
|
|
21418
|
+
rows: [
|
|
21419
|
+
{ label: t2("Default name"), value: project.manifest?.name || project.name },
|
|
21420
|
+
{ label: t2("Project type"), value: projectTypeLabels[project.projectType] },
|
|
21421
|
+
{ label: t2("Version"), value: project.manifest?.version || t2("Not declared") },
|
|
21422
|
+
{ label: t2("Project UUID"), value: project.id },
|
|
21423
|
+
{ label: project.assistant ? t2("Working directory") : t2("Local path"), value: project.assistant?.workdir || project.folderPath }
|
|
21424
|
+
]
|
|
21425
|
+
}, {
|
|
21426
|
+
title: t2("Project declarations"),
|
|
21427
|
+
expanded: true,
|
|
21428
|
+
rows: [
|
|
21429
|
+
{ label: t2("Storage location"), value: info?.dataStorage ? storage[info.dataStorage.mode] : t2("Not declared") },
|
|
21430
|
+
{ label: t2("Platform support"), value: info?.platformSupport.mode === "specific" ? info.platformSupport.platforms.map((id) => platforms[id] || id).join(", ") : t2("Platform independent") },
|
|
21431
|
+
{ label: t2("Declarations"), value: info?.declarations.map((id) => declarations[id] || id).join(", ") || t2("Not declared") }
|
|
21432
|
+
]
|
|
21433
|
+
}];
|
|
21434
|
+
if (info && Object.keys(info.localizedNames).length) {
|
|
21435
|
+
sections.push({ title: t2("Localized names"), rows: Object.entries(info.localizedNames).map(([label, value]) => ({ label, value })) });
|
|
21436
|
+
}
|
|
21437
|
+
for (const relation of info?.relatedProjects ?? []) {
|
|
21438
|
+
const grant = relation.grantToRelatedProject;
|
|
21439
|
+
sections.push({ title: t2("Related project: {0}", relation.alias), rows: [
|
|
21440
|
+
{ label: t2("Project UUID"), value: relation.projectId },
|
|
21441
|
+
{ label: t2("KV read granted"), value: access(grant.read) },
|
|
21442
|
+
{ label: t2("KV write granted"), value: access(grant.write) },
|
|
21443
|
+
{ label: t2("Knowledge read granted"), value: access(grant.knowledge?.read) },
|
|
21444
|
+
{ label: t2("Knowledge write granted"), value: access(grant.knowledge?.write) },
|
|
21445
|
+
{ label: t2("Entrypoints granted"), value: access(grant.entrypoints) }
|
|
21446
|
+
] });
|
|
21447
|
+
}
|
|
21448
|
+
if (project.entrypoints.length) {
|
|
21449
|
+
sections.push({ title: t2("Entrypoints"), rows: project.entrypoints.map((entry) => ({
|
|
21450
|
+
label: entry.title || entry.id,
|
|
21451
|
+
value: entry.id === project.defaultEntrypoint ? t2("{0} (default)", entry.id) : entry.id
|
|
21452
|
+
})) });
|
|
21453
|
+
}
|
|
21454
|
+
return sections;
|
|
21455
|
+
}
|
|
21456
|
+
|
|
21457
|
+
// src/web/ui/ai-usage.ts
|
|
21458
|
+
function usageAmount(value) {
|
|
21459
|
+
return value != null && Number.isFinite(Number(value)) ? `$${Math.max(0, Number(value)).toFixed(2)}` : t2("Not available");
|
|
21460
|
+
}
|
|
21461
|
+
function usagePeriods(subscription) {
|
|
21462
|
+
const labels = { daily: t2("Daily"), weekly: t2("Weekly"), monthly: t2("Monthly") };
|
|
21463
|
+
return ["daily", "weekly", "monthly"].map((period) => {
|
|
21464
|
+
const rawUsed = subscription[`${period}UsageUsd`], rawLimit = subscription[`${period}LimitUsd`];
|
|
21465
|
+
const used = Number.isFinite(Number(rawUsed)) && rawUsed != null ? Math.max(0, Number(rawUsed)) : void 0;
|
|
21466
|
+
const limit = rawLimit === null ? null : Number.isFinite(Number(rawLimit)) && rawLimit !== void 0 ? Math.max(0, Number(rawLimit)) : void 0;
|
|
21467
|
+
const ratio = used !== void 0 && limit !== null && limit !== void 0 ? limit > 0 ? used / limit : 1 : void 0;
|
|
21468
|
+
return {
|
|
21469
|
+
period,
|
|
21470
|
+
label: labels[period],
|
|
21471
|
+
used,
|
|
21472
|
+
limit,
|
|
21473
|
+
ratio,
|
|
21474
|
+
status: ratio === void 0 ? "" : ratio >= 1 ? "exhausted" : ratio >= 0.8 ? "near-limit" : "",
|
|
21475
|
+
remaining: used !== void 0 && limit !== null && limit !== void 0 ? Math.max(0, limit - used) : void 0
|
|
21476
|
+
};
|
|
21477
|
+
});
|
|
21478
|
+
}
|
|
21479
|
+
|
|
21336
21480
|
// src/web/ui/conversation-tools.ts
|
|
21337
21481
|
var ConversationTools = class {
|
|
21338
21482
|
dialog = document.createElement("dialog");
|
|
@@ -21342,6 +21486,8 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21342
21486
|
refresh;
|
|
21343
21487
|
constructor() {
|
|
21344
21488
|
this.dialog.className = "conversation-dialog";
|
|
21489
|
+
this.title.id = "conversation-dialog-title";
|
|
21490
|
+
this.dialog.setAttribute("aria-labelledby", this.title.id);
|
|
21345
21491
|
const header = document.createElement("header");
|
|
21346
21492
|
header.append(this.title, iconButton("close", t2("Close"), () => this.close()));
|
|
21347
21493
|
this.body.className = "dialog-body";
|
|
@@ -21355,6 +21501,7 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21355
21501
|
}
|
|
21356
21502
|
}
|
|
21357
21503
|
});
|
|
21504
|
+
this.dialog.addEventListener("cancel", () => this.close());
|
|
21358
21505
|
}
|
|
21359
21506
|
get open() {
|
|
21360
21507
|
return this.dialog.open;
|
|
@@ -21369,6 +21516,7 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21369
21516
|
this.close();
|
|
21370
21517
|
this.title.textContent = title;
|
|
21371
21518
|
this.body.replaceChildren();
|
|
21519
|
+
this.body.setAttribute("aria-busy", "false");
|
|
21372
21520
|
this.dialog.showModal();
|
|
21373
21521
|
}
|
|
21374
21522
|
plan(content) {
|
|
@@ -21386,6 +21534,35 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21386
21534
|
image.className = "image-preview";
|
|
21387
21535
|
this.body.append(image);
|
|
21388
21536
|
}
|
|
21537
|
+
projectInfo(project) {
|
|
21538
|
+
this.show(t2("Project information"));
|
|
21539
|
+
const heading = document.createElement("h3");
|
|
21540
|
+
heading.className = "project-information-name";
|
|
21541
|
+
heading.textContent = project.name;
|
|
21542
|
+
this.body.append(heading);
|
|
21543
|
+
if (project.manifest?.description) {
|
|
21544
|
+
const description = document.createElement("p");
|
|
21545
|
+
description.className = "project-information-description";
|
|
21546
|
+
description.textContent = project.manifest.description;
|
|
21547
|
+
this.body.append(description);
|
|
21548
|
+
}
|
|
21549
|
+
for (const section of projectInformation(project)) {
|
|
21550
|
+
const details = document.createElement("details");
|
|
21551
|
+
details.className = "project-information-section";
|
|
21552
|
+
details.open = !!section.expanded;
|
|
21553
|
+
const summary = document.createElement("summary");
|
|
21554
|
+
summary.innerHTML = `${iconHtml("chevron-right")}<span>${escapeHtml(section.title)}</span>`;
|
|
21555
|
+
const list = document.createElement("dl");
|
|
21556
|
+
for (const row of section.rows) {
|
|
21557
|
+
const label = document.createElement("dt"), value = document.createElement("dd");
|
|
21558
|
+
label.textContent = row.label;
|
|
21559
|
+
value.textContent = row.value;
|
|
21560
|
+
list.append(label, value);
|
|
21561
|
+
}
|
|
21562
|
+
details.append(summary, list);
|
|
21563
|
+
this.body.append(details);
|
|
21564
|
+
}
|
|
21565
|
+
}
|
|
21389
21566
|
permissions(parameters2, policies, changed) {
|
|
21390
21567
|
this.show(t2("Tool permissions"));
|
|
21391
21568
|
const tools = parameters2.tools ?? [];
|
|
@@ -21429,14 +21606,18 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21429
21606
|
}
|
|
21430
21607
|
}
|
|
21431
21608
|
usage(load) {
|
|
21432
|
-
this.show(t2("
|
|
21609
|
+
this.show(t2("AI usage"));
|
|
21433
21610
|
this.usageOpen = true;
|
|
21434
|
-
const refresh = this.refresh = iconButton("refresh", t2("Refresh usage"), () =>
|
|
21435
|
-
this.body.textContent = t2("Loading...");
|
|
21436
|
-
load();
|
|
21437
|
-
});
|
|
21611
|
+
const refresh = this.refresh = iconButton("refresh", t2("Refresh usage"), () => this.loadUsage(load));
|
|
21438
21612
|
this.dialog.querySelector("header").insertBefore(refresh, this.dialog.querySelector("header > button:last-child"));
|
|
21439
|
-
this.
|
|
21613
|
+
this.loadUsage(load);
|
|
21614
|
+
}
|
|
21615
|
+
loadUsage(load) {
|
|
21616
|
+
this.body.innerHTML = `<div class="usage-status" role="status">${iconHtml("loading")}<span>${t2("Loading usage...")}</span></div>`;
|
|
21617
|
+
this.body.setAttribute("aria-busy", "true");
|
|
21618
|
+
if (this.refresh) {
|
|
21619
|
+
this.refresh.disabled = true;
|
|
21620
|
+
}
|
|
21440
21621
|
load();
|
|
21441
21622
|
}
|
|
21442
21623
|
usageResult(data, error) {
|
|
@@ -21444,20 +21625,26 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21444
21625
|
return;
|
|
21445
21626
|
}
|
|
21446
21627
|
this.body.replaceChildren();
|
|
21447
|
-
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
}
|
|
21451
|
-
if (!data) {
|
|
21628
|
+
this.body.setAttribute("aria-busy", "false");
|
|
21629
|
+
if (this.refresh) {
|
|
21630
|
+
this.refresh.disabled = false;
|
|
21631
|
+
}
|
|
21632
|
+
if (error || !data) {
|
|
21633
|
+
const status = document.createElement("p");
|
|
21634
|
+
status.className = error ? "error usage-status" : "usage-status";
|
|
21635
|
+
status.setAttribute("role", error ? "alert" : "status");
|
|
21636
|
+
status.textContent = error || t2("Usage unavailable");
|
|
21637
|
+
this.body.append(status);
|
|
21452
21638
|
return;
|
|
21453
21639
|
}
|
|
21454
|
-
const balance = document.createElement("
|
|
21455
|
-
balance.
|
|
21640
|
+
const balance = document.createElement("div");
|
|
21641
|
+
balance.className = "usage-balance";
|
|
21642
|
+
balance.innerHTML = `<span>${t2("Account balance")}</span><strong>${escapeHtml(usageAmount(data.balance))}</strong><small>USD</small>`;
|
|
21456
21643
|
this.body.append(balance);
|
|
21457
|
-
const labels = { daily: t2("Daily"), weekly: t2("Weekly"), monthly: t2("Monthly") };
|
|
21458
21644
|
const plans = data.groups.filter((group) => group.subscriptionType === "subscription" && group.subscription?.status === "active");
|
|
21459
21645
|
if (!plans.length) {
|
|
21460
21646
|
const empty = document.createElement("p");
|
|
21647
|
+
empty.className = "usage-status";
|
|
21461
21648
|
empty.textContent = t2("No active subscriptions");
|
|
21462
21649
|
this.body.append(empty);
|
|
21463
21650
|
}
|
|
@@ -21467,19 +21654,24 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21467
21654
|
const title = document.createElement("h3");
|
|
21468
21655
|
title.textContent = plan.name;
|
|
21469
21656
|
section.append(title);
|
|
21470
|
-
for (const period of
|
|
21471
|
-
const limit = plan.subscription[`${period}LimitUsd`];
|
|
21472
|
-
const used = Number(plan.subscription[`${period}UsageUsd`] ?? 0);
|
|
21657
|
+
for (const period of usagePeriods(plan.subscription)) {
|
|
21473
21658
|
const row = document.createElement("div");
|
|
21474
|
-
|
|
21475
|
-
|
|
21476
|
-
|
|
21477
|
-
|
|
21659
|
+
row.className = "usage-period";
|
|
21660
|
+
row.dataset.status = period.status;
|
|
21661
|
+
const used = period.used === void 0 ? t2("Not available") : usageAmount(period.used);
|
|
21662
|
+
const limit = period.limit === null ? t2("Unlimited") : period.limit === void 0 ? t2("Not available") : usageAmount(period.limit);
|
|
21663
|
+
row.innerHTML = `<div class="usage-period-heading"><span>${period.label}</span><strong>${period.ratio === void 0 ? escapeHtml(limit) : `${Math.round(period.ratio * 100)}%`}</strong></div><div class="usage-period-amount"><strong>${escapeHtml(used)}</strong><span>/ ${escapeHtml(limit)}</span></div>`;
|
|
21664
|
+
if (period.ratio !== void 0) {
|
|
21478
21665
|
const progress = document.createElement("progress");
|
|
21479
|
-
progress.max =
|
|
21480
|
-
progress.value =
|
|
21666
|
+
progress.max = 1;
|
|
21667
|
+
progress.value = Math.min(1, period.ratio);
|
|
21668
|
+
progress.ariaLabel = t2("{0} usage", period.label);
|
|
21481
21669
|
row.append(progress);
|
|
21482
21670
|
}
|
|
21671
|
+
const remaining = document.createElement("span");
|
|
21672
|
+
remaining.className = "usage-period-remaining";
|
|
21673
|
+
remaining.textContent = period.status === "exhausted" ? t2("Limit reached") : period.remaining === void 0 ? t2("Used") : t2("{0} remaining", usageAmount(period.remaining));
|
|
21674
|
+
row.append(remaining);
|
|
21483
21675
|
section.append(row);
|
|
21484
21676
|
}
|
|
21485
21677
|
this.body.append(section);
|
|
@@ -21618,7 +21810,7 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21618
21810
|
var host = acquireWorkflowHost();
|
|
21619
21811
|
app.classList.add("workflow-app");
|
|
21620
21812
|
app.innerHTML = `
|
|
21621
|
-
<header class="toolbar"><div class="project-title"><button id="menu-toggle" class="icon-button" aria-label="${t2("Show runs")}" title="${t2("Show runs")}">${iconHtml("layout-sidebar-left")}</button><span class="project-icon">${iconHtml("symbol-event")}</span><h1 id="workflow-title">Workflow</h1></div><div class="toolbar-actions"><button id="usage" class="icon-button" title="${t2("System AI usage")}" aria-label="${t2("System AI usage")}" hidden>${iconHtml("dashboard")}</button><button id="tools" class="icon-button" title="${t2("Tool permissions")}" aria-label="${t2("Tool permissions")}">${iconHtml("tools")}</button></div></header>
|
|
21813
|
+
<header class="toolbar"><div class="project-title"><button id="menu-toggle" class="icon-button" aria-label="${t2("Show runs")}" title="${t2("Show runs")}">${iconHtml("layout-sidebar-left")}</button><button id="project-info" class="icon-button" title="${t2("Project information")}" aria-label="${t2("Project information")}" aria-haspopup="dialog">${iconHtml("info")}</button><span class="project-icon">${iconHtml("symbol-event")}</span><h1 id="workflow-title">Workflow</h1></div><div class="toolbar-actions"><button id="usage" class="icon-button usage-button" title="${t2("System AI usage")}" aria-label="${t2("System AI usage")}" aria-haspopup="dialog" hidden>${iconHtml("dashboard")}<span>${t2("AI usage")}</span></button><button id="tools" class="icon-button" title="${t2("Tool permissions")}" aria-label="${t2("Tool permissions")}">${iconHtml("tools")}</button></div></header>
|
|
21622
21814
|
<aside id="project-menu" class="project-menu" aria-label="${t2("Runs")}"><div class="menu-heading"><span>${t2("Runs")}</span><div class="menu-actions"><button id="history-toggle" class="icon-button" aria-label="${t2("Search runs")}" title="${t2("Search runs")}">${iconHtml("search")}</button><button id="new" class="icon-button" aria-label="${t2("New run")}" title="${t2("New run")}">${iconHtml("add")}</button><button id="hide-menu" class="icon-button" aria-label="${t2("Hide runs")}" title="${t2("Hide runs")}">${iconHtml("chevron-left")}</button></div></div><section id="run-history"><nav id="run-list"></nav><div id="empty-history" class="no-history">${t2("No runs")}</div><button id="load-more-history" class="all-history" hidden>${iconHtml("chevron-down")}<span>${t2("Load more")}</span></button></section></aside>
|
|
21623
21815
|
<main><div id="error" class="error" role="alert" hidden></div><div id="active-run" class="workflow-active" hidden><button id="show-active" class="workflow-active-link"></button><button id="stop-active" class="icon-button" title="${t2("Stop run")}" aria-label="${t2("Stop run")}">${iconHtml("debug-stop")}</button></div>
|
|
21624
21816
|
<div id="workspace-scroll" class="workspace-scroll"><section id="entrypoints" class="workflow-entrypoints" aria-label="${t2("Workflow entrypoint")}"></section>
|
|
@@ -21693,8 +21885,6 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
21693
21885
|
app.classList.toggle("menu-open", open);
|
|
21694
21886
|
element("menu-toggle").hidden = open;
|
|
21695
21887
|
element("menu-toggle").setAttribute("aria-expanded", String(open));
|
|
21696
|
-
const actions = document.querySelector(narrow.matches && open ? ".menu-actions" : ".toolbar-actions");
|
|
21697
|
-
actions.prepend(element("usage"), element("tools"));
|
|
21698
21888
|
persist();
|
|
21699
21889
|
}
|
|
21700
21890
|
menu(menuOpen);
|
|
@@ -22104,6 +22294,12 @@ ${JSON.stringify(output2.details, null, 2)}` : "");
|
|
|
22104
22294
|
post({ type: "tool-policy", policies });
|
|
22105
22295
|
});
|
|
22106
22296
|
element("usage").onclick = () => dialogs.usage(() => post({ type: "usage" }));
|
|
22297
|
+
element("project-info").onclick = () => {
|
|
22298
|
+
if (state) {
|
|
22299
|
+
fields.close();
|
|
22300
|
+
dialogs.projectInfo(state.project);
|
|
22301
|
+
}
|
|
22302
|
+
};
|
|
22107
22303
|
addEventListener("message", (event) => {
|
|
22108
22304
|
const message = event.data;
|
|
22109
22305
|
if (message?.type === "state" && message.project?.projectType === "workflow") {
|
|
@@ -64,6 +64,44 @@ var messages_zh_cn_default = {
|
|
|
64
64
|
"{0}{1} \xB7 {2} items": "\u5DF2{0}{1} \xB7 {2} \u9879",
|
|
65
65
|
"{1} in {0}": "{0} \u4E2D {1}",
|
|
66
66
|
"Account balance ${0}": "\u8D26\u6237\u4F59\u989D ${0}",
|
|
67
|
+
"Account balance": "\u8D26\u6237\u4F59\u989D",
|
|
68
|
+
"AI usage": "AI \u7528\u91CF",
|
|
69
|
+
All: "\u5168\u90E8",
|
|
70
|
+
"Basic information": "\u57FA\u672C\u4FE1\u606F",
|
|
71
|
+
Declarations: "\u58F0\u660E",
|
|
72
|
+
"Default name": "\u9ED8\u8BA4\u540D\u79F0",
|
|
73
|
+
"Entrypoints granted": "\u5165\u53E3\u8C03\u7528\u6388\u6743",
|
|
74
|
+
"Knowledge read granted": "\u77E5\u8BC6\u5E93\u8BFB\u53D6\u6388\u6743",
|
|
75
|
+
"Knowledge write granted": "\u77E5\u8BC6\u5E93\u5199\u5165\u6388\u6743",
|
|
76
|
+
"KV read granted": "KV \u8BFB\u53D6\u6388\u6743",
|
|
77
|
+
"KV write granted": "KV \u5199\u5165\u6388\u6743",
|
|
78
|
+
"Limit reached": "\u989D\u5EA6\u5DF2\u7528\u5C3D",
|
|
79
|
+
"Loading usage...": "\u6B63\u5728\u52A0\u8F7D\u7528\u91CF...",
|
|
80
|
+
Local: "\u672C\u5730",
|
|
81
|
+
"Local and server": "\u672C\u5730\u4E0E\u670D\u52A1\u5668",
|
|
82
|
+
"Local path": "\u672C\u5730\u8DEF\u5F84",
|
|
83
|
+
"Localized names": "\u591A\u8BED\u8A00\u540D\u79F0",
|
|
84
|
+
"Multiple languages": "\u591A\u8BED\u8A00",
|
|
85
|
+
"Multiple platforms": "\u591A\u5E73\u53F0",
|
|
86
|
+
"Not allowed": "\u4E0D\u5141\u8BB8",
|
|
87
|
+
"Not available": "\u6682\u65E0\u6570\u636E",
|
|
88
|
+
"Not declared": "\u672A\u58F0\u660E",
|
|
89
|
+
"Platform independent": "\u5E73\u53F0\u65E0\u5173",
|
|
90
|
+
"Platform support": "\u5E73\u53F0\u652F\u6301",
|
|
91
|
+
Prefixes: "\u524D\u7F00",
|
|
92
|
+
"Project declarations": "\u9879\u76EE\u58F0\u660E",
|
|
93
|
+
"Project information": "\u9879\u76EE\u4FE1\u606F",
|
|
94
|
+
"Project type": "\u9879\u76EE\u7C7B\u578B",
|
|
95
|
+
"Project UUID": "\u9879\u76EE UUID",
|
|
96
|
+
"Related project: {0}": "\u5173\u8054\u9879\u76EE\uFF1A{0}",
|
|
97
|
+
"Storage location": "\u5B58\u50A8\u4F4D\u7F6E",
|
|
98
|
+
"Usage unavailable": "\u6682\u65F6\u65E0\u6CD5\u83B7\u53D6\u7528\u91CF",
|
|
99
|
+
Used: "\u5DF2\u4F7F\u7528",
|
|
100
|
+
Version: "\u7248\u672C",
|
|
101
|
+
"Working directory": "\u5DE5\u4F5C\u76EE\u5F55",
|
|
102
|
+
"{0} (default)": "{0}\uFF08\u9ED8\u8BA4\uFF09",
|
|
103
|
+
"{0} remaining": "\u5269\u4F59 {0}",
|
|
104
|
+
"{0} usage": "{0}\u7528\u91CF",
|
|
67
105
|
"Add attachment": "\u6DFB\u52A0\u9644\u4EF6",
|
|
68
106
|
"Agent run": "Agent \u8FD0\u884C",
|
|
69
107
|
"All chats": "\u5168\u90E8\u804A\u5929",
|