dsh-run2skill 0.3.0 → 0.3.1
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.en.md +13 -7
- package/README.md +13 -7
- package/lib/client.js +324 -46
- package/lib/index.d.ts +110 -4
- package/lib/index.js +2243 -594
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4219,48 +4219,50 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4219
4219
|
}
|
|
4220
4220
|
//#endregion
|
|
4221
4221
|
//#region \0run2skill-css:run2skill-settings-page.module.css.mjs
|
|
4222
|
-
const css = ".
|
|
4222
|
+
const css = ".run2skill_page_WCb_nq{width:min(100%,1040px);color:var(--dsw-alias-label-primary);gap:24px;padding:16px 0 48px;display:grid}.run2skill_intro_WCb_nq,.run2skill_muted_WCb_nq{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:1.5}.run2skill_section_WCb_nq{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);box-shadow:0 1px 2px var(--dsw-alias-border-l1);border-radius:16px;overflow:hidden}.run2skill_sectionHeader_WCb_nq{box-sizing:border-box;height:auto;min-height:56px;padding:14px 20px}.run2skill_sectionTitle_WCb_nq{font-size:15px}.run2skill_sectionBody_WCb_nq{gap:18px;padding:12px 24px 24px 56px;display:grid;container-type:inline-size}.run2skill_attentionGroup_WCb_nq{gap:16px;min-width:0;display:grid}.run2skill_empty_WCb_nq{min-height:56px;color:var(--dsw-alias-label-secondary);place-items:center;margin:0;font-size:13px;display:grid}.run2skill_toolbar_WCb_nq,.run2skill_actions_WCb_nq,.run2skill_modeGroup_WCb_nq{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.run2skill_learningStatusRow_WCb_nq{justify-content:space-between;align-items:center;gap:16px;min-width:0;display:flex}.run2skill_learningStatusRow_WCb_nq>:first-child{overflow-wrap:anywhere;min-width:0}@container (width<=30rem){.run2skill_learningStatusRow_WCb_nq{flex-direction:column;align-items:stretch}.run2skill_learningStatusRow_WCb_nq .run2skill_actions_WCb_nq{flex-direction:column;align-items:stretch;width:100%}.run2skill_learningStatusRow_WCb_nq .run2skill_actions_WCb_nq>*{box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;flex:none;width:100%;min-width:0;max-width:100%;height:auto}}.run2skill_attentionList_WCb_nq,.run2skill_proposalList_WCb_nq,.run2skill_activityList_WCb_nq{gap:8px;margin:0;padding:0;list-style:none;display:grid}.run2skill_activityItem_WCb_nq{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;display:flex}.run2skill_activitySummary_WCb_nq{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.run2skill_proposalToolbar_WCb_nq{grid-template-columns:minmax(12rem,1fr) auto;align-items:center;gap:8px;display:grid}.run2skill_proposalToolbar_WCb_nq>:first-child{width:100%}.run2skill_proposalToolbarCompact_WCb_nq{justify-content:flex-end;display:flex}.run2skill_proposalToolbarCompact_WCb_nq>:first-child{width:auto}.run2skill_proposalLayout_WCb_nq{grid-template-columns:1fr;gap:12px;display:grid}.run2skill_proposalListButton_WCb_nq{text-align:start;white-space:normal;overflow-wrap:anywhere;border-radius:10px;flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:2px;width:100%;height:auto;min-height:48px;padding:8px 12px}.run2skill_proposalListButton_WCb_nq[aria-current=true]{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary);box-shadow:inset 3px 0 var(--dsw-alias-brand-primary)}.run2skill_proposalName_WCb_nq{max-width:100%;font-size:14px;font-weight:600;line-height:20px}.run2skill_proposalMeta_WCb_nq{max-width:100%;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.run2skill_detail_WCb_nq{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px;min-width:0;max-height:640px;padding:18px;overflow:auto}.run2skill_detail_WCb_nq>:first-child{margin-top:0}.run2skill_detailFacts_WCb_nq{grid-template-columns:minmax(6rem,max-content) minmax(0,1fr);gap:8px 16px;margin:0 0 20px;display:grid}.run2skill_detailFacts_WCb_nq dt{color:var(--dsw-alias-label-secondary);font-size:13px}.run2skill_detailFacts_WCb_nq dd{overflow-wrap:anywhere;min-width:0;margin:0}.run2skill_detail_WCb_nq pre{white-space:pre-wrap;unicode-bidi:isolate;overflow:auto}.run2skill_technicalDetails_WCb_nq{border:1px solid var(--dsw-alias-border-l2);border-radius:8px;margin:16px 0;padding:10px 12px}.run2skill_technicalDetails_WCb_nq summary{cursor:pointer;color:var(--dsw-alias-label-secondary);font-size:13px}.run2skill_technicalDetails_WCb_nq[open] summary{margin-bottom:12px}.run2skill_status_WCb_nq{min-height:20px;margin:0;font-size:13px}.run2skill_revisionBox_WCb_nq{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:12px;gap:8px;margin:18px 0;padding:14px;display:grid}.run2skill_revisionBox_WCb_nq label{font-size:14px;font-weight:600}.run2skill_revisionBox_WCb_nq textarea{box-sizing:border-box;resize:vertical;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);width:100%;min-height:84px;color:var(--dsw-alias-label-primary);font:inherit;border-radius:10px;padding:10px 12px;line-height:1.5}.run2skill_revisionBox_WCb_nq textarea:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.run2skill_revisionBox_WCb_nq textarea:disabled{cursor:not-allowed;opacity:.65}.run2skill_revisionBox_WCb_nq>:last-child{justify-self:start}.run2skill_danger_WCb_nq{color:var(--dsw-alias-state-error-primary)}.run2skill_backdrop_WCb_nq,.run2skill_rejectOverlay_WCb_nq{background:var(--dsw-alias-bg-mask-1);position:fixed;inset:0}.run2skill_backdrop_WCb_nq{z-index:999}.run2skill_rejectOverlay_WCb_nq{z-index:1001;place-items:center;padding:16px;display:grid}.run2skill_legacyDialog_WCb_nq{z-index:1000;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);box-shadow:0 16px 48px var(--dsw-alias-bg-mask-1);border-radius:16px;grid-template-columns:minmax(16rem,24rem) minmax(0,1fr);gap:16px;padding:16px;display:grid;position:fixed;inset:5vh 5vw;overflow:hidden}.run2skill_blocked_WCb_nq{pointer-events:none;display:contents}.run2skill_queue_WCb_nq,.run2skill_legacyDetail_WCb_nq{min-width:0;overflow:auto}.run2skill_legacyHeader_WCb_nq{justify-content:space-between;align-items:center;gap:8px;display:flex}.run2skill_legacyList_WCb_nq{margin:0;padding:0;list-style:none}.run2skill_rejectCard_WCb_nq{background:var(--dsw-alias-bg-layer-1);border-radius:16px;max-width:32rem;padding:16px}.run2skill_textBlock_WCb_nq{white-space:pre-wrap;overflow-wrap:anywhere;unicode-bidi:isolate;overflow:auto}.run2skill_previewFacts_WCb_nq{grid-template-columns:max-content 1fr;gap:6px 12px;display:grid}.run2skill_previewFacts_WCb_nq dt,.run2skill_previewFacts_WCb_nq dd{margin:0}@container (width>=760px){.run2skill_proposalLayout_WCb_nq{grid-template-columns:minmax(240px,.8fr) minmax(0,1.6fr);gap:20px}}@container (width<=420px){.run2skill_proposalToolbar_WCb_nq,.run2skill_detailFacts_WCb_nq{grid-template-columns:1fr}.run2skill_proposalToolbar_WCb_nq>:last-child{justify-self:start}.run2skill_detailFacts_WCb_nq dt:not(:first-child){margin-top:8px}}@media (width<=720px){.run2skill_sectionBody_WCb_nq{padding:8px 18px 20px}.run2skill_activityItem_WCb_nq{flex-direction:column;align-items:flex-start}}";
|
|
4223
4223
|
if (typeof document !== "undefined") upsertRun2skillStyle(css);
|
|
4224
4224
|
var _run2skill_css_run2skill_settings_page_module_css_default = {
|
|
4225
|
-
"
|
|
4226
|
-
"
|
|
4227
|
-
"
|
|
4228
|
-
"
|
|
4229
|
-
"
|
|
4230
|
-
"
|
|
4231
|
-
"
|
|
4232
|
-
"
|
|
4233
|
-
"
|
|
4234
|
-
"
|
|
4235
|
-
"
|
|
4236
|
-
"
|
|
4237
|
-
"
|
|
4238
|
-
"
|
|
4239
|
-
"
|
|
4240
|
-
"
|
|
4241
|
-
"
|
|
4242
|
-
"
|
|
4243
|
-
"
|
|
4244
|
-
"
|
|
4245
|
-
"
|
|
4246
|
-
"
|
|
4247
|
-
"
|
|
4248
|
-
"
|
|
4249
|
-
"
|
|
4250
|
-
"
|
|
4251
|
-
"
|
|
4252
|
-
"
|
|
4253
|
-
"
|
|
4254
|
-
"activityList": "
|
|
4255
|
-
"
|
|
4256
|
-
"
|
|
4257
|
-
"
|
|
4258
|
-
"
|
|
4259
|
-
"
|
|
4260
|
-
"
|
|
4261
|
-
"
|
|
4262
|
-
"
|
|
4263
|
-
"
|
|
4225
|
+
"legacyHeader": "run2skill_legacyHeader_WCb_nq",
|
|
4226
|
+
"proposalName": "run2skill_proposalName_WCb_nq",
|
|
4227
|
+
"legacyDialog": "run2skill_legacyDialog_WCb_nq",
|
|
4228
|
+
"status": "run2skill_status_WCb_nq",
|
|
4229
|
+
"blocked": "run2skill_blocked_WCb_nq",
|
|
4230
|
+
"attentionList": "run2skill_attentionList_WCb_nq",
|
|
4231
|
+
"toolbar": "run2skill_toolbar_WCb_nq",
|
|
4232
|
+
"rejectCard": "run2skill_rejectCard_WCb_nq",
|
|
4233
|
+
"legacyDetail": "run2skill_legacyDetail_WCb_nq",
|
|
4234
|
+
"intro": "run2skill_intro_WCb_nq",
|
|
4235
|
+
"backdrop": "run2skill_backdrop_WCb_nq",
|
|
4236
|
+
"sectionBody": "run2skill_sectionBody_WCb_nq",
|
|
4237
|
+
"detail": "run2skill_detail_WCb_nq",
|
|
4238
|
+
"activityItem": "run2skill_activityItem_WCb_nq",
|
|
4239
|
+
"muted": "run2skill_muted_WCb_nq",
|
|
4240
|
+
"attentionGroup": "run2skill_attentionGroup_WCb_nq",
|
|
4241
|
+
"legacyList": "run2skill_legacyList_WCb_nq",
|
|
4242
|
+
"detailFacts": "run2skill_detailFacts_WCb_nq",
|
|
4243
|
+
"activitySummary": "run2skill_activitySummary_WCb_nq",
|
|
4244
|
+
"danger": "run2skill_danger_WCb_nq",
|
|
4245
|
+
"proposalList": "run2skill_proposalList_WCb_nq",
|
|
4246
|
+
"section": "run2skill_section_WCb_nq",
|
|
4247
|
+
"actions": "run2skill_actions_WCb_nq",
|
|
4248
|
+
"sectionHeader": "run2skill_sectionHeader_WCb_nq",
|
|
4249
|
+
"learningStatusRow": "run2skill_learningStatusRow_WCb_nq",
|
|
4250
|
+
"revisionBox": "run2skill_revisionBox_WCb_nq",
|
|
4251
|
+
"rejectOverlay": "run2skill_rejectOverlay_WCb_nq",
|
|
4252
|
+
"queue": "run2skill_queue_WCb_nq",
|
|
4253
|
+
"empty": "run2skill_empty_WCb_nq",
|
|
4254
|
+
"activityList": "run2skill_activityList_WCb_nq",
|
|
4255
|
+
"technicalDetails": "run2skill_technicalDetails_WCb_nq",
|
|
4256
|
+
"sectionTitle": "run2skill_sectionTitle_WCb_nq",
|
|
4257
|
+
"page": "run2skill_page_WCb_nq",
|
|
4258
|
+
"proposalToolbarCompact": "run2skill_proposalToolbarCompact_WCb_nq",
|
|
4259
|
+
"proposalToolbar": "run2skill_proposalToolbar_WCb_nq",
|
|
4260
|
+
"proposalLayout": "run2skill_proposalLayout_WCb_nq",
|
|
4261
|
+
"proposalListButton": "run2skill_proposalListButton_WCb_nq",
|
|
4262
|
+
"modeGroup": "run2skill_modeGroup_WCb_nq",
|
|
4263
|
+
"proposalMeta": "run2skill_proposalMeta_WCb_nq",
|
|
4264
|
+
"textBlock": "run2skill_textBlock_WCb_nq",
|
|
4265
|
+
"previewFacts": "run2skill_previewFacts_WCb_nq"
|
|
4264
4266
|
};
|
|
4265
4267
|
//#endregion
|
|
4266
4268
|
//#region src/client/purge-settings.ts
|
|
@@ -4965,6 +4967,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4965
4967
|
}).strict();
|
|
4966
4968
|
const processingState = _enum([
|
|
4967
4969
|
"READY_FOR_REVIEW",
|
|
4970
|
+
"REVISING",
|
|
4968
4971
|
"PUBLISHING",
|
|
4969
4972
|
"NEEDS_ATTENTION",
|
|
4970
4973
|
"TERMINAL"
|
|
@@ -5060,6 +5063,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5060
5063
|
supportingExperienceIds: array(string().regex(/^exp_[a-f0-9]{64}$/)).min(1).max(3),
|
|
5061
5064
|
catalogObservationDigest: sha256,
|
|
5062
5065
|
curationRationale: string().min(1).max(4096),
|
|
5066
|
+
revisionParent: object({
|
|
5067
|
+
proposalId,
|
|
5068
|
+
revision: positiveInteger,
|
|
5069
|
+
digest: sha256,
|
|
5070
|
+
exactSkillBytes: string().min(1).max(65536)
|
|
5071
|
+
}).strict().optional(),
|
|
5063
5072
|
actionBinding: actionBinding.optional(),
|
|
5064
5073
|
proposalId,
|
|
5065
5074
|
digest: sha256
|
|
@@ -5126,6 +5135,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5126
5135
|
createdAt: string().min(1).max(64),
|
|
5127
5136
|
processingState: _enum([
|
|
5128
5137
|
"READY_FOR_REVIEW",
|
|
5138
|
+
"REVISING",
|
|
5129
5139
|
"PUBLISHING",
|
|
5130
5140
|
"NEEDS_ATTENTION"
|
|
5131
5141
|
]),
|
|
@@ -5214,6 +5224,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5214
5224
|
reject: "proposals/reject",
|
|
5215
5225
|
retry: "proposals/retry",
|
|
5216
5226
|
refresh: "proposals/refresh",
|
|
5227
|
+
revise: "proposals/revise",
|
|
5217
5228
|
confirmDiscard: "coverage/confirm-discard"
|
|
5218
5229
|
};
|
|
5219
5230
|
function describeProposalKind(kind) {
|
|
@@ -5229,6 +5240,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5229
5240
|
return scope === "PROJECT" ? "本次经验来自当前项目" : "本次经验适用于所有项目";
|
|
5230
5241
|
}
|
|
5231
5242
|
function describeProposalOutcome(detail) {
|
|
5243
|
+
if (detail.processingState === "REVISING") return "正在按修改意见生成新草稿";
|
|
5232
5244
|
if (detail.publicationOutcome === "PUBLISHED") return "Skill 已保存,DSH 已确认可以使用";
|
|
5233
5245
|
if (detail.publicationOutcome === "DISCARDED") return "技能草稿已放弃,Skill 未更改";
|
|
5234
5246
|
if (detail.publicationOutcome === "NEEDS_REFRESH") return "保存目标已变化,需要生成新的技能草稿";
|
|
@@ -5246,6 +5258,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5246
5258
|
return "待决定";
|
|
5247
5259
|
}
|
|
5248
5260
|
function describeProcessingState(state) {
|
|
5261
|
+
if (state === "REVISING") return "正在生成新草稿";
|
|
5249
5262
|
if (state === "PUBLISHING") return "正在保存";
|
|
5250
5263
|
if (state === "NEEDS_ATTENTION") return "需要处理";
|
|
5251
5264
|
if (state === "TERMINAL") return "已结束";
|
|
@@ -5315,6 +5328,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5315
5328
|
#removeFocus;
|
|
5316
5329
|
#removeVisibility;
|
|
5317
5330
|
#removeOnline;
|
|
5331
|
+
#revisionAttempt;
|
|
5318
5332
|
constructor(workspaceId, call, environment = browserEnvironment$1(), options = {}) {
|
|
5319
5333
|
this.workspaceId = workspaceId;
|
|
5320
5334
|
this.call = call;
|
|
@@ -5487,6 +5501,66 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5487
5501
|
});
|
|
5488
5502
|
});
|
|
5489
5503
|
}
|
|
5504
|
+
async revise(feedback) {
|
|
5505
|
+
await this.whenIdle();
|
|
5506
|
+
const detail = this.#state.detail;
|
|
5507
|
+
const normalized = feedback.normalize("NFKC").trim();
|
|
5508
|
+
if (this.#disposed || detail === void 0 || this.#state.mutationPending || normalized.length === 0 || new TextEncoder().encode(normalized).byteLength > 2048) return;
|
|
5509
|
+
const proposalRef = detail.action?.proposalRef ?? {
|
|
5510
|
+
proposalId: detail.proposal.proposalId,
|
|
5511
|
+
revision: detail.proposal.revision,
|
|
5512
|
+
digest: detail.proposal.digest
|
|
5513
|
+
};
|
|
5514
|
+
const action = this.#scopeAccess().actions.find((candidate) => candidate.proposalRef.proposalId === proposalRef.proposalId) ?? detail.action;
|
|
5515
|
+
if (action === void 0) return;
|
|
5516
|
+
const attempt = this.#revisionAttempt?.workItemId === detail.workItemId && sameProposalRef(this.#revisionAttempt.proposalRef, proposalRef) && this.#revisionAttempt.feedback === normalized ? this.#revisionAttempt : {
|
|
5517
|
+
workItemId: detail.workItemId,
|
|
5518
|
+
proposalRef,
|
|
5519
|
+
feedback: normalized,
|
|
5520
|
+
actionId: createRevisionActionId()
|
|
5521
|
+
};
|
|
5522
|
+
this.#revisionAttempt = attempt;
|
|
5523
|
+
await this.#execute(async (signal) => {
|
|
5524
|
+
this.#publish({
|
|
5525
|
+
...this.#state,
|
|
5526
|
+
mutationPending: true,
|
|
5527
|
+
announcement: "正在按修改意见生成新草稿…"
|
|
5528
|
+
});
|
|
5529
|
+
const raw = await this.call(endpoint.revise, {
|
|
5530
|
+
apiVersion: 1,
|
|
5531
|
+
workItemId: detail.workItemId,
|
|
5532
|
+
workItemRevision: detail.workItemRevision,
|
|
5533
|
+
proposalRef,
|
|
5534
|
+
currentScope: this.#scopeAccess().currentScope,
|
|
5535
|
+
action,
|
|
5536
|
+
actionId: attempt.actionId,
|
|
5537
|
+
feedback: normalized
|
|
5538
|
+
}, signal);
|
|
5539
|
+
const receipt = parseMutationReceipt(raw);
|
|
5540
|
+
if (receipt === void 0) {
|
|
5541
|
+
if (raw !== null && typeof raw === "object" && "ok" in raw && raw.ok === false) this.#revisionAttempt = void 0;
|
|
5542
|
+
throw new Error("invalid revision receipt");
|
|
5543
|
+
}
|
|
5544
|
+
this.#revisionAttempt = void 0;
|
|
5545
|
+
this.#publish({
|
|
5546
|
+
...this.#state,
|
|
5547
|
+
mutationPending: false,
|
|
5548
|
+
selectedProposalId: receipt.proposalRef.proposalId,
|
|
5549
|
+
detailPhase: "LOADING",
|
|
5550
|
+
detail: void 0,
|
|
5551
|
+
announcement: "已生成新草稿,请重新审核"
|
|
5552
|
+
});
|
|
5553
|
+
await this.#loadListWithin(signal);
|
|
5554
|
+
}, () => {
|
|
5555
|
+
this.#publish({
|
|
5556
|
+
...this.#state,
|
|
5557
|
+
mutationPending: false,
|
|
5558
|
+
detailPhase: "ERROR",
|
|
5559
|
+
detail: void 0,
|
|
5560
|
+
announcement: "修改未完成,原草稿未被替换;请重新打开后重试"
|
|
5561
|
+
});
|
|
5562
|
+
});
|
|
5563
|
+
}
|
|
5490
5564
|
dispose() {
|
|
5491
5565
|
if (this.#disposed) return;
|
|
5492
5566
|
this.#disposed = true;
|
|
@@ -5545,7 +5619,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5545
5619
|
}
|
|
5546
5620
|
async #refreshPublishingDetailWithin(signal) {
|
|
5547
5621
|
const selected = this.#state.selectedProposalId;
|
|
5548
|
-
if (selected !== void 0 && this.#state.detail?.processingState
|
|
5622
|
+
if (selected !== void 0 && ["PUBLISHING", "REVISING"].includes(this.#state.detail?.processingState ?? "")) {
|
|
5549
5623
|
const scopeAccess = this.#scopeAccess();
|
|
5550
5624
|
const action = scopeAccess.actions.find((candidate) => candidate.proposalRef.proposalId === selected);
|
|
5551
5625
|
if (action === void 0) return;
|
|
@@ -5652,6 +5726,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5652
5726
|
};
|
|
5653
5727
|
}
|
|
5654
5728
|
};
|
|
5729
|
+
function createRevisionActionId() {
|
|
5730
|
+
const bytes = /* @__PURE__ */ new Uint8Array(32);
|
|
5731
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
5732
|
+
return `rev_${Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("")}`;
|
|
5733
|
+
}
|
|
5734
|
+
function sameProposalRef(left, right) {
|
|
5735
|
+
return left.proposalId === right.proposalId && left.revision === right.revision && left.digest === right.digest;
|
|
5736
|
+
}
|
|
5655
5737
|
const formatCharacters = /* @__PURE__ */ new Map([
|
|
5656
5738
|
[0, "NULL"],
|
|
5657
5739
|
[9, "CHARACTER TABULATION"],
|
|
@@ -5894,6 +5976,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5894
5976
|
onRefresh: () => {
|
|
5895
5977
|
controller.mutate("REFRESH");
|
|
5896
5978
|
},
|
|
5979
|
+
onRevise: (feedback) => {
|
|
5980
|
+
controller.revise(feedback);
|
|
5981
|
+
},
|
|
5982
|
+
canRevise: false,
|
|
5897
5983
|
onConfirmDiscard: () => {
|
|
5898
5984
|
controller.mutate("CONFIRM_DISCARD");
|
|
5899
5985
|
}
|
|
@@ -5993,6 +6079,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5993
6079
|
}
|
|
5994
6080
|
function ProposalDetailView(props) {
|
|
5995
6081
|
const { detail, mutationPending } = props;
|
|
6082
|
+
const [revisionFeedback, setRevisionFeedback] = (0, react.useState)("");
|
|
6083
|
+
const [revisionSubmitted, setRevisionSubmitted] = (0, react.useState)(false);
|
|
6084
|
+
(0, react.useEffect)(() => {
|
|
6085
|
+
setRevisionFeedback("");
|
|
6086
|
+
setRevisionSubmitted(false);
|
|
6087
|
+
}, [detail.proposal.proposalId]);
|
|
5996
6088
|
const proposal = detail.proposal;
|
|
5997
6089
|
const action = proposalDetailAction(detail, mutationPending);
|
|
5998
6090
|
const actionable = action === "REVIEW";
|
|
@@ -6001,6 +6093,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6001
6093
|
const coveringBytes = proposal.actionBinding?.kind === "DISCARD" ? proposal.actionBinding.coveringCandidateBinding.content : void 0;
|
|
6002
6094
|
const coveringCandidate = proposal.actionBinding?.kind === "DISCARD" ? proposal.actionBinding.coveringCandidateBinding : void 0;
|
|
6003
6095
|
const diff = baseBytes === void 0 ? [] : makeExactLineDiff(baseBytes, proposal.exactSkillBytes);
|
|
6096
|
+
const revisionDiff = proposal.revisionParent === void 0 ? [] : makeExactLineDiff(proposal.revisionParent.exactSkillBytes, proposal.exactSkillBytes);
|
|
6097
|
+
const revisionFeedbackBytes = new TextEncoder().encode(revisionFeedback.trim()).byteLength;
|
|
6098
|
+
const revisionFeedbackValid = revisionFeedback.trim().length > 0 && revisionFeedbackBytes <= 2048;
|
|
6004
6099
|
return (0, react.createElement)(react.Fragment, null, (0, react.createElement)("h3", null, coveringCandidate === void 0 ? `${describeProposalKind(proposal.kind)}:${makeSafeText(proposal.name)}` : `无需新建技能:继续使用 ${makeSafeText(coveringCandidate.name)}`), (0, react.createElement)("dl", { className: _run2skill_css_run2skill_settings_page_module_css_default.detailFacts }, coveringCandidate === void 0 ? (0, react.createElement)(react.Fragment, null, (0, react.createElement)("dt", null, "这个技能有什么用"), (0, react.createElement)("dd", null, makeSafeText(proposal.description)), (0, react.createElement)("dt", null, "什么时候会用到"), (0, react.createElement)("dd", null, makeSafeText(proposal.whenToUse)), (0, react.createElement)("dt", null, "保存后在哪里可用"), (0, react.createElement)("dd", null, describePersistenceScope(proposal.persistenceScope))) : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("dt", null, "原本想保存的经验"), (0, react.createElement)("dd", null, makeSafeText(proposal.description)), (0, react.createElement)("dt", null, "适用场景"), (0, react.createElement)("dd", null, makeSafeText(proposal.whenToUse)), (0, react.createElement)("dt", null, "这次经验的范围"), (0, react.createElement)("dd", null, describeProposalScope(proposal.kind, proposal.persistenceScope))), (0, react.createElement)("dt", null, "当前进度"), (0, react.createElement)("dd", null, describeProposalOutcome(detail))), (0, react.createElement)("h4", null, coveringCandidate === void 0 ? "为什么建议保存" : "为什么无需新建"), (0, react.createElement)("p", null, makeSafeText(proposal.curationRationale)), ...detail.experiences.map((experience) => (0, react.createElement)("article", { key: experience.experienceId }, (0, react.createElement)("strong", null, `${describeExperienceType(experience.type)} · 来自明确表达`), (0, react.createElement)("p", null, makeSafeText(experience.lesson)))), (0, react.createElement)("h4", null, "参考的对话内容"), (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.muted }, "以下片段来自本次对话,并已过滤不可安全展示的内容。"), ...detail.evidenceRefs.map((evidence, index) => (0, react.createElement)("article", { key: `${String(evidence.messageSeq)}:${evidence.excerptDigest}` }, (0, react.createElement)("strong", null, `对话片段 ${String(index + 1)}${evidence.truncated ? "(内容较长,已节选)" : ""}`), (0, react.createElement)(ProposalTextView, {
|
|
6005
6100
|
value: evidence.excerpt,
|
|
6006
6101
|
mode: "SAFE",
|
|
@@ -6029,11 +6124,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6029
6124
|
value: proposal.exactSkillBytes,
|
|
6030
6125
|
mode: props.textMode,
|
|
6031
6126
|
label: coveringCandidate === void 0 ? "确认要保存的技能说明" : "用于判断的草稿内容"
|
|
6032
|
-
}), baseBytes === void 0 ? null : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("h4", null, "现有技能内容"), (0, react.createElement)(ProposalTextView, {
|
|
6127
|
+
}), proposal.revisionParent === void 0 ? null : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("h4", null, "相对上一版草稿的变化"), (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.muted }, "“+”表示新增内容,“-”表示被替换的内容。修改后需要重新审核。"), (0, react.createElement)("pre", { "aria-label": "相对上一版草稿的变化" }, revisionDiff.map((line) => `${line.kind === "ADD" ? "+" : line.kind === "REMOVE" ? "-" : " "} ${makeSafeText(line.text)}`).join("\n"))), baseBytes === void 0 ? null : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("h4", null, "现有技能内容"), (0, react.createElement)(ProposalTextView, {
|
|
6033
6128
|
value: baseBytes,
|
|
6034
6129
|
mode: props.textMode,
|
|
6035
6130
|
label: "现有技能内容"
|
|
6036
|
-
}), (0, react.createElement)("h4", null, "将发生的内容变化"), (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.muted }, "“+”表示新增内容,“-”表示将被替换的内容。"), (0, react.createElement)("pre", { "aria-label": "将发生的内容变化" }, diff.map((line) => `${line.kind === "ADD" ? "+" : line.kind === "REMOVE" ? "-" : " "} ${makeSafeText(line.text)}`).join("\n"))),
|
|
6131
|
+
}), (0, react.createElement)("h4", null, "将发生的内容变化"), (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.muted }, "“+”表示新增内容,“-”表示将被替换的内容。"), (0, react.createElement)("pre", { "aria-label": "将发生的内容变化" }, diff.map((line) => `${line.kind === "ADD" ? "+" : line.kind === "REMOVE" ? "-" : " "} ${makeSafeText(line.text)}`).join("\n"))), proposal.kind === "DISCARD" || props.canRevise !== true ? null : (0, react.createElement)("section", {
|
|
6132
|
+
className: _run2skill_css_run2skill_settings_page_module_css_default.revisionBox,
|
|
6133
|
+
"aria-label": "要求修改技能草稿"
|
|
6134
|
+
}, (0, react.createElement)("label", { htmlFor: `run2skill-revision-${proposal.proposalId}` }, "想怎么修改?"), (0, react.createElement)("p", {
|
|
6135
|
+
id: `run2skill-revision-help-${proposal.proposalId}`,
|
|
6136
|
+
className: _run2skill_css_run2skill_settings_page_module_css_default.muted
|
|
6137
|
+
}, "写一条简短意见。Run2Skill 会重新生成完整草稿,原草稿不会直接发布。"), (0, react.createElement)("textarea", {
|
|
6138
|
+
id: `run2skill-revision-${proposal.proposalId}`,
|
|
6139
|
+
value: revisionFeedback,
|
|
6140
|
+
rows: 3,
|
|
6141
|
+
disabled: mutationPending,
|
|
6142
|
+
"aria-describedby": `run2skill-revision-help-${proposal.proposalId} run2skill-revision-count-${proposal.proposalId}`,
|
|
6143
|
+
onChange: (event) => {
|
|
6144
|
+
setRevisionFeedback(event.currentTarget.value);
|
|
6145
|
+
}
|
|
6146
|
+
}), (0, react.createElement)("span", {
|
|
6147
|
+
id: `run2skill-revision-count-${proposal.proposalId}`,
|
|
6148
|
+
className: revisionFeedbackBytes > 2048 ? _run2skill_css_run2skill_settings_page_module_css_default.danger : _run2skill_css_run2skill_settings_page_module_css_default.muted,
|
|
6149
|
+
role: revisionFeedbackBytes > 2048 ? "alert" : void 0
|
|
6150
|
+
}, `${String(revisionFeedbackBytes)} / 2048 字节`), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6151
|
+
variant: "outline",
|
|
6152
|
+
disabled: mutationPending || !revisionFeedbackValid,
|
|
6153
|
+
onClick: () => {
|
|
6154
|
+
setRevisionSubmitted(true);
|
|
6155
|
+
props.onRevise(revisionFeedback);
|
|
6156
|
+
}
|
|
6157
|
+
}, mutationPending && revisionSubmitted ? "正在生成新草稿…" : "按意见生成新草稿")), coveringBytes === void 0 ? null : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("h4", null, "将继续使用的已有技能内容"), (0, react.createElement)(ProposalTextView, {
|
|
6037
6158
|
value: coveringBytes,
|
|
6038
6159
|
mode: props.textMode,
|
|
6039
6160
|
label: "将继续使用的已有技能内容"
|
|
@@ -6118,6 +6239,133 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6118
6239
|
}
|
|
6119
6240
|
//#endregion
|
|
6120
6241
|
//#region src/client/run2skill-settings-page.ts
|
|
6242
|
+
const learningStatusResultSchema = object({
|
|
6243
|
+
ok: literal(true),
|
|
6244
|
+
value: object({
|
|
6245
|
+
apiVersion: literal(1),
|
|
6246
|
+
state: _enum([
|
|
6247
|
+
"EMPTY",
|
|
6248
|
+
"RECORDED",
|
|
6249
|
+
"PROCESSING",
|
|
6250
|
+
"CHECKING",
|
|
6251
|
+
"COVERED",
|
|
6252
|
+
"NEEDS_ATTENTION"
|
|
6253
|
+
]),
|
|
6254
|
+
canRequest: boolean()
|
|
6255
|
+
}).strict()
|
|
6256
|
+
}).strict();
|
|
6257
|
+
const learningRequestResultSchema = object({
|
|
6258
|
+
ok: literal(true),
|
|
6259
|
+
value: object({
|
|
6260
|
+
apiVersion: literal(1),
|
|
6261
|
+
changed: boolean(),
|
|
6262
|
+
disposition: _enum([
|
|
6263
|
+
"EMPTY",
|
|
6264
|
+
"PROCESSING",
|
|
6265
|
+
"QUEUED"
|
|
6266
|
+
])
|
|
6267
|
+
}).strict()
|
|
6268
|
+
}).strict();
|
|
6269
|
+
const learningStatusCopy = {
|
|
6270
|
+
EMPTY: "暂无可整理的经验。",
|
|
6271
|
+
RECORDED: "已记下,待本次会话结束后整理。",
|
|
6272
|
+
PROCESSING: "正在整理本次经验…",
|
|
6273
|
+
CHECKING: "正在检查已有 Skill…",
|
|
6274
|
+
COVERED: "已有 Skill 已覆盖这次经验。",
|
|
6275
|
+
NEEDS_ATTENTION: "整理结果需要你处理。"
|
|
6276
|
+
};
|
|
6277
|
+
function LearningStatusSection(props) {
|
|
6278
|
+
const [state, setState] = (0, react.useState)({ phase: "LOADING" });
|
|
6279
|
+
const [refreshGeneration, setRefreshGeneration] = (0, react.useState)(0);
|
|
6280
|
+
const requestPending = (0, react.useRef)(false);
|
|
6281
|
+
const [submitting, setSubmitting] = (0, react.useState)(false);
|
|
6282
|
+
(0, react.useEffect)(() => {
|
|
6283
|
+
if (!props.active || props.sessionId === void 0) return;
|
|
6284
|
+
const abort = new AbortController();
|
|
6285
|
+
let timer;
|
|
6286
|
+
const refresh = async () => {
|
|
6287
|
+
try {
|
|
6288
|
+
const parsed = learningStatusResultSchema.safeParse(await props.call("learning/status", {
|
|
6289
|
+
apiVersion: 1,
|
|
6290
|
+
currentScope: currentScope(props.workspaceId, props.scopeGeneration ?? 1),
|
|
6291
|
+
sessionId: props.sessionId
|
|
6292
|
+
}, abort.signal));
|
|
6293
|
+
if (!abort.signal.aborted) setState(parsed.success ? {
|
|
6294
|
+
phase: "READY",
|
|
6295
|
+
value: parsed.data.value
|
|
6296
|
+
} : { phase: "ERROR" });
|
|
6297
|
+
} catch {
|
|
6298
|
+
if (!abort.signal.aborted) setState({ phase: "ERROR" });
|
|
6299
|
+
} finally {
|
|
6300
|
+
if (!abort.signal.aborted) timer = setTimeout(() => {
|
|
6301
|
+
refresh();
|
|
6302
|
+
}, props.pollMs ?? 5e3);
|
|
6303
|
+
}
|
|
6304
|
+
};
|
|
6305
|
+
refresh();
|
|
6306
|
+
return () => {
|
|
6307
|
+
abort.abort();
|
|
6308
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
6309
|
+
};
|
|
6310
|
+
}, [
|
|
6311
|
+
props.active,
|
|
6312
|
+
props.call,
|
|
6313
|
+
props.pollMs,
|
|
6314
|
+
props.scopeGeneration,
|
|
6315
|
+
props.sessionId,
|
|
6316
|
+
props.workspaceId,
|
|
6317
|
+
refreshGeneration
|
|
6318
|
+
]);
|
|
6319
|
+
const request = () => {
|
|
6320
|
+
if (!props.active || requestPending.current || state.phase !== "READY" || !state.value.canRequest || props.sessionId === void 0) return;
|
|
6321
|
+
requestPending.current = true;
|
|
6322
|
+
setSubmitting(true);
|
|
6323
|
+
const abort = new AbortController();
|
|
6324
|
+
(async () => {
|
|
6325
|
+
try {
|
|
6326
|
+
const result = learningRequestResultSchema.safeParse(await props.call("learning/request", {
|
|
6327
|
+
apiVersion: 1,
|
|
6328
|
+
currentScope: currentScope(props.workspaceId, props.scopeGeneration ?? 1),
|
|
6329
|
+
sessionId: props.sessionId
|
|
6330
|
+
}, abort.signal));
|
|
6331
|
+
if (!result.success) throw new Error("LEARNING_REQUEST_UNAVAILABLE");
|
|
6332
|
+
setState({
|
|
6333
|
+
phase: "READY",
|
|
6334
|
+
value: {
|
|
6335
|
+
apiVersion: 1,
|
|
6336
|
+
state: result.data.value.disposition === "PROCESSING" ? "PROCESSING" : result.data.value.disposition === "QUEUED" ? "RECORDED" : "EMPTY",
|
|
6337
|
+
canRequest: false
|
|
6338
|
+
}
|
|
6339
|
+
});
|
|
6340
|
+
setRefreshGeneration((value) => value + 1);
|
|
6341
|
+
} catch {
|
|
6342
|
+
setState({ phase: "ERROR" });
|
|
6343
|
+
} finally {
|
|
6344
|
+
requestPending.current = false;
|
|
6345
|
+
setSubmitting(false);
|
|
6346
|
+
}
|
|
6347
|
+
})();
|
|
6348
|
+
};
|
|
6349
|
+
const disabled = !props.active || state.phase !== "READY" || !state.value.canRequest || submitting;
|
|
6350
|
+
const statusText = props.sessionId === void 0 ? "请先打开一个会话。" : state.phase === "LOADING" ? "正在读取整理状态…" : state.phase === "ERROR" ? "整理状态暂不可用,请刷新后重试。" : learningStatusCopy[state.value.state];
|
|
6351
|
+
return (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.sectionBody }, (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.learningStatusRow }, (0, react.createElement)("p", {
|
|
6352
|
+
role: state.phase === "ERROR" ? "alert" : "status",
|
|
6353
|
+
"aria-live": "polite",
|
|
6354
|
+
className: _run2skill_css_run2skill_settings_page_module_css_default.status
|
|
6355
|
+
}, statusText), (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.actions }, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6356
|
+
variant: "primary",
|
|
6357
|
+
disabled,
|
|
6358
|
+
onClick: request
|
|
6359
|
+
}, submitting ? "正在提交…" : "立即整理本次经验"), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6360
|
+
variant: "outline",
|
|
6361
|
+
"aria-label": "刷新整理状态",
|
|
6362
|
+
disabled: !props.active || props.sessionId === void 0 || submitting,
|
|
6363
|
+
onClick: () => {
|
|
6364
|
+
setState({ phase: "LOADING" });
|
|
6365
|
+
setRefreshGeneration((value) => value + 1);
|
|
6366
|
+
}
|
|
6367
|
+
}, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline16)))));
|
|
6368
|
+
}
|
|
6121
6369
|
const recentSkillActivityResultSchema = object({
|
|
6122
6370
|
ok: literal(true),
|
|
6123
6371
|
value: object({
|
|
@@ -6529,6 +6777,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6529
6777
|
}
|
|
6530
6778
|
}, [controller, props.active]);
|
|
6531
6779
|
const state = (0, react.useSyncExternalStore)(controller.subscribe, controller.snapshot, controller.snapshot);
|
|
6780
|
+
(0, react.useEffect)(() => {
|
|
6781
|
+
const selected = state.selectedProposalId;
|
|
6782
|
+
if (props.active && selected !== void 0 && state.detailPhase === "LOADING" && state.announcement === "已生成新草稿,请重新审核" && scopeAccessRef.current.actions.some((action) => action.proposalRef.proposalId === selected)) controller.select(selected);
|
|
6783
|
+
}, [
|
|
6784
|
+
controller,
|
|
6785
|
+
props.active,
|
|
6786
|
+
props.actions,
|
|
6787
|
+
state.announcement,
|
|
6788
|
+
state.detailPhase,
|
|
6789
|
+
state.selectedProposalId
|
|
6790
|
+
]);
|
|
6532
6791
|
const [filter, setFilter] = (0, react.useState)("");
|
|
6533
6792
|
const [textMode, setTextMode] = (0, react.useState)("SAFE");
|
|
6534
6793
|
const [rejectConfirm, setRejectConfirm] = (0, react.useState)(false);
|
|
@@ -6582,6 +6841,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6582
6841
|
onRefresh: () => {
|
|
6583
6842
|
controller.mutate("REFRESH").finally(props.onMutationSettled);
|
|
6584
6843
|
},
|
|
6844
|
+
onRevise: (feedback) => {
|
|
6845
|
+
controller.revise(feedback).finally(props.onMutationSettled);
|
|
6846
|
+
},
|
|
6847
|
+
canRevise: props.actions.some((action) => action.proposalRef?.proposalId === state.detail?.proposal.proposalId && action.availableActions?.includes("REVISE") === true),
|
|
6585
6848
|
onConfirmDiscard: () => {
|
|
6586
6849
|
controller.mutate("CONFIRM_DISCARD").finally(props.onMutationSettled);
|
|
6587
6850
|
}
|
|
@@ -6919,7 +7182,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6919
7182
|
const liveWorkspaceId = props.useWorkspaces?.((state) => state.items.find((workspace) => workspace.sessionIds?.includes(liveSessionId ?? ""))?.workspaceId);
|
|
6920
7183
|
const workspaceId = props.useSessions === void 0 ? props.workspaceId : liveWorkspaceId;
|
|
6921
7184
|
const sessionId = props.useSessions === void 0 ? props.sessionId : liveSessionId;
|
|
6922
|
-
const [open, setOpen] = (0, react.useState)(() => /* @__PURE__ */ new Set(["attention"]));
|
|
7185
|
+
const [open, setOpen] = (0, react.useState)(() => /* @__PURE__ */ new Set(["status", "attention"]));
|
|
6923
7186
|
const hostTab = useHostTabVisibility();
|
|
6924
7187
|
const [attention, setAttention] = (0, react.useState)();
|
|
6925
7188
|
const [attentionRefresh, setAttentionRefresh] = (0, react.useState)(0);
|
|
@@ -6956,7 +7219,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6956
7219
|
ref: hostTab.ref,
|
|
6957
7220
|
className: _run2skill_css_run2skill_settings_page_module_css_default.page,
|
|
6958
7221
|
"data-run2skill-settings-page": true
|
|
6959
|
-
}, (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.intro }, "Run2Skill
|
|
7222
|
+
}, (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.intro }, "Run2Skill 在后台自动沉淀经验;这里展示当前状态、需要处理的事项和持久设置。"), props.callLearningStatus === void 0 ? null : disclosure("status", "整理状态", (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconSparkle16), (0, react.createElement)(LearningStatusSection, {
|
|
7223
|
+
key: JSON.stringify([
|
|
7224
|
+
sessionId ?? null,
|
|
7225
|
+
workspaceId ?? null,
|
|
7226
|
+
scopeGeneration,
|
|
7227
|
+
purgeState.hostDataEpoch
|
|
7228
|
+
]),
|
|
7229
|
+
...sessionId === void 0 ? {} : { sessionId },
|
|
7230
|
+
...workspaceId === void 0 ? {} : { workspaceId },
|
|
7231
|
+
scopeGeneration,
|
|
7232
|
+
active: hostTab.visible && open.has("status") && !purgeDataChanging,
|
|
7233
|
+
call: props.callLearningStatus
|
|
7234
|
+
})), disclosure("attention", "需要处理", (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutline16), (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.sectionBody }, (0, react.createElement)(AttentionSettingsSummary, {
|
|
6960
7235
|
active: hostTab.visible && open.has("attention"),
|
|
6961
7236
|
...sessionId === void 0 ? {} : { sessionId },
|
|
6962
7237
|
...workspaceId === void 0 ? {} : { workspaceId },
|
|
@@ -7017,6 +7292,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7017
7292
|
const callReview = async (endpoint, payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, endpoint, payload, signal);
|
|
7018
7293
|
const callAttention = async (payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, "attention", payload, signal);
|
|
7019
7294
|
const callActivity = async (payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, "recent-activity/list", payload, signal);
|
|
7295
|
+
const callLearningStatus = async (endpoint, payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, endpoint, payload, signal);
|
|
7020
7296
|
const callPurge = async (endpoint, payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, endpoint, payload, signal);
|
|
7021
7297
|
const purgeController = new PurgeSettingsController(callPurge, () => workspaceFor(context, currentSessionId(context)));
|
|
7022
7298
|
context.effect(() => {
|
|
@@ -7039,7 +7315,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7039
7315
|
sessionId: currentSessionId(context),
|
|
7040
7316
|
callAttention,
|
|
7041
7317
|
callReview,
|
|
7042
|
-
callActivity
|
|
7318
|
+
callActivity,
|
|
7319
|
+
callLearningStatus
|
|
7043
7320
|
})
|
|
7044
7321
|
}, Run2skillSettingsPage));
|
|
7045
7322
|
context.slots.inject("conversation.session.header.actions", () => context.slots.register({
|
|
@@ -7206,6 +7483,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7206
7483
|
exports.AutomaticLearningSettingsCard = AutomaticLearningSettingsCard;
|
|
7207
7484
|
exports.AutomaticLearningSettingsController = AutomaticLearningSettingsController;
|
|
7208
7485
|
exports.LearningFailureSection = LearningFailureSection;
|
|
7486
|
+
exports.LearningStatusSection = LearningStatusSection;
|
|
7209
7487
|
exports.OBSERVE_SUMMARY_POLL_INTERVAL_MS = OBSERVE_SUMMARY_POLL_INTERVAL_MS;
|
|
7210
7488
|
exports.ObserveSummaryPoller = ObserveSummaryPoller;
|
|
7211
7489
|
exports.PROPOSAL_ACTIVE_POLL_INTERVAL_MS = PROPOSAL_ACTIVE_POLL_INTERVAL_MS;
|