@musnows/scriverse 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-protocol.js +5 -1
- package/dist/ai-protocol.js.map +1 -1
- package/dist/ai.js +461 -49
- package/dist/ai.js.map +1 -1
- package/dist/app.js +35 -7
- package/dist/app.js.map +1 -1
- package/dist/database.js +174 -2
- package/dist/database.js.map +1 -1
- package/dist/hybrid-search.js +2 -1
- package/dist/hybrid-search.js.map +1 -1
- package/dist/public/app.js +302 -89
- package/dist/public/display-labels.js +2 -1
- package/dist/public/global-search.d.ts +3 -1
- package/dist/public/global-search.js +22 -0
- package/dist/public/index.html +7 -4
- package/dist/public/model-config.d.ts +3 -0
- package/dist/public/model-config.js +8 -0
- package/dist/public/styles.css +44 -2
- package/dist/release-update.js +170 -0
- package/dist/release-update.js.map +1 -0
- package/dist/server-runtime.js +5 -1
- package/dist/server-runtime.js.map +1 -1
- package/dist/store.js +99 -18
- package/dist/store.js.map +1 -1
- package/dist/user-auth.js +6 -2
- package/dist/user-auth.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type GlobalSearchTarget =
|
|
2
2
|
| { kind: "chapter"; type: "chapter"; id: string; module: "editor"; startLine?: number; endLine?: number }
|
|
3
|
+
| { kind: "agent-history"; type: "agent-history"; id: string; module: "editor"; conversationId: string; messageId?: string }
|
|
3
4
|
| {
|
|
4
5
|
kind: "entity";
|
|
5
6
|
type: "setting" | "character" | "race" | "organization" | "timeline-track" | "timeline-event" | "relationship" | "chapter-outline" | "foreshadow" | "review";
|
|
@@ -9,5 +10,6 @@ export type GlobalSearchTarget =
|
|
|
9
10
|
apiPath: string;
|
|
10
11
|
};
|
|
11
12
|
|
|
13
|
+
export function prioritizeGlobalSearchResults<T extends { type?: unknown }>(results: readonly T[]): T[];
|
|
12
14
|
export function splitGlobalSearchHighlight(value: unknown, query: unknown): Array<{ text: string; match: boolean }>;
|
|
13
|
-
export function resolveGlobalSearchTarget(result?: { type?: unknown; id?: unknown; startLine?: unknown; endLine?: unknown }): GlobalSearchTarget | null;
|
|
15
|
+
export function resolveGlobalSearchTarget(result?: { type?: unknown; id?: unknown; startLine?: unknown; endLine?: unknown; conversationId?: unknown; messageId?: unknown }): GlobalSearchTarget | null;
|
|
@@ -11,6 +11,15 @@ const entityTargets = Object.freeze({
|
|
|
11
11
|
review: Object.freeze({ module: "reviews", entity: "review", resource: "reviews" })
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
+
export function prioritizeGlobalSearchResults(results = []) {
|
|
15
|
+
const settingResults = [];
|
|
16
|
+
const proseResults = [];
|
|
17
|
+
for (const result of Array.isArray(results) ? results : []) {
|
|
18
|
+
(String(result?.type ?? "") === "chapter" ? proseResults : settingResults).push(result);
|
|
19
|
+
}
|
|
20
|
+
return [...settingResults, ...proseResults];
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
function positiveLine(value) {
|
|
15
24
|
const line = Number(value);
|
|
16
25
|
return Number.isInteger(line) && line > 0 ? line : null;
|
|
@@ -39,6 +48,19 @@ export function resolveGlobalSearchTarget(result = {}) {
|
|
|
39
48
|
const type = String(result.type ?? "").trim();
|
|
40
49
|
const id = String(result.id ?? "").trim();
|
|
41
50
|
if (!id) return null;
|
|
51
|
+
if (type === "agent-history") {
|
|
52
|
+
const conversationId = String(result.conversationId ?? "").trim();
|
|
53
|
+
if (!conversationId) return null;
|
|
54
|
+
const messageId = String(result.messageId ?? "").trim();
|
|
55
|
+
return {
|
|
56
|
+
kind: "agent-history",
|
|
57
|
+
type,
|
|
58
|
+
id,
|
|
59
|
+
module: "editor",
|
|
60
|
+
conversationId,
|
|
61
|
+
...(messageId ? { messageId } : {})
|
|
62
|
+
};
|
|
63
|
+
}
|
|
42
64
|
if (type === "chapter") {
|
|
43
65
|
const startLine = positiveLine(result.startLine);
|
|
44
66
|
const endLine = positiveLine(result.endLine);
|
package/dist/public/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="icon" href="/icon.svg?v=20260712" type="image/svg+xml">
|
|
11
11
|
<link rel="manifest" href="/site.webmanifest">
|
|
12
12
|
<link rel="stylesheet" href="/vendor/vditor/dist/index.css?v=3.11.2">
|
|
13
|
-
<link rel="stylesheet" href="/styles.css?v=
|
|
13
|
+
<link rel="stylesheet" href="/styles.css?v=20260804-agent-history-search-v1">
|
|
14
14
|
</head>
|
|
15
15
|
<body class="auth-pending">
|
|
16
16
|
<section id="auth-view" class="auth-view hidden" aria-labelledby="auth-title">
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
</button>
|
|
103
103
|
<button id="settings-button" class="settings-button" type="button" aria-label="设置" title="设置">
|
|
104
104
|
<svg class="settings-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.09a2 2 0 0 1 1 1.74v.5a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
105
|
+
<span class="settings-update-dot hidden" data-settings-update-dot aria-hidden="true"></span>
|
|
105
106
|
</button>
|
|
106
107
|
</div>
|
|
107
108
|
</header>
|
|
@@ -219,6 +220,7 @@
|
|
|
219
220
|
<footer class="product-footer settings-product-footer" data-product-footer aria-label="叙界项目信息">
|
|
220
221
|
<span class="product-footer-meta"><span>© <time data-product-footer-year></time></span><span aria-hidden="true">·</span><span>叙界 <span data-product-footer-version>v—</span></span><span aria-hidden="true">·</span><a href="https://github.com/musnows/Scriverse" target="_blank" rel="noopener noreferrer" aria-label="在 GitHub 查看叙界仓库">GitHub</a></span>
|
|
221
222
|
<span class="product-footer-development hidden" data-product-footer-development>开发模式</span>
|
|
223
|
+
<a class="product-footer-update hidden" data-product-footer-update target="_blank" rel="noopener noreferrer"></a>
|
|
222
224
|
</footer>
|
|
223
225
|
</section>
|
|
224
226
|
|
|
@@ -382,7 +384,7 @@
|
|
|
382
384
|
<dialog id="background-task-dialog" class="dialog wide-dialog background-task-dialog" aria-labelledby="background-task-dialog-title">
|
|
383
385
|
<form method="dialog">
|
|
384
386
|
<div class="dialog-header">
|
|
385
|
-
<div><span class="eyebrow">全局进度</span><h2 id="background-task-dialog-title">后台任务中心</h2><p id="background-task-dialog-meta" class="dialog-header-meta"
|
|
387
|
+
<div><span class="eyebrow">全局进度</span><h2 id="background-task-dialog-title">后台任务中心</h2><p id="background-task-dialog-meta" class="dialog-header-meta">系统更新与当前作品的分析任务、索引队列</p></div>
|
|
386
388
|
<button class="dialog-close" value="cancel" aria-label="关闭后台任务中心" type="submit">×</button>
|
|
387
389
|
</div>
|
|
388
390
|
<div id="background-task-content" class="background-task-content" role="region" aria-label="后台任务状态"></div>
|
|
@@ -611,7 +613,7 @@
|
|
|
611
613
|
</div>
|
|
612
614
|
<div class="access-dialog-body">
|
|
613
615
|
<form id="search-form" class="search-form">
|
|
614
|
-
<label>关键词<input id="search-query" name="query" type="search" maxlength="500" placeholder="
|
|
616
|
+
<label>关键词<input id="search-query" name="query" type="search" maxlength="500" placeholder="搜索正文、设定、人物、时间线、关系、大纲、伏笔或 Agent 历史" required></label>
|
|
615
617
|
<label>资料类型<select id="search-type" name="type">
|
|
616
618
|
<option value="">全部资料</option>
|
|
617
619
|
<option value="chapter">章节</option>
|
|
@@ -625,6 +627,7 @@
|
|
|
625
627
|
<option value="chapter-outline">章节大纲</option>
|
|
626
628
|
<option value="foreshadow">伏笔</option>
|
|
627
629
|
<option value="review">审核项</option>
|
|
630
|
+
<option value="agent-history">Agent 历史</option>
|
|
628
631
|
</select></label>
|
|
629
632
|
<button class="primary-button" type="submit">搜索</button>
|
|
630
633
|
</form>
|
|
@@ -951,6 +954,6 @@
|
|
|
951
954
|
<div id="auth-loading" class="auth-loading" role="status" aria-label="正在载入工作台"></div>
|
|
952
955
|
<script id="vditorIconScript" src="/vendor/vditor/dist/js/icons/ant.js?v=3.11.2"></script>
|
|
953
956
|
<script src="/vendor/vditor/dist/index.min.js?v=3.11.2"></script>
|
|
954
|
-
<script type="module" src="/app.js?v=
|
|
957
|
+
<script type="module" src="/app.js?v=20260804-agent-history-search-v1"></script>
|
|
955
958
|
</body>
|
|
956
959
|
</html>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const MODEL_PURPOSE_OPTIONS: ReadonlyArray<readonly [string, string]>;
|
|
2
2
|
export const MIN_MODEL_CONTEXT_WINDOW: number;
|
|
3
3
|
export const RECOMMENDED_MODEL_CONTEXT_WINDOW: number;
|
|
4
|
+
export function supportsMultimodalModelProtocol(protocol: string | null | undefined): boolean;
|
|
4
5
|
|
|
5
6
|
export type ModelFormValues = {
|
|
6
7
|
displayName: string;
|
|
@@ -10,6 +11,8 @@ export type ModelFormValues = {
|
|
|
10
11
|
temperature: number;
|
|
11
12
|
maxTokens: number;
|
|
12
13
|
thinkingEnabled: boolean;
|
|
14
|
+
multimodalEnabled: boolean;
|
|
15
|
+
imageToolDefault: boolean;
|
|
13
16
|
enabled: boolean;
|
|
14
17
|
};
|
|
15
18
|
|
|
@@ -12,6 +12,10 @@ export const MODEL_PURPOSE_OPTIONS = Object.freeze([
|
|
|
12
12
|
export const MIN_MODEL_CONTEXT_WINDOW = 32_768;
|
|
13
13
|
export const RECOMMENDED_MODEL_CONTEXT_WINDOW = 128_000;
|
|
14
14
|
|
|
15
|
+
export function supportsMultimodalModelProtocol(protocol) {
|
|
16
|
+
return protocol === "openai-chat-completions";
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
const purposeAliases = new Map([
|
|
16
20
|
...MODEL_PURPOSE_OPTIONS.flatMap(([key, label]) => [[key, key], [label, key]]),
|
|
17
21
|
["章节分析", "chapter-analysis"],
|
|
@@ -52,6 +56,8 @@ export function modelFormValues(model = null) {
|
|
|
52
56
|
: (configuredTemperature ?? 0.7),
|
|
53
57
|
maxTokens: model?.preset?.max_tokens ?? 32000,
|
|
54
58
|
thinkingEnabled: model?.thinkingEnabled ?? true,
|
|
59
|
+
multimodalEnabled: model?.multimodalEnabled ?? false,
|
|
60
|
+
imageToolDefault: model?.imageToolDefault ?? false,
|
|
55
61
|
enabled: model?.enabled ?? true
|
|
56
62
|
};
|
|
57
63
|
}
|
|
@@ -69,6 +75,8 @@ export function modelPayload(values, existingPreset = {}) {
|
|
|
69
75
|
max_tokens: Number(values.maxTokens)
|
|
70
76
|
},
|
|
71
77
|
thinkingEnabled: Boolean(values.thinkingEnabled),
|
|
78
|
+
multimodalEnabled: Boolean(values.multimodalEnabled),
|
|
79
|
+
imageToolDefault: Boolean(values.imageToolDefault),
|
|
72
80
|
enabled: Boolean(values.enabled)
|
|
73
81
|
};
|
|
74
82
|
}
|
package/dist/public/styles.css
CHANGED
|
@@ -400,6 +400,7 @@ input[type="checkbox"][hidden] { display: none; }
|
|
|
400
400
|
.presence-person-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
|
|
401
401
|
.presence-same-page { color: var(--accent-dark); font-size: 9px; white-space: nowrap; }
|
|
402
402
|
.theme-toggle, .settings-button, .topbar-icon-button {
|
|
403
|
+
position: relative;
|
|
403
404
|
display: grid;
|
|
404
405
|
flex: 0 0 34px;
|
|
405
406
|
place-items: center;
|
|
@@ -411,6 +412,16 @@ input[type="checkbox"][hidden] { display: none; }
|
|
|
411
412
|
background: transparent;
|
|
412
413
|
color: var(--muted);
|
|
413
414
|
}
|
|
415
|
+
.settings-update-dot {
|
|
416
|
+
position: absolute;
|
|
417
|
+
top: -2px;
|
|
418
|
+
right: -2px;
|
|
419
|
+
width: 9px;
|
|
420
|
+
height: 9px;
|
|
421
|
+
border: 2px solid var(--paper);
|
|
422
|
+
border-radius: 50%;
|
|
423
|
+
background: #d9363e;
|
|
424
|
+
}
|
|
414
425
|
.theme-toggle:hover, .theme-toggle:focus-visible,
|
|
415
426
|
.settings-button:hover, .settings-button:focus-visible, .settings-button[aria-current="page"],
|
|
416
427
|
.topbar-icon-button:hover, .topbar-icon-button:focus-visible {
|
|
@@ -720,6 +731,8 @@ body.is-panel-resizing { cursor: col-resize; user-select: none; }
|
|
|
720
731
|
.product-footer a { color: inherit; text-decoration: none; text-underline-offset: 3px; transition: color .14s ease; }
|
|
721
732
|
.product-footer a:hover, .product-footer a:focus-visible { color: var(--accent-dark); text-decoration: underline; }
|
|
722
733
|
.product-footer-development { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-dark); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
|
|
734
|
+
.product-footer .product-footer-update { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent-dark); font-weight: 700; }
|
|
735
|
+
.product-footer .product-footer-update:hover, .product-footer .product-footer-update:focus-visible { color: var(--accent-dark); }
|
|
723
736
|
.auth-product-footer { align-self: end; max-width: 440px; margin: 0; padding-top: 14px; }
|
|
724
737
|
.settings-product-footer { max-width: 1000px; }
|
|
725
738
|
.access-dialog-body { display: grid; gap: 16px; max-height: calc(88vh - 82px); overflow-y: auto; padding: 18px 24px 22px; }
|
|
@@ -1268,6 +1281,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
1268
1281
|
.module-header h1 { margin: 0 0 6px; font-weight: 500; font-size: 24px; line-height: 1.25; }
|
|
1269
1282
|
.module-header p { margin: 0; color: var(--muted); font-size: 13px; }
|
|
1270
1283
|
.module-content { padding: 24px 0 80px; }
|
|
1284
|
+
#platform-ai-content { width: 100%; max-width: 1400px; margin-inline: auto; }
|
|
1271
1285
|
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px; }
|
|
1272
1286
|
.record-card { position: relative; border: 1px solid var(--line); background: var(--surface-soft); padding: 18px; min-height: 130px; border-radius: 4px; }
|
|
1273
1287
|
.record-card.has-card-edit h3 { padding-right: 34px; }
|
|
@@ -1411,6 +1425,11 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
1411
1425
|
.config-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
|
|
1412
1426
|
.config-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
|
|
1413
1427
|
.platform-system-prompt-section { margin-bottom: 36px; }
|
|
1428
|
+
.platform-image-tool-section { margin-bottom: 0; }
|
|
1429
|
+
.platform-image-tool-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
|
|
1430
|
+
.platform-image-tool-field { display: grid; flex: 1 1 360px; gap: 7px; min-width: 0; color: var(--muted); font-size: 10px; }
|
|
1431
|
+
.platform-image-tool-field select { width: 100%; height: 36px; min-height: 36px; padding: 8px 10px; font-size: 12px; }
|
|
1432
|
+
.platform-image-tool-panel .config-save-button { flex: 0 0 auto; min-height: 36px; padding: 8px 14px; }
|
|
1414
1433
|
.task-auto-run-panel {
|
|
1415
1434
|
display: grid;
|
|
1416
1435
|
grid-template-columns: minmax(0, 1fr) 148px;
|
|
@@ -2147,6 +2166,13 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2147
2166
|
.config-section .config-save-button { min-height: 32px; padding: 5px 11px; font-size: 11px; }
|
|
2148
2167
|
.config-section .card-actions { margin-top: 12px; }
|
|
2149
2168
|
.config-section .card-actions .config-save-button { border: 1px solid var(--line); background: transparent; color: var(--ink); }
|
|
2169
|
+
.platform-image-tool-panel .config-save-button:hover, .platform-image-tool-panel .config-save-button:focus-visible { border-color: var(--accent); background: var(--paper-deep); color: var(--accent-dark); }
|
|
2170
|
+
@media (max-width: 850px) {
|
|
2171
|
+
.platform-image-tool-panel { align-items: stretch; flex-direction: column; }
|
|
2172
|
+
.platform-image-tool-field { flex: 0 0 auto; }
|
|
2173
|
+
.platform-image-tool-field select, .platform-image-tool-panel .config-save-button { height: 40px; min-height: 40px; }
|
|
2174
|
+
.platform-image-tool-panel .config-save-button { width: 100%; }
|
|
2175
|
+
}
|
|
2150
2176
|
.field-label textarea {
|
|
2151
2177
|
width: 100%;
|
|
2152
2178
|
min-height: 140px;
|
|
@@ -2167,6 +2193,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2167
2193
|
.ai-context-compaction-divider span { letter-spacing: .08em; white-space: nowrap; }
|
|
2168
2194
|
.assistant-message, .user-message { position: relative; margin-bottom: 12px; padding: 12px 13px; border-radius: 5px; font-size: 12px; line-height: 1.55; }
|
|
2169
2195
|
.assistant-message { background: var(--paper-deep); }
|
|
2196
|
+
.assistant-message.is-search-target, .user-message.is-search-target { outline: 2px solid var(--accent); outline-offset: 3px; }
|
|
2170
2197
|
.assistant-message.is-error { border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--paper-deep)); }
|
|
2171
2198
|
.assistant-message.has-message-actions, .user-message.has-message-actions { margin-bottom: 42px; }
|
|
2172
2199
|
.user-message { margin-left: 24px; background: var(--accent); color: #fff; }
|
|
@@ -2243,8 +2270,9 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2243
2270
|
.ai-tool-call-detail section { min-width: 0; }
|
|
2244
2271
|
.ai-tool-call-detail h3 { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 600; }
|
|
2245
2272
|
.ai-tool-call-detail pre { min-height: 120px; max-height: 32vh; overflow: auto; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper-deep); color: var(--ink); font: 10px/1.55 var(--font-latin), monospace; white-space: pre-wrap; word-break: break-word; }
|
|
2273
|
+
#ai-tool-call-arguments { min-height: 0; max-height: 26vh; }
|
|
2246
2274
|
.ai-tool-call-detail section:last-child pre { min-height: 180px; }
|
|
2247
|
-
@media (max-width: 680px) { .ai-tool-call-info { grid-template-columns: minmax(0, 1fr); }.ai-tool-call-detail pre { min-height: 100px; max-height: 26vh; }.ai-tool-call-detail section:last-child pre { min-height: 140px; } }
|
|
2275
|
+
@media (max-width: 680px) { .ai-tool-call-info { grid-template-columns: minmax(0, 1fr); }.ai-tool-call-detail pre { min-height: 100px; max-height: 26vh; }#ai-tool-call-arguments { min-height: 0; max-height: 20vh; }.ai-tool-call-detail section:last-child pre { min-height: 140px; } }
|
|
2248
2276
|
.guard-card { margin-top: 10px; padding: 9px 10px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 4px; background: var(--surface-soft); }
|
|
2249
2277
|
.guard-card.warning { border-left-color: #c07b31; }.guard-card.failed { border-left-color: var(--accent); }
|
|
2250
2278
|
.guard-card strong { display: block; margin-bottom: 5px; font-size: 10px; }.guard-card p { margin: 4px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }.guard-card p b { color: var(--ink); }
|
|
@@ -2500,6 +2528,8 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2500
2528
|
.background-task-row > div small { color: var(--muted); font-size: 9px; }
|
|
2501
2529
|
.background-task-row .task-status-badge { min-height: 24px; padding: 3px 8px; font-size: 9px; }
|
|
2502
2530
|
.background-task-row .ghost-button { min-height: 30px; padding: 5px 9px; font-size: 10px; }
|
|
2531
|
+
.background-update-link { display: grid; place-items: center; text-decoration: none; }
|
|
2532
|
+
.background-task-action-placeholder { width: 42px; }
|
|
2503
2533
|
.background-task-progress { color: var(--muted); font-family: var(--font-latin), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; text-align: right; }
|
|
2504
2534
|
.background-task-empty, .background-task-error { margin: 0; padding: 12px; color: var(--muted); font-size: 10px; text-align: center; }
|
|
2505
2535
|
.background-task-error { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--accent-dark); text-align: left; }
|
|
@@ -2507,6 +2537,16 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2507
2537
|
.background-task-actions #background-task-open-analysis { margin-right: auto; }
|
|
2508
2538
|
.merge-dialog-note { margin: 0; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--surface-soft); color: var(--muted); font-size: 11px; line-height: 1.6; }
|
|
2509
2539
|
.form-field { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
|
|
2540
|
+
.model-multimodal-fields { gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
|
|
2541
|
+
.model-multimodal-heading { color: var(--ink); font-size: 12px; font-weight: 600; }
|
|
2542
|
+
.model-multimodal-fields .model-capability-option { display: grid !important; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink) !important; transition: border-color .15s ease, background-color .15s ease; }
|
|
2543
|
+
.model-multimodal-fields .model-capability-option[hidden], .model-multimodal-fields .model-capability-option.hidden { display: none !important; }
|
|
2544
|
+
.model-capability-option > input { width: 16px !important; min-width: 16px; margin-top: 2px; }
|
|
2545
|
+
.model-capability-option > span { display: grid; gap: 4px; min-width: 0; }
|
|
2546
|
+
.model-capability-option strong { color: var(--ink); font-size: 11px; font-weight: 600; }
|
|
2547
|
+
.model-capability-option small, .model-multimodal-note { color: var(--muted); font-size: 9px; line-height: 1.5; }
|
|
2548
|
+
.model-capability-option:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 62%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
|
|
2549
|
+
.model-multimodal-note { margin: 0 2px; }
|
|
2510
2550
|
.analysis-type-description { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
|
|
2511
2551
|
.task-chapter-field { transition: opacity .15s ease; }
|
|
2512
2552
|
.task-chapter-field.is-disabled { opacity: .48; }
|
|
@@ -2727,6 +2767,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2727
2767
|
.setting-editor-content { height: 100%; min-height: 0; padding: 16px clamp(16px, 2vw, 32px) 24px; overflow: hidden; }
|
|
2728
2768
|
.setting-markdown-field { display: grid; grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
|
|
2729
2769
|
.entity-editor-page.is-read-only .vditor-ir pre.vditor-reset[contenteditable="false"], .entity-editor-page.is-read-only .vditor-wysiwyg pre.vditor-reset[contenteditable="false"], .entity-editor-page.is-read-only .vditor-sv[contenteditable="false"] { opacity: 1; cursor: default; }
|
|
2770
|
+
.markdown-editor-field.is-read-only .vditor-ir pre.vditor-reset[contenteditable="false"], .markdown-editor-field.is-read-only .vditor-wysiwyg pre.vditor-reset[contenteditable="false"], .markdown-editor-field.is-read-only .vditor-sv[contenteditable="false"] { opacity: 1; cursor: default; }
|
|
2730
2771
|
.setting-markdown-heading, .markdown-editor-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; color: var(--ink); font-size: 14px; }
|
|
2731
2772
|
.setting-markdown-heading small, .markdown-editor-field-heading small { color: var(--muted); font-size: 10px; }
|
|
2732
2773
|
.markdown-editor-field { display: grid; gap: 10px; min-width: 0; }
|
|
@@ -2753,6 +2794,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
2753
2794
|
.vditor-editor-host.vditor--dark .vditor-reset table tr { background: var(--surface); border-top-color: var(--line); }
|
|
2754
2795
|
.vditor-editor-host.vditor--dark .vditor-reset table td, .vditor-editor-host.vditor--dark .vditor-reset table th { border-color: var(--line); color: var(--ink); }
|
|
2755
2796
|
.vditor-editor-host.vditor--dark .vditor-reset table tbody tr:nth-child(2n) { background: var(--surface-soft); }
|
|
2797
|
+
.editor-dialog .dialog-fields input[readonly], .editor-dialog .dialog-fields textarea[readonly], .editor-dialog .dialog-fields select:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; cursor: default; }
|
|
2756
2798
|
.record-markdown-preview { display: -webkit-box; margin: 12px 0 8px; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 12; }
|
|
2757
2799
|
.record-markdown-preview > :first-child, .knowledge-markdown-block .message-body > :first-child { margin-top: 0; }
|
|
2758
2800
|
.record-markdown-preview > :last-child, .knowledge-markdown-block .message-body > :last-child { margin-bottom: 0; }
|
|
@@ -3168,7 +3210,7 @@ select:focus, input:focus, textarea:focus { border-color: #a77768; box-shadow: 0
|
|
|
3168
3210
|
.app-shell.ai-panel-collapsed .ai-panel > :not(.ai-heading) { display: none; }
|
|
3169
3211
|
.app-shell.ai-panel-collapsed .ai-heading { display: flex; justify-content: space-between; padding: 0; }
|
|
3170
3212
|
|
|
3171
|
-
.shelf-view { height:
|
|
3213
|
+
.shelf-view { height: 100%; min-height: 0; padding: 28px var(--mobile-gutter) 42px; }
|
|
3172
3214
|
#shelf-view, #settings-hub-view { padding-bottom: 0; }
|
|
3173
3215
|
#shelf-view .product-footer, #settings-hub-view .product-footer { margin-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
|
|
3174
3216
|
.shelf-header, .module-header { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 20px; }
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
const githubLatestReleaseUrl = "https://api.github.com/repos/musnows/Scriverse/releases/latest";
|
|
2
|
+
const githubReleasePathPrefix = "/musnows/Scriverse/releases/";
|
|
3
|
+
const minutesToMilliseconds = 60 * 1000;
|
|
4
|
+
const secondsToMilliseconds = 1000;
|
|
5
|
+
export const defaultReleaseCheckIntervalMs = 60 * minutesToMilliseconds;
|
|
6
|
+
export const minimumReleaseCheckIntervalMs = 10 * minutesToMilliseconds;
|
|
7
|
+
export const maximumReleaseCheckIntervalMs = 7 * 24 * 60 * minutesToMilliseconds;
|
|
8
|
+
export const defaultReleaseCheckTimeoutMs = 90 * secondsToMilliseconds;
|
|
9
|
+
export const maximumReleaseCheckTimeoutMs = 300 * secondsToMilliseconds;
|
|
10
|
+
export const defaultReleaseCheckRetries = 1;
|
|
11
|
+
export const maximumReleaseCheckRetries = 5;
|
|
12
|
+
export function resolveReleaseCheckIntervalMs(value) {
|
|
13
|
+
if (value === undefined || value.trim() === "")
|
|
14
|
+
return defaultReleaseCheckIntervalMs;
|
|
15
|
+
const minutes = Number(value);
|
|
16
|
+
if (!Number.isFinite(minutes))
|
|
17
|
+
return defaultReleaseCheckIntervalMs;
|
|
18
|
+
if (minutes === 0)
|
|
19
|
+
return 0;
|
|
20
|
+
return Math.min(maximumReleaseCheckIntervalMs, Math.max(minimumReleaseCheckIntervalMs, Math.round(minutes * minutesToMilliseconds)));
|
|
21
|
+
}
|
|
22
|
+
export function resolveReleaseCheckTimeoutMs(value) {
|
|
23
|
+
if (value === undefined || value.trim() === "")
|
|
24
|
+
return defaultReleaseCheckTimeoutMs;
|
|
25
|
+
const seconds = Number(value);
|
|
26
|
+
if (!Number.isFinite(seconds) || seconds <= 0)
|
|
27
|
+
return defaultReleaseCheckTimeoutMs;
|
|
28
|
+
return Math.min(maximumReleaseCheckTimeoutMs, Math.round(seconds * secondsToMilliseconds));
|
|
29
|
+
}
|
|
30
|
+
export function resolveReleaseCheckRetries(value) {
|
|
31
|
+
if (value === undefined || value.trim() === "")
|
|
32
|
+
return defaultReleaseCheckRetries;
|
|
33
|
+
const retries = Number(value);
|
|
34
|
+
if (!Number.isFinite(retries) || retries < 0)
|
|
35
|
+
return defaultReleaseCheckRetries;
|
|
36
|
+
return Math.min(maximumReleaseCheckRetries, Math.floor(retries));
|
|
37
|
+
}
|
|
38
|
+
function parseVersion(value) {
|
|
39
|
+
const match = value.trim().match(/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/u);
|
|
40
|
+
if (!match)
|
|
41
|
+
return null;
|
|
42
|
+
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
43
|
+
}
|
|
44
|
+
export function isNewerRelease(currentVersion, candidateVersion) {
|
|
45
|
+
const current = parseVersion(currentVersion);
|
|
46
|
+
const candidate = parseVersion(candidateVersion);
|
|
47
|
+
if (!current || !candidate)
|
|
48
|
+
return false;
|
|
49
|
+
for (let index = 0; index < current.length; index += 1) {
|
|
50
|
+
const currentPart = current[index];
|
|
51
|
+
const candidatePart = candidate[index];
|
|
52
|
+
if (candidatePart !== currentPart)
|
|
53
|
+
return candidatePart > currentPart;
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
function validatedReleaseUrl(value) {
|
|
58
|
+
if (typeof value !== "string")
|
|
59
|
+
return null;
|
|
60
|
+
try {
|
|
61
|
+
const url = new URL(value);
|
|
62
|
+
if (url.protocol !== "https:" || url.hostname !== "github.com")
|
|
63
|
+
return null;
|
|
64
|
+
if (!url.pathname.toLocaleLowerCase().startsWith(githubReleasePathPrefix.toLocaleLowerCase()))
|
|
65
|
+
return null;
|
|
66
|
+
return url.toString();
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export class ReleaseUpdateChecker {
|
|
73
|
+
currentVersion;
|
|
74
|
+
fetchImpl;
|
|
75
|
+
intervalMs;
|
|
76
|
+
timeoutMs;
|
|
77
|
+
retries;
|
|
78
|
+
now;
|
|
79
|
+
cached = null;
|
|
80
|
+
inFlight = null;
|
|
81
|
+
constructor(currentVersion, fetchImpl = fetch, options = {}) {
|
|
82
|
+
this.currentVersion = currentVersion;
|
|
83
|
+
this.fetchImpl = fetchImpl;
|
|
84
|
+
const configuredIntervalMs = options.intervalMs ?? defaultReleaseCheckIntervalMs;
|
|
85
|
+
this.intervalMs = configuredIntervalMs === 0
|
|
86
|
+
? 0
|
|
87
|
+
: Math.min(maximumReleaseCheckIntervalMs, Math.max(minimumReleaseCheckIntervalMs, Number.isFinite(configuredIntervalMs) ? Math.round(configuredIntervalMs) : defaultReleaseCheckIntervalMs));
|
|
88
|
+
this.timeoutMs = Math.max(secondsToMilliseconds, Math.min(maximumReleaseCheckTimeoutMs, options.timeoutMs ?? defaultReleaseCheckTimeoutMs));
|
|
89
|
+
this.retries = Math.min(maximumReleaseCheckRetries, Math.max(0, Math.floor(options.retries ?? defaultReleaseCheckRetries)));
|
|
90
|
+
this.now = options.now ?? Date.now;
|
|
91
|
+
}
|
|
92
|
+
check() {
|
|
93
|
+
if (this.intervalMs === 0) {
|
|
94
|
+
return Promise.resolve({
|
|
95
|
+
enabled: false,
|
|
96
|
+
checked: false,
|
|
97
|
+
updateAvailable: false,
|
|
98
|
+
currentVersion: this.currentVersion
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
if (this.cached && this.cached.expiresAt > this.now())
|
|
102
|
+
return Promise.resolve(this.cached.result);
|
|
103
|
+
if (this.inFlight)
|
|
104
|
+
return this.inFlight;
|
|
105
|
+
this.inFlight = this.fetchLatestRelease().then((result) => {
|
|
106
|
+
const checkedAt = this.now();
|
|
107
|
+
const scheduledResult = {
|
|
108
|
+
...result,
|
|
109
|
+
checkedAt: new Date(checkedAt).toISOString(),
|
|
110
|
+
nextCheckAt: new Date(checkedAt + this.intervalMs).toISOString()
|
|
111
|
+
};
|
|
112
|
+
this.cached = {
|
|
113
|
+
expiresAt: checkedAt + this.intervalMs,
|
|
114
|
+
result: scheduledResult
|
|
115
|
+
};
|
|
116
|
+
return scheduledResult;
|
|
117
|
+
}).finally(() => {
|
|
118
|
+
this.inFlight = null;
|
|
119
|
+
});
|
|
120
|
+
return this.inFlight;
|
|
121
|
+
}
|
|
122
|
+
async fetchLatestRelease() {
|
|
123
|
+
const unavailable = {
|
|
124
|
+
enabled: true,
|
|
125
|
+
checked: false,
|
|
126
|
+
updateAvailable: false,
|
|
127
|
+
currentVersion: this.currentVersion
|
|
128
|
+
};
|
|
129
|
+
for (let attempt = 0; attempt <= this.retries; attempt += 1) {
|
|
130
|
+
try {
|
|
131
|
+
const response = await this.fetchImpl(githubLatestReleaseUrl, {
|
|
132
|
+
headers: {
|
|
133
|
+
Accept: "application/vnd.github+json",
|
|
134
|
+
"User-Agent": "Scriverse-Update-Checker",
|
|
135
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
136
|
+
},
|
|
137
|
+
signal: AbortSignal.timeout(this.timeoutMs)
|
|
138
|
+
});
|
|
139
|
+
if (!response.ok)
|
|
140
|
+
continue;
|
|
141
|
+
const payload = await response.json();
|
|
142
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload))
|
|
143
|
+
continue;
|
|
144
|
+
const release = payload;
|
|
145
|
+
if (typeof release.tag_name !== "string")
|
|
146
|
+
continue;
|
|
147
|
+
const releaseUrl = validatedReleaseUrl(release.html_url);
|
|
148
|
+
if (!releaseUrl)
|
|
149
|
+
continue;
|
|
150
|
+
const latestVersion = release.tag_name.trim().replace(/^v/u, "");
|
|
151
|
+
if (!parseVersion(latestVersion))
|
|
152
|
+
continue;
|
|
153
|
+
const updateAvailable = isNewerRelease(this.currentVersion, latestVersion);
|
|
154
|
+
return {
|
|
155
|
+
enabled: true,
|
|
156
|
+
checked: true,
|
|
157
|
+
updateAvailable,
|
|
158
|
+
currentVersion: this.currentVersion,
|
|
159
|
+
latestVersion,
|
|
160
|
+
...(updateAvailable ? { releaseUrl } : {})
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
// 网络错误和超时由内部重试处理,耗尽次数后静默返回未探测状态
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return unavailable;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=release-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-update.js","sourceRoot":"","sources":["../src/release-update.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,gEAAgE,CAAC;AAChG,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAC/D,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,CAAC;AACxC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,qBAAqB,CAAC;AACxE,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,qBAAqB,CAAC;AACxE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,qBAAqB,CAAC;AACjF,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,qBAAqB,CAAC;AACvE,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,GAAG,qBAAqB,CAAC;AACxE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAa5C,MAAM,UAAU,6BAA6B,CAAC,KAAyB;IACrE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,6BAA6B,CAAC;IACrF,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,MAAM,CAA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AE,IAAI;oBACb,eAAe;oBACf,cAAc,EAAE,IAAI,CAAC,cAAc;oBACnC,aAAa;oBACb,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC3C,CAAC;YACJ,CAAC;YAAC,MAAM,CAAC;gBACP,gCAAgC;YAClC,CAAC;QACH,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
|
package/dist/server-runtime.js
CHANGED
|
@@ -6,6 +6,7 @@ import { DATABASE_SCHEMA_VERSION, readDatabaseSchemaVersion } from "./database.j
|
|
|
6
6
|
import { loadMasterSecret } from "./credential-vault.js";
|
|
7
7
|
import { isDevelopmentAuthBypassEnabled, resolveRuntimeSecurity } from "./security.js";
|
|
8
8
|
import { logger, sanitizeError } from "./logger.js";
|
|
9
|
+
import { resolveReleaseCheckIntervalMs, resolveReleaseCheckRetries, resolveReleaseCheckTimeoutMs } from "./release-update.js";
|
|
9
10
|
const publicPath = fileURLToPath(new URL("./public/", import.meta.url));
|
|
10
11
|
export function isDevelopmentServer(environment) {
|
|
11
12
|
return environment.NODE_ENV === "development" || environment.npm_lifecycle_event === "dev";
|
|
@@ -77,7 +78,10 @@ export async function startLocalServer(options) {
|
|
|
77
78
|
security,
|
|
78
79
|
disableUserAuth: devAuthBypass,
|
|
79
80
|
devAuthBypass,
|
|
80
|
-
developmentServer: isDevelopmentServer(options.env)
|
|
81
|
+
developmentServer: isDevelopmentServer(options.env),
|
|
82
|
+
releaseCheckIntervalMs: resolveReleaseCheckIntervalMs(options.env.APP_UPDATE_CHECK_INTERVAL_MINUTES),
|
|
83
|
+
releaseCheckTimeoutMs: resolveReleaseCheckTimeoutMs(options.env.APP_UPDATE_CHECK_TIMEOUT_SECONDS),
|
|
84
|
+
releaseCheckRetries: resolveReleaseCheckRetries(options.env.APP_UPDATE_CHECK_RETRIES)
|
|
81
85
|
});
|
|
82
86
|
await runtime.cleanupAttachments();
|
|
83
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-runtime.js","sourceRoot":"","sources":["../src/server-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAgB,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAA+B,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"server-runtime.js","sourceRoot":"","sources":["../src/server-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAgB,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAA+B,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,6BA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