@oxmumu3/dsh-plugin-finder 0.13.0 → 0.13.2
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/CHANGELOG.md +12 -0
- package/README.md +3 -3
- package/dist/client.js +880 -255
- package/docs/install.md +2 -2
- package/package.json +1 -1
- package/src/creator-strip.js +677 -159
- package/src/experience-style.js +15 -32
- package/src/experience-view.js +123 -38
- package/src/telemetry-config.js +1 -1
- package/src/v8-style.js +21 -2
package/dist/client.js
CHANGED
|
@@ -3745,20 +3745,27 @@ function createExperienceView(React2) {
|
|
|
3745
3745
|
}
|
|
3746
3746
|
if (state.view === "home" && !state.searching) return home();
|
|
3747
3747
|
if (state.view === "find" && state.stage === "describe" && !busy && !state.request && !plan) return home();
|
|
3748
|
+
const executionTitle = execution ? {
|
|
3749
|
+
preparing: "\u6B63\u5728\u51C6\u5907",
|
|
3750
|
+
running: execution.kind === "create" ? "\u6B63\u5728\u521B\u5EFA" : "\u6B63\u5728\u4F7F\u7528\u65B9\u6848",
|
|
3751
|
+
waiting: "\u7B49\u5F85\u7EE7\u7EED",
|
|
3752
|
+
completed: "\u672C\u6B21\u8FD0\u884C\u5DF2\u7ED3\u675F",
|
|
3753
|
+
failed: "\u8FD9\u6B21\u6CA1\u6709\u5B8C\u6210",
|
|
3754
|
+
cancelled: "\u5DF2\u505C\u6B62"
|
|
3755
|
+
}[execution.phase] || "\u5F53\u524D\u72B6\u6001" : "";
|
|
3756
|
+
const rawExecSummary = execution ? text11(execution.summary).trim() : "";
|
|
3757
|
+
const executionSummary = rawExecSummary && rawExecSummary !== executionTitle && !(execution?.phase === "completed" && rawExecSummary === "\u6267\u884C\u5DF2\u7ED3\u675F") ? execution.summary : "";
|
|
3748
3758
|
const executionView = execution ? h(
|
|
3749
3759
|
"section",
|
|
3750
3760
|
{ className: `pfv_execution pfv_execution_${execution.phase}`, role: execution.phase === "failed" ? "alert" : "status", "aria-label": "\u5F53\u524D\u6267\u884C\u72B6\u6001" },
|
|
3751
|
-
h(
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
paragraph(execution.summary),
|
|
3760
|
-
text11(execution.details) ? paragraph(execution.details, { className: "pfv_hint pfv_execution_details" }) : list2(strings2(execution.details)),
|
|
3761
|
-
execution.canContinue ? primary("\u7EE7\u7EED\u6267\u884C", () => controller.continueExecution(), { disabled: busy }) : null,
|
|
3761
|
+
h(
|
|
3762
|
+
"div",
|
|
3763
|
+
{ className: "pfv_execution_head_band" },
|
|
3764
|
+
h("div", { className: "pfv_execution_heading" }, h("h3", null, executionTitle), executionActive ? button2("\u505C\u6B62", () => controller.cancelExecution(), { className: "pfv_button pfv_quiet", "aria-label": "\u505C\u6B62\u5F53\u524D\u6267\u884C" }) : null),
|
|
3765
|
+
paragraph(executionSummary),
|
|
3766
|
+
text11(execution.details) ? paragraph(execution.details, { className: "pfv_hint pfv_execution_details" }) : list2(strings2(execution.details)),
|
|
3767
|
+
execution.canContinue ? primary("\u7EE7\u7EED\u6267\u884C", () => controller.continueExecution(), { disabled: busy }) : null
|
|
3768
|
+
),
|
|
3762
3769
|
sections.executionConversation
|
|
3763
3770
|
) : null;
|
|
3764
3771
|
const clarification = isCreating && question ? planSurface.clarification({
|
|
@@ -4085,6 +4092,45 @@ function createExperienceView(React2) {
|
|
|
4085
4092
|
),
|
|
4086
4093
|
expertSection || followup
|
|
4087
4094
|
);
|
|
4095
|
+
const creationSummaryRows = () => [
|
|
4096
|
+
["\u9996\u7248\u505A\u4EC0\u4E48", blueprint.scope],
|
|
4097
|
+
["\u600E\u6837\u4F7F\u7528", blueprint.workflow],
|
|
4098
|
+
["\u5F97\u5230\u4EC0\u4E48", blueprint.outputs],
|
|
4099
|
+
["\u6570\u636E\u4E0E\u6743\u9650", unique([text11(blueprint.data), text11(blueprint.tools)]).join("\uFF1B")],
|
|
4100
|
+
["\u5B8C\u6210\u6807\u51C6", blueprint.acceptance]
|
|
4101
|
+
].filter(([, value]) => text11(value));
|
|
4102
|
+
const startBlueprintAction = () => ({
|
|
4103
|
+
label: "\u5F00\u59CB\u521B\u5EFA",
|
|
4104
|
+
primary: true,
|
|
4105
|
+
onClick: () => !workspacePending && confirmOrRun({
|
|
4106
|
+
title: "\u5F00\u59CB\u5728\u5DE5\u4F5C\u533A\u521B\u5EFA\u8FD9\u4E2A\u63D2\u4EF6\uFF1F",
|
|
4107
|
+
body: "\u4F1A\u5148\u628A\u5F53\u524D\u65B9\u6848\u5B58\u6210\u8349\u7A3F\u5E76\u4EA4\u7ED9\u6267\u884C\u5BF9\u8BDD\uFF0C\u6309\u4E94\u6B65\u966A\u505A\u8282\u594F\u63A8\u8FDB\u3002",
|
|
4108
|
+
facts: [
|
|
4109
|
+
text11(blueprint?.name) ? { label: "\u63D2\u4EF6\u8349\u7A3F", value: text11(blueprint.name) } : null,
|
|
4110
|
+
text11(blueprint?.purpose) ? { label: "\u76EE\u6807", value: short2(blueprint.purpose, 80) } : null,
|
|
4111
|
+
state.executionWorkspaceLabel ? { label: "\u5DE5\u4F5C\u533A", value: text11(state.executionWorkspaceLabel) } : null
|
|
4112
|
+
].filter(Boolean),
|
|
4113
|
+
showWorkspacePicker: true,
|
|
4114
|
+
confirmLabel: "\u786E\u8BA4\u5F00\u59CB\u521B\u5EFA",
|
|
4115
|
+
cancelLabel: "\u518D\u6539\u6539"
|
|
4116
|
+
}, () => controller.createInWorkspace()),
|
|
4117
|
+
disabled: !canAct || workspacePending || Boolean(question)
|
|
4118
|
+
});
|
|
4119
|
+
const blueprintEditorDisclosure = () => disclosure("\u67E5\u770B\u4E0E\u7F16\u8F91\u8BE6\u7EC6\u65B9\u6848", h(
|
|
4120
|
+
React2.Fragment,
|
|
4121
|
+
null,
|
|
4122
|
+
...blueprintGroups.map((group, index) => h(
|
|
4123
|
+
"section",
|
|
4124
|
+
{ className: "pfv_blueprint_block", key: group.title },
|
|
4125
|
+
h("h3", null, group.title),
|
|
4126
|
+
h("dl", { className: "pfv_blueprint_values" }, ...group.fields.map(([key, label]) => h("div", { key }, h("dt", null, label), h("dd", null, text11(blueprint[key]) || "\u5F85\u8865\u5145")))),
|
|
4127
|
+
disclosure(`\u7F16\u8F91${group.title}`, h("div", { className: "pfv_block_editor" }, ...group.fields.map(([key, label]) => h("label", { key, className: "pfv_field", htmlFor: `pfv_field_${key}` }, label, h("textarea", { id: `pfv_field_${key}`, "aria-label": label, value: text11(blueprint[key]), maxLength: 4e3, disabled: locked, onChange: (event) => controller.editCreation({ blueprint: { [key]: event.target.value } }) })))), { key: `edit-${index}`, className: "pfv_disclosure pfv_edit_block" })
|
|
4128
|
+
)),
|
|
4129
|
+
paragraph(creation.reuseAssessment),
|
|
4130
|
+
list2(records2(creation.candidateDecisions).map((item) => `${records2(state.candidates).find((candidate) => candidate.id === item.pluginId)?.name || item.pluginId}\uFF1A${text11(item.reason)}`)),
|
|
4131
|
+
h("label", { className: "pfv_field", htmlFor: "pfv_assumptions" }, "\u5047\u8BBE\uFF0C\u6BCF\u884C\u4E00\u9879", h("textarea", { id: "pfv_assumptions", value: items7(form?.assumptions || creation.assumptions).filter((item) => typeof item === "string").join("\n"), maxLength: 6e3, disabled: locked, onChange: (event) => controller.editCreation({ assumptions: event.target.value.split("\n") }) })),
|
|
4132
|
+
state.creationDirty ? button2("\u4FDD\u5B58\u8349\u7A3F", () => controller.updateCreation(), { disabled: locked }) : null
|
|
4133
|
+
));
|
|
4088
4134
|
const blueprintView = () => {
|
|
4089
4135
|
if (!creation) return h(
|
|
4090
4136
|
"article",
|
|
@@ -4093,13 +4139,7 @@ function createExperienceView(React2) {
|
|
|
4093
4139
|
h("p", { className: "pf8_why" }, "\u6839\u636E\u8FD9\u6B21\u9700\u6C42\uFF0C\u6574\u7406\u9996\u7248\u8981\u505A\u4EC0\u4E48\u3002"),
|
|
4094
4140
|
!busy ? h("div", { className: "pf8_acts" }, v8Action({ label: "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6", primary: true, onClick: () => controller.startCreation(), disabled: !modelReady || !state.plan })) : null
|
|
4095
4141
|
);
|
|
4096
|
-
const summaryRows =
|
|
4097
|
-
["\u9996\u7248\u505A\u4EC0\u4E48", blueprint.scope],
|
|
4098
|
-
["\u600E\u6837\u4F7F\u7528", blueprint.workflow],
|
|
4099
|
-
["\u5F97\u5230\u4EC0\u4E48", blueprint.outputs],
|
|
4100
|
-
["\u6570\u636E\u4E0E\u6743\u9650", unique([text11(blueprint.data), text11(blueprint.tools)]).join("\uFF1B")],
|
|
4101
|
-
["\u5B8C\u6210\u6807\u51C6", blueprint.acceptance]
|
|
4102
|
-
].filter(([, value]) => text11(value));
|
|
4142
|
+
const summaryRows = creationSummaryRows();
|
|
4103
4143
|
const capabilities = capabilityMap();
|
|
4104
4144
|
return h(
|
|
4105
4145
|
"article",
|
|
@@ -4123,55 +4163,120 @@ function createExperienceView(React2) {
|
|
|
4123
4163
|
h(
|
|
4124
4164
|
"div",
|
|
4125
4165
|
{ className: "pf8_acts" },
|
|
4126
|
-
v8Action(
|
|
4127
|
-
label: "\u5F00\u59CB\u521B\u5EFA",
|
|
4128
|
-
primary: true,
|
|
4129
|
-
onClick: () => !workspacePending && confirmOrRun({
|
|
4130
|
-
title: "\u5F00\u59CB\u5728\u5DE5\u4F5C\u533A\u521B\u5EFA\u8FD9\u4E2A\u63D2\u4EF6\uFF1F",
|
|
4131
|
-
body: "\u4F1A\u5148\u628A\u5F53\u524D\u65B9\u6848\u5B58\u6210\u8349\u7A3F\u5E76\u4EA4\u7ED9\u6267\u884C\u5BF9\u8BDD\uFF0C\u6309\u4E94\u6B65\u966A\u505A\u8282\u594F\u63A8\u8FDB\u3002",
|
|
4132
|
-
facts: [
|
|
4133
|
-
text11(blueprint?.name) ? { label: "\u63D2\u4EF6\u8349\u7A3F", value: text11(blueprint.name) } : null,
|
|
4134
|
-
text11(blueprint?.purpose) ? { label: "\u76EE\u6807", value: short2(blueprint.purpose, 80) } : null,
|
|
4135
|
-
state.executionWorkspaceLabel ? { label: "\u5DE5\u4F5C\u533A", value: text11(state.executionWorkspaceLabel) } : null
|
|
4136
|
-
].filter(Boolean),
|
|
4137
|
-
showWorkspacePicker: true,
|
|
4138
|
-
confirmLabel: "\u786E\u8BA4\u5F00\u59CB\u521B\u5EFA",
|
|
4139
|
-
cancelLabel: "\u518D\u6539\u6539"
|
|
4140
|
-
}, () => controller.createInWorkspace()),
|
|
4141
|
-
disabled: !canAct || workspacePending || Boolean(question)
|
|
4142
|
-
}),
|
|
4166
|
+
v8Action(startBlueprintAction()),
|
|
4143
4167
|
v8Action({ label: "\u56DE\u770B\u65B9\u6848", onClick: () => controller.showFind(), disabled: locked })
|
|
4144
4168
|
),
|
|
4145
4169
|
h("p", { className: "pf8_next" }, "\u4F1A\u5148\u5728\u53D1\u73B0\u597D\u63D2\u4EF6\u91CC\u5B58\u4E00\u4EFD\u8349\u7A3F\uFF0C\u518D\u4ECE\u7B2C\u4E00\u6B65\u5F00\u59CB\uFF1B\u968F\u65F6\u53EF\u4EE5\u56DE\u6765\u6539\u3002")
|
|
4146
4170
|
) : null,
|
|
4147
4171
|
state.creationDirty ? h("p", { className: "pf8_fine", role: "status" }, "\u4FEE\u6539\u5DF2\u4FDD\u7559\uFF0C\u5F00\u59CB\u521B\u5EFA\u65F6\u4F1A\u4E00\u5E76\u4F7F\u7528\u3002") : null,
|
|
4148
|
-
|
|
4172
|
+
blueprintEditorDisclosure()
|
|
4173
|
+
);
|
|
4174
|
+
};
|
|
4175
|
+
const execActionBtn = (action) => h("button", {
|
|
4176
|
+
key: action.label,
|
|
4177
|
+
type: "button",
|
|
4178
|
+
className: action.primary ? "pf8_btn pf8_ink pfv_primary" : "pf8_btn",
|
|
4179
|
+
disabled: Boolean(action.disabled),
|
|
4180
|
+
onClick: action.onClick
|
|
4181
|
+
}, action.label);
|
|
4182
|
+
const execBar = ({ kicker, title, chips = [], actions = [] }) => h(
|
|
4183
|
+
"div",
|
|
4184
|
+
{ className: "pf8_exec_bar" },
|
|
4185
|
+
h(
|
|
4186
|
+
"div",
|
|
4187
|
+
{ className: "pf8_exec_plan_main" },
|
|
4188
|
+
h("span", { className: "pf8_exec_kicker" }, kicker),
|
|
4189
|
+
h("strong", { className: "pf8_exec_title" }, title),
|
|
4190
|
+
chips.length ? h("span", { className: "pf8_exec_chips" }, ...chips.map((block, index) => h("span", { key: `${block.kind}-${index}`, className: `pf8_exec_chip ${block.kind}` }, h("code", null, text11(block.name))))) : null
|
|
4191
|
+
),
|
|
4192
|
+
actions.length ? h("div", { className: "pf8_exec_acts" }, ...actions.map(execActionBtn)) : null
|
|
4193
|
+
);
|
|
4194
|
+
const execDetailsFold = (content) => content ? h(
|
|
4195
|
+
"details",
|
|
4196
|
+
{ className: "pf8_disclosure pf8_exec_details" },
|
|
4197
|
+
h("summary", { className: "pf8_lk" }, "\u67E5\u770B\u672C\u6B21\u65B9\u6848\u8BE6\u60C5"),
|
|
4198
|
+
h("div", { className: "pf8_disclosure_body" }, content)
|
|
4199
|
+
) : null;
|
|
4200
|
+
const completedCreationAction = execution?.phase === "completed" && execution.kind === "use" ? { label: "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6", onClick: () => controller.startCreation(), disabled: locked || !modelReady } : null;
|
|
4201
|
+
const executionOverview = () => {
|
|
4202
|
+
if (isCreating) {
|
|
4203
|
+
if (!creation) {
|
|
4204
|
+
return execBar({
|
|
4205
|
+
kicker: "\u63D2\u4EF6\u65B9\u6848",
|
|
4206
|
+
title: busy ? "\u6B63\u5728\u6574\u7406\u63D2\u4EF6\u65B9\u6848" : "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6",
|
|
4207
|
+
actions: !busy ? [{ label: "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6", primary: true, onClick: () => controller.startCreation(), disabled: !modelReady || !state.plan }] : []
|
|
4208
|
+
});
|
|
4209
|
+
}
|
|
4210
|
+
const summaryRows = creationSummaryRows();
|
|
4211
|
+
const capabilities = capabilityMap();
|
|
4212
|
+
const actions = showActions ? [startBlueprintAction(), { label: "\u56DE\u770B\u65B9\u6848", onClick: () => controller.showFind(), disabled: locked }] : [];
|
|
4213
|
+
return h(
|
|
4149
4214
|
React2.Fragment,
|
|
4150
4215
|
null,
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4216
|
+
execBar({ kicker: "\u63D2\u4EF6\u65B9\u6848", title: text11(blueprint.name) || "\u6211\u7684\u63D2\u4EF6", actions }),
|
|
4217
|
+
clarification,
|
|
4218
|
+
showActions && (workspacePicker || workspaceStatus) ? h("div", { className: "pf8_exec_recovery" }, workspacePicker, workspaceStatus) : null,
|
|
4219
|
+
state.creationDirty ? h("p", { className: "pf8_fine", role: "status" }, "\u4FEE\u6539\u5DF2\u4FDD\u7559\uFF0C\u5F00\u59CB\u521B\u5EFA\u65F6\u4F1A\u4E00\u5E76\u4F7F\u7528\u3002") : null,
|
|
4220
|
+
execDetailsFold(h(
|
|
4221
|
+
React2.Fragment,
|
|
4222
|
+
null,
|
|
4223
|
+
text11(blueprint.purpose) ? h("p", { className: "pf8_why" }, short2(blueprint.purpose, 260)) : null,
|
|
4224
|
+
summaryRows.length ? h("dl", { className: "pfv_creation_summary" }, ...summaryRows.map(([label, value]) => h("div", { key: label }, h("dt", null, label), h("dd", null, short2(value, 200))))) : null,
|
|
4225
|
+
capabilities,
|
|
4226
|
+
blueprintEditorDisclosure()
|
|
4227
|
+
))
|
|
4228
|
+
);
|
|
4229
|
+
}
|
|
4230
|
+
if (uncertainGap) {
|
|
4231
|
+
const actions = showActions ? [retryAction(), plan ? { label: "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6", onClick: () => controller.startCreation(), disabled: !canAct } : null].filter(Boolean) : completedCreationAction ? [completedCreationAction] : [];
|
|
4232
|
+
return h(
|
|
4233
|
+
React2.Fragment,
|
|
4234
|
+
null,
|
|
4235
|
+
execBar({ kicker: "\u6765\u6E90\u5F85\u6838\u5BF9", title: "\u8FD9\u6B21\u6CA1\u67E5\u5B8C\uFF0C\u5148\u4E0D\u7ED9\u4F60\u7ED3\u8BBA", actions }),
|
|
4236
|
+
execDetailsFold(h(
|
|
4237
|
+
React2.Fragment,
|
|
4238
|
+
null,
|
|
4239
|
+
h("p", { className: "pf8_why" }, text11(health?.message) || "\u90E8\u5206\u6765\u6E90\u6CA1\u6709\u8BFB\u56DE\u6765\uFF0C\u53EA\u51ED\u5DF2\u7ECF\u8BFB\u5230\u7684\u5185\u5BB9\u4E0B\u7ED3\u8BBA\uFF0C\u5BB9\u6613\u8BA9\u4F60\u88C5\u9519\u3002"),
|
|
4240
|
+
plan ? planSurface.solution({ request, understanding: "", plan, candidates: outcome.candidates, discovery, searchedAt, actions: [], note: "", showSignature: false, compact: true, embedded: true }) : null
|
|
4241
|
+
))
|
|
4242
|
+
);
|
|
4243
|
+
}
|
|
4244
|
+
if (plan) {
|
|
4245
|
+
const execBlocks = planSurface.planBlocks({ plan, candidates: outcome.candidates, request });
|
|
4246
|
+
const secondary = !needsCreation || uncertainGap ? { label: "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6", onClick: () => controller.startCreation(), disabled: !canAct } : null;
|
|
4247
|
+
const execActions = showActions ? [primaryAction(), secondary].filter(Boolean) : completedCreationAction ? [completedCreationAction] : [];
|
|
4248
|
+
return h(
|
|
4249
|
+
React2.Fragment,
|
|
4250
|
+
null,
|
|
4251
|
+
execBar({ kicker: "\u672C\u6B21\u65B9\u6848", title: text11(plan.title) || "\u5F53\u524D\u65B9\u6848", chips: execBlocks, actions: execActions }),
|
|
4252
|
+
showActions && (workspacePicker || workspaceStatus) ? h("div", { className: "pf8_exec_recovery" }, workspacePicker, workspaceStatus) : null,
|
|
4253
|
+
execDetailsFold(planSurface.solution({
|
|
4254
|
+
request,
|
|
4255
|
+
understanding: "",
|
|
4256
|
+
plan,
|
|
4257
|
+
candidates: outcome.candidates,
|
|
4258
|
+
discovery,
|
|
4259
|
+
searchedAt,
|
|
4260
|
+
actions: [],
|
|
4261
|
+
note: "",
|
|
4262
|
+
showSignature: true,
|
|
4263
|
+
compact: true,
|
|
4264
|
+
embedded: true
|
|
4265
|
+
}))
|
|
4266
|
+
);
|
|
4267
|
+
}
|
|
4268
|
+
const fallbackActions = !showFindCard && showActions && (state.intent || request) ? [retryAction()] : [];
|
|
4269
|
+
return execBar({
|
|
4270
|
+
kicker: "\u672C\u6B21\u65B9\u6848",
|
|
4271
|
+
title: showFindCard ? "\u6B63\u5728\u66FF\u4F60\u627E" : "\u7EE7\u7EED\u67E5\u627E\u65B9\u6848",
|
|
4272
|
+
actions: fallbackActions
|
|
4273
|
+
});
|
|
4164
4274
|
};
|
|
4165
|
-
const completedCreation = execution?.phase === "completed" && execution.kind === "use" ? h("div", { className: "pf8_acts" }, v8Action({ label: "\u521B\u5EFA\u81EA\u5DF1\u7684\u63D2\u4EF6", onClick: () => controller.startCreation(), disabled: locked || !modelReady })) : null;
|
|
4166
4275
|
const body = startingNew ? searchingCard() : execution ? h(
|
|
4167
4276
|
"div",
|
|
4168
4277
|
{ className: "pfv_result_grid" },
|
|
4169
4278
|
h("div", { className: "pfv_result_primary" }, executionView),
|
|
4170
|
-
h(
|
|
4171
|
-
"aside",
|
|
4172
|
-
{ className: "pfv_solution_overview", "aria-label": "\u672C\u6B21\u80FD\u529B\u65B9\u6848" },
|
|
4173
|
-
isCreating ? blueprintView() : h(React2.Fragment, null, planCardArea(), completedCreation)
|
|
4174
|
-
)
|
|
4279
|
+
h("aside", { className: "pfv_solution_overview", "aria-label": "\u672C\u6B21\u80FD\u529B\u65B9\u6848" }, executionOverview())
|
|
4175
4280
|
) : isCreating ? blueprintView() : h("section", { className: "pf8_planwrap", "aria-label": "\u5F53\u524D\u65B9\u6848" }, expertPlanCard, planCardArea());
|
|
4176
4281
|
return h(
|
|
4177
4282
|
"div",
|
|
@@ -4729,12 +4834,18 @@ var v8Css = `
|
|
|
4729
4834
|
.pf_v8 .pf8_drafts .pf8_btn { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 18px; color: var(--ink); background: transparent; font-size: 13.5px; }
|
|
4730
4835
|
.pf_v8 .pf8_drafts .pf8_lk { padding: 0; border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; color: var(--ink2); background: none; font-size: 13px; }
|
|
4731
4836
|
.pf_root.pf_v2 .pf_footer { max-width: 1080px; margin: 0 auto; padding: 0 40px 56px; border-top: 0; }
|
|
4837
|
+
.pf_root.pf_v2:has(.pf8_narrow) .pf_footer { max-width: 860px; }
|
|
4838
|
+
.pf_root.pf_v2:has(.pf8_shopw) .pf_footer, .pf_root.pf_v2:has(.pf8_histwrap) .pf_footer { max-width: 920px; }
|
|
4732
4839
|
.pf_root.pf_v2 .pf_footer .pf_details { border-top: 0; }
|
|
4733
|
-
.pf_root.pf_v2 .pf_footer .pf_details > summary { font-size: 13px; color: var(--ink3); }
|
|
4734
|
-
.pf_root.pf_v2 .pf_footer .pf_details > summary { list-style: none; cursor: pointer; }
|
|
4840
|
+
.pf_root.pf_v2 .pf_footer .pf_details > summary { min-height: 26px; padding-block: 2px; font-size: 13px; color: var(--ink3); list-style: none; cursor: pointer; }
|
|
4735
4841
|
.pf_root.pf_v2 .pf_footer .pf_details > summary::-webkit-details-marker { display: none; }
|
|
4736
4842
|
.pf_root.pf_v2 .pf_footer .pf_details > summary::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: 7px; vertical-align: 1px; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
|
|
4737
4843
|
.pf_root.pf_v2 .pf_footer .pf_details[open] > summary::before { vertical-align: 0; border-left: 0; border-top: 5px solid currentColor; border-right: 4px solid transparent; border-bottom: 0; border-left: 4px solid transparent; }
|
|
4844
|
+
.pf_root.pf_v2:has(.pfv_result_grid) > .pf_inner { padding-top: 10px; }
|
|
4845
|
+
.pf_v8.pf8_findpage:has(.pfv_result_grid) .pf8_wrap { padding-top: 12px; padding-bottom: 14px; }
|
|
4846
|
+
.pf_v8.pf8_findpage:has(.pfv_result_grid) .pf8_top { margin-bottom: 16px; }
|
|
4847
|
+
.pf_v8.pf8_findpage:has(.pfv_result_grid) .pf8_folds { margin-top: 12px; }
|
|
4848
|
+
.pf_root.pf_v2:has(.pfv_result_grid) .pf_footer { margin-top: 8px; padding-bottom: 18px; }
|
|
4738
4849
|
.pf_v8.pf8_flowback { width: calc(100% - 80px); max-width: 840px; margin: 0 auto 12px; }
|
|
4739
4850
|
@container finder (max-width: 700px) { .pf_v8.pf8_flowback { width: calc(100% - 32px); } }
|
|
4740
4851
|
@container finder (max-width: 700px) { .pf_v8 .pf8_oppcard { max-width: none; } }
|
|
@@ -4983,6 +5094,19 @@ var v8Css = `
|
|
|
4983
5094
|
.pf_modal_ws { margin-top: 14px; display: grid; gap: 6px; font-size: 13px; color: var(--ink2); }
|
|
4984
5095
|
.pf_modal_ws select { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }
|
|
4985
5096
|
.pf_modal_acts { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
|
|
5097
|
+
.pf_v8 .pf8_exec_bar { display: flex; align-items: safe center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; min-inline-size: 0; }
|
|
5098
|
+
.pf_v8 .pf8_exec_plan_main { display: flex; align-items: baseline; gap: 8px 10px; flex-wrap: wrap; flex: 1 1 260px; min-inline-size: 0; }
|
|
5099
|
+
.pf_v8 .pf8_exec_kicker { font-size: 12px; color: var(--ink3); white-space: nowrap; }
|
|
5100
|
+
.pf_v8 .pf8_exec_title { font: 500 15px/1.45 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
|
|
5101
|
+
.pf_v8 .pf8_exec_chips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-inline-size: 0; }
|
|
5102
|
+
.pf_v8 .pf8_exec_chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; background: var(--subtle); color: var(--ink2); max-inline-size: 100%; }
|
|
5103
|
+
.pf_v8 .pf8_exec_chip.have { background: color-mix(in srgb, var(--have) 11%, transparent); color: color-mix(in srgb, var(--have) 88%, var(--ink)); }
|
|
5104
|
+
.pf_v8 .pf8_exec_chip.build { background: color-mix(in srgb, var(--build) 12%, transparent); color: color-mix(in srgb, var(--build) 80%, var(--ink)); }
|
|
5105
|
+
.pf_v8 .pf8_exec_chip code { font: 500 11.5px/1 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 220px; }
|
|
5106
|
+
.pf_v8 .pf8_exec_acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
|
|
5107
|
+
.pf_v8 .pf8_exec_recovery { margin-top: 10px; display: grid; gap: 8px; }
|
|
5108
|
+
.pf_v8 .pf8_exec_details { margin-top: 8px; }
|
|
5109
|
+
.pf_v8 .pf8_exec_details > summary { min-height: 24px; padding-block: 2px; line-height: 1.5; }
|
|
4986
5110
|
|
|
4987
5111
|
`;
|
|
4988
5112
|
|
|
@@ -5533,41 +5657,24 @@ var experienceV3Css = `
|
|
|
5533
5657
|
.pfv_capability_gap { border-style: dashed; border-color: color-mix(in srgb, var(--pfv_accent) 45%, var(--pfv_line)); background: var(--pfv_tint); }
|
|
5534
5658
|
.pfv_capability_gap .pfv_capability_kind { color: var(--pfv_accent); }
|
|
5535
5659
|
|
|
5536
|
-
/* Runtime output owns the
|
|
5660
|
+
/* Runtime output owns the full width; the saved plan sits below as a compact expandable bar. */
|
|
5537
5661
|
.pfv_outcome_document.pfv_outcome_live { padding: 0; border: 0; box-shadow: none; background: transparent; }
|
|
5538
|
-
.pfv_result_grid { display: grid; grid-template-columns: minmax(0, 1fr)
|
|
5539
|
-
.pfv_result_primary { min-
|
|
5540
|
-
.pfv_result_primary .pfv_execution { margin: 0; padding: 20px; background: var(--pfv_paper); border: 1px solid var(--pfv_line); border-radius:
|
|
5541
|
-
.pfv_result_primary .
|
|
5542
|
-
.pfv_result_primary .pfv_execution_heading
|
|
5543
|
-
.pfv_result_primary .
|
|
5544
|
-
.pfv_result_primary .
|
|
5545
|
-
.
|
|
5546
|
-
.
|
|
5547
|
-
.
|
|
5548
|
-
.pfv_solution_overview
|
|
5549
|
-
.pfv_solution_overview .pfv_capabilities_heading .pfv_hint { display: none; }
|
|
5550
|
-
.pfv_solution_overview .pfv_capability_map { grid-template-columns: minmax(0, 1fr); gap: 0; border-block: 1px solid var(--pfv_line); }
|
|
5551
|
-
.pfv_solution_overview .pfv_capability_item { padding: 14px 0; border: 0; border-bottom: 1px solid var(--pfv_line); border-radius: 0; background: transparent; }
|
|
5552
|
-
.pfv_solution_overview .pfv_capability_item:last-child { border-bottom: 0; }
|
|
5553
|
-
.pfv_solution_overview .pfv_capability_gap { padding-left: 12px; border-left: 2px solid var(--pfv_accent); }
|
|
5554
|
-
.pfv_solution_overview .pfv_capability_kind { margin-bottom: 4px; }
|
|
5555
|
-
.pfv_solution_overview .pfv_capability_item strong { font-size: 14px; }
|
|
5556
|
-
.pfv_solution_overview .pfv_outcome_actions { gap: 6px; margin-top: 16px; }
|
|
5557
|
-
.pfv_solution_overview .pfv_outcome_actions .pfv_button { font-size: 13px; min-width: 0; }
|
|
5558
|
-
.pfv_solution_overview .pfv_prerequisites { padding: 0; border-radius: 0; background: transparent; }
|
|
5559
|
-
.pfv_solution_overview .pfv_prerequisites .pfv_list { font-size: 12px; color: var(--pfv_muted); }
|
|
5560
|
-
@container finder (max-width: 900px) {
|
|
5561
|
-
.pfv_result_grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
|
|
5562
|
-
.pfv_solution_overview { border-top: 1px solid var(--pfv_line); padding-top: 20px; }
|
|
5563
|
-
.pfv_solution_overview .pfv_capability_map { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; border: 0; }
|
|
5564
|
-
.pfv_solution_overview .pfv_capability_item { padding: 14px; border: 1px solid var(--pfv_line); border-radius: 10px; background: var(--pfv_paper); }
|
|
5565
|
-
.pfv_solution_overview .pfv_capability_gap { border-style: dashed; border-color: var(--pfv_accent); }
|
|
5566
|
-
}
|
|
5662
|
+
.pfv_result_grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
|
|
5663
|
+
.pfv_result_primary { min-inline-size: 0; }
|
|
5664
|
+
.pfv_result_primary .pfv_execution { margin: 0; padding: 18px 22px 20px; background: var(--card, var(--pfv_paper)); border: 1px solid var(--line2, var(--pfv_line)); border-radius: 22px; box-shadow: none; }
|
|
5665
|
+
.pfv_result_primary .pfv_execution_head_band { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line, var(--pfv_line)); }
|
|
5666
|
+
.pfv_result_primary .pfv_execution_heading { display: flex; align-items: safe center; justify-content: space-between; gap: 12px; padding-bottom: 0; border-bottom: 0; }
|
|
5667
|
+
.pfv_result_primary .pfv_execution_heading h3 { font: 600 15.5px/1.4 var(--sans, inherit); color: var(--ink, var(--pfv_ink)); }
|
|
5668
|
+
.pfv_result_primary .pfv_execution_head_band > .pfv_prose { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink3, var(--pfv_muted)); }
|
|
5669
|
+
.pfv_result_primary .pfv_execution_details { margin-top: 2px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
5670
|
+
.pfv_result_primary .pf_execution_conversation { min-inline-size: 0; margin-top: 12px; min-height: 320px !important; height: clamp(340px, calc(100vh - 380px), 680px) !important; height: clamp(340px, calc(100dvh - 380px), 680px) !important; }
|
|
5671
|
+
.pfv_result_primary .pf_execution_file_preview { min-inline-size: 0; }
|
|
5672
|
+
.pfv_solution_overview { min-inline-size: 0; padding: 14px 20px; border: 1px solid var(--line, var(--pfv_line)); border-radius: 18px; background: var(--card, var(--pfv_paper)); }
|
|
5567
5673
|
@container finder (max-width: 520px) {
|
|
5568
5674
|
.pfv_capability_map_hybrid { grid-template-columns: minmax(0, 1fr); }
|
|
5569
|
-
.pfv_result_primary .pfv_execution { padding: 16px; }
|
|
5570
|
-
.pfv_result_primary .pf_execution_conversation { min-height: 300px !important; height:
|
|
5675
|
+
.pfv_result_primary .pfv_execution { padding: 14px 16px 16px; border-radius: 18px; }
|
|
5676
|
+
.pfv_result_primary .pf_execution_conversation { min-height: 280px !important; height: clamp(300px, calc(100vh - 340px), 560px) !important; height: clamp(300px, calc(100dvh - 340px), 560px) !important; }
|
|
5677
|
+
.pfv_solution_overview { padding: 12px 16px; border-radius: 16px; }
|
|
5571
5678
|
.pf_v2 .pfv_expert_identity h1 { font-size: 25px; }
|
|
5572
5679
|
}
|
|
5573
5680
|
|
|
@@ -5850,13 +5957,124 @@ var ORDER = Object.fromEntries(STAGES.map((stage, index) => [stage.id, index]));
|
|
|
5850
5957
|
var LABEL = { ...Object.fromEntries(STAGES.map((stage) => [stage.id, stage.label])), blocked: "\u5361\u4F4F\u4E86" };
|
|
5851
5958
|
var PLAIN = {
|
|
5852
5959
|
search: "\u5148\u770B\u770B\u6709\u6CA1\u6709\u73B0\u6210\u7684",
|
|
5853
|
-
design: "\
|
|
5854
|
-
skeleton: "\u5148\u642D\
|
|
5855
|
-
feature: "\u4E00\u6B21\u52A0\u4E00\u4E2A\u529F\u80FD",
|
|
5856
|
-
verify: "\
|
|
5960
|
+
design: "\u5148\u5BF9\u9F50 3 \u53E5\u8BDD\u65B9\u6848",
|
|
5961
|
+
skeleton: "\u5148\u642D\u80FD\u70B9\u5F00\u7684\u7A7A\u67B6\u5B50",
|
|
5962
|
+
feature: "\u4E00\u6B21\u53EA\u52A0\u4E00\u4E2A\u6838\u5FC3\u529F\u80FD",
|
|
5963
|
+
verify: "\u6309\u63D0\u793A\u5237\u65B0\u6838\u5BF9\u5B9E\u6548",
|
|
5857
5964
|
blocked: "\u5361\u4F4F\u4E86"
|
|
5858
5965
|
};
|
|
5859
|
-
var
|
|
5966
|
+
var STAGE_SHORT = Object.freeze({
|
|
5967
|
+
search: "\u67E5\u73B0\u6210",
|
|
5968
|
+
design: "\u5B9A\u65B9\u6848",
|
|
5969
|
+
skeleton: "\u642D\u67B6\u5B50",
|
|
5970
|
+
feature: "\u52A0\u529F\u80FD",
|
|
5971
|
+
verify: "\u5F85\u9A8C\u6536"
|
|
5972
|
+
});
|
|
5973
|
+
var STAGE_HINTS = Object.freeze({
|
|
5974
|
+
search: "\u6709\u73B0\u6210\u63D2\u4EF6\u4F18\u5148\u590D\u7528\uFF0C\u786E\u5B9E\u6CA1\u6709\u518D\u81EA\u5DF1\u9020",
|
|
5975
|
+
design: "\u5148\u786E\u8BA4\u6302\u5728\u54EA\u3001\u5E73\u65F6\u600E\u4E48\u7528\uFF0C\u518D\u8BA9\u5B83\u5199\u4EE3\u7801",
|
|
5976
|
+
skeleton: "\u5148\u70B9\u5F00\u770B\u4F4D\u7F6E\u548C\u5165\u53E3\u6CA1\u767D\u5C4F\uFF0C\u5148\u4E0D\u7BA1\u7EC6\u8282",
|
|
5977
|
+
feature: "\u770B\u4E00\u773C\u521A\u52A0\u7684\u529F\u80FD\u987A\u4E0D\u987A\u624B\uFF0C\u4E00\u6B21\u53EA\u6539\u4E00\u5904",
|
|
5978
|
+
verify: "\u6309 \u2318R \u5237\u65B0\u770B\u5B9E\u6548\uFF08\u6539\u4E86\u540E\u53F0\u6216\u5DE5\u5177\u9700\u9000\u51FA\u91CD\u5F00 DSH\uFF09"
|
|
5979
|
+
});
|
|
5980
|
+
var STAGE_LESSONS = Object.freeze({
|
|
5981
|
+
search: [
|
|
5982
|
+
"\u5148\u641C\u793E\u533A\u73B0\u6210\u63D2\u4EF6\u80FD\u7701\u6389\u5927\u91CF\u91CD\u590D\u9020\u8F6E\u5B50\uFF1B\u771F\u6CA1\u6709\u73B0\u6210\u7684\uFF0C\u4E5F\u53EF\u6311\u6700\u63A5\u8FD1\u7684\u8BA9 AI \u7167\u7740\u6539\u3002",
|
|
5983
|
+
"\u804A\u5B8C\u53D1\u73B0\u73B0\u6210\u7684\u5C31\u80FD\u7528\u65F6\uFF0C\u76F4\u63A5\u88C5\u73B0\u6210\u63D2\u4EF6\u6700\u7A33\u3002"
|
|
5984
|
+
],
|
|
5985
|
+
design: [
|
|
5986
|
+
"\u52A8\u624B\u524D\u53EA\u5BF9\u9F50\u4E09\u4EF6\u4E8B\uFF1A\u5165\u53E3\u6302\u5728\u54EA\uFF08\u4FA7\u680F\u3001\u9876\u90E8\u6807\u7B7E\u8FD8\u662F\u60AC\u6D6E\u7A97\uFF09\u3001\u5360\u591A\u5927\u7A7A\u95F4\u3001\u6570\u636E\u5B58\u54EA\u3002",
|
|
5987
|
+
"\u9996\u7248\u780D\u6389\u9526\u4E0A\u6DFB\u82B1\u7684\u529F\u80FD\uFF0C\u8D8A\u805A\u7126\u8D8A\u5BB9\u6613\u4E00\u6B21\u505A\u6210\u3002"
|
|
5988
|
+
],
|
|
5989
|
+
skeleton: [
|
|
5990
|
+
"\u7B2C\u4E00\u7248\u53EA\u8981\u80FD\u70B9\u5F00\u3001\u4E0D\u767D\u5C4F\u3001\u4F4D\u7F6E\u987A\u773C\u5C31\u7B97\u8FC7\u5173\uFF0C\u522B\u4E00\u53E3\u6C14\u585E\u6EE1\u6240\u6709\u529F\u80FD\u3002",
|
|
5991
|
+
"\u5165\u53E3\u4F4D\u7F6E\u5982\u679C\u4E0D\u987A\u624B\uFF0C\u8D81\u73B0\u5728\u8FD8\u6CA1\u5806\u903B\u8F91\u65F6\u6362\u4F4D\u7F6E\u6700\u8F7B\u677E\u3002"
|
|
5992
|
+
],
|
|
5993
|
+
feature: [
|
|
5994
|
+
"\u6BCF\u6B21\u53EA\u63D0 1\u20132 \u4E2A\u5177\u4F53\u8C03\u6574\uFF08\u5982\u201C\u538B\u5C0F\u5B57\u53F7\u201D\u201C\u53EA\u7559\u4E09\u9879\u6307\u6807\u201D\uFF09\uFF0C\u6BD4\u4E00\u6B21\u6539\u5341\u5904\u7A33\u5F97\u591A\u3002",
|
|
5995
|
+
"\u6BCF\u52A0\u5B8C\u4E00\u5757\u90FD\u987A\u624B\u70B9\u4E00\u4E0B\uFF0C\u786E\u8BA4\u6CA1\u628A\u4E0A\u4E00\u7248\u505A\u597D\u7684\u5730\u65B9\u6539\u574F\u3002"
|
|
5996
|
+
],
|
|
5997
|
+
verify: [
|
|
5998
|
+
"\u53EA\u6539\u754C\u9762\u6837\u5F0F\u6309 \u2318R \u5373\u53EF\u751F\u6548\uFF1B\u65B0\u52A0\u4E86\u5DE5\u5177\u3001\u540E\u53F0\u63A5\u53E3\u6216\u91CD\u88C5\u540C\u540D\u63D2\u4EF6\uFF0C\u9700 \u2318Q \u9000\u51FA\u91CD\u5F00 DSH\u3002",
|
|
5999
|
+
"\u987A\u624B\u5207\u4E00\u4E0B\u6DF1\u8272/\u6D45\u8272\u548C\u7A84\u7A97\u53E3\uFF0C\u770B\u6709\u6CA1\u6709\u6324\u7206\u3001\u906E\u6321\u6216\u770B\u4E0D\u6E05\u7684\u5B57\u3002"
|
|
6000
|
+
],
|
|
6001
|
+
blocked: [
|
|
6002
|
+
"\u540C\u4E00\u95EE\u9898\u8FDE\u6539\u4E09\u8F6E\u6CA1\u597D\uFF0C\u7EE7\u7EED\u5728\u957F\u5BF9\u8BDD\u91CC\u786C\u78E8\u53EA\u4F1A\u8D8A\u6539\u8D8A\u4E71\u3001\u8D8A\u82B1\u8D8A\u591A Token\uFF1B\u5E26\u8FDB\u5C55\u6362\u5E72\u51C0\u7A97\u53E3\u6700\u5212\u7B97\u3002"
|
|
6003
|
+
]
|
|
6004
|
+
});
|
|
6005
|
+
var STARTER_CHIPS = Object.freeze([
|
|
6006
|
+
{
|
|
6007
|
+
label: "\u5148\u67E5\u6709\u6CA1\u6709\u73B0\u6210\u7684",
|
|
6008
|
+
prompt: "\u6211\u60F3\u505A\u4E00\u4E2A\u529F\u80FD\uFF1A___\u3002\u5148\u522B\u6025\u7740\u5199\u4EE3\u7801\uFF0C\u8BF7\u5148\u7528 finder_search \u67E5\u67E5\u793E\u533A\u6709\u6CA1\u6709\u73B0\u6210\u6216\u76F8\u8FD1\u7684\u63D2\u4EF6\u3002"
|
|
6009
|
+
},
|
|
6010
|
+
{
|
|
6011
|
+
label: "\u5148\u5BF9\u9F50 3 \u53E5\u8BDD\u65B9\u6848",
|
|
6012
|
+
prompt: "\u6211\u60F3\u81EA\u5DF1\u505A\u4E00\u4E2A\u5C0F\u63D2\u4EF6\uFF1A___\u3002\u5148\u522B\u5199\u4EE3\u7801\uFF0C\u8BF7\u7528\u4E09\u4E94\u53E5\u5927\u767D\u8BDD\u8DDF\u6211\u786E\u8BA4\u5165\u53E3\u6302\u5728\u54EA\u3001\u600E\u4E48\u4EA4\u4E92\u3001\u6570\u636E\u5B58\u54EA\u3002"
|
|
6013
|
+
},
|
|
6014
|
+
{
|
|
6015
|
+
label: "\u642D\u6700\u5C0F\u53EF\u70B9\u5F00\u521D\u7248",
|
|
6016
|
+
prompt: "\u6211\u60F3\u505A\uFF1A___\u3002\u7B2C\u4E00\u7248\u8BF7\u53EA\u642D\u4E00\u4E2A\u6700\u5C0F\u80FD\u70B9\u5F00\u3001\u4E0D\u767D\u5C4F\u7684\u7A7A\u67B6\u5B50\uFF0C\u6211\u786E\u8BA4\u4F4D\u7F6E\u987A\u773C\u540E\u518D\u9010\u4E2A\u52A0\u529F\u80FD\u3002"
|
|
6017
|
+
}
|
|
6018
|
+
]);
|
|
6019
|
+
var STAGE_CHIPS = Object.freeze({
|
|
6020
|
+
search: {
|
|
6021
|
+
primary: {
|
|
6022
|
+
label: "\u81EA\u5DF1\u9020 \xB7 \u5148\u5B9A 3 \u53E5\u65B9\u6848",
|
|
6023
|
+
prompt: "\u73B0\u6210\u63D2\u4EF6\u4E0D\u5B8C\u5168\u5408\u9002\uFF0C\u6211\u4EEC\u81EA\u5DF1\u505A\u4E00\u4E2A\u8F7B\u91CF\u7248\u3002\u5148\u522B\u5199\u4EE3\u7801\uFF0C\u8BF7\u7528\u4E09\u4E94\u53E5\u5927\u767D\u8BDD\u8DDF\u6211\u786E\u8BA4\u5165\u53E3\u6302\u5728\u54EA\u3001\u5E73\u65F6\u600E\u4E48\u7528\u3001\u6570\u636E\u5B58\u54EA\u3002"
|
|
6024
|
+
},
|
|
6025
|
+
secondary: {
|
|
6026
|
+
label: "\u6311\u6700\u63A5\u8FD1\u7684\u7167\u7740\u6539",
|
|
6027
|
+
prompt: "\u8BF7\u6311\u4E00\u4E2A\u7ED3\u6784\u6700\u63A5\u8FD1\u7684\u73B0\u6210\u63D2\u4EF6\u53C2\u8003\u5B83\u7684\u6302\u8F7D\u65B9\u5F0F\uFF0C\u6309\u6211\u7684\u9700\u6C42\u7CBE\u7B80\u91CD\u505A\u4E00\u7248\u3002"
|
|
6028
|
+
}
|
|
6029
|
+
},
|
|
6030
|
+
design: {
|
|
6031
|
+
primary: {
|
|
6032
|
+
label: "\u65B9\u6848\u53EF\u4EE5 \xB7 \u5148\u642D\u7A7A\u67B6\u5B50",
|
|
6033
|
+
prompt: "\u8FD9\u4E2A\u65B9\u6848\u53EF\u4EE5\uFF0C\u7B2C\u4E00\u7248\u8BF7\u5148\u642D\u4E00\u4E2A\u6700\u5C0F\u80FD\u70B9\u5F00\u3001\u4E0D\u767D\u5C4F\u7684\u7A7A\u67B6\u5B50\uFF0C\u5148\u4E0D\u585E\u590D\u6742\u903B\u8F91\u3002"
|
|
6034
|
+
},
|
|
6035
|
+
secondary: {
|
|
6036
|
+
label: "\u518D\u538B\u7CBE\u7B80\u4E00\u70B9",
|
|
6037
|
+
prompt: "\u9996\u7248\u8FD8\u53EF\u4EE5\u518D\u7CBE\u7B80\u4E00\u70B9\uFF0C\u53EA\u4FDD\u7559\u6700\u6838\u5FC3\u7684\u4E00\u9879\u80FD\u529B\uFF1A"
|
|
6038
|
+
}
|
|
6039
|
+
},
|
|
6040
|
+
skeleton: {
|
|
6041
|
+
primary: {
|
|
6042
|
+
label: "\u67B6\u5B50 OK \xB7 \u52A0\u6838\u5FC3\u529F\u80FD",
|
|
6043
|
+
prompt: "\u5165\u53E3\u6211\u5DF2\u7ECF\u70B9\u5F00\u786E\u8BA4\u6B63\u5E38\u4E86\uFF0C\u73B0\u5728\u8BF7\u53EA\u52A0\u4E0A\u6700\u6838\u5FC3\u7684\u7B2C\u4E00\u4E2A\u529F\u80FD\uFF1A"
|
|
6044
|
+
},
|
|
6045
|
+
secondary: {
|
|
6046
|
+
label: "\u600E\u4E48\u5237\u65B0\u770B\u6548\u679C\uFF1F",
|
|
6047
|
+
prompt: "\u8BF7\u544A\u8BC9\u6211\u8FD9\u4E00\u6B65\u53EA\u9700\u8981\u6309 Cmd+R \u5237\u65B0\u754C\u9762\uFF0C\u8FD8\u662F\u9700\u8981\u5F7B\u5E95\u9000\u51FA\u91CD\u5F00 DSH\uFF1F"
|
|
6048
|
+
}
|
|
6049
|
+
},
|
|
6050
|
+
feature: {
|
|
6051
|
+
primary: {
|
|
6052
|
+
label: "\u81EA\u67E5\u6DF1\u6D45\u8272\u4E0E\u7A84\u7A97\u53E3",
|
|
6053
|
+
prompt: "\u8BF7\u5E2E\u6211\u68C0\u67E5\u4E00\u4E0B\u5F53\u524D\u754C\u9762\u5728\u6DF1\u8272/\u6D45\u8272\u4E3B\u9898\u548C\u7A84\u7A97\u53E3\u4E0B\u7684\u6392\u7248\u3001\u5BF9\u6BD4\u5EA6\u4E0E\u6EA2\u51FA\u60C5\u51B5\u3002"
|
|
6054
|
+
},
|
|
6055
|
+
secondary: {
|
|
6056
|
+
label: "\u5FAE\u8C03\u4EA4\u4E92\u4E0E\u7EC6\u8282",
|
|
6057
|
+
prompt: "\u521A\u52A0\u7684\u529F\u80FD\u6211\u770B\u4E86\u4E00\u773C\uFF0C\u60F3\u5FAE\u8C03\u4E00\u5904\u7EC6\u8282\uFF1A"
|
|
6058
|
+
}
|
|
6059
|
+
},
|
|
6060
|
+
verify: {
|
|
6061
|
+
primary: {
|
|
6062
|
+
label: "\u5FAE\u8C03\u6837\u5F0F\u4E0E\u7CBE\u7B80\u5EA6",
|
|
6063
|
+
prompt: "\u6211\u770B\u4E86\u4E00\u773C\u5F53\u524D\u6548\u679C\uFF0C\u60F3\u5FAE\u8C03\u4E00\u4E0B\u89C6\u89C9\u6837\u5F0F\u548C\u4FE1\u606F\u7CBE\u7B80\u5EA6\uFF1A"
|
|
6064
|
+
},
|
|
6065
|
+
secondary: {
|
|
6066
|
+
label: "\u628A\u8E29\u5751\u8BB0\u5165\u7ECF\u9A8C\u5E93",
|
|
6067
|
+
prompt: "\u8BF7\u628A\u8FD9\u6B21\u5236\u4F5C\u8FC7\u7A0B\u4E2D\u503C\u5F97\u590D\u7528\u7684\u907F\u5751\u70B9\u8C03\u7528 finder_creator_note \u8BB0\u5165\u63D2\u4EF6\u7ECF\u9A8C\u3002"
|
|
6068
|
+
}
|
|
6069
|
+
},
|
|
6070
|
+
blocked: {
|
|
6071
|
+
primary: {
|
|
6072
|
+
label: "\u5148\u603B\u7ED3\u8BD5\u8FC7\u4EC0\u4E48\u4E0E\u5361\u70B9",
|
|
6073
|
+
prompt: "\u5148\u505C\u4E00\u4E0B\u522B\u6539\u4EE3\u7801\u4E86\uFF1A\u8BF7\u7528\u4E09\u53E5\u8BDD\u603B\u7ED3\u521A\u624D\u8BD5\u8FC7\u4E86\u4EC0\u4E48\u3001\u5177\u4F53\u5361\u5728\u54EA\u4E2A\u73B0\u8C61\uFF0C\u65B9\u4FBF\u6211\u5224\u65AD\u6216\u6362\u65B0\u7A97\u53E3\u7EE7\u7EED\u3002"
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
});
|
|
6077
|
+
var SPARK_PATH = "M10 2.25 11.9 7.1l4.85 1.9-4.85 1.9L10 15.75l-1.9-4.85-4.85-1.9 4.85-1.9L10 2.25Z";
|
|
5860
6078
|
var text12 = (value) => typeof value === "string" ? value : "";
|
|
5861
6079
|
var CREATOR_PRESET = "cordis";
|
|
5862
6080
|
function creatorProgress(steps) {
|
|
@@ -5868,12 +6086,16 @@ function creatorProgress(steps) {
|
|
|
5868
6086
|
const recorded = new Set(rows.map((item) => item.stage));
|
|
5869
6087
|
const last = rows.at(-1) ?? null;
|
|
5870
6088
|
return {
|
|
5871
|
-
stages: STAGES.map((stage, index) => ({
|
|
6089
|
+
stages: STAGES.map((stage, index) => ({
|
|
6090
|
+
...stage,
|
|
6091
|
+
plain: PLAIN[stage.id],
|
|
6092
|
+
state: index === furthest ? "current" : index > furthest ? "todo" : recorded.has(stage.id) ? "done" : "skipped"
|
|
6093
|
+
})),
|
|
5872
6094
|
last: last ? { stage: last.stage, label: LABEL[last.stage], summary: text12(last.summary) } : null,
|
|
5873
6095
|
blocked: last?.stage === "blocked",
|
|
5874
6096
|
blockedStep: recordedStep,
|
|
5875
6097
|
count: rows.length,
|
|
5876
|
-
reached: Math.max(0, STAGES.filter((
|
|
6098
|
+
reached: Math.max(0, STAGES.filter((_, index) => index <= furthest).length)
|
|
5877
6099
|
};
|
|
5878
6100
|
}
|
|
5879
6101
|
function creatorHandoffPrompt(steps) {
|
|
@@ -5886,133 +6108,326 @@ function creatorHandoffPrompt(steps) {
|
|
|
5886
6108
|
"\u8BF7\u5148\u8C03\u7528 finder_creator_guide \u8BFB\u53D6\u521B\u9020\u7ECF\u9A8C\uFF0C\u518D\u4ECE\u6700\u540E\u4E00\u6B65\u7EE7\u7EED\uFF1B\u5DF2\u7ECF\u8DD1\u901A\u7684\u90E8\u5206\u4E0D\u8981\u91CD\u5199\u3002\u9700\u8981\u4E0A\u4E2A\u7A97\u53E3\u7684\u7EC6\u8282\u65F6\u5148\u95EE\u6211\u3002"
|
|
5887
6109
|
].join("\n");
|
|
5888
6110
|
}
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
6111
|
+
async function applyCreatorPrompt({ ctx, sessionId, inputActions } = {}, prompt) {
|
|
6112
|
+
const value = text12(prompt).trim();
|
|
6113
|
+
if (!value) return "noop";
|
|
6114
|
+
if (typeof inputActions?.captureInsertion === "function" && typeof inputActions?.insertText === "function") {
|
|
6115
|
+
try {
|
|
6116
|
+
const span = inputActions.captureInsertion();
|
|
6117
|
+
const prefix = span && Number.isInteger(span.start) && span.start > 0 && span.start === span.end ? "\n" : "";
|
|
6118
|
+
if (inputActions.insertText(prefix + value, span)) {
|
|
6119
|
+
try {
|
|
6120
|
+
const editor = globalThis.document?.querySelector?.('[data-composer-seat] [contenteditable="true"], [data-composer-seat] textarea');
|
|
6121
|
+
editor?.focus?.();
|
|
6122
|
+
} catch {
|
|
6123
|
+
}
|
|
6124
|
+
return "inserted";
|
|
6125
|
+
}
|
|
6126
|
+
} catch {
|
|
6127
|
+
}
|
|
6128
|
+
}
|
|
6129
|
+
try {
|
|
6130
|
+
const binding = sessionId ? ctx?.sessions?.binding?.(sessionId) : null;
|
|
6131
|
+
const convInput = binding?.ctx?.get?.("conversation", false)?.input;
|
|
6132
|
+
if (typeof convInput?.requestDraftInitialization === "function") {
|
|
6133
|
+
const status = convInput.requestDraftInitialization(binding, {
|
|
6134
|
+
prompt: value,
|
|
6135
|
+
whenDraftExists: "append",
|
|
6136
|
+
clearPreviousDraft: false
|
|
6137
|
+
});
|
|
6138
|
+
if (status === "applied") return "inserted";
|
|
6139
|
+
}
|
|
6140
|
+
} catch {
|
|
6141
|
+
}
|
|
6142
|
+
try {
|
|
6143
|
+
if (typeof globalThis.navigator?.clipboard?.writeText === "function") {
|
|
6144
|
+
await globalThis.navigator.clipboard.writeText(value);
|
|
6145
|
+
return "copied";
|
|
6146
|
+
}
|
|
6147
|
+
} catch {
|
|
6148
|
+
}
|
|
6149
|
+
return "unavailable";
|
|
6150
|
+
}
|
|
5914
6151
|
var css = `
|
|
5915
|
-
.pfc_dock, .pfc_closed {
|
|
6152
|
+
.pfc_dock, .pfc_closed {
|
|
6153
|
+
box-sizing: border-box;
|
|
6154
|
+
container-type: inline-size;
|
|
6155
|
+
container-name: pfc-dock;
|
|
6156
|
+
color-scheme: light dark;
|
|
5916
6157
|
--pfc_ink: var(--dsw-alias-label-primary, #191b1f);
|
|
5917
6158
|
--pfc_ink2: var(--dsw-alias-label-secondary, #4b5058);
|
|
5918
6159
|
--pfc_ink3: var(--dsw-alias-label-tertiary, #868c95);
|
|
5919
|
-
--pfc_card: var(--dsw-alias-bg-layer-2, #ffffff);
|
|
5920
|
-
--
|
|
5921
|
-
--
|
|
5922
|
-
--
|
|
6160
|
+
--pfc_card: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2, #ffffff));
|
|
6161
|
+
--pfc_chip_bg: var(--dsw-alias-fill-l2, rgba(25, 27, 31, 0.05));
|
|
6162
|
+
--pfc_chip_hover: var(--dsw-alias-fill-l3, rgba(25, 27, 31, 0.09));
|
|
6163
|
+
--pfc_line: var(--dsw-alias-border-l1, rgba(25, 27, 31, 0.08));
|
|
6164
|
+
--pfc_line2: var(--dsw-alias-border-l3, rgba(25, 27, 31, 0.16));
|
|
6165
|
+
--pfc_accent: var(--dsw-alias-brand-primary, #4b83f0);
|
|
6166
|
+
--pfc_build: var(--dsw-alias-state-warn-primary, #d97706);
|
|
5923
6167
|
--pfc_ok: var(--dsw-alias-state-success-primary, #2fa36b);
|
|
5924
6168
|
--pfc_primary: var(--dsw-alias-button-primary-fill, #191b1f);
|
|
5925
6169
|
--pfc_on_primary: var(--dsw-alias-label-primary-inverted, #ffffff);
|
|
5926
|
-
--pfc_serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
|
|
5927
6170
|
--pfc_sans: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif);
|
|
5928
|
-
|
|
6171
|
+
width: calc(100% - var(--dsh-composer-side-clearance, 0px) - var(--dsh-composer-side-clearance, 0px) - var(--dsh-composer-dock-inset, 0px) - var(--dsh-composer-dock-inset, 0px) - var(--dsh-composer-dock-inset, 0px) - var(--dsh-composer-dock-inset, 0px));
|
|
6172
|
+
max-width: calc(var(--dsh-composer-card-max-width, 768px) - var(--dsh-composer-dock-inset, 0px) - var(--dsh-composer-dock-inset, 0px) - var(--dsh-composer-dock-inset, 0px) - var(--dsh-composer-dock-inset, 0px));
|
|
6173
|
+
margin: 0 auto 6px;
|
|
6174
|
+
border-radius: var(--dsw-radius-lg, 12px);
|
|
6175
|
+
border: 1px solid var(--pfc_line);
|
|
6176
|
+
background: var(--pfc_card);
|
|
6177
|
+
backdrop-filter: var(--dsw-menu-backdrop-filter, blur(16px));
|
|
6178
|
+
box-shadow: var(--dsw-elevation-panel, 0 2px 8px rgba(0, 0, 0, 0.06));
|
|
6179
|
+
font-family: var(--pfc_sans);
|
|
6180
|
+
color: var(--pfc_ink);
|
|
6181
|
+
overflow: hidden;
|
|
6182
|
+
}
|
|
5929
6183
|
:where(.pfc_dock, .pfc_closed)[data-theme="dark"], .dark :where(.pfc_dock, .pfc_closed) {
|
|
5930
6184
|
--pfc_ink: var(--dsw-alias-label-primary, #eceded);
|
|
5931
6185
|
--pfc_ink2: var(--dsw-alias-label-secondary, #b5b9bf);
|
|
5932
6186
|
--pfc_ink3: var(--dsw-alias-label-tertiary, #7e848d);
|
|
5933
|
-
--pfc_card: var(--dsw-alias-bg-layer-2,
|
|
5934
|
-
--
|
|
5935
|
-
--
|
|
6187
|
+
--pfc_card: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2, rgba(31, 33, 38, 0.92)));
|
|
6188
|
+
--pfc_chip_bg: var(--dsw-alias-fill-l2, rgba(255, 255, 255, 0.07));
|
|
6189
|
+
--pfc_chip_hover: var(--dsw-alias-fill-l3, rgba(255, 255, 255, 0.12));
|
|
6190
|
+
--pfc_line: var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
|
6191
|
+
--pfc_line2: var(--dsw-alias-border-l3, rgba(255, 255, 255, 0.16));
|
|
6192
|
+
--pfc_accent: var(--dsw-alias-brand-primary, #6c9ef8);
|
|
5936
6193
|
--pfc_build: var(--dsw-alias-state-warn-primary, #f0a530);
|
|
5937
6194
|
--pfc_ok: var(--dsw-alias-state-success-primary, #4cc38a);
|
|
5938
6195
|
--pfc_primary: var(--dsw-alias-button-primary-fill, #eceded);
|
|
5939
6196
|
--pfc_on_primary: var(--dsw-alias-label-primary-inverted, #141517);
|
|
6197
|
+
box-shadow: var(--dsw-elevation-panel, 0 2px 10px rgba(0, 0, 0, 0.28));
|
|
5940
6198
|
}
|
|
5941
6199
|
@media (prefers-color-scheme: dark) {
|
|
5942
6200
|
:where(.pfc_dock, .pfc_closed):not([data-theme="light"]) {
|
|
5943
6201
|
--pfc_ink: var(--dsw-alias-label-primary, #eceded);
|
|
5944
6202
|
--pfc_ink2: var(--dsw-alias-label-secondary, #b5b9bf);
|
|
5945
6203
|
--pfc_ink3: var(--dsw-alias-label-tertiary, #7e848d);
|
|
5946
|
-
--pfc_card: var(--dsw-alias-bg-layer-2,
|
|
5947
|
-
--
|
|
5948
|
-
--
|
|
6204
|
+
--pfc_card: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2, rgba(31, 33, 38, 0.92)));
|
|
6205
|
+
--pfc_chip_bg: var(--dsw-alias-fill-l2, rgba(255, 255, 255, 0.07));
|
|
6206
|
+
--pfc_chip_hover: var(--dsw-alias-fill-l3, rgba(255, 255, 255, 0.12));
|
|
6207
|
+
--pfc_line: var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08));
|
|
6208
|
+
--pfc_line2: var(--dsw-alias-border-l3, rgba(255, 255, 255, 0.16));
|
|
6209
|
+
--pfc_accent: var(--dsw-alias-brand-primary, #6c9ef8);
|
|
5949
6210
|
--pfc_build: var(--dsw-alias-state-warn-primary, #f0a530);
|
|
5950
6211
|
--pfc_ok: var(--dsw-alias-state-success-primary, #4cc38a);
|
|
5951
6212
|
--pfc_primary: var(--dsw-alias-button-primary-fill, #eceded);
|
|
5952
6213
|
--pfc_on_primary: var(--dsw-alias-label-primary-inverted, #141517);
|
|
5953
6214
|
}
|
|
5954
6215
|
}
|
|
5955
|
-
|
|
5956
|
-
.pfc_dock[data-
|
|
5957
|
-
.
|
|
5958
|
-
.
|
|
5959
|
-
|
|
5960
|
-
.
|
|
5961
|
-
.
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
6216
|
+
|
|
6217
|
+
.pfc_dock[data-compact="true"] { padding: 5px 10px; }
|
|
6218
|
+
.pfc_dock:not([data-compact="true"]) { padding: 10px 14px; }
|
|
6219
|
+
.pfc_dock[data-stuck="true"] { border-color: color-mix(in srgb, var(--pfc_build) 52%, var(--pfc_line)); }
|
|
6220
|
+
|
|
6221
|
+
.pfc_bar { display: flex; align-items: center; gap: 8px; min-height: 26px; }
|
|
6222
|
+
.pfc_bar_toggle {
|
|
6223
|
+
flex: 1 1 0;
|
|
6224
|
+
min-width: 0;
|
|
6225
|
+
display: flex;
|
|
6226
|
+
align-items: center;
|
|
6227
|
+
gap: 8px;
|
|
6228
|
+
padding: 2px 4px;
|
|
6229
|
+
border: 0;
|
|
6230
|
+
border-radius: 7px;
|
|
6231
|
+
background: transparent;
|
|
6232
|
+
color: inherit;
|
|
6233
|
+
font: inherit;
|
|
6234
|
+
text-align: left;
|
|
6235
|
+
cursor: pointer;
|
|
6236
|
+
}
|
|
6237
|
+
.pfc_bar_toggle:hover:not(:disabled) { background: var(--pfc_chip_bg); }
|
|
6238
|
+
|
|
6239
|
+
.pfc_mini_steps { display: inline-flex; align-items: center; gap: 3px; flex: none; }
|
|
6240
|
+
.pfc_mini_steps i { display: block; width: 14px; height: 4px; border-radius: 999px; background: var(--pfc_line2); }
|
|
6241
|
+
.pfc_mini_steps .is_done { background: var(--pfc_ok); }
|
|
6242
|
+
.pfc_mini_steps .is_skipped { background: color-mix(in srgb, var(--pfc_ok) 36%, var(--pfc_line2)); }
|
|
6243
|
+
.pfc_mini_steps .is_current { background: var(--pfc_accent); }
|
|
6244
|
+
.pfc_dock[data-stage="verify"][data-running="false"] .pfc_mini_steps .is_current { background: var(--pfc_ok); }
|
|
6245
|
+
.pfc_dock[data-stuck="true"] .pfc_mini_steps .is_current { background: var(--pfc_build); }
|
|
6246
|
+
.pfc_mini_steps .is_current.is_running { background: var(--pfc_accent); }
|
|
6247
|
+
|
|
6248
|
+
.pfc_badge { font-size: 12px; font-weight: 600; line-height: 18px; color: var(--pfc_ink); white-space: nowrap; flex: none; }
|
|
6249
|
+
.pfc_hint {
|
|
6250
|
+
min-width: 0;
|
|
6251
|
+
flex: 1 1 auto;
|
|
6252
|
+
font-size: 12.5px;
|
|
6253
|
+
line-height: 18px;
|
|
6254
|
+
color: var(--pfc_ink2);
|
|
6255
|
+
overflow: hidden;
|
|
6256
|
+
text-overflow: ellipsis;
|
|
6257
|
+
white-space: nowrap;
|
|
6258
|
+
}
|
|
6259
|
+
.pfc_bar_actions { display: flex; align-items: center; gap: 4px; flex: none; }
|
|
6260
|
+
|
|
6261
|
+
.pfc_chip {
|
|
6262
|
+
box-sizing: border-box;
|
|
6263
|
+
height: 26px;
|
|
6264
|
+
padding: 0 10px;
|
|
6265
|
+
border-radius: 999px;
|
|
6266
|
+
border: 1px solid var(--pfc_line);
|
|
6267
|
+
background: var(--pfc_chip_bg);
|
|
6268
|
+
color: var(--pfc_ink);
|
|
6269
|
+
font: inherit;
|
|
6270
|
+
font-size: 12px;
|
|
6271
|
+
font-weight: 500;
|
|
6272
|
+
line-height: 24px;
|
|
6273
|
+
white-space: nowrap;
|
|
6274
|
+
cursor: pointer;
|
|
6275
|
+
}
|
|
6276
|
+
.pfc_chip:hover:not(:disabled) { background: var(--pfc_chip_hover); border-color: var(--pfc_line2); }
|
|
6277
|
+
.pfc_chip:disabled { opacity: 0.45; cursor: default; }
|
|
6278
|
+
|
|
6279
|
+
.pfc_icon_btn {
|
|
6280
|
+
box-sizing: border-box;
|
|
6281
|
+
width: 24px;
|
|
6282
|
+
height: 24px;
|
|
6283
|
+
padding: 0;
|
|
6284
|
+
border: 0;
|
|
6285
|
+
border-radius: 6px;
|
|
6286
|
+
background: transparent;
|
|
6287
|
+
color: var(--pfc_ink3);
|
|
6288
|
+
display: inline-flex;
|
|
6289
|
+
align-items: center;
|
|
6290
|
+
justify-content: center;
|
|
6291
|
+
cursor: pointer;
|
|
6292
|
+
flex: none;
|
|
6293
|
+
}
|
|
6294
|
+
.pfc_icon_btn:hover:not(:disabled) { background: var(--pfc_chip_bg); color: var(--pfc_ink); }
|
|
6295
|
+
.pfc_icon_btn:disabled { opacity: 0.45; cursor: default; }
|
|
6296
|
+
|
|
6297
|
+
.pfc_hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 24px; }
|
|
6298
|
+
.pfc_hd b { font-size: 13px; font-weight: 600; line-height: 20px; color: var(--pfc_ink); }
|
|
6299
|
+
.pfc_sub { font-size: 12.5px; line-height: 18px; color: var(--pfc_ink2); flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
6300
|
+
.pfc_hd_tools { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
|
|
6301
|
+
.pfc_spark { width: 15px; height: 15px; flex: none; color: var(--pfc_accent); }
|
|
6302
|
+
.pfc_stuck_dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pfc_build); flex: none; }
|
|
6303
|
+
|
|
6304
|
+
.pfc_chip_row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
|
|
6305
|
+
.pfc_stuck_note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--pfc_ink2); }
|
|
6306
|
+
|
|
6307
|
+
.pfc_dock .pfc_button, .pfc_closed .pfc_button {
|
|
6308
|
+
box-sizing: border-box;
|
|
6309
|
+
height: 28px;
|
|
6310
|
+
padding: 0 12px;
|
|
6311
|
+
border-radius: 999px;
|
|
6312
|
+
border: 1px solid var(--pfc_line2);
|
|
6313
|
+
background: transparent;
|
|
6314
|
+
color: var(--pfc_ink);
|
|
6315
|
+
font: inherit;
|
|
6316
|
+
font-size: 12.5px;
|
|
6317
|
+
font-weight: 500;
|
|
6318
|
+
cursor: pointer;
|
|
6319
|
+
}
|
|
6320
|
+
.pfc_dock .pfc_button:hover:not(:disabled), .pfc_closed .pfc_button:hover:not(:disabled) { background: var(--pfc_chip_bg); }
|
|
6321
|
+
.pfc_dock .pfc_button[data-primary="true"] { border-color: var(--pfc_primary); background: var(--pfc_primary); color: var(--pfc_on_primary); }
|
|
6322
|
+
.pfc_dock .pfc_button[data-primary="true"]:hover:not(:disabled) { opacity: 0.9; background: var(--pfc_primary); }
|
|
6323
|
+
.pfc_dock .pfc_button:disabled, .pfc_closed .pfc_button:disabled { opacity: 0.45; cursor: default; }
|
|
6324
|
+
|
|
6325
|
+
.pfc_dock .pfc_ghost, .pfc_closed .pfc_ghost {
|
|
6326
|
+
box-sizing: border-box;
|
|
6327
|
+
height: 24px;
|
|
6328
|
+
padding: 0 8px;
|
|
6329
|
+
border: 0;
|
|
6330
|
+
border-radius: 6px;
|
|
6331
|
+
background: transparent;
|
|
6332
|
+
color: var(--pfc_ink3);
|
|
6333
|
+
font: inherit;
|
|
6334
|
+
font-size: 12px;
|
|
6335
|
+
line-height: 24px;
|
|
6336
|
+
text-decoration: none;
|
|
6337
|
+
cursor: pointer;
|
|
6338
|
+
white-space: nowrap;
|
|
6339
|
+
}
|
|
6340
|
+
.pfc_dock .pfc_ghost:hover:not(:disabled), .pfc_closed .pfc_ghost:hover:not(:disabled) { background: var(--pfc_chip_bg); color: var(--pfc_ink); }
|
|
6341
|
+
.pfc_dock .pfc_ghost:disabled, .pfc_closed .pfc_ghost:disabled { opacity: 0.45; cursor: default; }
|
|
6342
|
+
|
|
6343
|
+
.pfc_drawer { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--pfc_line); display: flex; flex-direction: column; gap: 10px; }
|
|
6344
|
+
.pfc_five { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
|
|
6345
|
+
.pfc_five div { min-width: 0; }
|
|
6346
|
+
.pfc_five i { display: block; height: 4px; border-radius: 999px; background: var(--pfc_line2); }
|
|
5967
6347
|
.pfc_five .is_done i { background: var(--pfc_ok); }
|
|
5968
|
-
.pfc_five .
|
|
5969
|
-
.pfc_five
|
|
6348
|
+
.pfc_five .is_skipped i { background: color-mix(in srgb, var(--pfc_ok) 36%, var(--pfc_line2)); }
|
|
6349
|
+
.pfc_five .is_current i { background: var(--pfc_accent); }
|
|
6350
|
+
.pfc_dock[data-stage="verify"][data-running="false"] .pfc_five .is_current i { background: var(--pfc_ok); }
|
|
6351
|
+
.pfc_dock[data-stuck="true"] .pfc_five .is_current i { background: var(--pfc_build); }
|
|
6352
|
+
.pfc_five span { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.35; color: var(--pfc_ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
5970
6353
|
.pfc_five .is_done span { color: var(--pfc_ink2); }
|
|
6354
|
+
.pfc_five .is_skipped span { color: var(--pfc_ink3); }
|
|
5971
6355
|
.pfc_five .is_current span { color: var(--pfc_ink); font-weight: 600; }
|
|
5972
|
-
.
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
.
|
|
5976
|
-
.
|
|
5977
|
-
.
|
|
5978
|
-
.
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
.
|
|
5990
|
-
|
|
5991
|
-
.
|
|
5992
|
-
.
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
6356
|
+
.pfc_meta_note { margin: -2px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--pfc_ink3); }
|
|
6357
|
+
|
|
6358
|
+
.pfc_summary { margin: 0; padding: 8px 0 0; border-top: 1px solid var(--pfc_line); font-size: 12.5px; line-height: 1.55; color: var(--pfc_ink2); }
|
|
6359
|
+
.pfc_lessons { padding-top: 8px; border-top: 1px solid var(--pfc_line); }
|
|
6360
|
+
.pfc_lessons_hd { font-size: 12px; font-weight: 600; line-height: 18px; color: var(--pfc_ink); }
|
|
6361
|
+
.pfc_lessons_list { margin: 4px 0 0; padding-left: 16px; list-style: disc; font-size: 12px; line-height: 1.6; color: var(--pfc_ink2); }
|
|
6362
|
+
.pfc_lessons_list li + li { margin-top: 2px; }
|
|
6363
|
+
|
|
6364
|
+
.pfc_drawer_foot {
|
|
6365
|
+
padding-top: 8px;
|
|
6366
|
+
border-top: 1px solid var(--pfc_line);
|
|
6367
|
+
display: flex;
|
|
6368
|
+
align-items: center;
|
|
6369
|
+
justify-content: space-between;
|
|
6370
|
+
gap: 8px;
|
|
6371
|
+
flex-wrap: wrap;
|
|
6372
|
+
}
|
|
6373
|
+
.pfc_drawer_left, .pfc_drawer_right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
6374
|
+
|
|
6375
|
+
.pfc_notice_row { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--pfc_ok); }
|
|
6376
|
+
.pfc_closed {
|
|
6377
|
+
padding: 6px 12px;
|
|
6378
|
+
display: flex;
|
|
6379
|
+
align-items: center;
|
|
6380
|
+
gap: 10px;
|
|
6381
|
+
flex-wrap: wrap;
|
|
6382
|
+
font-size: 12.5px;
|
|
6383
|
+
color: var(--pfc_ink2);
|
|
6384
|
+
}
|
|
6385
|
+
.pfc_closed .pfc_ghost { margin-left: auto; color: var(--pfc_ink); font-weight: 500; }
|
|
6386
|
+
.pfc_bar_toggle:focus-visible, .pfc_chip:focus-visible, .pfc_icon_btn:focus-visible, .pfc_button:focus-visible, .pfc_ghost:focus-visible {
|
|
6387
|
+
outline: 2px solid var(--pfc_accent);
|
|
6388
|
+
outline-offset: 2px;
|
|
6389
|
+
}
|
|
6390
|
+
|
|
6391
|
+
@container pfc-dock (max-width: 560px) {
|
|
6392
|
+
.pfc_hint { display: none; }
|
|
6393
|
+
.pfc_five { gap: 4px; }
|
|
5996
6394
|
.pfc_five span { font-size: 11px; }
|
|
5997
6395
|
}
|
|
5998
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
6396
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
6397
|
+
@keyframes pfc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.38; } }
|
|
6398
|
+
.pfc_mini_steps .is_current.is_running { animation: pfc-pulse 1.4s ease-in-out infinite; }
|
|
6399
|
+
.pfc_mini_steps i, .pfc_five i { transition: background-color 0.2s ease; }
|
|
6400
|
+
}
|
|
5999
6401
|
`;
|
|
6000
6402
|
var creatorStripCss = css;
|
|
6001
6403
|
function createCreatorDock(React2) {
|
|
6002
6404
|
const h = React2.createElement;
|
|
6003
|
-
const
|
|
6405
|
+
const sparkIcon = () => h(
|
|
6406
|
+
"svg",
|
|
6407
|
+
{ className: "pfc_spark", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true" },
|
|
6408
|
+
h("path", { d: SPARK_PATH, stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" })
|
|
6409
|
+
);
|
|
6410
|
+
const chevronIcon = (open) => h(
|
|
6004
6411
|
"svg",
|
|
6005
|
-
{
|
|
6006
|
-
h("path", { d:
|
|
6412
|
+
{ width: 14, height: 14, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" },
|
|
6413
|
+
h("path", { d: open ? "M4 10l4-4 4 4" : "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
6414
|
+
);
|
|
6415
|
+
const closeIcon = () => h(
|
|
6416
|
+
"svg",
|
|
6417
|
+
{ width: 13, height: 13, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" },
|
|
6418
|
+
h("path", { d: "M4.5 4.5l7 7m0-7l-7 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
6007
6419
|
);
|
|
6008
6420
|
return function CreatorDock({
|
|
6009
6421
|
mode = "intro",
|
|
6010
6422
|
progress = null,
|
|
6423
|
+
expanded = false,
|
|
6424
|
+
running = false,
|
|
6011
6425
|
busy = "",
|
|
6012
6426
|
notice = "",
|
|
6013
6427
|
onKnow,
|
|
6014
6428
|
onSkip,
|
|
6015
|
-
|
|
6429
|
+
onToggleExpand,
|
|
6430
|
+
onPrompt,
|
|
6016
6431
|
onOpenNext,
|
|
6017
6432
|
onClose,
|
|
6018
6433
|
onSettings,
|
|
@@ -6024,95 +6439,240 @@ function createCreatorDock(React2) {
|
|
|
6024
6439
|
return h(
|
|
6025
6440
|
"div",
|
|
6026
6441
|
{ className: "pfc_closed", role: "status" },
|
|
6027
|
-
h("span", null, "\u5DF2\u5173\u95ED\
|
|
6028
|
-
h("
|
|
6029
|
-
|
|
6442
|
+
h("span", null, "\u5DF2\u5168\u5C40\u5173\u95ED\u521B\u9020\u5411\u5BFC\u4E0E\u540E\u53F0\u7701 Token \u7ECF\u9A8C\uFF0C\u65B0\u5F00\u521B\u9020\u4F1A\u8BDD\u4E0D\u518D\u542F\u7528\u3002"),
|
|
6443
|
+
notice ? h("span", { className: "pfc_notice_row", role: "status" }, notice) : null,
|
|
6444
|
+
h("button", { type: "button", className: "pfc_ghost", disabled: busy !== "", onClick: onEnable }, "\u64A4\u9500")
|
|
6030
6445
|
);
|
|
6031
6446
|
}
|
|
6032
6447
|
const stages = progress?.stages ?? [];
|
|
6033
6448
|
const reached = progress?.reached ?? 0;
|
|
6034
6449
|
const last = progress?.last ?? null;
|
|
6035
|
-
const
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
)
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
showSteps ? h("button", { type: "button", className: "pfc_link pfc_steps_link", onClick: onShowSteps, title: "\u8FD9\u51E0\u6B65\u662F\u4EC0\u4E48" }, "\u8FD9\u51E0\u6B65\u662F\u4EC0\u4E48") : null,
|
|
6049
|
-
typeof onSettings === "function" ? h("button", { type: "button", className: "pfc_link", onClick: onSettings }, "\u7ECF\u9A8C") : null,
|
|
6050
|
-
h("button", { type: "button", className: "pfc_link", disabled: busy !== "", onClick: onClose }, "\u5173\u95ED")
|
|
6450
|
+
const current = stages.find((stage) => stage.state === "current") ?? stages[Math.min(Math.max(reached - 1, 0), (stages.length || 1) - 1)] ?? STAGES[0];
|
|
6451
|
+
const currentId = current?.id || "search";
|
|
6452
|
+
const isExpanded = Boolean(expanded);
|
|
6453
|
+
const hasSkipped = stages.some((stage) => stage.state === "skipped");
|
|
6454
|
+
const stageTip = (stage, index, isRunning) => {
|
|
6455
|
+
const shortLabel = STAGE_SHORT[stage.id] ?? stage.label;
|
|
6456
|
+
const stateLabel = stage.state === "done" ? "\u5DF2\u5B8C\u6210" : stage.state === "skipped" ? "\u672C\u8F6E\u514D\u8D70\uFF08\u5982\u7EE7\u7EED\u8FED\u4EE3\u5DF2\u6709\u63D2\u4EF6\uFF09\uFF0C\u65E0\u9700\u8865\u505A" : stage.state === "current" ? isRunning ? "AI \u6B63\u5728\u6539\u52A8" : "\u5F53\u524D\u6B65\u9AA4" : "\u5F85\u8FDB\u884C";
|
|
6457
|
+
return `${index + 1}. ${shortLabel} \xB7 ${stateLabel}`;
|
|
6458
|
+
};
|
|
6459
|
+
const metaNote = () => h(
|
|
6460
|
+
"p",
|
|
6461
|
+
{ className: "pfc_meta_note" },
|
|
6462
|
+
hasSkipped ? "\u6765\u81EA\u300C\u53D1\u73B0\u597D\u63D2\u4EF6\u300D\xB7 \u540E\u53F0\u7701 Token \u5F15\u5BFC\u751F\u6548\u4E2D\uFF08\u70B9 \xD7 \u4EC5\u6536\u8D77\u6D6E\u6761\uFF09\xB7 \u6807\u300C\u514D\u8D70\u300D\u4EE3\u8868\u8001\u9879\u76EE\u8FED\u4EE3\u6216\u76F4\u5954\u4E3B\u9898\uFF0C\u65E0\u9700\u56DE\u5934\u8865\u505A" : "\u6765\u81EA\u300C\u53D1\u73B0\u597D\u63D2\u4EF6\u300D\xB7 \u627E\u73B0\u6210\u6CA1\u5408\u9002\u7684\u5C31\u966A\u4F60\u9020 \xB7 \u540E\u53F0\u7701 Token \u5F15\u5BFC\u751F\u6548\u4E2D\uFF08\u70B9 \xD7 \u4EC5\u6536\u8D77\u6D6E\u6761\uFF09"
|
|
6051
6463
|
);
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
);
|
|
6066
|
-
}
|
|
6464
|
+
const five = () => h("div", {
|
|
6465
|
+
className: "pfc_five",
|
|
6466
|
+
role: "img",
|
|
6467
|
+
"aria-label": `\u4E94\u6B65\u6D41\u7A0B\uFF1A${stages.map((stage, index) => `${index + 1} ${STAGE_SHORT[stage.id] ?? stage.label}`).join("\uFF0C")}`
|
|
6468
|
+
}, ...stages.map((stage, index) => {
|
|
6469
|
+
const shortLabel = STAGE_SHORT[stage.id] ?? stage.label;
|
|
6470
|
+
const tip = stageTip(stage, index, running);
|
|
6471
|
+
return h("div", {
|
|
6472
|
+
key: stage.id,
|
|
6473
|
+
title: tip,
|
|
6474
|
+
className: stage.state === "done" ? "is_done" : stage.state === "skipped" ? "is_skipped" : stage.state === "current" ? "is_current" : ""
|
|
6475
|
+
}, h("i", null), h("span", { title: tip }, `${index + 1} ${shortLabel}${stage.state === "skipped" ? " \xB7 \u514D\u8D70" : ""}`));
|
|
6476
|
+
}));
|
|
6067
6477
|
const lessonList = (stageId, label) => {
|
|
6068
6478
|
const items8 = STAGE_LESSONS[stageId] ?? STAGE_LESSONS.search;
|
|
6069
6479
|
return h(
|
|
6070
|
-
"
|
|
6480
|
+
"div",
|
|
6071
6481
|
{ className: "pfc_lessons" },
|
|
6072
|
-
h("
|
|
6482
|
+
h("div", { className: "pfc_lessons_hd" }, label ? `\u8FD9\u4E00\u6B65\u6CE8\u610F\u4EC0\u4E48 \xB7 ${label}` : "\u8FD9\u4E00\u6B65\u6CE8\u610F\u4EC0\u4E48"),
|
|
6073
6483
|
h("ul", { className: "pfc_lessons_list" }, ...items8.map((item, idx) => h("li", { key: idx }, item)))
|
|
6074
6484
|
);
|
|
6075
6485
|
};
|
|
6486
|
+
const noticeEl = notice ? h("div", { className: "pfc_notice_row", role: "status" }, notice) : null;
|
|
6487
|
+
if (mode === "intro") {
|
|
6488
|
+
return h(
|
|
6489
|
+
"div",
|
|
6490
|
+
{ className: "pfc_dock", "data-mode": "intro", role: "region", "aria-label": "\u53D1\u73B0\u597D\u63D2\u4EF6 \xB7 \u521B\u9020\u5411\u5BFC" },
|
|
6491
|
+
h(
|
|
6492
|
+
"div",
|
|
6493
|
+
{ className: "pfc_hd" },
|
|
6494
|
+
sparkIcon(),
|
|
6495
|
+
h("b", null, "\u53D1\u73B0\u597D\u63D2\u4EF6 \xB7 \u521B\u9020\u5411\u5BFC"),
|
|
6496
|
+
h("span", { className: "pfc_sub" }, "\u6CA1\u73B0\u6210\u63D2\u4EF6\u65F6\u966A\u4F60\u6309 5 \u6B65\u7A33\u9020 \xB7 \u540E\u53F0\u5DF2\u81EA\u52A8\u7ED9 AI \u5F00\u542F\u7701 Token \u89C4\u77E9"),
|
|
6497
|
+
h(
|
|
6498
|
+
"div",
|
|
6499
|
+
{ className: "pfc_hd_tools" },
|
|
6500
|
+
typeof onSkip === "function" ? h("button", { type: "button", className: "pfc_ghost", title: "\u4EC5\u9690\u85CF\u672C\u6B21\u8D77\u6B65\u5361\uFF0C\u540E\u53F0\u7701 Token \u5F15\u5BFC\u7EE7\u7EED\u751F\u6548", onClick: onSkip }, "\u8FD9\u56DE\u4E0D\u7528") : null,
|
|
6501
|
+
typeof onClose === "function" ? h("button", { type: "button", className: "pfc_ghost", title: "\u5728\u6240\u6709\u521B\u9020\u4F1A\u8BDD\u4E2D\u540C\u65F6\u5173\u95ED\u5411\u5BFC\u6D6E\u6761\u4E0E\u540E\u53F0\u7701 Token \u7ECF\u9A8C", disabled: busy !== "", onClick: onClose }, "\u5168\u5C40\u5173\u95ED") : null
|
|
6502
|
+
)
|
|
6503
|
+
),
|
|
6504
|
+
h(
|
|
6505
|
+
"div",
|
|
6506
|
+
{ className: "pfc_chip_row" },
|
|
6507
|
+
...STARTER_CHIPS.map((chip) => h("button", {
|
|
6508
|
+
key: chip.label,
|
|
6509
|
+
type: "button",
|
|
6510
|
+
className: "pfc_chip",
|
|
6511
|
+
title: chip.prompt,
|
|
6512
|
+
onClick: () => onPrompt ? onPrompt(chip.prompt, { fromIntro: true }) : onKnow?.()
|
|
6513
|
+
}, chip.label)),
|
|
6514
|
+
!onPrompt && typeof onKnow === "function" ? h("button", { type: "button", className: "pfc_ghost", onClick: onKnow }, "\u77E5\u9053\u4E86") : null
|
|
6515
|
+
),
|
|
6516
|
+
noticeEl
|
|
6517
|
+
);
|
|
6518
|
+
}
|
|
6076
6519
|
if (mode === "stuck") {
|
|
6077
6520
|
const blockedStep = progress?.blockedStep;
|
|
6078
|
-
const heading = blockedStep ? `\u5361\u5728\u7B2C ${blockedStep} \u6B65
|
|
6521
|
+
const heading = blockedStep ? `\u5361\u5728\u7B2C ${blockedStep} \u6B65` : "\u8FD9\u91CC\u5361\u4F4F\u4E86";
|
|
6522
|
+
const stuckChip = STAGE_CHIPS.blocked.primary;
|
|
6079
6523
|
return h(
|
|
6080
6524
|
"div",
|
|
6081
|
-
{ className: "pfc_dock", "data-stuck": "true", role: "region", "aria-label": "\u53D1\u73B0\u597D\u63D2\u4EF6 \xB7 \
|
|
6525
|
+
{ className: "pfc_dock", "data-mode": "stuck", "data-stuck": "true", "data-stage": currentId, "data-running": running ? "true" : "false", role: "region", "aria-label": "\u53D1\u73B0\u597D\u63D2\u4EF6 \xB7 \u5361\u70B9\u6B62\u635F" },
|
|
6082
6526
|
h(
|
|
6083
6527
|
"div",
|
|
6084
6528
|
{ className: "pfc_hd" },
|
|
6085
|
-
|
|
6086
|
-
h("b", null, heading)
|
|
6529
|
+
h("i", { className: "pfc_stuck_dot", "aria-hidden": "true" }),
|
|
6530
|
+
h("b", null, heading),
|
|
6531
|
+
last?.summary ? h("span", { className: "pfc_sub", title: last.summary }, last.summary) : null,
|
|
6532
|
+
h(
|
|
6533
|
+
"div",
|
|
6534
|
+
{ className: "pfc_hd_tools" },
|
|
6535
|
+
typeof onToggleExpand === "function" ? h("button", { type: "button", className: "pfc_ghost", "aria-expanded": isExpanded, onClick: onToggleExpand }, isExpanded ? "\u6536\u8D77" : "\u8BE6\u60C5") : null,
|
|
6536
|
+
h("button", { type: "button", className: "pfc_ghost", title: "\u672C\u6B21\u5148\u6536\u8D77\u63D0\u793A\uFF0C\u540E\u53F0\u7701 Token \u5F15\u5BFC\u7EE7\u7EED\u751F\u6548", onClick: onDismiss }, "\u5148\u4E0D\u7528")
|
|
6537
|
+
)
|
|
6087
6538
|
),
|
|
6088
|
-
h("p",
|
|
6089
|
-
five(),
|
|
6090
|
-
lessonList("blocked", "\u6B62\u635F\u6362\u7A97"),
|
|
6539
|
+
h("p", { className: "pfc_stuck_note" }, "\u540C\u4E00\u4E2A\u95EE\u9898\u5728\u957F\u5BF9\u8BDD\u91CC\u53CD\u590D\u6539\u53EA\u4F1A\u8D8A\u6539\u8D8A\u4E71\uFF1B\u628A\u8FDB\u5C55\u548C\u5361\u70B9\u5E26\u53BB\u65B0\u7A97\u53E3\u63A5\u7740\u505A\u6700\u7A33\u3002"),
|
|
6091
6540
|
h(
|
|
6092
6541
|
"div",
|
|
6093
|
-
{ className: "
|
|
6094
|
-
h("button", {
|
|
6095
|
-
|
|
6096
|
-
|
|
6542
|
+
{ className: "pfc_chip_row" },
|
|
6543
|
+
h("button", {
|
|
6544
|
+
type: "button",
|
|
6545
|
+
className: "pfc_button",
|
|
6546
|
+
"data-primary": "true",
|
|
6547
|
+
disabled: busy !== "",
|
|
6548
|
+
onClick: onOpenNext,
|
|
6549
|
+
title: "\u65B0\u5EFA\u4E00\u4E2A\u5E72\u51C0\u7684\u521B\u9020\u6A21\u5F0F\u7A97\u53E3\uFF0C\u628A\u8FD9\u91CC\u8BB0\u4E0B\u7684\u8FDB\u5C55\u5E26\u8FC7\u53BB"
|
|
6550
|
+
}, "\u5F00\u65B0\u7A97\u53E3\u63A5\u7740\u505A"),
|
|
6551
|
+
h("button", {
|
|
6552
|
+
type: "button",
|
|
6553
|
+
className: "pfc_chip",
|
|
6554
|
+
title: stuckChip.prompt,
|
|
6555
|
+
onClick: () => onPrompt?.(stuckChip.prompt)
|
|
6556
|
+
}, stuckChip.label)
|
|
6097
6557
|
),
|
|
6098
|
-
|
|
6558
|
+
isExpanded ? h(
|
|
6559
|
+
"div",
|
|
6560
|
+
{ className: "pfc_drawer" },
|
|
6561
|
+
five(),
|
|
6562
|
+
metaNote(),
|
|
6563
|
+
lessonList("blocked", "\u6B62\u635F\u6362\u7A97"),
|
|
6564
|
+
h(
|
|
6565
|
+
"div",
|
|
6566
|
+
{ className: "pfc_drawer_foot" },
|
|
6567
|
+
h(
|
|
6568
|
+
"div",
|
|
6569
|
+
{ className: "pfc_drawer_right" },
|
|
6570
|
+
typeof onSettings === "function" ? h("button", { type: "button", className: "pfc_ghost", onClick: onSettings }, "\u7BA1\u7406\u7ECF\u9A8C\u5E93") : null,
|
|
6571
|
+
typeof onClose === "function" ? h("button", { type: "button", className: "pfc_ghost", title: "\u5728\u6240\u6709\u521B\u9020\u4F1A\u8BDD\u4E2D\u540C\u65F6\u5173\u95ED\u5411\u5BFC\u6D6E\u6761\u4E0E\u540E\u53F0\u7701 Token \u7ECF\u9A8C", disabled: busy !== "", onClick: onClose }, "\u5168\u5C40\u5173\u95ED") : null
|
|
6572
|
+
)
|
|
6573
|
+
)
|
|
6574
|
+
) : null,
|
|
6575
|
+
noticeEl
|
|
6099
6576
|
);
|
|
6100
6577
|
}
|
|
6101
|
-
const
|
|
6578
|
+
const stepNum = Math.min(Math.max(reached, 1), stages.length || 5);
|
|
6579
|
+
const chips = STAGE_CHIPS[currentId] ?? STAGE_CHIPS.search;
|
|
6580
|
+
const shortTitle = STAGE_SHORT[currentId] ?? current?.label ?? "\u8FDB\u884C\u4E2D";
|
|
6581
|
+
const hintText = running ? "\u6B63\u5728\u6309\u4F60\u7684\u8981\u6C42\u66F4\u65B0\uFF0C\u5B8C\u6210\u540E\u518D\u6838\u5BF9\u6548\u679C" : STAGE_HINTS[currentId] ?? "";
|
|
6582
|
+
const badgeText = running ? `\u7B2C ${stepNum}/5 \u6B65 \xB7 \u6B63\u5728\u6539\u52A8\u2026` : `\u7B2C ${stepNum}/5 \u6B65 \xB7 ${shortTitle}`;
|
|
6102
6583
|
return h(
|
|
6103
6584
|
"div",
|
|
6104
|
-
{
|
|
6585
|
+
{
|
|
6586
|
+
className: "pfc_dock",
|
|
6587
|
+
"data-mode": "run",
|
|
6588
|
+
"data-compact": isExpanded ? "false" : "true",
|
|
6589
|
+
"data-stage": currentId,
|
|
6590
|
+
"data-running": running ? "true" : "false",
|
|
6591
|
+
role: "region",
|
|
6592
|
+
"aria-label": "\u53D1\u73B0\u597D\u63D2\u4EF6 \xB7 \u521B\u9020\u5411\u5BFC"
|
|
6593
|
+
},
|
|
6105
6594
|
h(
|
|
6106
6595
|
"div",
|
|
6107
|
-
{ className: "
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6596
|
+
{ className: "pfc_bar" },
|
|
6597
|
+
h(
|
|
6598
|
+
"button",
|
|
6599
|
+
{
|
|
6600
|
+
type: "button",
|
|
6601
|
+
className: "pfc_bar_toggle",
|
|
6602
|
+
"aria-expanded": isExpanded,
|
|
6603
|
+
onClick: onToggleExpand,
|
|
6604
|
+
title: isExpanded ? "\u6536\u8D77\u5411\u5BFC\u8BE6\u60C5" : "\u70B9\u51FB\u67E5\u770B 5 \u6B65\u8F68\u8FF9\u4E0E\u9A8C\u6536\u9526\u56CA\uFF08\u6765\u81EA\u300C\u53D1\u73B0\u597D\u63D2\u4EF6\u300D\uFF0C\u540E\u53F0\u7701 Token \u5F15\u5BFC\u751F\u6548\u4E2D\uFF09"
|
|
6605
|
+
},
|
|
6606
|
+
h("span", { className: "pfc_mini_steps", "aria-hidden": "true" }, ...stages.map((stage, index) => h("i", {
|
|
6607
|
+
key: stage.id,
|
|
6608
|
+
title: stageTip(stage, index, running),
|
|
6609
|
+
className: stage.state === "done" ? "is_done" : stage.state === "skipped" ? "is_skipped" : stage.state === "current" ? running ? "is_current is_running" : "is_current" : ""
|
|
6610
|
+
}))),
|
|
6611
|
+
h("span", { className: "pfc_badge" }, badgeText),
|
|
6612
|
+
h("span", { className: "pfc_hint" }, hintText)
|
|
6613
|
+
),
|
|
6614
|
+
h(
|
|
6615
|
+
"div",
|
|
6616
|
+
{ className: "pfc_bar_actions" },
|
|
6617
|
+
!running && chips.primary ? h("button", {
|
|
6618
|
+
type: "button",
|
|
6619
|
+
className: "pfc_chip",
|
|
6620
|
+
title: chips.primary.prompt,
|
|
6621
|
+
onClick: () => onPrompt?.(chips.primary.prompt)
|
|
6622
|
+
}, chips.primary.label) : null,
|
|
6623
|
+
h("button", {
|
|
6624
|
+
type: "button",
|
|
6625
|
+
className: "pfc_icon_btn",
|
|
6626
|
+
"aria-expanded": isExpanded,
|
|
6627
|
+
"aria-label": isExpanded ? "\u6536\u8D77\u5411\u5BFC\u8BE6\u60C5" : "\u5C55\u5F00\u5411\u5BFC\u8BE6\u60C5",
|
|
6628
|
+
title: isExpanded ? "\u6536\u8D77\u5411\u5BFC\u8BE6\u60C5" : "\u5C55\u5F00\u9636\u6BB5\u4E0E\u9526\u56CA",
|
|
6629
|
+
onClick: onToggleExpand
|
|
6630
|
+
}, chevronIcon(isExpanded)),
|
|
6631
|
+
typeof onDismiss === "function" ? h("button", {
|
|
6632
|
+
type: "button",
|
|
6633
|
+
className: "pfc_icon_btn",
|
|
6634
|
+
"aria-label": "\u672C\u4F1A\u8BDD\u6536\u8D77\u5411\u5BFC",
|
|
6635
|
+
title: "\u672C\u6B21\u5BF9\u8BDD\u5148\u6536\u8D77\u6D6E\u6761\uFF08\u540E\u53F0\u7701 Token \u5F15\u5BFC\u7EE7\u7EED\u751F\u6548\uFF09",
|
|
6636
|
+
onClick: onDismiss
|
|
6637
|
+
}, closeIcon()) : null
|
|
6638
|
+
)
|
|
6111
6639
|
),
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6640
|
+
isExpanded ? h(
|
|
6641
|
+
"div",
|
|
6642
|
+
{ className: "pfc_drawer" },
|
|
6643
|
+
five(),
|
|
6644
|
+
metaNote(),
|
|
6645
|
+
last?.summary ? h("p", { className: "pfc_summary" }, `\u6700\u8FD1\u8BB0\u5F55\uFF1A${last.summary}`) : null,
|
|
6646
|
+
lessonList(currentId, shortTitle),
|
|
6647
|
+
h(
|
|
6648
|
+
"div",
|
|
6649
|
+
{ className: "pfc_drawer_foot" },
|
|
6650
|
+
h(
|
|
6651
|
+
"div",
|
|
6652
|
+
{ className: "pfc_drawer_left" },
|
|
6653
|
+
chips.secondary ? h("button", {
|
|
6654
|
+
type: "button",
|
|
6655
|
+
className: "pfc_chip",
|
|
6656
|
+
title: chips.secondary.prompt,
|
|
6657
|
+
onClick: () => onPrompt?.(chips.secondary.prompt)
|
|
6658
|
+
}, chips.secondary.label) : null,
|
|
6659
|
+
typeof onOpenNext === "function" ? h("button", {
|
|
6660
|
+
type: "button",
|
|
6661
|
+
className: "pfc_chip",
|
|
6662
|
+
disabled: busy !== "",
|
|
6663
|
+
onClick: onOpenNext
|
|
6664
|
+
}, "\u5E26\u8FDB\u5C55\u6362\u65B0\u7A97\u53E3") : null
|
|
6665
|
+
),
|
|
6666
|
+
h(
|
|
6667
|
+
"div",
|
|
6668
|
+
{ className: "pfc_drawer_right" },
|
|
6669
|
+
typeof onShowSteps === "function" ? h("button", { type: "button", className: "pfc_ghost", onClick: onShowSteps }, "\u67E5\u770B\u8D77\u6B65\u6A21\u677F") : null,
|
|
6670
|
+
typeof onSettings === "function" ? h("button", { type: "button", className: "pfc_ghost", onClick: onSettings }, "\u7BA1\u7406\u7ECF\u9A8C\u5E93") : null,
|
|
6671
|
+
typeof onClose === "function" ? h("button", { type: "button", className: "pfc_ghost", title: "\u5728\u6240\u6709\u521B\u9020\u4F1A\u8BDD\u4E2D\u540C\u65F6\u5173\u95ED\u5411\u5BFC\u6D6E\u6761\u4E0E\u540E\u53F0\u7701 Token \u7ECF\u9A8C", disabled: busy !== "", onClick: onClose }, "\u5168\u5C40\u5173\u95ED") : null
|
|
6672
|
+
)
|
|
6673
|
+
)
|
|
6674
|
+
) : null,
|
|
6675
|
+
noticeEl
|
|
6116
6676
|
);
|
|
6117
6677
|
};
|
|
6118
6678
|
}
|
|
@@ -6161,7 +6721,11 @@ function createCreatorStrip(React2, { ctx, request, openSettings }) {
|
|
|
6161
6721
|
const [busy, setBusy] = React2.useState("");
|
|
6162
6722
|
const [notice, setNotice] = React2.useState("");
|
|
6163
6723
|
const [closedHere, setClosedHere] = React2.useState(false);
|
|
6164
|
-
const [
|
|
6724
|
+
const [expanded, setExpanded] = React2.useState(false);
|
|
6725
|
+
const [running, setRunning] = React2.useState(false);
|
|
6726
|
+
const [turnEnds, setTurnEnds] = React2.useState(0);
|
|
6727
|
+
const [dismissedAt, setDismissedAt] = React2.useState(-1);
|
|
6728
|
+
const [manualIntro, setManualIntro] = React2.useState(false);
|
|
6165
6729
|
const [introOpen, setIntroOpen] = React2.useState(() => {
|
|
6166
6730
|
try {
|
|
6167
6731
|
const store = globalThis.localStorage;
|
|
@@ -6170,15 +6734,40 @@ function createCreatorStrip(React2, { ctx, request, openSettings }) {
|
|
|
6170
6734
|
return true;
|
|
6171
6735
|
}
|
|
6172
6736
|
});
|
|
6737
|
+
const noticeTimerRef = React2.useRef(null);
|
|
6738
|
+
const showNotice = React2.useCallback((message) => {
|
|
6739
|
+
if (noticeTimerRef.current) clearTimeout(noticeTimerRef.current);
|
|
6740
|
+
setNotice(message);
|
|
6741
|
+
if (message) noticeTimerRef.current = setTimeout(() => {
|
|
6742
|
+
noticeTimerRef.current = null;
|
|
6743
|
+
setNotice("");
|
|
6744
|
+
}, 2400);
|
|
6745
|
+
}, []);
|
|
6746
|
+
React2.useEffect(() => () => {
|
|
6747
|
+
if (noticeTimerRef.current) clearTimeout(noticeTimerRef.current);
|
|
6748
|
+
}, []);
|
|
6173
6749
|
const dismissIntro = (hideForever) => {
|
|
6174
6750
|
try {
|
|
6175
6751
|
globalThis.localStorage?.setItem(hideForever ? `finder.creator.skip.${sessionId}` : `finder.creator.intro.${sessionId}`, "1");
|
|
6176
6752
|
} catch {
|
|
6177
6753
|
}
|
|
6178
6754
|
setIntroOpen(false);
|
|
6755
|
+
setManualIntro(false);
|
|
6179
6756
|
};
|
|
6180
6757
|
React2.useEffect(() => {
|
|
6181
6758
|
setPreset(presetOf(ctx, sessionId));
|
|
6759
|
+
setExpanded(false);
|
|
6760
|
+
setDismissedAt(-1);
|
|
6761
|
+
setManualIntro(false);
|
|
6762
|
+
setRunning(false);
|
|
6763
|
+
setTurnEnds(0);
|
|
6764
|
+
setNotice("");
|
|
6765
|
+
try {
|
|
6766
|
+
const store = globalThis.localStorage;
|
|
6767
|
+
setIntroOpen(store?.getItem(`finder.creator.intro.${sessionId}`) !== "1" && store?.getItem(`finder.creator.skip.${sessionId}`) !== "1");
|
|
6768
|
+
} catch {
|
|
6769
|
+
setIntroOpen(true);
|
|
6770
|
+
}
|
|
6182
6771
|
const face = (() => {
|
|
6183
6772
|
try {
|
|
6184
6773
|
return ctx.sessions?.binding?.(sessionId)?.session?.projections?.faceOf?.("agentPreset");
|
|
@@ -6210,20 +6799,35 @@ function createCreatorStrip(React2, { ctx, request, openSettings }) {
|
|
|
6210
6799
|
return null;
|
|
6211
6800
|
}
|
|
6212
6801
|
})();
|
|
6213
|
-
const
|
|
6802
|
+
const scan = () => {
|
|
6214
6803
|
const entries = source?.getSnapshot?.()?.entries;
|
|
6215
|
-
if (!Array.isArray(entries)) return 0;
|
|
6216
|
-
let
|
|
6804
|
+
if (!Array.isArray(entries)) return { signalCount: 0, endedCount: 0, isRunning: false };
|
|
6805
|
+
let signalCount = 0;
|
|
6806
|
+
let endedCount = 0;
|
|
6807
|
+
let lastTurnType = "";
|
|
6217
6808
|
for (const entry of entries) {
|
|
6218
6809
|
const event = entry?.event;
|
|
6219
|
-
if (entry?.type
|
|
6810
|
+
if (entry?.type !== "event") continue;
|
|
6811
|
+
if (event?.type === "turn/start") {
|
|
6812
|
+
lastTurnType = "turn/start";
|
|
6813
|
+
continue;
|
|
6814
|
+
}
|
|
6815
|
+
if (event?.type === "turn/end") {
|
|
6816
|
+
lastTurnType = "turn/end";
|
|
6817
|
+
endedCount += 1;
|
|
6818
|
+
signalCount += 1;
|
|
6819
|
+
continue;
|
|
6820
|
+
}
|
|
6821
|
+
if (event?.type === "tool/call" && event.data?.name === "finder_creator_step") signalCount += 1;
|
|
6220
6822
|
}
|
|
6221
|
-
return
|
|
6823
|
+
return { signalCount, endedCount, isRunning: lastTurnType === "turn/start" };
|
|
6222
6824
|
};
|
|
6223
6825
|
const check = () => {
|
|
6224
|
-
const
|
|
6225
|
-
|
|
6226
|
-
|
|
6826
|
+
const next = scan();
|
|
6827
|
+
setRunning(next.isRunning);
|
|
6828
|
+
setTurnEnds(next.endedCount);
|
|
6829
|
+
if (next.signalCount === seen) return;
|
|
6830
|
+
seen = next.signalCount;
|
|
6227
6831
|
if (timer) clearTimeout(timer);
|
|
6228
6832
|
timer = setTimeout(() => {
|
|
6229
6833
|
timer = null;
|
|
@@ -6244,37 +6848,58 @@ function createCreatorStrip(React2, { ctx, request, openSettings }) {
|
|
|
6244
6848
|
void request("creator-configure", { enabled: true }).then(() => {
|
|
6245
6849
|
setClosedHere(false);
|
|
6246
6850
|
setData((current) => ({ ...current ?? {}, enabled: true }));
|
|
6247
|
-
}).catch(() =>
|
|
6851
|
+
}).catch(() => showNotice("\u6CA1\u6709\u91CD\u65B0\u5F00\u542F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002")).finally(() => setBusy(""));
|
|
6248
6852
|
};
|
|
6249
6853
|
if (closedHere) return h(Dock, { mode: "closed", busy, notice, onEnable: enable });
|
|
6250
6854
|
if (data.enabled === false) return null;
|
|
6251
6855
|
const progress = creatorProgress(data.steps);
|
|
6252
6856
|
const openNext = () => {
|
|
6253
6857
|
setBusy("next");
|
|
6254
|
-
|
|
6858
|
+
showNotice("");
|
|
6255
6859
|
void openCreatorContinuation(ctx, sessionId, creatorHandoffPrompt(data.steps)).then((result) => {
|
|
6256
|
-
if (result.draft !== "applied")
|
|
6257
|
-
}).catch((error) =>
|
|
6860
|
+
if (result.draft !== "applied") showNotice("\u65B0\u7A97\u53E3\u5DF2\u6253\u5F00\uFF0C\u4EA4\u63A5\u5185\u5BB9\u6CA1\u80FD\u653E\u8FDB\u8F93\u5165\u6846\uFF0C\u53EF\u4EE5\u624B\u52A8\u8BF4\u660E\u8FDB\u5C55\u3002");
|
|
6861
|
+
}).catch((error) => showNotice(error?.safeForUser ? error.message : "\u6CA1\u80FD\u5F00\u65B0\u7A97\u53E3\uFF0C\u8BF7\u4ECE\u5DE6\u4FA7\u65B0\u5EFA\u521B\u9020\u6A21\u5F0F\u4F1A\u8BDD\u3002")).finally(() => setBusy(""));
|
|
6258
6862
|
};
|
|
6259
6863
|
const close = () => {
|
|
6260
6864
|
setBusy("close");
|
|
6261
|
-
|
|
6262
|
-
void request("creator-configure", { enabled: false }).then(() => setClosedHere(true)).catch(() =>
|
|
6865
|
+
showNotice("");
|
|
6866
|
+
void request("creator-configure", { enabled: false }).then(() => setClosedHere(true)).catch(() => showNotice("\u6CA1\u6709\u5173\u95ED\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002")).finally(() => setBusy(""));
|
|
6263
6867
|
};
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6868
|
+
const handlePrompt = (prompt, opts = {}) => {
|
|
6869
|
+
void applyCreatorPrompt({ ctx, sessionId, inputActions: props?.inputActions }, prompt).then((status) => {
|
|
6870
|
+
if (opts.fromIntro) dismissIntro(false);
|
|
6871
|
+
if (status === "copied") showNotice("\u5DF2\u590D\u5236\u5F15\u5BFC\u8BDD\u672F\uFF0C\u53EF\u76F4\u63A5\u7C98\u8D34\u5230\u8F93\u5165\u6846");
|
|
6872
|
+
else if (status === "unavailable") showNotice("\u6682\u65F6\u5199\u5165\u4E0D\u5230\u8F93\u5165\u6846\uFF0C\u8BF7\u5148\u70B9\u4E00\u4E0B\u8F93\u5165\u6846\u518D\u8BD5");
|
|
6873
|
+
else if (status === "inserted" && !opts.fromIntro) showNotice("\u5DF2\u586B\u5165\u8F93\u5165\u6846\uFF0C\u8865\u5145\u7EC6\u8282\u5373\u53EF\u53D1\u9001");
|
|
6874
|
+
});
|
|
6875
|
+
};
|
|
6876
|
+
if (!progress.count && !manualIntro && (!introOpen || turnEnds > 0)) return null;
|
|
6877
|
+
const isDismissed = dismissedAt >= 0 && !(progress.blocked && progress.count > dismissedAt);
|
|
6878
|
+
if (isDismissed && !manualIntro) return null;
|
|
6879
|
+
const mode = manualIntro ? "intro" : progress.blocked ? "stuck" : progress.count ? "run" : "intro";
|
|
6267
6880
|
return h(Dock, {
|
|
6268
6881
|
mode,
|
|
6269
6882
|
progress,
|
|
6883
|
+
expanded,
|
|
6884
|
+
running,
|
|
6270
6885
|
busy,
|
|
6271
6886
|
notice,
|
|
6272
6887
|
onKnow: () => dismissIntro(false),
|
|
6273
6888
|
onSkip: () => dismissIntro(true),
|
|
6274
|
-
|
|
6889
|
+
onToggleExpand: () => setExpanded((v) => !v),
|
|
6890
|
+
onPrompt: handlePrompt,
|
|
6891
|
+
onShowSteps: () => {
|
|
6892
|
+
setExpanded(false);
|
|
6893
|
+
setManualIntro(true);
|
|
6894
|
+
setIntroOpen(true);
|
|
6895
|
+
},
|
|
6275
6896
|
onOpenNext: openNext,
|
|
6276
6897
|
onClose: close,
|
|
6277
|
-
onDismiss: () =>
|
|
6898
|
+
onDismiss: () => {
|
|
6899
|
+
setExpanded(false);
|
|
6900
|
+
setManualIntro(false);
|
|
6901
|
+
setDismissedAt(progress.count);
|
|
6902
|
+
},
|
|
6278
6903
|
onSettings: typeof openSettings === "function" ? openSettings : null,
|
|
6279
6904
|
onEnable: enable
|
|
6280
6905
|
});
|