dsh-run2skill 0.2.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 +589 -88
- package/lib/index.d.ts +174 -7
- package/lib/index.js +8895 -5623
- package/package.json +18 -5
package/lib/client.js
CHANGED
|
@@ -4219,41 +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
|
-
"
|
|
4255
|
-
"
|
|
4256
|
-
"sectionTitle": "
|
|
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"
|
|
4257
4266
|
};
|
|
4258
4267
|
//#endregion
|
|
4259
4268
|
//#region src/client/purge-settings.ts
|
|
@@ -4958,6 +4967,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4958
4967
|
}).strict();
|
|
4959
4968
|
const processingState = _enum([
|
|
4960
4969
|
"READY_FOR_REVIEW",
|
|
4970
|
+
"REVISING",
|
|
4961
4971
|
"PUBLISHING",
|
|
4962
4972
|
"NEEDS_ATTENTION",
|
|
4963
4973
|
"TERMINAL"
|
|
@@ -4970,6 +4980,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4970
4980
|
"PUBLISHED",
|
|
4971
4981
|
"PUBLISH_FAILED"
|
|
4972
4982
|
]);
|
|
4983
|
+
const attentionAction = object({
|
|
4984
|
+
actionKey: string().regex(/^act_[a-f0-9]{64}$/),
|
|
4985
|
+
subjectId: workItemId,
|
|
4986
|
+
kind: _enum([
|
|
4987
|
+
"REVIEW_PROPOSAL",
|
|
4988
|
+
"REFRESH_PROPOSAL",
|
|
4989
|
+
"RETRY_PUBLICATION"
|
|
4990
|
+
]),
|
|
4991
|
+
proposalRef
|
|
4992
|
+
}).strict();
|
|
4973
4993
|
const rootDisplay = object({
|
|
4974
4994
|
state: _enum(["EXISTING", "ABSENT"]),
|
|
4975
4995
|
scope: _enum(["PROJECT", "USER"]),
|
|
@@ -5043,12 +5063,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5043
5063
|
supportingExperienceIds: array(string().regex(/^exp_[a-f0-9]{64}$/)).min(1).max(3),
|
|
5044
5064
|
catalogObservationDigest: sha256,
|
|
5045
5065
|
curationRationale: string().min(1).max(4096),
|
|
5046
|
-
|
|
5066
|
+
revisionParent: object({
|
|
5067
|
+
proposalId,
|
|
5068
|
+
revision: positiveInteger,
|
|
5069
|
+
digest: sha256,
|
|
5070
|
+
exactSkillBytes: string().min(1).max(65536)
|
|
5071
|
+
}).strict().optional(),
|
|
5072
|
+
actionBinding: actionBinding.optional(),
|
|
5047
5073
|
proposalId,
|
|
5048
5074
|
digest: sha256
|
|
5049
|
-
}).strict().
|
|
5050
|
-
|
|
5051
|
-
|
|
5075
|
+
}).strict().superRefine((value, context) => {
|
|
5076
|
+
if (value.actionBinding !== void 0 && value.kind !== value.actionBinding.kind) context.addIssue({
|
|
5077
|
+
code: "custom",
|
|
5078
|
+
path: ["actionBinding"],
|
|
5079
|
+
message: "action binding kind must match proposal kind"
|
|
5080
|
+
});
|
|
5052
5081
|
});
|
|
5053
5082
|
const evidence = object({
|
|
5054
5083
|
source: literal("USER_DIRECT"),
|
|
@@ -5106,6 +5135,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5106
5135
|
createdAt: string().min(1).max(64),
|
|
5107
5136
|
processingState: _enum([
|
|
5108
5137
|
"READY_FOR_REVIEW",
|
|
5138
|
+
"REVISING",
|
|
5109
5139
|
"PUBLISHING",
|
|
5110
5140
|
"NEEDS_ATTENTION"
|
|
5111
5141
|
]),
|
|
@@ -5140,8 +5170,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5140
5170
|
turnEndSeq: nonNegativeInteger
|
|
5141
5171
|
}).strict(),
|
|
5142
5172
|
evidenceRefs: array(evidence).max(16),
|
|
5143
|
-
experiences: array(experience).max(3)
|
|
5144
|
-
|
|
5173
|
+
experiences: array(experience).max(3),
|
|
5174
|
+
action: attentionAction.optional()
|
|
5175
|
+
}).strict().superRefine((value, context) => {
|
|
5176
|
+
if (value.processingState === "READY_FOR_REVIEW" && value.publicationOutcome === "PENDING_REVIEW" && value.proposal.actionBinding === void 0) context.addIssue({
|
|
5177
|
+
code: "custom",
|
|
5178
|
+
path: ["proposal", "actionBinding"],
|
|
5179
|
+
message: "approvable Proposal requires a safe action binding"
|
|
5180
|
+
});
|
|
5181
|
+
});
|
|
5145
5182
|
const receipt = object({
|
|
5146
5183
|
apiVersion: literal(1),
|
|
5147
5184
|
workItemId,
|
|
@@ -5186,9 +5223,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5186
5223
|
approve: "proposals/approve",
|
|
5187
5224
|
reject: "proposals/reject",
|
|
5188
5225
|
retry: "proposals/retry",
|
|
5226
|
+
refresh: "proposals/refresh",
|
|
5227
|
+
revise: "proposals/revise",
|
|
5189
5228
|
confirmDiscard: "coverage/confirm-discard"
|
|
5190
5229
|
};
|
|
5230
|
+
function describeProposalKind(kind) {
|
|
5231
|
+
if (kind === "CREATE") return "新建技能";
|
|
5232
|
+
if (kind === "MERGE") return "更新已有技能";
|
|
5233
|
+
return "无需新建技能";
|
|
5234
|
+
}
|
|
5235
|
+
function describePersistenceScope(scope) {
|
|
5236
|
+
return scope === "PROJECT" ? "仅当前项目可用" : "所有项目可用";
|
|
5237
|
+
}
|
|
5238
|
+
function describeProposalScope(kind, scope) {
|
|
5239
|
+
if (kind !== "DISCARD") return describePersistenceScope(scope);
|
|
5240
|
+
return scope === "PROJECT" ? "本次经验来自当前项目" : "本次经验适用于所有项目";
|
|
5241
|
+
}
|
|
5191
5242
|
function describeProposalOutcome(detail) {
|
|
5243
|
+
if (detail.processingState === "REVISING") return "正在按修改意见生成新草稿";
|
|
5192
5244
|
if (detail.publicationOutcome === "PUBLISHED") return "Skill 已保存,DSH 已确认可以使用";
|
|
5193
5245
|
if (detail.publicationOutcome === "DISCARDED") return "技能草稿已放弃,Skill 未更改";
|
|
5194
5246
|
if (detail.publicationOutcome === "NEEDS_REFRESH") return "保存目标已变化,需要生成新的技能草稿";
|
|
@@ -5206,6 +5258,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5206
5258
|
return "待决定";
|
|
5207
5259
|
}
|
|
5208
5260
|
function describeProcessingState(state) {
|
|
5261
|
+
if (state === "REVISING") return "正在生成新草稿";
|
|
5209
5262
|
if (state === "PUBLISHING") return "正在保存";
|
|
5210
5263
|
if (state === "NEEDS_ATTENTION") return "需要处理";
|
|
5211
5264
|
if (state === "TERMINAL") return "已结束";
|
|
@@ -5275,6 +5328,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5275
5328
|
#removeFocus;
|
|
5276
5329
|
#removeVisibility;
|
|
5277
5330
|
#removeOnline;
|
|
5331
|
+
#revisionAttempt;
|
|
5278
5332
|
constructor(workspaceId, call, environment = browserEnvironment$1(), options = {}) {
|
|
5279
5333
|
this.workspaceId = workspaceId;
|
|
5280
5334
|
this.call = call;
|
|
@@ -5393,19 +5447,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5393
5447
|
await this.whenIdle();
|
|
5394
5448
|
const detail = this.#state.detail;
|
|
5395
5449
|
if (this.#disposed || detail === void 0 || this.#state.mutationPending) return;
|
|
5396
|
-
const proposalRef = {
|
|
5450
|
+
const proposalRef = detail.action?.proposalRef ?? {
|
|
5397
5451
|
proposalId: detail.proposal.proposalId,
|
|
5398
5452
|
revision: detail.proposal.revision,
|
|
5399
5453
|
digest: detail.proposal.digest
|
|
5400
5454
|
};
|
|
5401
|
-
const targetEndpoint = action === "APPROVE" ? endpoint.approve : action === "REJECT" ? endpoint.reject : action === "RETRY" ? endpoint.retry : endpoint.confirmDiscard;
|
|
5455
|
+
const targetEndpoint = action === "APPROVE" ? endpoint.approve : action === "REJECT" ? endpoint.reject : action === "REFRESH" ? endpoint.refresh : action === "RETRY" ? endpoint.retry : endpoint.confirmDiscard;
|
|
5402
5456
|
const request = {
|
|
5403
5457
|
apiVersion: 1,
|
|
5404
5458
|
workItemId: detail.workItemId,
|
|
5405
5459
|
workItemRevision: detail.workItemRevision,
|
|
5406
5460
|
proposalRef,
|
|
5407
5461
|
currentScope: this.#scopeAccess().currentScope,
|
|
5408
|
-
action: this.#scopeAccess().actions.find((candidate) => candidate.proposalRef.proposalId === proposalRef.proposalId),
|
|
5462
|
+
action: detail.action ?? this.#scopeAccess().actions.find((candidate) => candidate.proposalRef.proposalId === proposalRef.proposalId),
|
|
5409
5463
|
...action === "REJECT" ? { confirm: true } : {}
|
|
5410
5464
|
};
|
|
5411
5465
|
await this.#execute(async (signal) => {
|
|
@@ -5447,6 +5501,66 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5447
5501
|
});
|
|
5448
5502
|
});
|
|
5449
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
|
+
}
|
|
5450
5564
|
dispose() {
|
|
5451
5565
|
if (this.#disposed) return;
|
|
5452
5566
|
this.#disposed = true;
|
|
@@ -5505,7 +5619,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5505
5619
|
}
|
|
5506
5620
|
async #refreshPublishingDetailWithin(signal) {
|
|
5507
5621
|
const selected = this.#state.selectedProposalId;
|
|
5508
|
-
if (selected !== void 0 && this.#state.detail?.processingState
|
|
5622
|
+
if (selected !== void 0 && ["PUBLISHING", "REVISING"].includes(this.#state.detail?.processingState ?? "")) {
|
|
5509
5623
|
const scopeAccess = this.#scopeAccess();
|
|
5510
5624
|
const action = scopeAccess.actions.find((candidate) => candidate.proposalRef.proposalId === selected);
|
|
5511
5625
|
if (action === void 0) return;
|
|
@@ -5612,6 +5726,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5612
5726
|
};
|
|
5613
5727
|
}
|
|
5614
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
|
+
}
|
|
5615
5737
|
const formatCharacters = /* @__PURE__ */ new Map([
|
|
5616
5738
|
[0, "NULL"],
|
|
5617
5739
|
[9, "CHARACTER TABULATION"],
|
|
@@ -5834,7 +5956,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5834
5956
|
controller.select(item.proposalRef.proposalId);
|
|
5835
5957
|
},
|
|
5836
5958
|
className: _run2skill_css_run2skill_settings_page_module_css_default.proposalListButton
|
|
5837
|
-
}, `${item.kind} · ${makeSafeText(item.name)} · ${item.persistenceScope} · ${describeProposalListItem(item)}`))))), (0, react.createElement)("section", {
|
|
5959
|
+
}, `${describeProposalKind(item.kind)} · ${makeSafeText(item.name)} · ${describeProposalScope(item.kind, item.persistenceScope)} · ${describeProposalListItem(item)}`))))), (0, react.createElement)("section", {
|
|
5838
5960
|
"aria-label": "技能草稿详情",
|
|
5839
5961
|
className: _run2skill_css_run2skill_settings_page_module_css_default.legacyDetail
|
|
5840
5962
|
}, state.detailPhase === "IDLE" ? (0, react.createElement)("p", null, "选择一份技能草稿查看完整内容") : null, state.detailPhase === "LOADING" ? (0, react.createElement)("p", null, "正在加载技能草稿详情…") : null, state.detailPhase === "ERROR" ? (0, react.createElement)("p", { role: "alert" }, "技能草稿详情暂不可用") : null, state.detail === void 0 ? null : (0, react.createElement)(ProposalDetailView, {
|
|
@@ -5851,6 +5973,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5851
5973
|
onRetry: () => {
|
|
5852
5974
|
controller.mutate("RETRY");
|
|
5853
5975
|
},
|
|
5976
|
+
onRefresh: () => {
|
|
5977
|
+
controller.mutate("REFRESH");
|
|
5978
|
+
},
|
|
5979
|
+
onRevise: (feedback) => {
|
|
5980
|
+
controller.revise(feedback);
|
|
5981
|
+
},
|
|
5982
|
+
canRevise: false,
|
|
5854
5983
|
onConfirmDiscard: () => {
|
|
5855
5984
|
controller.mutate("CONFIRM_DISCARD");
|
|
5856
5985
|
}
|
|
@@ -5870,12 +5999,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5870
5999
|
}
|
|
5871
6000
|
function factsFromAction(detail) {
|
|
5872
6001
|
const action = detail.proposal.actionBinding;
|
|
6002
|
+
if (action === void 0) {
|
|
6003
|
+
if (detail.publicationOutcome === "NEEDS_REFRESH") return "这份草稿的保存目标已失效;请生成新草稿后重新审核。";
|
|
6004
|
+
if (detail.publicationOutcome === "PUBLISH_FAILED") return "这份草稿的保存目标暂时不可确认;请等待目录恢复后重试保存。";
|
|
6005
|
+
return "这份草稿的保存目标暂时不可确认;请等待目录恢复后重新打开详情。";
|
|
6006
|
+
}
|
|
5873
6007
|
if (action.kind === "CREATE") return [
|
|
5874
6008
|
`Skill 存储规则版本:${action.rootBinding.rootContractVersion}`,
|
|
5875
6009
|
`Skill 存储定位器版本:${action.rootBinding.resolverVersion}`,
|
|
5876
|
-
|
|
6010
|
+
`保存位置:${describeRootSource(action.rootBinding.expectedSource)}`,
|
|
5877
6011
|
`存储定位规则校验值:${action.rootBinding.resolutionContractDigest}`,
|
|
5878
|
-
|
|
6012
|
+
`保存目录:${describeRootState(action.rootBinding.state)}`,
|
|
5879
6013
|
`Skill 名称:${action.targetBinding.skillName}`,
|
|
5880
6014
|
`Skill 内容校验值:${detail.proposal.skillBytesDigest}`,
|
|
5881
6015
|
`确认目标不存在的时间:${action.expectedAbsence.observedAt}`,
|
|
@@ -5886,9 +6020,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5886
6020
|
if (action.kind === "MERGE") return [
|
|
5887
6021
|
`Skill 存储规则版本:${action.rootBinding.rootContractVersion}`,
|
|
5888
6022
|
`Skill 存储定位器版本:${action.rootBinding.resolverVersion}`,
|
|
5889
|
-
|
|
6023
|
+
`保存位置:${describeRootSource(action.rootBinding.expectedSource)}`,
|
|
5890
6024
|
`存储定位规则校验值:${action.rootBinding.resolutionContractDigest}`,
|
|
5891
|
-
|
|
6025
|
+
`保存目录:${describeRootState(action.rootBinding.state)}`,
|
|
5892
6026
|
`现有 Skill 标识:${action.baseBinding.candidateKey}`,
|
|
5893
6027
|
`Skill 名称:${action.targetBinding.skillName}`,
|
|
5894
6028
|
`原内容校验值:${action.baseBinding.bytesDigest}`,
|
|
@@ -5897,35 +6031,80 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5897
6031
|
return [
|
|
5898
6032
|
`匹配到的现有 Skill 标识:${action.coveringCandidateBinding.candidateKey}`,
|
|
5899
6033
|
`名称:${action.coveringCandidateBinding.name}`,
|
|
5900
|
-
|
|
6034
|
+
`已有技能来源:${describeCandidateSource(action.coveringCandidateBinding.source)}`,
|
|
5901
6035
|
`内容校验值:${action.coveringCandidateBinding.contentDigest}`,
|
|
5902
6036
|
`确认时间:${action.coveringCandidateBinding.observedAt}`
|
|
5903
6037
|
].join("\n");
|
|
5904
6038
|
}
|
|
6039
|
+
function describeRootSource(source) {
|
|
6040
|
+
return source === "project-dsh" ? "当前项目的 DSH 技能目录" : "个人 DSH 技能目录(所有项目可用)";
|
|
6041
|
+
}
|
|
6042
|
+
function describeRootState(state) {
|
|
6043
|
+
return state === "EXISTING" ? "已存在" : "尚未建立,保存时会自动创建";
|
|
6044
|
+
}
|
|
6045
|
+
function describeCandidateSource(source) {
|
|
6046
|
+
if (source === "project-dsh") return "当前项目的 DSH 技能";
|
|
6047
|
+
if (source === "project-agents") return "当前项目的 Agent 技能";
|
|
6048
|
+
if (source === "user-dsh") return "个人 DSH 技能(所有项目可用)";
|
|
6049
|
+
if (source === "user-agents") return "个人 Agent 技能(所有项目可用)";
|
|
6050
|
+
if (source === "bundled") return "DSH 内置技能";
|
|
6051
|
+
if (source === "runtime") return "当前会话加载的技能";
|
|
6052
|
+
if (source === "custom") return "自定义技能目录";
|
|
6053
|
+
return "其他已加载位置";
|
|
6054
|
+
}
|
|
6055
|
+
function describeProposalAction(detail) {
|
|
6056
|
+
const proposal = detail.proposal;
|
|
6057
|
+
if (proposal.actionBinding === void 0) return factsFromAction(detail);
|
|
6058
|
+
if (proposal.actionBinding.kind === "CREATE") return `确认后会新建技能“${makeSafeText(proposal.name)}”。`;
|
|
6059
|
+
if (proposal.actionBinding.kind === "MERGE") return `确认后会把这次经验补充到已有技能“${makeSafeText(proposal.name)}”中。`;
|
|
6060
|
+
const existingName = proposal.actionBinding.coveringCandidateBinding.name;
|
|
6061
|
+
return `已有技能“${makeSafeText(existingName)}”已包含这次经验。这份草稿不会保存,确认后将继续使用该已有技能。`;
|
|
6062
|
+
}
|
|
6063
|
+
function describeExperienceType(type) {
|
|
6064
|
+
if (type === "CORRECTION") return "纠错经验";
|
|
6065
|
+
if (type === "CONSTRAINT") return "使用约束";
|
|
6066
|
+
return "操作流程";
|
|
6067
|
+
}
|
|
6068
|
+
function describeResolutionKind(kind) {
|
|
6069
|
+
if (kind === "CONFIGURATION") return "由 DSH 配置指定";
|
|
6070
|
+
if (kind === "ENVIRONMENT") return "由运行环境指定";
|
|
6071
|
+
return "使用 DSH 默认位置";
|
|
6072
|
+
}
|
|
5905
6073
|
function proposalDetailAction(detail, mutationPending) {
|
|
5906
6074
|
if (mutationPending) return "NONE";
|
|
6075
|
+
if (detail.processingState === "NEEDS_ATTENTION" && detail.publicationOutcome === "NEEDS_REFRESH") return "REFRESH";
|
|
5907
6076
|
if (detail.reviewDecision === "PENDING" && detail.processingState === "READY_FOR_REVIEW" && detail.publicationOutcome === "PENDING_REVIEW") return "REVIEW";
|
|
5908
6077
|
if (detail.reviewDecision === "APPROVED" && detail.processingState === "NEEDS_ATTENTION" && detail.publicationOutcome === "PUBLISH_FAILED") return "RETRY_PUBLICATION";
|
|
5909
6078
|
return "NONE";
|
|
5910
6079
|
}
|
|
5911
6080
|
function ProposalDetailView(props) {
|
|
5912
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]);
|
|
5913
6088
|
const proposal = detail.proposal;
|
|
5914
6089
|
const action = proposalDetailAction(detail, mutationPending);
|
|
5915
6090
|
const actionable = action === "REVIEW";
|
|
5916
6091
|
const coordinate = detail.sessionCoordinate;
|
|
5917
|
-
const baseBytes = proposal.actionBinding
|
|
5918
|
-
const coveringBytes = proposal.actionBinding
|
|
6092
|
+
const baseBytes = proposal.actionBinding?.kind === "MERGE" ? proposal.actionBinding.baseBinding.exactBytes : void 0;
|
|
6093
|
+
const coveringBytes = proposal.actionBinding?.kind === "DISCARD" ? proposal.actionBinding.coveringCandidateBinding.content : void 0;
|
|
6094
|
+
const coveringCandidate = proposal.actionBinding?.kind === "DISCARD" ? proposal.actionBinding.coveringCandidateBinding : void 0;
|
|
5919
6095
|
const diff = baseBytes === void 0 ? [] : makeExactLineDiff(baseBytes, proposal.exactSkillBytes);
|
|
5920
|
-
|
|
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;
|
|
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, {
|
|
5921
6100
|
value: evidence.excerpt,
|
|
5922
6101
|
mode: "SAFE",
|
|
5923
|
-
label:
|
|
5924
|
-
}))), (0, react.createElement)("h4", null, "
|
|
6102
|
+
label: `参考的对话内容 ${String(index + 1)}`
|
|
6103
|
+
}))), (0, react.createElement)("h4", null, "这次会怎么处理"), (0, react.createElement)("p", null, describeProposalAction(detail)), (0, react.createElement)("details", { className: _run2skill_css_run2skill_settings_page_module_css_default.technicalDetails }, (0, react.createElement)("summary", null, "技术信息(排查问题时使用)"), (0, react.createElement)("dl", { className: _run2skill_css_run2skill_settings_page_module_css_default.detailFacts }, (0, react.createElement)("dt", null, "草稿版本"), (0, react.createElement)("dd", null, String(proposal.revision)), (0, react.createElement)("dt", null, "草稿内容指纹"), (0, react.createElement)("dd", null, proposal.digest), (0, react.createElement)("dt", null, "来源会话"), (0, react.createElement)("dd", null, `${coordinate.rootSessionId} / 第 ${String(coordinate.turn)} 回合 / 记录 ${String(coordinate.turnEndSeq)}`), proposal.workspaceBinding === void 0 ? null : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("dt", null, "项目标识"), (0, react.createElement)("dd", null, proposal.workspaceBinding.workspaceId)), proposal.dshHomeBinding === void 0 ? null : (0, react.createElement)(react.Fragment, null, (0, react.createElement)("dt", null, "保存位置识别方式"), (0, react.createElement)("dd", null, describeResolutionKind(proposal.dshHomeBinding.resolutionKind)), (0, react.createElement)("dt", null, "用户技能目录指纹"), (0, react.createElement)("dd", null, proposal.dshHomeBinding.identityDigest)), (0, react.createElement)("dt", null, "用户决定"), (0, react.createElement)("dd", null, describeReviewDecision(detail.reviewDecision)), (0, react.createElement)("dt", null, "处理进度"), (0, react.createElement)("dd", null, describeProcessingState(detail.processingState)), (0, react.createElement)("dt", null, coveringCandidate === void 0 ? "保存结果" : "处理结果"), (0, react.createElement)("dd", null, coveringCandidate === void 0 ? describePublicationOutcome(detail.publicationOutcome) : describeProposalOutcome(detail))), (0, react.createElement)("h4", null, "对话证据定位信息"), (0, react.createElement)("ul", null, ...detail.evidenceRefs.map((evidence) => (0, react.createElement)("li", { key: `${String(evidence.messageSeq)}:${evidence.excerptDigest}` }, `记录 ${String(evidence.messageSeq)} · 内容指纹 ${evidence.excerptDigest}`))), (0, react.createElement)(ProposalTextView, {
|
|
5925
6104
|
value: factsFromAction(detail),
|
|
5926
6105
|
mode: "SAFE",
|
|
5927
|
-
label: "
|
|
5928
|
-
}), (0, react.createElement)("div", {
|
|
6106
|
+
label: coveringCandidate === void 0 ? "保存目标技术信息" : "已有技能匹配技术信息"
|
|
6107
|
+
})), (0, react.createElement)("div", {
|
|
5929
6108
|
role: "group",
|
|
5930
6109
|
"aria-label": "内容显示方式",
|
|
5931
6110
|
className: _run2skill_css_run2skill_settings_page_module_css_default.modeGroup
|
|
@@ -5935,24 +6114,50 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5935
6114
|
onClick: () => {
|
|
5936
6115
|
props.setTextMode("SAFE");
|
|
5937
6116
|
}
|
|
5938
|
-
}, "
|
|
6117
|
+
}, "标出隐藏字符"), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, {
|
|
5939
6118
|
"aria-pressed": props.textMode === "RAW",
|
|
5940
6119
|
active: props.textMode === "RAW",
|
|
5941
6120
|
onClick: () => {
|
|
5942
6121
|
props.setTextMode("RAW");
|
|
5943
6122
|
}
|
|
5944
|
-
}, "
|
|
6123
|
+
}, "按原文显示")), (0, react.createElement)("h4", null, coveringCandidate === void 0 ? "确认要保存的技能说明" : "用于判断的草稿内容"), (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.muted }, coveringCandidate === void 0 ? "这是 Agent 以后会遵循的完整说明。开头是技能名称和设置,标题下方是具体规则。" : "这份草稿不会保存,仅用于核对已有技能是否已经包含相同经验。"), (0, react.createElement)(ProposalTextView, {
|
|
5945
6124
|
value: proposal.exactSkillBytes,
|
|
5946
6125
|
mode: props.textMode,
|
|
5947
|
-
label: "
|
|
5948
|
-
}),
|
|
6126
|
+
label: coveringCandidate === void 0 ? "确认要保存的技能说明" : "用于判断的草稿内容"
|
|
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, {
|
|
5949
6128
|
value: baseBytes,
|
|
5950
6129
|
mode: props.textMode,
|
|
5951
|
-
label: "
|
|
5952
|
-
}), (0, react.createElement)("h4", null, "
|
|
6130
|
+
label: "现有技能内容"
|
|
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, {
|
|
5953
6158
|
value: coveringBytes,
|
|
5954
6159
|
mode: props.textMode,
|
|
5955
|
-
label: "
|
|
6160
|
+
label: "将继续使用的已有技能内容"
|
|
5956
6161
|
})), (0, react.createElement)("div", {
|
|
5957
6162
|
role: "group",
|
|
5958
6163
|
"aria-label": "技能草稿操作",
|
|
@@ -5961,7 +6166,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5961
6166
|
variant: "primary",
|
|
5962
6167
|
disabled: mutationPending,
|
|
5963
6168
|
onClick: props.onRetry
|
|
5964
|
-
}, "重试保存") :
|
|
6169
|
+
}, "重试保存") : action === "REFRESH" ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6170
|
+
variant: "primary",
|
|
6171
|
+
disabled: mutationPending,
|
|
6172
|
+
onClick: props.onRefresh
|
|
6173
|
+
}, "生成新草稿") : proposal.kind === "DISCARD" ? (0, react.createElement)(react.Fragment, null, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5965
6174
|
variant: "primary",
|
|
5966
6175
|
disabled: !actionable,
|
|
5967
6176
|
onClick: props.onConfirmDiscard
|
|
@@ -6030,6 +6239,133 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6030
6239
|
}
|
|
6031
6240
|
//#endregion
|
|
6032
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
|
+
}
|
|
6033
6369
|
const recentSkillActivityResultSchema = object({
|
|
6034
6370
|
ok: literal(true),
|
|
6035
6371
|
value: object({
|
|
@@ -6174,7 +6510,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6174
6510
|
return (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.sectionBody }, (0, react.createElement)("p", { className: _run2skill_css_run2skill_settings_page_module_css_default.muted }, "展示最近沉淀的 Skill"), visibleState.phase === "LOADING" ? (0, react.createElement)("p", { role: "status" }, "正在读取最近活动…") : null, visibleState.phase === "ERROR" ? (0, react.createElement)("p", { role: "alert" }, "最近活动暂不可用。") : null, visibleState.phase === "READY" && visibleState.items.length === 0 ? (0, react.createElement)("p", null, "最近 7 天没有成功沉淀的 Skill。") : null, visibleState.items.length === 0 ? null : (0, react.createElement)("ul", { className: _run2skill_css_run2skill_settings_page_module_css_default.activityList }, ...visibleState.items.map((item) => (0, react.createElement)("li", {
|
|
6175
6511
|
className: _run2skill_css_run2skill_settings_page_module_css_default.activityItem,
|
|
6176
6512
|
key: item.activityId
|
|
6177
|
-
}, (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.activitySummary }, (0, react.createElement)("strong", null, item.skillName), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, item.operation === "CREATED" ? "
|
|
6513
|
+
}, (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.activitySummary }, (0, react.createElement)("strong", null, item.skillName), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, item.operation === "CREATED" ? "新建技能" : "更新技能"), usefulActivityScope(visibleState.items, item) ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, describePersistenceScope(item.scope)) : null), (0, react.createElement)("time", {
|
|
6178
6514
|
dateTime: item.occurredAt,
|
|
6179
6515
|
className: _run2skill_css_run2skill_settings_page_module_css_default.muted
|
|
6180
6516
|
}, formatActivityTime(item.occurredAt))))));
|
|
@@ -6199,7 +6535,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6199
6535
|
inputTokens: number().int().nonnegative().optional(),
|
|
6200
6536
|
outputTokens: number().int().nonnegative().optional(),
|
|
6201
6537
|
outcome: string().min(1).max(256)
|
|
6202
|
-
}).strict()).max(2)
|
|
6538
|
+
}).strict()).max(2),
|
|
6539
|
+
attentionKind: _enum([
|
|
6540
|
+
"SAFETY_STOP",
|
|
6541
|
+
"PROCESSING_FAILURE",
|
|
6542
|
+
"STALE_RESULT",
|
|
6543
|
+
"NEEDS_DECISION"
|
|
6544
|
+
]).optional(),
|
|
6545
|
+
currentStage: _enum([
|
|
6546
|
+
"DETECTION",
|
|
6547
|
+
"OWNERSHIP",
|
|
6548
|
+
"RECALL",
|
|
6549
|
+
"COVERAGE",
|
|
6550
|
+
"GENERATION"
|
|
6551
|
+
]).optional(),
|
|
6552
|
+
stages: array(object({
|
|
6553
|
+
stage: _enum([
|
|
6554
|
+
"DETECTION",
|
|
6555
|
+
"OWNERSHIP",
|
|
6556
|
+
"RECALL",
|
|
6557
|
+
"COVERAGE",
|
|
6558
|
+
"GENERATION"
|
|
6559
|
+
]),
|
|
6560
|
+
state: _enum([
|
|
6561
|
+
"NOT_STARTED",
|
|
6562
|
+
"COMPLETED",
|
|
6563
|
+
"STOPPED"
|
|
6564
|
+
]),
|
|
6565
|
+
modelCalls: object({
|
|
6566
|
+
total: number().int().nonnegative(),
|
|
6567
|
+
reserved: number().int().nonnegative(),
|
|
6568
|
+
succeeded: number().int().nonnegative(),
|
|
6569
|
+
failed: number().int().nonnegative(),
|
|
6570
|
+
aborted: number().int().nonnegative(),
|
|
6571
|
+
timedOut: number().int().nonnegative(),
|
|
6572
|
+
outcomeUnknown: number().int().nonnegative()
|
|
6573
|
+
}).strict()
|
|
6574
|
+
}).strict()).max(5).optional()
|
|
6203
6575
|
}).strict();
|
|
6204
6576
|
const learningIssuePageSchema = object({
|
|
6205
6577
|
ok: literal(true),
|
|
@@ -6209,6 +6581,75 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6209
6581
|
nextCursor: string().regex(/^c_[1-9][0-9]*_[1-9][0-9]*_[a-f0-9]{64}$/).optional()
|
|
6210
6582
|
}).strict()
|
|
6211
6583
|
}).strict();
|
|
6584
|
+
const learningStageLabels = {
|
|
6585
|
+
DETECTION: "语义检测",
|
|
6586
|
+
OWNERSHIP: "重复保存检查",
|
|
6587
|
+
RECALL: "已有 Skill 检索",
|
|
6588
|
+
COVERAGE: "重复与合并判断",
|
|
6589
|
+
GENERATION: "Skill 草稿生成"
|
|
6590
|
+
};
|
|
6591
|
+
function learningIssueDescription(item) {
|
|
6592
|
+
if (item.failureCode === "BASELINE_INCOMPLETE") return {
|
|
6593
|
+
title: "自动沉淀已停止",
|
|
6594
|
+
detail: "缺少任务开始前的 Skill 状态记录,无法确认 Agent 是否已经保存过同类 Skill。为避免重复生成,本次已停止。已有 Skill 和原始会话记录不受影响。"
|
|
6595
|
+
};
|
|
6596
|
+
if (item.failureCode === "MODEL_TERMINAL_FAILURE") return {
|
|
6597
|
+
title: "自动沉淀未完成",
|
|
6598
|
+
detail: "模型没有返回可用的结果,本次自动沉淀未完成。已有 Skill 和原始会话记录不受影响。"
|
|
6599
|
+
};
|
|
6600
|
+
if (item.failureCode === "MODEL_OUTPUT_TRUNCATED") return {
|
|
6601
|
+
title: "语义判断没有完成",
|
|
6602
|
+
detail: "模型在返回简短判断前用完了本次输出额度,因此没有继续生成 Skill 草稿。已有 Skill 和原始会话记录不受影响。"
|
|
6603
|
+
};
|
|
6604
|
+
if (item.failureCode === "SESSION_CONTEXT_UNAVAILABLE") return {
|
|
6605
|
+
title: "自动沉淀已停止",
|
|
6606
|
+
detail: "任务结束后没能恢复当时的会话信息,无法确认 Agent 是否已经保存过同类 Skill。为避免重复生成,本次已停止。已有 Skill 和原始会话记录不受影响。"
|
|
6607
|
+
};
|
|
6608
|
+
if (item.failureCode === "SESSION_SNAPSHOT_UNAVAILABLE") return {
|
|
6609
|
+
title: "自动沉淀已停止",
|
|
6610
|
+
detail: "没能读取任务结束时的会话快照,无法确认 Skill 状态是否稳定。为避免重复生成,本次已停止。已有 Skill 和原始会话记录不受影响。"
|
|
6611
|
+
};
|
|
6612
|
+
if (item.failureCode === "SESSION_LOG_UNAVAILABLE") return {
|
|
6613
|
+
title: "自动沉淀已停止",
|
|
6614
|
+
detail: "没能完整读取本次任务的会话记录,无法确认 Agent 是否已经保存过同类 Skill。为避免重复生成,本次已停止。已有 Skill 和原始会话记录不受影响。"
|
|
6615
|
+
};
|
|
6616
|
+
if (item.failureCode === "SESSION_WINDOW_INCOMPLETE") return {
|
|
6617
|
+
title: "自动沉淀已停止",
|
|
6618
|
+
detail: "本次任务的会话记录不完整或超出安全检查范围,无法可靠判断是否已经生成过 Skill。为避免重复生成,本次已停止。"
|
|
6619
|
+
};
|
|
6620
|
+
if (item.failureCode === "SESSION_CHANGED_DURING_CHECK") return {
|
|
6621
|
+
title: "自动沉淀已停止",
|
|
6622
|
+
detail: "核对期间会话又发生了变化,当前结果已经失效。为避免使用过期记录或重复生成,本次已停止。"
|
|
6623
|
+
};
|
|
6624
|
+
if (item.failureCode === "OWNERSHIP_ANALYSIS_UNAVAILABLE" || item.failureCode === "OBSERVATION_FAILED") return {
|
|
6625
|
+
title: "自动沉淀已停止",
|
|
6626
|
+
detail: "系统没能完整核对本次任务结束时的 Skill 状态和 Agent 操作记录,因此无法确认是否已经保存过同类 Skill。为避免重复生成,本次已停止。已有 Skill 和原始会话记录不受影响。"
|
|
6627
|
+
};
|
|
6628
|
+
if (item.attentionKind === "STALE_RESULT") return {
|
|
6629
|
+
title: "自动沉淀结果已过期",
|
|
6630
|
+
detail: "生成依据已经发生变化,本次结果已停止使用,以免覆盖新的 Skill 状态。"
|
|
6631
|
+
};
|
|
6632
|
+
if (item.attentionKind === "NEEDS_DECISION") return {
|
|
6633
|
+
title: "自动沉淀需要确认",
|
|
6634
|
+
detail: "系统无法明确判断是否还需要生成 Skill,因此没有自动继续。"
|
|
6635
|
+
};
|
|
6636
|
+
if (item.attentionKind === "SAFETY_STOP") return {
|
|
6637
|
+
title: "自动沉淀已停止",
|
|
6638
|
+
detail: "系统无法确认继续处理是否安全,因此本次自动沉淀已停止。已有 Skill 和原始会话记录不受影响。"
|
|
6639
|
+
};
|
|
6640
|
+
return {
|
|
6641
|
+
title: "自动沉淀未完成",
|
|
6642
|
+
detail: "处理过程中出现问题,本次自动沉淀未能继续。已有 Skill 和原始会话记录不受影响。"
|
|
6643
|
+
};
|
|
6644
|
+
}
|
|
6645
|
+
function stageDescription(stage) {
|
|
6646
|
+
const label = learningStageLabels[stage.stage];
|
|
6647
|
+
if (stage.state === "NOT_STARTED") return `${label}:未开始`;
|
|
6648
|
+
if (stage.state === "STOPPED") return `${label}:未完成`;
|
|
6649
|
+
if (stage.modelCalls.total === 0) return `${label}:已完成`;
|
|
6650
|
+
const succeeded = stage.modelCalls.succeeded === 0 ? "" : `,成功 ${String(stage.modelCalls.succeeded)} 次`;
|
|
6651
|
+
return `${label}:已完成(模型调用 ${String(stage.modelCalls.total)} 次${succeeded})`;
|
|
6652
|
+
}
|
|
6212
6653
|
function attentionValue(value) {
|
|
6213
6654
|
if (value === null || typeof value !== "object" || !("ok" in value) || value.ok !== true || !("value" in value)) return;
|
|
6214
6655
|
const projection = value.value;
|
|
@@ -6300,7 +6741,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6300
6741
|
});
|
|
6301
6742
|
scopeAccessRef.current = {
|
|
6302
6743
|
currentScope: currentScope(props.workspaceId, props.scopeGeneration),
|
|
6303
|
-
actions: props.actions.flatMap((action) => action.subjectId === void 0 || action.proposalRef === void 0 || ![
|
|
6744
|
+
actions: props.actions.flatMap((action) => action.subjectId === void 0 || action.proposalRef === void 0 || ![
|
|
6745
|
+
"REVIEW_PROPOSAL",
|
|
6746
|
+
"REFRESH_PROPOSAL",
|
|
6747
|
+
"RETRY_PUBLICATION"
|
|
6748
|
+
].includes(action.kind ?? "") ? [] : [{
|
|
6304
6749
|
actionKey: action.actionKey,
|
|
6305
6750
|
subjectId: action.subjectId,
|
|
6306
6751
|
kind: action.kind,
|
|
@@ -6332,21 +6777,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6332
6777
|
}
|
|
6333
6778
|
}, [controller, props.active]);
|
|
6334
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
|
+
]);
|
|
6335
6791
|
const [filter, setFilter] = (0, react.useState)("");
|
|
6336
6792
|
const [textMode, setTextMode] = (0, react.useState)("SAFE");
|
|
6337
6793
|
const [rejectConfirm, setRejectConfirm] = (0, react.useState)(false);
|
|
6338
6794
|
const rejectTriggerRef = (0, react.useRef)(null);
|
|
6339
|
-
const
|
|
6795
|
+
const actionableItems = actionableProposalItems(props.actions, state.items);
|
|
6796
|
+
const showFilter = actionableItems.length > 1;
|
|
6797
|
+
const items = showFilter ? actionableItems.filter((item) => `${item.name} ${item.description} ${item.kind}`.toLocaleLowerCase().includes(filter.trim().toLocaleLowerCase())) : actionableItems;
|
|
6340
6798
|
const selectedActionable = items.some((item) => item.proposalRef.proposalId === state.selectedProposalId);
|
|
6341
6799
|
if (props.actions.length === 0) return (0, react.createElement)(react.Fragment);
|
|
6342
|
-
return (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.
|
|
6800
|
+
return (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.attentionGroup }, (0, react.createElement)("div", { className: showFilter ? _run2skill_css_run2skill_settings_page_module_css_default.proposalToolbar : `${_run2skill_css_run2skill_settings_page_module_css_default.proposalToolbar} ${_run2skill_css_run2skill_settings_page_module_css_default.proposalToolbarCompact}` }, showFilter ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
6343
6801
|
value: filter,
|
|
6344
6802
|
placeholder: "筛选技能草稿",
|
|
6345
6803
|
"aria-label": "筛选技能草稿",
|
|
6346
6804
|
onChange: (event) => {
|
|
6347
6805
|
setFilter(event.currentTarget.value);
|
|
6348
6806
|
}
|
|
6349
|
-
}), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6807
|
+
}) : null, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6350
6808
|
variant: "outline",
|
|
6351
6809
|
size: "sm",
|
|
6352
6810
|
icon: (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline16),
|
|
@@ -6354,13 +6812,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6354
6812
|
controller.open();
|
|
6355
6813
|
}
|
|
6356
6814
|
}, "刷新")), state.listPhase === "LOADING" ? (0, react.createElement)("p", { role: "status" }, "正在加载待处理事项…") : null, state.listPhase === "ERROR" ? (0, react.createElement)("p", { role: "alert" }, "待处理事项暂不可用。") : null, (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.proposalLayout }, (0, react.createElement)("ul", { className: _run2skill_css_run2skill_settings_page_module_css_default.proposalList }, ...items.map((item) => (0, react.createElement)("li", { key: item.proposalRef.proposalId }, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6357
|
-
variant:
|
|
6815
|
+
variant: "outline",
|
|
6358
6816
|
className: _run2skill_css_run2skill_settings_page_module_css_default.proposalListButton,
|
|
6817
|
+
"aria-current": state.selectedProposalId === item.proposalRef.proposalId ? "true" : void 0,
|
|
6818
|
+
"aria-label": `${item.name},${describeProposalKind(item.kind)},${describeProposalScope(item.kind, item.persistenceScope)},${describeProposalListItem(item)}`,
|
|
6359
6819
|
disabled: state.mutationPending || state.detailPhase === "LOADING",
|
|
6360
6820
|
onClick: () => {
|
|
6361
6821
|
controller.select(item.proposalRef.proposalId);
|
|
6362
6822
|
}
|
|
6363
|
-
},
|
|
6823
|
+
}, (0, react.createElement)("span", { className: _run2skill_css_run2skill_settings_page_module_css_default.proposalName }, item.name), (0, react.createElement)("span", { className: _run2skill_css_run2skill_settings_page_module_css_default.proposalMeta }, `${describeProposalKind(item.kind)} · ${describeProposalScope(item.kind, item.persistenceScope)} · ${describeProposalListItem(item)}`))))), (0, react.createElement)("section", {
|
|
6824
|
+
className: _run2skill_css_run2skill_settings_page_module_css_default.detail,
|
|
6825
|
+
"aria-label": "技能草稿详情"
|
|
6826
|
+
}, !selectedActionable || state.detailPhase === "IDLE" ? (0, react.createElement)("p", null, "选择一项查看审核事实。") : null, selectedActionable && state.detailPhase === "LOADING" ? (0, react.createElement)("p", { role: "status" }, "正在加载详情…") : null, selectedActionable && state.detailPhase === "ERROR" ? (0, react.createElement)("p", { role: "alert" }, "详情暂不可用。") : null, !selectedActionable || state.detail === void 0 ? null : (0, react.createElement)(ProposalDetailView, {
|
|
6364
6827
|
detail: state.detail,
|
|
6365
6828
|
textMode,
|
|
6366
6829
|
setTextMode,
|
|
@@ -6375,6 +6838,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6375
6838
|
onRetry: () => {
|
|
6376
6839
|
controller.mutate("RETRY").finally(props.onMutationSettled);
|
|
6377
6840
|
},
|
|
6841
|
+
onRefresh: () => {
|
|
6842
|
+
controller.mutate("REFRESH").finally(props.onMutationSettled);
|
|
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),
|
|
6378
6848
|
onConfirmDiscard: () => {
|
|
6379
6849
|
controller.mutate("CONFIRM_DISCARD").finally(props.onMutationSettled);
|
|
6380
6850
|
}
|
|
@@ -6480,9 +6950,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6480
6950
|
};
|
|
6481
6951
|
if (learningActions.size === 0) return (0, react.createElement)(react.Fragment);
|
|
6482
6952
|
return (0, react.createElement)("section", {
|
|
6483
|
-
className: _run2skill_css_run2skill_settings_page_module_css_default.
|
|
6484
|
-
"aria-label": "
|
|
6485
|
-
}, (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.toolbar }, (0, react.createElement)("strong", null,
|
|
6953
|
+
className: _run2skill_css_run2skill_settings_page_module_css_default.attentionGroup,
|
|
6954
|
+
"aria-label": "自动沉淀未继续"
|
|
6955
|
+
}, (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.toolbar }, (0, react.createElement)("strong", null, `自动沉淀未继续 · ${String(learningActions.size)} 项`), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6486
6956
|
variant: "outline",
|
|
6487
6957
|
size: "sm",
|
|
6488
6958
|
icon: (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutline16),
|
|
@@ -6490,36 +6960,41 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6490
6960
|
onClick: () => {
|
|
6491
6961
|
setRefreshGeneration((value) => value + 1);
|
|
6492
6962
|
}
|
|
6493
|
-
}, "
|
|
6963
|
+
}, "刷新详情")), phase === "LOADING" ? (0, react.createElement)("p", { role: "status" }, "正在加载自动沉淀详情…") : null, phase === "ERROR" ? (0, react.createElement)("p", { role: "alert" }, "自动沉淀详情暂不可用,请保持 DSH 运行并稍后重试。") : null, ...items.map((item) => {
|
|
6494
6964
|
const action = learningActions.get(item.workItemId);
|
|
6495
6965
|
const busy = pending === item.workItemId;
|
|
6966
|
+
const isCoverageConfirmation = item.failureCode === "COVERED_NEEDS_CONFIRMATION";
|
|
6967
|
+
const description = isCoverageConfirmation ? {
|
|
6968
|
+
title: "发现可能重复的 Skill",
|
|
6969
|
+
detail: "Run2Skill 发现已有 Skill 可能已经包含这次经验,因此暂停生成新草稿。请选择下一步。"
|
|
6970
|
+
} : learningIssueDescription(item);
|
|
6496
6971
|
return (0, react.createElement)("article", {
|
|
6497
6972
|
className: _run2skill_css_run2skill_settings_page_module_css_default.detail,
|
|
6498
6973
|
key: item.workItemId
|
|
6499
|
-
}, (0, react.createElement)("
|
|
6974
|
+
}, (0, react.createElement)("strong", null, description.title), (0, react.createElement)("p", null, description.detail), item.stages === void 0 ? item.calls.length === 0 ? null : (0, react.createElement)("p", null, `已记录模型调用 ${String(item.calls.length)} 次`) : (0, react.createElement)("div", null, ...item.stages.map((stage) => (0, react.createElement)("p", { key: stage.stage }, stageDescription(stage)))), item.modelRoute === void 0 ? null : (0, react.createElement)("details", { className: _run2skill_css_run2skill_settings_page_module_css_default.technicalDetails }, (0, react.createElement)("summary", null, "本次处理的技术信息"), (0, react.createElement)("p", null, `使用的模型:${item.modelRoute.model}(${item.modelRoute.provider})`)), (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.actions }, action?.availableActions?.includes("RETRY") === true ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6500
6975
|
variant: "primary",
|
|
6501
6976
|
disabled: busy || pending !== void 0,
|
|
6502
6977
|
onClick: () => {
|
|
6503
6978
|
mutate("learning/issues/retry", item);
|
|
6504
6979
|
}
|
|
6505
|
-
}, busy ? "
|
|
6980
|
+
}, busy ? "正在处理…" : isCoverageConfirmation ? "继续生成新 Skill 草稿" : "重试学习") : null, action?.availableActions?.includes("DISMISS") === true ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6506
6981
|
variant: "outline",
|
|
6507
6982
|
disabled: busy || pending !== void 0,
|
|
6508
6983
|
onClick: (event) => {
|
|
6509
6984
|
dismissTriggerRef.current = event.currentTarget;
|
|
6510
6985
|
setDismiss(item);
|
|
6511
6986
|
}
|
|
6512
|
-
}, "
|
|
6987
|
+
}, isCoverageConfirmation ? "使用已有 Skill,不生成草稿" : "关闭此事项") : null));
|
|
6513
6988
|
}), (0, react.createElement)(ManagedConfirmationModal, {
|
|
6514
6989
|
open: dismiss !== void 0,
|
|
6515
|
-
title: "
|
|
6516
|
-
description: "
|
|
6990
|
+
title: dismiss?.failureCode === "COVERED_NEEDS_CONFIRMATION" ? "使用已有 Skill,不生成新草稿?" : "确认关闭此待处理事项?",
|
|
6991
|
+
description: dismiss?.failureCode === "COVERED_NEEDS_CONFIRMATION" ? "确认后,此项将从待处理列表移除,Run2Skill 不会为这次经验生成新草稿;已有 Skill 和 DSH 原始会话记录不会改变。" : "关闭后,本次自动沉淀不会继续,也不会生成草稿;已有 Skill 和 DSH 的原始会话记录不会改变。",
|
|
6517
6992
|
disabled: pending !== void 0,
|
|
6518
6993
|
triggerRef: dismissTriggerRef,
|
|
6519
6994
|
onClose: () => {
|
|
6520
6995
|
setDismiss(void 0);
|
|
6521
6996
|
},
|
|
6522
|
-
confirmLabel: "确认关闭",
|
|
6997
|
+
confirmLabel: dismiss?.failureCode === "COVERED_NEEDS_CONFIRMATION" ? "使用已有 Skill" : "确认关闭",
|
|
6523
6998
|
onConfirm: () => {
|
|
6524
6999
|
const selected = dismiss;
|
|
6525
7000
|
setDismiss(void 0);
|
|
@@ -6584,7 +7059,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6584
7059
|
}, (0, react.createElement)("div", { ref: contentRef }));
|
|
6585
7060
|
}
|
|
6586
7061
|
function actionableProposalItems(actions, items) {
|
|
6587
|
-
const identities = new Set(actions.flatMap((action) => action.subjectId === void 0 || action.proposalRef === void 0 || ![
|
|
7062
|
+
const identities = new Set(actions.flatMap((action) => action.subjectId === void 0 || action.proposalRef === void 0 || ![
|
|
7063
|
+
"REVIEW_PROPOSAL",
|
|
7064
|
+
"REFRESH_PROPOSAL",
|
|
7065
|
+
"RETRY_PUBLICATION"
|
|
7066
|
+
].includes(action.kind ?? "") ? [] : [`${action.subjectId}\u0000${action.proposalRef.proposalId}\u0000${String(action.proposalRef.revision)}\u0000${action.proposalRef.digest}`]));
|
|
6588
7067
|
return items.filter((item) => identities.has(`${item.workItemId}\u0000${item.proposalRef.proposalId}\u0000${String(item.proposalRef.revision)}\u0000${item.proposalRef.digest}`));
|
|
6589
7068
|
}
|
|
6590
7069
|
function hostTabVisible(element) {
|
|
@@ -6693,7 +7172,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6693
7172
|
}, [props.active, refresh]);
|
|
6694
7173
|
const value = state.value;
|
|
6695
7174
|
if (value === void 0 || value.actions.length === 0 && value.runtimeWarnings.length === 0 && value.projectCompleteness !== "UNKNOWN" && value.runtimeCompleteness !== "UNKNOWN") return (0, react.createElement)(react.Fragment);
|
|
6696
|
-
return (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.toolbar }, (0, react.createElement)(react.Fragment, null, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, `${String(value.actions.length)} 项可操作事项`), value.projectCompleteness === "UNAVAILABLE" ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, "未选择当前项目") : value.projectCompleteness === "UNKNOWN" ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, "
|
|
7175
|
+
return (0, react.createElement)("div", { className: _run2skill_css_run2skill_settings_page_module_css_default.toolbar }, (0, react.createElement)(react.Fragment, null, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, `${String(value.actions.length)} 项可操作事项`), value.projectCompleteness === "UNAVAILABLE" ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, "未选择当前项目") : value.projectCompleteness === "UNKNOWN" ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, "当前项目的待处理状态暂时无法确认") : null, value.runtimeCompleteness === "UNKNOWN" ? (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Pill, null, "未保存数量未知") : null, ...value.runtimeWarnings.map((warning) => (0, react.createElement)("span", {
|
|
6697
7176
|
key: warning.noticeKey,
|
|
6698
7177
|
role: "alert"
|
|
6699
7178
|
}, warning.message ?? "存在尚未持久化的学习信号。"))));
|
|
@@ -6703,7 +7182,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6703
7182
|
const liveWorkspaceId = props.useWorkspaces?.((state) => state.items.find((workspace) => workspace.sessionIds?.includes(liveSessionId ?? ""))?.workspaceId);
|
|
6704
7183
|
const workspaceId = props.useSessions === void 0 ? props.workspaceId : liveWorkspaceId;
|
|
6705
7184
|
const sessionId = props.useSessions === void 0 ? props.sessionId : liveSessionId;
|
|
6706
|
-
const [open, setOpen] = (0, react.useState)(() => /* @__PURE__ */ new Set(["attention"]));
|
|
7185
|
+
const [open, setOpen] = (0, react.useState)(() => /* @__PURE__ */ new Set(["status", "attention"]));
|
|
6707
7186
|
const hostTab = useHostTabVisibility();
|
|
6708
7187
|
const [attention, setAttention] = (0, react.useState)();
|
|
6709
7188
|
const [attentionRefresh, setAttentionRefresh] = (0, react.useState)(0);
|
|
@@ -6740,14 +7219,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6740
7219
|
ref: hostTab.ref,
|
|
6741
7220
|
className: _run2skill_css_run2skill_settings_page_module_css_default.page,
|
|
6742
7221
|
"data-run2skill-settings-page": true
|
|
6743
|
-
}, (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, {
|
|
6744
7235
|
active: hostTab.visible && open.has("attention"),
|
|
6745
7236
|
...sessionId === void 0 ? {} : { sessionId },
|
|
6746
7237
|
...workspaceId === void 0 ? {} : { workspaceId },
|
|
6747
7238
|
callAttention: props.callAttention,
|
|
6748
7239
|
refreshGeneration: attentionRefresh,
|
|
6749
7240
|
onProjection: setAttention
|
|
6750
|
-
}), attention?.actions.some((action) => [
|
|
7241
|
+
}), attention?.actions.some((action) => [
|
|
7242
|
+
"REVIEW_PROPOSAL",
|
|
7243
|
+
"REFRESH_PROPOSAL",
|
|
7244
|
+
"RETRY_PUBLICATION"
|
|
7245
|
+
].includes(action.kind ?? "")) === true ? (0, react.createElement)(ProposalSettingsSection, {
|
|
6751
7246
|
...workspaceId === void 0 ? {} : { workspaceId },
|
|
6752
7247
|
callReview: props.callReview,
|
|
6753
7248
|
active: hostTab.visible && open.has("attention"),
|
|
@@ -6797,6 +7292,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6797
7292
|
const callReview = async (endpoint, payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, endpoint, payload, signal);
|
|
6798
7293
|
const callAttention = async (payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, "attention", payload, signal);
|
|
6799
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);
|
|
6800
7296
|
const callPurge = async (endpoint, payload, signal) => await context.connection.rpc.call(RUN2SKILL_RPC_CHANNEL, endpoint, payload, signal);
|
|
6801
7297
|
const purgeController = new PurgeSettingsController(callPurge, () => workspaceFor(context, currentSessionId(context)));
|
|
6802
7298
|
context.effect(() => {
|
|
@@ -6819,7 +7315,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6819
7315
|
sessionId: currentSessionId(context),
|
|
6820
7316
|
callAttention,
|
|
6821
7317
|
callReview,
|
|
6822
|
-
callActivity
|
|
7318
|
+
callActivity,
|
|
7319
|
+
callLearningStatus
|
|
6823
7320
|
})
|
|
6824
7321
|
}, Run2skillSettingsPage));
|
|
6825
7322
|
context.slots.inject("conversation.session.header.actions", () => context.slots.register({
|
|
@@ -6986,6 +7483,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6986
7483
|
exports.AutomaticLearningSettingsCard = AutomaticLearningSettingsCard;
|
|
6987
7484
|
exports.AutomaticLearningSettingsController = AutomaticLearningSettingsController;
|
|
6988
7485
|
exports.LearningFailureSection = LearningFailureSection;
|
|
7486
|
+
exports.LearningStatusSection = LearningStatusSection;
|
|
6989
7487
|
exports.OBSERVE_SUMMARY_POLL_INTERVAL_MS = OBSERVE_SUMMARY_POLL_INTERVAL_MS;
|
|
6990
7488
|
exports.ObserveSummaryPoller = ObserveSummaryPoller;
|
|
6991
7489
|
exports.PROPOSAL_ACTIVE_POLL_INTERVAL_MS = PROPOSAL_ACTIVE_POLL_INTERVAL_MS;
|
|
@@ -7008,9 +7506,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7008
7506
|
exports.apply = apply;
|
|
7009
7507
|
exports.applyAutomaticLearningSettingsClient = applyAutomaticLearningSettingsClient;
|
|
7010
7508
|
exports.applyRun2skillClient = applyRun2skillClient;
|
|
7509
|
+
exports.describePersistenceScope = describePersistenceScope;
|
|
7011
7510
|
exports.describeProcessingState = describeProcessingState;
|
|
7511
|
+
exports.describeProposalKind = describeProposalKind;
|
|
7012
7512
|
exports.describeProposalListItem = describeProposalListItem;
|
|
7013
7513
|
exports.describeProposalOutcome = describeProposalOutcome;
|
|
7514
|
+
exports.describeProposalScope = describeProposalScope;
|
|
7014
7515
|
exports.describeProposalSummaryState = describeProposalSummaryState;
|
|
7015
7516
|
exports.describePublicationOutcome = describePublicationOutcome;
|
|
7016
7517
|
exports.describeReviewDecision = describeReviewDecision;
|