dsh-sidenote 0.4.4 → 0.4.6
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/lib/client.js +349 -177
- package/lib/types/client/annotate/index.d.ts +2 -0
- package/lib/types/client/annotate/overlay.d.ts +17 -1
- package/lib/types/client/host/contracts.d.ts +16 -0
- package/lib/types/client/host/currentSession.d.ts +8 -0
- package/lib/types/client/host/icons.d.ts +32 -0
- package/lib/types/client/sidechat/lifecycle.d.ts +9 -1
- package/package.json +1 -1
- package/src/client/annotate/chip.tsx +1 -1
- package/src/client/annotate/index.tsx +5 -1
- package/src/client/annotate/overlay.tsx +21 -5
- package/src/client/annotate/send.ts +2 -7
- package/src/client/chat/FoldCard.tsx +2 -1
- package/src/client/chat/ReasoningRow.tsx +2 -1
- package/src/client/chat/ToolCard.tsx +8 -6
- package/src/client/host/contracts.ts +14 -0
- package/src/client/host/currentSession.ts +18 -0
- package/src/client/host/icons.ts +48 -0
- package/src/client/sidechat/ComposerBar.tsx +1 -1
- package/src/client/sidechat/ModelMenu.tsx +2 -1
- package/src/client/sidechat/PendingCard.tsx +1 -1
- package/src/client/sidechat/PermissionChip.tsx +2 -1
- package/src/client/sidechat/SideChatPanel.tsx +37 -11
- package/src/client/sidechat/header.tsx +7 -3
- package/src/client/sidechat/index.tsx +4 -3
- package/src/client/sidechat/lifecycle.ts +108 -24
- package/src/client/sidechat/native-tab.tsx +1 -1
- package/src/client/sidechat/open.ts +5 -3
- package/src/client/sidechat/rows.tsx +2 -1
package/lib/client.js
CHANGED
|
@@ -4,8 +4,31 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
//#region \0rolldown/runtime.js
|
|
8
|
+
var __create = Object.create;
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
16
|
+
key = keys[i];
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: ((k) => from[k]).bind(null, key),
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : target, mod));
|
|
28
|
+
//#endregion
|
|
7
29
|
let react = require("react");
|
|
8
30
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
31
|
+
_deepseek_ai_dsh_client_ui_primitives = __toESM(_deepseek_ai_dsh_client_ui_primitives, 1);
|
|
9
32
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
33
|
let react_dom_client = require("react-dom/client");
|
|
11
34
|
//#region src/client/sidechat/native.ts
|
|
@@ -863,6 +886,22 @@ window.__ModuleLoader__.load({
|
|
|
863
886
|
};
|
|
864
887
|
}
|
|
865
888
|
//#endregion
|
|
889
|
+
//#region src/client/host/currentSession.ts
|
|
890
|
+
/**
|
|
891
|
+
* 当前(在屏)会话 id 的双版本探测:0.1.5 的 SessionListState 带 `current`
|
|
892
|
+
* 字段;0.1.7 移除了它(列表只剩 ids/byId/phase),改为会话视图 DOM 的
|
|
893
|
+
* `[data-conversation-session]` 属性携带。两源皆空 → ''(调用方按既有
|
|
894
|
+
* 降级语义处理:守卫拒绝、工具条不弹、按钮不渲染)。
|
|
895
|
+
*/
|
|
896
|
+
function currentSessionIdOf(ctx) {
|
|
897
|
+
try {
|
|
898
|
+
const current = ctx.sessions.list.getSnapshot().current;
|
|
899
|
+
if (typeof current === "string" && current !== "") return current;
|
|
900
|
+
} catch {}
|
|
901
|
+
if (typeof document === "undefined") return "";
|
|
902
|
+
return document.querySelector("[data-conversation-session]")?.dataset.conversationSession ?? "";
|
|
903
|
+
}
|
|
904
|
+
//#endregion
|
|
866
905
|
//#region src/client/sidechat/metaStore.ts
|
|
867
906
|
const KEY_PREFIX$1 = "dsh-sidenote:side-meta:v1:";
|
|
868
907
|
/**
|
|
@@ -1130,7 +1169,7 @@ window.__ModuleLoader__.load({
|
|
|
1130
1169
|
/** 直连腿:聚焦既有(三级数据源)或铸造新开。 */
|
|
1131
1170
|
function openOrFocusDirect(ctx, sessionId, draftText) {
|
|
1132
1171
|
try {
|
|
1133
|
-
if (ctx
|
|
1172
|
+
if (currentSessionIdOf(ctx) !== sessionId) return false;
|
|
1134
1173
|
const hasDraft = draftText !== void 0 && draftText !== "";
|
|
1135
1174
|
const live = lastLiveSideChat(sessionId);
|
|
1136
1175
|
if (live !== void 0) {
|
|
@@ -1240,7 +1279,7 @@ window.__ModuleLoader__.load({
|
|
|
1240
1279
|
function sideChatTargetTitle(ctx, sessionId) {
|
|
1241
1280
|
try {
|
|
1242
1281
|
if (directLeg(ctx)) {
|
|
1243
|
-
if (ctx
|
|
1282
|
+
if (currentSessionIdOf(ctx) !== sessionId) return void 0;
|
|
1244
1283
|
const live = lastLiveSideChat(sessionId);
|
|
1245
1284
|
if (live !== void 0) return live.readTitle();
|
|
1246
1285
|
const metas = sideChatMetasOf(sessionId);
|
|
@@ -1269,7 +1308,7 @@ window.__ModuleLoader__.load({
|
|
|
1269
1308
|
*/
|
|
1270
1309
|
function reopenSideChat(ctx, sessionId, childId, opts) {
|
|
1271
1310
|
if (directLeg(ctx)) try {
|
|
1272
|
-
if (ctx
|
|
1311
|
+
if (currentSessionIdOf(ctx) !== sessionId) return false;
|
|
1273
1312
|
if (sideChatMetasOf(sessionId).length > 0) return false;
|
|
1274
1313
|
sidebarRightOf(ctx).openTab(SIDE_TAB_TYPE, { params: {
|
|
1275
1314
|
parentSessionId: sessionId,
|
|
@@ -2171,6 +2210,15 @@ ${entries.map((entry) => {
|
|
|
2171
2210
|
}
|
|
2172
2211
|
//#endregion
|
|
2173
2212
|
//#region src/client/sidechat/lifecycle.ts
|
|
2213
|
+
/** 0.1.7+ 显式持有 Session generation;旧宿主无 retain 时保持原行为。 */
|
|
2214
|
+
function retainSession(ctx, sessionId, signal) {
|
|
2215
|
+
const retain = ctx.sessions.retain;
|
|
2216
|
+
if (typeof retain !== "function") return void 0;
|
|
2217
|
+
return retain.call(ctx.sessions, sessionId, {
|
|
2218
|
+
source: "dsh-sidenote",
|
|
2219
|
+
...signal === void 0 ? {} : { signal }
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2174
2222
|
/**
|
|
2175
2223
|
* 主线忙碌判定(busy-fork 路由)。2026-09-22 实证的宿主 fork 语义缺口:fork
|
|
2176
2224
|
* 一个 turn 在飞的会话,会把在飞消息以「未认领的 inbox splice」形态遗传
|
|
@@ -2205,9 +2253,9 @@ ${entries.map((entry) => {
|
|
|
2205
2253
|
return purgingChildren.has(childId);
|
|
2206
2254
|
}
|
|
2207
2255
|
/** 读父会话当前最大节点 seq(折叠边界;读不到不阻断)。 */
|
|
2208
|
-
function readMaxNodeSeq(ctx, sessionId) {
|
|
2256
|
+
function readMaxNodeSeq(ctx, sessionId, binding) {
|
|
2209
2257
|
try {
|
|
2210
|
-
const snap = chatSourceOf(ctx, ctx.sessions.binding(sessionId))?.getLegacy();
|
|
2258
|
+
const snap = chatSourceOf(ctx, binding ?? ctx.sessions.binding(sessionId))?.getLegacy();
|
|
2211
2259
|
let max = -1;
|
|
2212
2260
|
for (const node of snap?.nodes ?? []) {
|
|
2213
2261
|
const seq = node.seq;
|
|
@@ -2314,19 +2362,28 @@ ${entries.map((entry) => {
|
|
|
2314
2362
|
if (purgingChildren.has(childId)) return;
|
|
2315
2363
|
purgingChildren.add(childId);
|
|
2316
2364
|
let settled = false;
|
|
2365
|
+
let retained;
|
|
2317
2366
|
const offs = [];
|
|
2367
|
+
const releaseRetained = () => {
|
|
2368
|
+
retained?.release();
|
|
2369
|
+
retained = void 0;
|
|
2370
|
+
};
|
|
2318
2371
|
const markPurged = () => {
|
|
2319
2372
|
updateTabMeta(ctx, parentSessionId, tabId, (cur) => ({
|
|
2320
2373
|
...cur,
|
|
2321
2374
|
inheritedPurged: true
|
|
2322
2375
|
}));
|
|
2323
2376
|
};
|
|
2324
|
-
const
|
|
2325
|
-
if (settled) return;
|
|
2377
|
+
const stop = () => {
|
|
2378
|
+
if (settled) return false;
|
|
2326
2379
|
settled = true;
|
|
2327
2380
|
for (const off of offs) off();
|
|
2328
2381
|
purgingChildren.delete(childId);
|
|
2329
|
-
|
|
2382
|
+
releaseRetained();
|
|
2383
|
+
return true;
|
|
2384
|
+
};
|
|
2385
|
+
const disarm = () => {
|
|
2386
|
+
if (stop()) markPurged();
|
|
2330
2387
|
};
|
|
2331
2388
|
/**
|
|
2332
2389
|
* 子会话投影里「fork 后新增」的用户消息文本(无 = ''):seq ≤ fork 边界的
|
|
@@ -2334,7 +2391,7 @@ ${entries.map((entry) => {
|
|
|
2334
2391
|
*/
|
|
2335
2392
|
const freshUserText = () => {
|
|
2336
2393
|
try {
|
|
2337
|
-
const nodes = chatSourceOf(ctx, ctx.sessions.binding(childId))?.getLegacy()?.nodes ?? [];
|
|
2394
|
+
const nodes = chatSourceOf(ctx, retained?.binding ?? ctx.sessions.binding(childId))?.getLegacy()?.nodes ?? [];
|
|
2338
2395
|
for (let i = nodes.length - 1; i >= 0; i -= 1) {
|
|
2339
2396
|
const n = nodes[i];
|
|
2340
2397
|
if (n?.kind !== "user" && n?.kind !== "steering") continue;
|
|
@@ -2345,13 +2402,18 @@ ${entries.map((entry) => {
|
|
|
2345
2402
|
return "";
|
|
2346
2403
|
};
|
|
2347
2404
|
try {
|
|
2348
|
-
|
|
2405
|
+
retained = retainSession(ctx, childId);
|
|
2406
|
+
if (retained !== void 0) retained.ready.catch((error) => {
|
|
2407
|
+
if (!stop()) return;
|
|
2408
|
+
console.warn("[dsh-sidenote] 遗传 turn 监护打开子会话失败:", childId, error);
|
|
2409
|
+
});
|
|
2410
|
+
const binding = retained?.binding ?? ctx.sessions.binding(childId);
|
|
2349
2411
|
const session = binding?.session;
|
|
2350
2412
|
const cancelFace = session;
|
|
2351
2413
|
const chat = binding === void 0 ? void 0 : chatSourceOf(ctx, binding);
|
|
2352
2414
|
if (session === void 0 || typeof cancelFace?.cancel !== "function" || chat === void 0) {
|
|
2353
2415
|
console.warn("[dsh-sidenote] 子会话 cancel/chat 面缺席,遗传 turn 监护未启用:", childId, "session:", session !== void 0, "chat:", chat !== void 0);
|
|
2354
|
-
|
|
2416
|
+
stop();
|
|
2355
2417
|
return;
|
|
2356
2418
|
}
|
|
2357
2419
|
const cancelChild = cancelFace.cancel;
|
|
@@ -2369,15 +2431,23 @@ ${entries.map((entry) => {
|
|
|
2369
2431
|
}
|
|
2370
2432
|
settled = true;
|
|
2371
2433
|
for (const off of offs) off();
|
|
2372
|
-
|
|
2434
|
+
let cancellation;
|
|
2435
|
+
try {
|
|
2436
|
+
cancellation = cancelChild.call(session);
|
|
2437
|
+
} catch (error) {
|
|
2438
|
+
cancellation = Promise.reject(error);
|
|
2439
|
+
}
|
|
2440
|
+
cancellation.catch((error) => console.warn("[dsh-sidenote] 遗传 turn 取消失败:", error)).finally(() => {
|
|
2373
2441
|
purgingChildren.delete(childId);
|
|
2374
2442
|
markPurged();
|
|
2375
2443
|
advanceBoundaryPastTail(ctx, parentSessionId, tabId, childId);
|
|
2376
2444
|
reconcileChildQueueAfterCancel(ctx, childId, expectedPrefix);
|
|
2445
|
+
releaseRetained();
|
|
2377
2446
|
});
|
|
2378
2447
|
}));
|
|
2379
|
-
} catch {
|
|
2380
|
-
|
|
2448
|
+
} catch (error) {
|
|
2449
|
+
stop();
|
|
2450
|
+
console.warn("[dsh-sidenote] 遗传 turn 监护初始化失败:", error);
|
|
2381
2451
|
}
|
|
2382
2452
|
}
|
|
2383
2453
|
/**
|
|
@@ -2390,19 +2460,35 @@ ${entries.map((entry) => {
|
|
|
2390
2460
|
* 两者皆无(主线积压、用户的快手第二条)→ 留在队列里不动(保守不删用户文字)。
|
|
2391
2461
|
*/
|
|
2392
2462
|
function reconcileChildQueueAfterCancel(ctx, childId, expectedPrefix) {
|
|
2463
|
+
let retained;
|
|
2464
|
+
try {
|
|
2465
|
+
retained = retainSession(ctx, childId);
|
|
2466
|
+
} catch {}
|
|
2393
2467
|
let attempts = 0;
|
|
2468
|
+
let finished = false;
|
|
2469
|
+
const finish = () => {
|
|
2470
|
+
if (finished) return;
|
|
2471
|
+
finished = true;
|
|
2472
|
+
retained?.release();
|
|
2473
|
+
retained = void 0;
|
|
2474
|
+
};
|
|
2394
2475
|
const tick = () => {
|
|
2395
2476
|
attempts += 1;
|
|
2396
2477
|
try {
|
|
2397
|
-
const session = ctx.sessions.binding(childId)?.session;
|
|
2478
|
+
const session = (retained?.binding ?? ctx.sessions.binding(childId))?.session;
|
|
2398
2479
|
const snap = session?.getSnapshot?.();
|
|
2399
|
-
if (session === void 0 || snap === void 0 || snap === null || typeof session.updateQueue !== "function" || typeof session.prompt !== "function")
|
|
2480
|
+
if (session === void 0 || snap === void 0 || snap === null || typeof session.updateQueue !== "function" || typeof session.prompt !== "function") {
|
|
2481
|
+
finish();
|
|
2482
|
+
return;
|
|
2483
|
+
}
|
|
2400
2484
|
if (snap.running === true) {
|
|
2401
2485
|
if (attempts < 8) setTimeout(tick, 400);
|
|
2486
|
+
else finish();
|
|
2402
2487
|
return;
|
|
2403
2488
|
}
|
|
2404
2489
|
const updateQueue = session.updateQueue.bind(session);
|
|
2405
2490
|
const prompt = session.prompt.bind(session);
|
|
2491
|
+
const tasks = [];
|
|
2406
2492
|
for (const item of snap.queue ?? []) {
|
|
2407
2493
|
if (typeof item?.id !== "string") continue;
|
|
2408
2494
|
const text = typeof item.text === "string" ? item.text : contentTextOf(item.content);
|
|
@@ -2411,12 +2497,16 @@ ${entries.map((entry) => {
|
|
|
2411
2497
|
if (!isLeak && !isUserReal) continue;
|
|
2412
2498
|
const itemId = item.id;
|
|
2413
2499
|
const content = item.content;
|
|
2414
|
-
updateQueue(itemId, { kind: "remove" }).then(() => {
|
|
2500
|
+
tasks.push(updateQueue(itemId, { kind: "remove" }).then(() => {
|
|
2415
2501
|
if (!isUserReal) return void 0;
|
|
2416
2502
|
return prompt(content, "queue");
|
|
2417
|
-
}).catch((error) => console.warn("[dsh-sidenote] 取消后队列和解失败:", error));
|
|
2503
|
+
}).catch((error) => console.warn("[dsh-sidenote] 取消后队列和解失败:", error)));
|
|
2418
2504
|
}
|
|
2419
|
-
|
|
2505
|
+
if (tasks.length === 0) finish();
|
|
2506
|
+
else Promise.allSettled(tasks).then(finish);
|
|
2507
|
+
} catch {
|
|
2508
|
+
finish();
|
|
2509
|
+
}
|
|
2420
2510
|
};
|
|
2421
2511
|
setTimeout(tick, 300);
|
|
2422
2512
|
}
|
|
@@ -2427,20 +2517,34 @@ ${entries.map((entry) => {
|
|
|
2427
2517
|
* turn 会短暂可见,属可接受降级)。
|
|
2428
2518
|
*/
|
|
2429
2519
|
function advanceBoundaryPastTail(ctx, parentSessionId, tabId, childId) {
|
|
2520
|
+
let retained;
|
|
2521
|
+
try {
|
|
2522
|
+
retained = retainSession(ctx, childId);
|
|
2523
|
+
} catch {}
|
|
2430
2524
|
let attempts = 0;
|
|
2525
|
+
let finished = false;
|
|
2526
|
+
const finish = () => {
|
|
2527
|
+
if (finished) return;
|
|
2528
|
+
finished = true;
|
|
2529
|
+
retained?.release();
|
|
2530
|
+
retained = void 0;
|
|
2531
|
+
};
|
|
2431
2532
|
const tick = () => {
|
|
2432
2533
|
attempts += 1;
|
|
2433
2534
|
try {
|
|
2434
|
-
const
|
|
2535
|
+
const binding = retained?.binding ?? ctx.sessions.binding(childId);
|
|
2536
|
+
const max = (binding?.session.getSnapshot())?.running === true ? void 0 : readMaxNodeSeq(ctx, childId, binding);
|
|
2435
2537
|
if (max !== void 0) {
|
|
2436
2538
|
updateTabMeta(ctx, parentSessionId, tabId, (cur) => ({
|
|
2437
2539
|
...cur,
|
|
2438
2540
|
boundarySeq: Math.max(cur.boundarySeq ?? -1, max)
|
|
2439
2541
|
}));
|
|
2542
|
+
finish();
|
|
2440
2543
|
return;
|
|
2441
2544
|
}
|
|
2442
2545
|
} catch {}
|
|
2443
2546
|
if (attempts < 8) setTimeout(tick, 400);
|
|
2547
|
+
else finish();
|
|
2444
2548
|
};
|
|
2445
2549
|
setTimeout(tick, 300);
|
|
2446
2550
|
}
|
|
@@ -2482,7 +2586,7 @@ ${entries.map((entry) => {
|
|
|
2482
2586
|
...snapshotOnly ? { snapshotOnly: true } : {},
|
|
2483
2587
|
...leakedPromptPrefix !== void 0 ? { leakedPromptPrefix } : {}
|
|
2484
2588
|
}));
|
|
2485
|
-
try {
|
|
2589
|
+
if (typeof owner.workspaces.unarchiveSession !== "function") try {
|
|
2486
2590
|
await owner.workspaces.archiveSession(forked);
|
|
2487
2591
|
} catch (error) {
|
|
2488
2592
|
console.warn("[dsh-sidenote] 归档侧边会话失败(会话列表可能短暂可见):", error);
|
|
@@ -2579,6 +2683,17 @@ ${entries.map((entry) => {
|
|
|
2579
2683
|
} catch {}
|
|
2580
2684
|
}
|
|
2581
2685
|
/**
|
|
2686
|
+
* 0.1.7 自愈:旧版本插件把侧边子会话归档隐藏,ArchivedSessionGate 会拒跑它
|
|
2687
|
+
* 的模型步(turn/end blocked)。面板挂载时对 childId 幂等 unarchive;
|
|
2688
|
+
* 旧宿主无此 API 时 no-op。
|
|
2689
|
+
*/
|
|
2690
|
+
function unarchiveSideSession(ctx, sessionId) {
|
|
2691
|
+
if (sessionId === void 0) return;
|
|
2692
|
+
const unarchive = ctx.workspaces.unarchiveSession;
|
|
2693
|
+
if (typeof unarchive !== "function") return;
|
|
2694
|
+
unarchive.call(ctx.workspaces, sessionId).catch(() => {});
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2582
2697
|
* 打开非 staged 会话的事件窗口(off-face:open() 在 concrete Session 上是
|
|
2583
2698
|
* public 且幂等,但不在 SessionFace 契约上——契约面只有 staged 会话会被
|
|
2584
2699
|
* 运行时自动 open)。feature-check + 吞错,运行时若移除则降级为只发不收。
|
|
@@ -2974,6 +3089,38 @@ ${entries.map((entry) => {
|
|
|
2974
3089
|
};
|
|
2975
3090
|
}
|
|
2976
3091
|
//#endregion
|
|
3092
|
+
//#region src/client/host/icons.ts
|
|
3093
|
+
const EmptyIcon = () => null;
|
|
3094
|
+
const iconExports = _deepseek_ai_dsh_client_ui_primitives;
|
|
3095
|
+
/** Prefer the weight-named 0.1.7 export, then fall back to the legacy size-named export. */
|
|
3096
|
+
function resolveIcon(exports, modernName, legacyName) {
|
|
3097
|
+
return exports[modernName] ?? exports[legacyName] ?? EmptyIcon;
|
|
3098
|
+
}
|
|
3099
|
+
const icon = (modernName, legacyName) => resolveIcon(iconExports, modernName, legacyName);
|
|
3100
|
+
const IconNewChatOutline16 = icon("IconNewChatOutlineRegular", "IconNewChatOutline16");
|
|
3101
|
+
const IconCheckOutline16 = icon("IconCheckOutlineRegular", "IconCheckOutline16");
|
|
3102
|
+
const IconListPenOutline16 = icon("IconListPenOutlineRegular", "IconListPenOutline16");
|
|
3103
|
+
const IconEditOutline16 = icon("IconEditOutlineRegular", "IconEditOutline16");
|
|
3104
|
+
const IconTrashOutline16 = icon("IconTrashOutlineRegular", "IconTrashOutline16");
|
|
3105
|
+
const IconPlayOutline16 = icon("IconPlayOutlineRegular", "IconPlayOutline16");
|
|
3106
|
+
const IconCordisPluginOutline14 = icon("IconCordisPluginOutlineRegular", "IconCordisPluginOutline14");
|
|
3107
|
+
const IconBranchOutline16 = icon("IconBranchOutlineRegular", "IconBranchOutline16");
|
|
3108
|
+
const IconShareOutline16 = icon("IconShareOutlineRegular", "IconShareOutline16");
|
|
3109
|
+
const IconChevronDownOutline14 = icon("IconChevronDownOutlineRegular", "IconChevronDownOutline14");
|
|
3110
|
+
const IconCloseOutline16 = icon("IconCloseOutlineRegular", "IconCloseOutline16");
|
|
3111
|
+
const IconRightUpOutline16 = icon("IconRightUpOutlineRegular", "IconRightUpOutline16");
|
|
3112
|
+
const IconSearchOutline16 = icon("IconSearchOutlineRegular", "IconSearchOutline16");
|
|
3113
|
+
const IconGlobeOutline14 = icon("IconGlobeOutlineRegular", "IconGlobeOutline14");
|
|
3114
|
+
const IconCodeOutline16 = icon("IconCodeOutlineRegular", "IconCodeOutline16");
|
|
3115
|
+
const IconChecklistOutline14 = icon("IconChecklistOutlineRegular", "IconChecklistOutline14");
|
|
3116
|
+
const IconThinkOutline16 = icon("IconThinkOutlineRegular", "IconThinkOutline16");
|
|
3117
|
+
const IconInspectOutline12 = icon("IconInspectOutlineRegular", "IconInspectOutline12");
|
|
3118
|
+
const IconPaperclipOutline16 = icon("IconPaperclipOutlineRegular", "IconPaperclipOutline16");
|
|
3119
|
+
const IconStopFill16 = icon("IconStopFillRegular", "IconStopFill16");
|
|
3120
|
+
const IconSendOutline16 = icon("IconSendOutlineRegular", "IconSendOutline16");
|
|
3121
|
+
const IconWarningOutline16 = icon("IconWarningOutlineRegular", "IconWarningOutline16");
|
|
3122
|
+
const IconQuestionOutline14 = icon("IconQuestionOutlineRegular", "IconQuestionOutline14");
|
|
3123
|
+
//#endregion
|
|
2977
3124
|
//#region src/client/bridge.ts
|
|
2978
3125
|
const sideChatBridge = { current: null };
|
|
2979
3126
|
//#endregion
|
|
@@ -3122,95 +3269,95 @@ ${entries.map((entry) => {
|
|
|
3122
3269
|
document.head.appendChild(tag);
|
|
3123
3270
|
}
|
|
3124
3271
|
var sidechat_module_css_default = {
|
|
3125
|
-
"
|
|
3126
|
-
"
|
|
3127
|
-
"
|
|
3128
|
-
"empty": "_5KEEsG_empty",
|
|
3129
|
-
"flowRowError": "_5KEEsG_flowRowError",
|
|
3130
|
-
"sentChipRow": "_5KEEsG_sentChipRow",
|
|
3131
|
-
"todoText": "_5KEEsG_todoText",
|
|
3132
|
-
"slashItem": "_5KEEsG_slashItem",
|
|
3133
|
-
"slashItemDetail": "_5KEEsG_slashItemDetail",
|
|
3134
|
-
"noticeRow": "_5KEEsG_noticeRow",
|
|
3272
|
+
"sentChip": "_5KEEsG_sentChip",
|
|
3273
|
+
"pendingQuestion": "_5KEEsG_pendingQuestion",
|
|
3274
|
+
"assistantBody": "_5KEEsG_assistantBody",
|
|
3135
3275
|
"pendingTitle": "_5KEEsG_pendingTitle",
|
|
3136
|
-
"userBubble": "_5KEEsG_userBubble",
|
|
3137
|
-
"toolCard": "_5KEEsG_toolCard",
|
|
3138
|
-
"slashMenu": "_5KEEsG_slashMenu",
|
|
3139
|
-
"stateDetail": "_5KEEsG_stateDetail",
|
|
3140
3276
|
"pendingQHeader": "_5KEEsG_pendingQHeader",
|
|
3141
|
-
"
|
|
3142
|
-
"
|
|
3277
|
+
"pendingBtnPrimary": "_5KEEsG_pendingBtnPrimary",
|
|
3278
|
+
"assistantRow": "_5KEEsG_assistantRow",
|
|
3143
3279
|
"reflowButton": "_5KEEsG_reflowButton",
|
|
3144
|
-
"
|
|
3145
|
-
"
|
|
3146
|
-
"
|
|
3147
|
-
"
|
|
3280
|
+
"composerFoot": "_5KEEsG_composerFoot",
|
|
3281
|
+
"slashItemDetail": "_5KEEsG_slashItemDetail",
|
|
3282
|
+
"inheritedBody": "_5KEEsG_inheritedBody",
|
|
3283
|
+
"reasoningBody": "_5KEEsG_reasoningBody",
|
|
3148
3284
|
"pendingQText": "_5KEEsG_pendingQText",
|
|
3149
|
-
"
|
|
3150
|
-
"
|
|
3151
|
-
"
|
|
3152
|
-
"
|
|
3153
|
-
"
|
|
3154
|
-
"
|
|
3155
|
-
"
|
|
3285
|
+
"flowRowError": "_5KEEsG_flowRowError",
|
|
3286
|
+
"toolRunning": "_5KEEsG_toolRunning",
|
|
3287
|
+
"attachButton": "_5KEEsG_attachButton",
|
|
3288
|
+
"slashGroupTitle": "_5KEEsG_slashGroupTitle",
|
|
3289
|
+
"pendingOptionActive": "_5KEEsG_pendingOptionActive",
|
|
3290
|
+
"toolBody": "_5KEEsG_toolBody",
|
|
3291
|
+
"pendingDesc": "_5KEEsG_pendingDesc",
|
|
3292
|
+
"transcript": "_5KEEsG_transcript",
|
|
3293
|
+
"headerSide": "_5KEEsG_headerSide",
|
|
3294
|
+
"reasoning": "_5KEEsG_reasoning",
|
|
3295
|
+
"composerChips": "_5KEEsG_composerChips",
|
|
3156
3296
|
"pendingOption": "_5KEEsG_pendingOption",
|
|
3157
|
-
"todoBody": "_5KEEsG_todoBody",
|
|
3158
|
-
"errorRow": "_5KEEsG_errorRow",
|
|
3159
|
-
"root": "_5KEEsG_root",
|
|
3160
|
-
"stateScreen": "_5KEEsG_stateScreen",
|
|
3161
|
-
"snapshotBody": "_5KEEsG_snapshotBody",
|
|
3162
|
-
"toolBodyText": "_5KEEsG_toolBodyText",
|
|
3163
|
-
"dotRunning": "_5KEEsG_dotRunning",
|
|
3164
|
-
"modelLabel": "_5KEEsG_modelLabel",
|
|
3165
|
-
"attachThumb": "_5KEEsG_attachThumb",
|
|
3166
|
-
"toolGenericBody": "_5KEEsG_toolGenericBody",
|
|
3167
|
-
"emptyIcon": "_5KEEsG_emptyIcon",
|
|
3168
3297
|
"rowActions": "_5KEEsG_rowActions",
|
|
3169
|
-
"emptyText": "_5KEEsG_emptyText",
|
|
3170
|
-
"emptyTitle": "_5KEEsG_emptyTitle",
|
|
3171
|
-
"streamingHint": "_5KEEsG_streamingHint",
|
|
3172
|
-
"toolError": "_5KEEsG_toolError",
|
|
3173
|
-
"dotIdle": "_5KEEsG_dotIdle",
|
|
3174
|
-
"inheritedBody": "_5KEEsG_inheritedBody",
|
|
3175
|
-
"rowPreview": "_5KEEsG_rowPreview",
|
|
3176
|
-
"headerSide": "_5KEEsG_headerSide",
|
|
3177
|
-
"actionGroup": "_5KEEsG_actionGroup",
|
|
3178
|
-
"pendingBtnPrimary": "_5KEEsG_pendingBtnPrimary",
|
|
3179
|
-
"pendingOptionActive": "_5KEEsG_pendingOptionActive",
|
|
3180
3298
|
"snapshotText": "_5KEEsG_snapshotText",
|
|
3181
|
-
"
|
|
3182
|
-
"
|
|
3183
|
-
"
|
|
3184
|
-
"
|
|
3185
|
-
"
|
|
3186
|
-
"toolHead": "_5KEEsG_toolHead",
|
|
3187
|
-
"attachButton": "_5KEEsG_attachButton",
|
|
3188
|
-
"pendingQuestion": "_5KEEsG_pendingQuestion",
|
|
3189
|
-
"pendingCustom": "_5KEEsG_pendingCustom",
|
|
3190
|
-
"pendingDesc": "_5KEEsG_pendingDesc",
|
|
3191
|
-
"writeNoticeClose": "_5KEEsG_writeNoticeClose",
|
|
3299
|
+
"pendingActions": "_5KEEsG_pendingActions",
|
|
3300
|
+
"parentStrip": "_5KEEsG_parentStrip",
|
|
3301
|
+
"root": "_5KEEsG_root",
|
|
3302
|
+
"actionGroup": "_5KEEsG_actionGroup",
|
|
3303
|
+
"emptyTitle": "_5KEEsG_emptyTitle",
|
|
3192
3304
|
"flowRow": "_5KEEsG_flowRow",
|
|
3305
|
+
"jumpBottom": "_5KEEsG_jumpBottom",
|
|
3306
|
+
"emptyText": "_5KEEsG_emptyText",
|
|
3307
|
+
"slashItemName": "_5KEEsG_slashItemName",
|
|
3308
|
+
"attachImg": "_5KEEsG_attachImg",
|
|
3309
|
+
"attachRemove": "_5KEEsG_attachRemove",
|
|
3310
|
+
"pendingReason": "_5KEEsG_pendingReason",
|
|
3311
|
+
"modelSelect": "_5KEEsG_modelSelect",
|
|
3312
|
+
"pendingBar": "_5KEEsG_pendingBar",
|
|
3313
|
+
"todoBody": "_5KEEsG_todoBody",
|
|
3314
|
+
"input": "_5KEEsG_input",
|
|
3315
|
+
"toolHead": "_5KEEsG_toolHead",
|
|
3316
|
+
"userBubble": "_5KEEsG_userBubble",
|
|
3317
|
+
"toolGenericBody": "_5KEEsG_toolGenericBody",
|
|
3318
|
+
"toolLocations": "_5KEEsG_toolLocations",
|
|
3319
|
+
"snapshotBody": "_5KEEsG_snapshotBody",
|
|
3320
|
+
"slashItemActive": "_5KEEsG_slashItemActive",
|
|
3193
3321
|
"pendingOptionDesc": "_5KEEsG_pendingOptionDesc",
|
|
3322
|
+
"stopButton": "_5KEEsG_stopButton",
|
|
3323
|
+
"pendingBtnGhost": "_5KEEsG_pendingBtnGhost",
|
|
3324
|
+
"toolCard": "_5KEEsG_toolCard",
|
|
3325
|
+
"rowPreview": "_5KEEsG_rowPreview",
|
|
3326
|
+
"densityToggle": "_5KEEsG_densityToggle",
|
|
3327
|
+
"pendingHead": "_5KEEsG_pendingHead",
|
|
3328
|
+
"dotRunning": "_5KEEsG_dotRunning",
|
|
3329
|
+
"stateDetail": "_5KEEsG_stateDetail",
|
|
3194
3330
|
"dotPending": "_5KEEsG_dotPending",
|
|
3331
|
+
"toolBodyText": "_5KEEsG_toolBodyText",
|
|
3332
|
+
"dotIdle": "_5KEEsG_dotIdle",
|
|
3333
|
+
"userRow": "_5KEEsG_userRow",
|
|
3195
3334
|
"sidechat-pulse": "_5KEEsG_sidechat-pulse",
|
|
3196
|
-
"
|
|
3197
|
-
"
|
|
3198
|
-
"
|
|
3199
|
-
"
|
|
3200
|
-
"
|
|
3201
|
-
"
|
|
3202
|
-
"
|
|
3203
|
-
"
|
|
3335
|
+
"modelLabel": "_5KEEsG_modelLabel",
|
|
3336
|
+
"todoDot": "_5KEEsG_todoDot",
|
|
3337
|
+
"empty": "_5KEEsG_empty",
|
|
3338
|
+
"pendingCard": "_5KEEsG_pendingCard",
|
|
3339
|
+
"writeNotice": "_5KEEsG_writeNotice",
|
|
3340
|
+
"todoItem": "_5KEEsG_todoItem",
|
|
3341
|
+
"pendingCustom": "_5KEEsG_pendingCustom",
|
|
3342
|
+
"body": "_5KEEsG_body",
|
|
3343
|
+
"writeNoticeClose": "_5KEEsG_writeNoticeClose",
|
|
3204
3344
|
"attachRail": "_5KEEsG_attachRail",
|
|
3205
|
-
"
|
|
3206
|
-
"
|
|
3207
|
-
"
|
|
3208
|
-
"
|
|
3209
|
-
"
|
|
3345
|
+
"slashMenu": "_5KEEsG_slashMenu",
|
|
3346
|
+
"slashItem": "_5KEEsG_slashItem",
|
|
3347
|
+
"sendButton": "_5KEEsG_sendButton",
|
|
3348
|
+
"noticeRow": "_5KEEsG_noticeRow",
|
|
3349
|
+
"toolError": "_5KEEsG_toolError",
|
|
3350
|
+
"composer": "_5KEEsG_composer",
|
|
3351
|
+
"streamingHint": "_5KEEsG_streamingHint",
|
|
3352
|
+
"todoText": "_5KEEsG_todoText",
|
|
3210
3353
|
"densityRow": "_5KEEsG_densityRow",
|
|
3211
|
-
"
|
|
3212
|
-
"
|
|
3213
|
-
"
|
|
3354
|
+
"nativeHost": "_5KEEsG_nativeHost",
|
|
3355
|
+
"sentChipRow": "_5KEEsG_sentChipRow",
|
|
3356
|
+
"emptyIcon": "_5KEEsG_emptyIcon",
|
|
3357
|
+
"errorRow": "_5KEEsG_errorRow",
|
|
3358
|
+
"attachThumb": "_5KEEsG_attachThumb",
|
|
3359
|
+
"stateScreen": "_5KEEsG_stateScreen",
|
|
3360
|
+
"composerCard": "_5KEEsG_composerCard"
|
|
3214
3361
|
};
|
|
3215
3362
|
//#endregion
|
|
3216
3363
|
//#region src/client/chat/ToolCard.tsx
|
|
@@ -3225,14 +3372,14 @@ ${entries.map((entry) => {
|
|
|
3225
3372
|
/** ToolCallKind → 图标(宿主 ui-tool 同族映射;primitives 图标全集见 icons/index.d.ts)。 */
|
|
3226
3373
|
function kindIcon(kind) {
|
|
3227
3374
|
switch (kind) {
|
|
3228
|
-
case "read": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3229
|
-
case "edit": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3230
|
-
case "delete": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3231
|
-
case "move": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3232
|
-
case "search": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3233
|
-
case "execute": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3234
|
-
case "fetch": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3235
|
-
default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3375
|
+
case "read": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconListPenOutline16, { size: 14 });
|
|
3376
|
+
case "edit": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconEditOutline16, { size: 14 });
|
|
3377
|
+
case "delete": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconTrashOutline16, { size: 14 });
|
|
3378
|
+
case "move": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconRightUpOutline16, { size: 14 });
|
|
3379
|
+
case "search": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSearchOutline16, { size: 14 });
|
|
3380
|
+
case "execute": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPlayOutline16, { size: 14 });
|
|
3381
|
+
case "fetch": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconGlobeOutline14, { size: 14 });
|
|
3382
|
+
default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCordisPluginOutline14, { size: 14 });
|
|
3236
3383
|
}
|
|
3237
3384
|
}
|
|
3238
3385
|
/** 折叠态读取 hook(viewState store 的 React 绑定,L2 侧)。 */
|
|
@@ -3242,7 +3389,7 @@ ${entries.map((entry) => {
|
|
|
3242
3389
|
function ToolCard(props) {
|
|
3243
3390
|
const { model, rowKey, fold } = props;
|
|
3244
3391
|
const open = useFoldOpen(fold, rowKey);
|
|
3245
|
-
const icon = model.kind === "terminal" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3392
|
+
const icon = model.kind === "terminal" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPlayOutline16, { size: 14 }) : model.kind === "diff" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconEditOutline16, { size: 14 }) : model.kind === "read" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCodeOutline16, { size: 14 }) : model.kind === "todo" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChecklistOutline14, { size: 14 }) : model.kind === "generic" ? kindIcon(model.icon) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCordisPluginOutline14, { size: 14 });
|
|
3246
3393
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3247
3394
|
className: sidechat_module_css_default.flowRow,
|
|
3248
3395
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
@@ -3389,7 +3536,7 @@ ${entries.map((entry) => {
|
|
|
3389
3536
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3390
3537
|
className: sidechat_module_css_default.flowRow,
|
|
3391
3538
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
3392
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3539
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconThinkOutline16, { size: 14 }),
|
|
3393
3540
|
title: t("thinking"),
|
|
3394
3541
|
open,
|
|
3395
3542
|
expandable: true,
|
|
@@ -3425,7 +3572,7 @@ ${entries.map((entry) => {
|
|
|
3425
3572
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3426
3573
|
className: sidechat_module_css_default.flowRow,
|
|
3427
3574
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
3428
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3575
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconBranchOutline16, { size: 14 }),
|
|
3429
3576
|
title: t("inheritedLabel", { n: props.count }),
|
|
3430
3577
|
open,
|
|
3431
3578
|
expandable: true,
|
|
@@ -3467,7 +3614,7 @@ ${entries.map((entry) => {
|
|
|
3467
3614
|
children: [
|
|
3468
3615
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3469
3616
|
className: sidechat_module_css_default.emptyIcon,
|
|
3470
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3617
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconNewChatOutline16, { size: 32 })
|
|
3471
3618
|
}),
|
|
3472
3619
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3473
3620
|
className: sidechat_module_css_default.emptyTitle,
|
|
@@ -3488,7 +3635,7 @@ ${entries.map((entry) => {
|
|
|
3488
3635
|
children: [
|
|
3489
3636
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3490
3637
|
className: sidechat_module_css_default.emptyIcon,
|
|
3491
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3638
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconNewChatOutline16, { size: 32 })
|
|
3492
3639
|
}),
|
|
3493
3640
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3494
3641
|
className: sidechat_module_css_default.emptyTitle,
|
|
@@ -3529,7 +3676,7 @@ ${entries.map((entry) => {
|
|
|
3529
3676
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3530
3677
|
className: sidechat_module_css_default.flowRow,
|
|
3531
3678
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
3532
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3679
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconBranchOutline16, { size: 14 }),
|
|
3533
3680
|
title: takenAt !== null ? t("snapshotLabelAt", { at: takenAt }) : t("snapshotLabel"),
|
|
3534
3681
|
open,
|
|
3535
3682
|
expandable: true,
|
|
@@ -3662,7 +3809,7 @@ ${entries.map((entry) => {
|
|
|
3662
3809
|
setDone(false);
|
|
3663
3810
|
}, 1600);
|
|
3664
3811
|
},
|
|
3665
|
-
children: done ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3812
|
+
children: done ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheckOutline16, { size: 12 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconShareOutline16, { size: 12 })
|
|
3666
3813
|
});
|
|
3667
3814
|
}
|
|
3668
3815
|
const MessageRow = (0, react.memo)(function MessageRow({ message, question, fold, reflow, parentSessionId, sideTitle }) {
|
|
@@ -3846,7 +3993,7 @@ ${entries.map((entry) => {
|
|
|
3846
3993
|
items.push({
|
|
3847
3994
|
id: `${group.id}/${m.id}`,
|
|
3848
3995
|
label: m.name,
|
|
3849
|
-
...selected ? { icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3996
|
+
...selected ? { icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheckOutline16, { size: 12 }) } : {}
|
|
3850
3997
|
});
|
|
3851
3998
|
}
|
|
3852
3999
|
}
|
|
@@ -3862,7 +4009,7 @@ ${entries.map((entry) => {
|
|
|
3862
4009
|
onClick: () => {
|
|
3863
4010
|
open ? setOpen(false) : openMenu();
|
|
3864
4011
|
},
|
|
3865
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("modelLabel", { name: props.modelName ?? t("modelFollowsMain") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4012
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("modelLabel", { name: props.modelName ?? t("modelFollowsMain") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, { size: 12 })]
|
|
3866
4013
|
}),
|
|
3867
4014
|
items,
|
|
3868
4015
|
onClose: () => {
|
|
@@ -3927,9 +4074,9 @@ ${entries.map((entry) => {
|
|
|
3927
4074
|
setOpen(!open);
|
|
3928
4075
|
},
|
|
3929
4076
|
children: [
|
|
3930
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4077
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconInspectOutline12, { size: 12 }),
|
|
3931
4078
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: presetLabel(effective) }),
|
|
3932
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4079
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, { size: 12 })
|
|
3933
4080
|
]
|
|
3934
4081
|
}),
|
|
3935
4082
|
items,
|
|
@@ -4129,7 +4276,7 @@ ${entries.map((entry) => {
|
|
|
4129
4276
|
onClick: () => {
|
|
4130
4277
|
fileInputRef.current?.click();
|
|
4131
4278
|
},
|
|
4132
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4279
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconPaperclipOutline16, { size: 14 })
|
|
4133
4280
|
}),
|
|
4134
4281
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
4135
4282
|
ref: fileInputRef,
|
|
@@ -4163,7 +4310,7 @@ ${entries.map((entry) => {
|
|
|
4163
4310
|
onClick: () => {
|
|
4164
4311
|
session?.cancel().catch(() => {});
|
|
4165
4312
|
},
|
|
4166
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4313
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconStopFill16, { size: 12 })
|
|
4167
4314
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4168
4315
|
type: "button",
|
|
4169
4316
|
className: sidechat_module_css_default.sendButton,
|
|
@@ -4173,7 +4320,7 @@ ${entries.map((entry) => {
|
|
|
4173
4320
|
onClick: () => {
|
|
4174
4321
|
composer.submit();
|
|
4175
4322
|
},
|
|
4176
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4323
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconSendOutline16, { size: 14 })
|
|
4177
4324
|
})
|
|
4178
4325
|
]
|
|
4179
4326
|
})
|
|
@@ -4478,7 +4625,7 @@ ${entries.map((entry) => {
|
|
|
4478
4625
|
children: [
|
|
4479
4626
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4480
4627
|
className: sidechat_module_css_default.pendingHead,
|
|
4481
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4628
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconWarningOutline16, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4482
4629
|
className: sidechat_module_css_default.pendingTitle,
|
|
4483
4630
|
children: t("pendingApprovalTitle")
|
|
4484
4631
|
})]
|
|
@@ -4556,7 +4703,7 @@ ${entries.map((entry) => {
|
|
|
4556
4703
|
children: [
|
|
4557
4704
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4558
4705
|
className: sidechat_module_css_default.pendingHead,
|
|
4559
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4706
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconQuestionOutline14, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4560
4707
|
className: sidechat_module_css_default.pendingTitle,
|
|
4561
4708
|
children: item.planReview ? t("pendingPlanReview") : t("pendingQuestionTitle")
|
|
4562
4709
|
})]
|
|
@@ -4657,6 +4804,7 @@ ${entries.map((entry) => {
|
|
|
4657
4804
|
const meta = parseSideChatMeta(tab.meta);
|
|
4658
4805
|
const childId = meta.childId;
|
|
4659
4806
|
const [forkError, setForkError] = (0, react.useState)(null);
|
|
4807
|
+
const [, refreshBinding] = (0, react.useState)(0);
|
|
4660
4808
|
const forkStarted = (0, react.useRef)(false);
|
|
4661
4809
|
const prevChildId = (0, react.useRef)(childId);
|
|
4662
4810
|
(0, react.useEffect)(() => {
|
|
@@ -4685,12 +4833,31 @@ ${entries.map((entry) => {
|
|
|
4685
4833
|
tab.id,
|
|
4686
4834
|
childId
|
|
4687
4835
|
]);
|
|
4836
|
+
(0, react.useEffect)(() => {
|
|
4837
|
+
if (childId === void 0) return;
|
|
4838
|
+
let acquired;
|
|
4839
|
+
try {
|
|
4840
|
+
acquired = retainSession(ctx, childId);
|
|
4841
|
+
} catch (error) {
|
|
4842
|
+
console.warn("[dsh-sidenote] 侧边会话 retain 失败:", childId, error);
|
|
4843
|
+
return;
|
|
4844
|
+
}
|
|
4845
|
+
if (acquired === void 0) return;
|
|
4846
|
+
const reference = acquired;
|
|
4847
|
+
let released = false;
|
|
4848
|
+
unarchiveSideSession(ctx, childId);
|
|
4849
|
+
refreshBinding((value) => value + 1);
|
|
4850
|
+
reference.ready.catch((error) => {
|
|
4851
|
+
if (!released) console.warn("[dsh-sidenote] 侧边会话打开失败:", childId, error);
|
|
4852
|
+
});
|
|
4853
|
+
return () => {
|
|
4854
|
+
released = true;
|
|
4855
|
+
reference.release();
|
|
4856
|
+
};
|
|
4857
|
+
}, [ctx, childId]);
|
|
4688
4858
|
const listSnap = (0, react.useSyncExternalStore)((0, react.useCallback)((notify) => ctx.sessions.list.subscribe(notify), [ctx]), () => ctx.sessions.list.getSnapshot());
|
|
4689
4859
|
const listed = childId !== void 0 && listSnap.byId?.[childId] !== void 0;
|
|
4690
4860
|
const session = (childId === void 0 ? void 0 : ctx.sessions.binding(childId))?.session;
|
|
4691
|
-
(0, react.useEffect)(() => {
|
|
4692
|
-
openSessionWindow(session);
|
|
4693
|
-
}, [session]);
|
|
4694
4861
|
(0, react.useEffect)(() => {
|
|
4695
4862
|
if (meta.forkedMidTurn !== true || meta.inheritedPurged === true) return;
|
|
4696
4863
|
if (childId === void 0 || session === void 0) return;
|
|
@@ -4706,6 +4873,9 @@ ${entries.map((entry) => {
|
|
|
4706
4873
|
scope.sessionId,
|
|
4707
4874
|
tab.id
|
|
4708
4875
|
]);
|
|
4876
|
+
(0, react.useEffect)(() => {
|
|
4877
|
+
openSessionWindow(session);
|
|
4878
|
+
}, [session]);
|
|
4709
4879
|
const phase = phaseOf({
|
|
4710
4880
|
childId,
|
|
4711
4881
|
forkError,
|
|
@@ -5178,7 +5348,7 @@ ${entries.map((entry) => {
|
|
|
5178
5348
|
guide: [{
|
|
5179
5349
|
order: 60,
|
|
5180
5350
|
title: () => t("menuTitle"),
|
|
5181
|
-
icon: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5351
|
+
icon: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconNewChatOutline16, { size: props.size ?? 16 })
|
|
5182
5352
|
}]
|
|
5183
5353
|
});
|
|
5184
5354
|
const disposeBody = ctx.slots.inject("sidebar.right.pane.tab", () => ctx.slots.register({
|
|
@@ -5219,8 +5389,9 @@ ${entries.map((entry) => {
|
|
|
5219
5389
|
*/
|
|
5220
5390
|
function HeaderSideButton({ ctx }) {
|
|
5221
5391
|
useLocaleTick();
|
|
5222
|
-
|
|
5223
|
-
|
|
5392
|
+
(0, react.useSyncExternalStore)((notify) => ctx.sessions.list.subscribe(notify), () => ctx.sessions.list.getSnapshot());
|
|
5393
|
+
const sessionId = currentSessionIdOf(ctx);
|
|
5394
|
+
if (sessionId === "" || !canForkFrom(ctx, sessionId)) return null;
|
|
5224
5395
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
5225
5396
|
type: "button",
|
|
5226
5397
|
className: sidechat_module_css_default.headerSide,
|
|
@@ -5229,7 +5400,7 @@ ${entries.map((entry) => {
|
|
|
5229
5400
|
onClick: () => {
|
|
5230
5401
|
openOrFocusSideChat(ctx, sessionId);
|
|
5231
5402
|
},
|
|
5232
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5403
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconNewChatOutline16, { size: 13 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("headerSide") })]
|
|
5233
5404
|
});
|
|
5234
5405
|
}
|
|
5235
5406
|
function registerHeaderEntry(ctx) {
|
|
@@ -5568,14 +5739,14 @@ ${entries.map((entry) => {
|
|
|
5568
5739
|
ctx.effect(() => bs.registerTab({
|
|
5569
5740
|
id: SIDE_TAB_TYPE,
|
|
5570
5741
|
title: () => t("menuTitle"),
|
|
5571
|
-
icon: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5742
|
+
icon: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconNewChatOutline16, { size }),
|
|
5572
5743
|
order: 60,
|
|
5573
5744
|
available: (availableCtx, scope) => canForkFrom(availableCtx, scope.sessionId),
|
|
5574
5745
|
createTab: (state) => {
|
|
5575
5746
|
const titles = collectSideTabs(state).map((tab) => tab.title);
|
|
5576
5747
|
if (nativeSidebarHost(ctx)) {
|
|
5577
|
-
const current = ctx
|
|
5578
|
-
if (current !==
|
|
5748
|
+
const current = currentSessionIdOf(ctx);
|
|
5749
|
+
if (current !== "") for (const live of liveSideChatsOf(current)) titles.push(live.readTitle());
|
|
5579
5750
|
}
|
|
5580
5751
|
return { tab: {
|
|
5581
5752
|
id: mintSideTabId(),
|
|
@@ -6066,43 +6237,43 @@ ${entries.map((entry) => {
|
|
|
6066
6237
|
document.head.appendChild(tag);
|
|
6067
6238
|
}
|
|
6068
6239
|
var annotate_module_css_default = {
|
|
6069
|
-
"
|
|
6070
|
-
"chipNumber": "_SVViG_chipNumber",
|
|
6071
|
-
"hintClose": "_SVViG_hintClose",
|
|
6072
|
-
"cancelButton": "_SVViG_cancelButton",
|
|
6073
|
-
"toolbarButton": "_SVViG_toolbarButton",
|
|
6074
|
-
"badgeSent": "_SVViG_badgeSent",
|
|
6075
|
-
"chipWrap": "_SVViG_chipWrap",
|
|
6076
|
-
"sentCardTitle": "_SVViG_sentCardTitle",
|
|
6240
|
+
"confirmButton": "_SVViG_confirmButton",
|
|
6077
6241
|
"editorTarget": "_SVViG_editorTarget",
|
|
6078
|
-
"toolbar": "_SVViG_toolbar",
|
|
6079
|
-
"chip": "_SVViG_chip",
|
|
6080
|
-
"chipRemove": "_SVViG_chipRemove",
|
|
6081
|
-
"editorInput": "_SVViG_editorInput",
|
|
6082
6242
|
"highlight": "_SVViG_highlight",
|
|
6083
|
-
"
|
|
6084
|
-
"
|
|
6243
|
+
"toolbarBelow": "_SVViG_toolbarBelow",
|
|
6244
|
+
"editorFooter": "_SVViG_editorFooter",
|
|
6245
|
+
"badgeSent": "_SVViG_badgeSent",
|
|
6246
|
+
"badge": "_SVViG_badge",
|
|
6247
|
+
"chipNote": "_SVViG_chipNote",
|
|
6248
|
+
"editorAskRow": "_SVViG_editorAskRow",
|
|
6249
|
+
"editorError": "_SVViG_editorError",
|
|
6250
|
+
"toolbar": "_SVViG_toolbar",
|
|
6251
|
+
"editorNew": "_SVViG_editorNew",
|
|
6085
6252
|
"editorEdit": "_SVViG_editorEdit",
|
|
6253
|
+
"sentCardTitle": "_SVViG_sentCardTitle",
|
|
6254
|
+
"sentChip": "_SVViG_sentChip",
|
|
6086
6255
|
"chipClearAll": "_SVViG_chipClearAll",
|
|
6087
|
-
"
|
|
6088
|
-
"
|
|
6256
|
+
"chipText": "_SVViG_chipText",
|
|
6257
|
+
"editorInput": "_SVViG_editorInput",
|
|
6258
|
+
"dshSidenoteHintIn": "_SVViG_dshSidenoteHintIn",
|
|
6259
|
+
"sentChipRow": "_SVViG_sentChipRow",
|
|
6089
6260
|
"editorSpacer": "_SVViG_editorSpacer",
|
|
6090
|
-
"
|
|
6091
|
-
"
|
|
6261
|
+
"deleteButton": "_SVViG_deleteButton",
|
|
6262
|
+
"cancelButton": "_SVViG_cancelButton",
|
|
6263
|
+
"chipWrap": "_SVViG_chipWrap",
|
|
6264
|
+
"toolbarButton": "_SVViG_toolbarButton",
|
|
6092
6265
|
"editorTextarea": "_SVViG_editorTextarea",
|
|
6093
6266
|
"saveButton": "_SVViG_saveButton",
|
|
6267
|
+
"editorAsk": "_SVViG_editorAsk",
|
|
6268
|
+
"chip": "_SVViG_chip",
|
|
6094
6269
|
"chipPanel": "_SVViG_chipPanel",
|
|
6095
|
-
"
|
|
6096
|
-
"editorAskRow": "_SVViG_editorAskRow",
|
|
6270
|
+
"chipRemove": "_SVViG_chipRemove",
|
|
6097
6271
|
"sentCardNote": "_SVViG_sentCardNote",
|
|
6098
|
-
"chipNote": "_SVViG_chipNote",
|
|
6099
|
-
"editorAsk": "_SVViG_editorAsk",
|
|
6100
|
-
"toolbarBelow": "_SVViG_toolbarBelow",
|
|
6101
|
-
"sentChip": "_SVViG_sentChip",
|
|
6102
|
-
"deleteButton": "_SVViG_deleteButton",
|
|
6103
|
-
"editorNew": "_SVViG_editorNew",
|
|
6104
6272
|
"hint": "_SVViG_hint",
|
|
6105
|
-
"
|
|
6273
|
+
"chipRow": "_SVViG_chipRow",
|
|
6274
|
+
"chipNumber": "_SVViG_chipNumber",
|
|
6275
|
+
"sentCardQuote": "_SVViG_sentCardQuote",
|
|
6276
|
+
"hintClose": "_SVViG_hintClose"
|
|
6106
6277
|
};
|
|
6107
6278
|
//#endregion
|
|
6108
6279
|
//#region src/client/annotate/hint.tsx
|
|
@@ -6218,7 +6389,8 @@ ${entries.map((entry) => {
|
|
|
6218
6389
|
useLocaleTick();
|
|
6219
6390
|
const selectionState = (0, react.useSyncExternalStore)((0, react.useCallback)((cb) => controller.subscribe(cb), [controller]), () => controller.getSnapshot());
|
|
6220
6391
|
(0, react.useSyncExternalStore)((0, react.useCallback)((cb) => store.subscribe(cb), [store]), () => store.getSnapshot());
|
|
6221
|
-
|
|
6392
|
+
(0, react.useSyncExternalStore)((0, react.useCallback)((cb) => ctx.sessions.list.subscribe(cb), [ctx]), () => ctx.sessions.list.getSnapshot());
|
|
6393
|
+
const currentSessionId = currentSessionIdOf(ctx);
|
|
6222
6394
|
const [editor, setEditor] = (0, react.useState)(null);
|
|
6223
6395
|
const [sideDraft, setSideDraft] = (0, react.useState)(null);
|
|
6224
6396
|
const [, setGeometryTick] = (0, react.useState)(0);
|
|
@@ -6358,7 +6530,7 @@ ${entries.map((entry) => {
|
|
|
6358
6530
|
}
|
|
6359
6531
|
closeEditor();
|
|
6360
6532
|
}
|
|
6361
|
-
}),
|
|
6533
|
+
}, `${editor.annotationId}:${editor.mode}`),
|
|
6362
6534
|
sideDraft !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SideChatNoteEditor, {
|
|
6363
6535
|
x: sideDraft.x,
|
|
6364
6536
|
y: sideDraft.y,
|
|
@@ -6514,7 +6686,7 @@ ${entries.map((entry) => {
|
|
|
6514
6686
|
title: t("confirmTitle"),
|
|
6515
6687
|
"aria-label": t("confirmAskAria"),
|
|
6516
6688
|
onClick: save,
|
|
6517
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6689
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheckOutline16, { size: 14 })
|
|
6518
6690
|
})]
|
|
6519
6691
|
}),
|
|
6520
6692
|
failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -6623,12 +6795,17 @@ ${entries.map((entry) => {
|
|
|
6623
6795
|
}
|
|
6624
6796
|
/**
|
|
6625
6797
|
* The annotation editor popover. 新建态: input + ✓ 确认 (允许空注解直接保存;
|
|
6626
|
-
*
|
|
6798
|
+
* 点击外部 = 确认、Esc = 取消,无显式取消按钮). 重开态: 已有注解 + 🗑 删除 +
|
|
6799
|
+
* 取消/保存.
|
|
6800
|
+
*
|
|
6801
|
+
* 导出供单测直接挂载(tests/annotate-editor.spec.tsx)。
|
|
6627
6802
|
*/
|
|
6628
6803
|
function AnnotationEditor(props) {
|
|
6629
6804
|
useLocaleTick();
|
|
6630
6805
|
const [note, setNote] = (0, react.useState)(props.annotation.note);
|
|
6631
6806
|
const rootRef = (0, react.useRef)(null);
|
|
6807
|
+
const noteRef = (0, react.useRef)(note);
|
|
6808
|
+
noteRef.current = note;
|
|
6632
6809
|
(0, react.useEffect)(() => {
|
|
6633
6810
|
const onKeyDown = (event) => {
|
|
6634
6811
|
if (event.key === "Escape") {
|
|
@@ -6641,7 +6818,8 @@ ${entries.map((entry) => {
|
|
|
6641
6818
|
if (root === null || !(event.target instanceof Node)) return;
|
|
6642
6819
|
if (root.contains(event.target)) return;
|
|
6643
6820
|
if (event.target instanceof Element && event.target.closest("[data-dsh-sidenote]") !== null) return;
|
|
6644
|
-
props.
|
|
6821
|
+
if (props.mode === "new") props.onSave(noteRef.current);
|
|
6822
|
+
else props.onCancel();
|
|
6645
6823
|
};
|
|
6646
6824
|
document.addEventListener("keydown", onKeyDown, true);
|
|
6647
6825
|
document.addEventListener("mousedown", onMouseDown, true);
|
|
@@ -6684,7 +6862,7 @@ ${entries.map((entry) => {
|
|
|
6684
6862
|
title: t("confirmTitle"),
|
|
6685
6863
|
"aria-label": t("saveNoteAria"),
|
|
6686
6864
|
onClick: save,
|
|
6687
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6865
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCheckOutline16, { size: 14 })
|
|
6688
6866
|
})]
|
|
6689
6867
|
});
|
|
6690
6868
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6719,7 +6897,7 @@ ${entries.map((entry) => {
|
|
|
6719
6897
|
title: t("deleteNote"),
|
|
6720
6898
|
"aria-label": t("deleteNote"),
|
|
6721
6899
|
onClick: props.onDelete,
|
|
6722
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6900
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconTrashOutline16, { size: 14 })
|
|
6723
6901
|
}),
|
|
6724
6902
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: annotate_module_css_default.editorSpacer }),
|
|
6725
6903
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -6793,7 +6971,7 @@ ${entries.map((entry) => {
|
|
|
6793
6971
|
onClick: () => {
|
|
6794
6972
|
setExpanded((open) => !open);
|
|
6795
6973
|
},
|
|
6796
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6974
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconListPenOutline16, { size: 12 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(active.length === 1 ? "chipOne" : "chipMany", { n: active.length }) })]
|
|
6797
6975
|
}), expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", {
|
|
6798
6976
|
className: annotate_module_css_default.chipPanel,
|
|
6799
6977
|
children: [active.map((annotation) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
@@ -6819,7 +6997,7 @@ ${entries.map((entry) => {
|
|
|
6819
6997
|
onClick: () => {
|
|
6820
6998
|
store.remove(annotation.id);
|
|
6821
6999
|
},
|
|
6822
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7000
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCloseOutline16, { size: 12 })
|
|
6823
7001
|
})
|
|
6824
7002
|
]
|
|
6825
7003
|
}, annotation.id)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
@@ -6883,7 +7061,7 @@ ${entries.map((entry) => {
|
|
|
6883
7061
|
onClick: () => {
|
|
6884
7062
|
setExpanded((open) => !open);
|
|
6885
7063
|
},
|
|
6886
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7064
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconShareOutline16, { size: 12 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(items.length === 1 ? "reflowChipOne" : "reflowChipMany", { n: items.length }) })]
|
|
6887
7065
|
}), expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
6888
7066
|
className: annotate_module_css_default.chipPanel,
|
|
6889
7067
|
children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
@@ -6904,7 +7082,7 @@ ${entries.map((entry) => {
|
|
|
6904
7082
|
onClick: () => {
|
|
6905
7083
|
reflow.remove(item.id);
|
|
6906
7084
|
},
|
|
6907
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7085
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCloseOutline16, { size: 12 })
|
|
6908
7086
|
})]
|
|
6909
7087
|
}, item.id))
|
|
6910
7088
|
})]
|
|
@@ -6959,13 +7137,7 @@ ${entries.map((entry) => {
|
|
|
6959
7137
|
window.clearTimeout(swallowTimer);
|
|
6960
7138
|
swallowTimer = window.setTimeout(clearSwallow, 2e3);
|
|
6961
7139
|
};
|
|
6962
|
-
const currentSessionId = () =>
|
|
6963
|
-
try {
|
|
6964
|
-
return ctx.sessions.list.getSnapshot().current ?? "";
|
|
6965
|
-
} catch {
|
|
6966
|
-
return "";
|
|
6967
|
-
}
|
|
6968
|
-
};
|
|
7140
|
+
const currentSessionId = () => currentSessionIdOf(ctx);
|
|
6969
7141
|
/**
|
|
6970
7142
|
* 异步提交(Workitem_06):inject 尝试(有界等待,见 tryInjectReflows)
|
|
6971
7143
|
* 在拼稿前——成功项以 plugin-source 事件进父会话日志(不进消息前缀),
|
|
@@ -7227,7 +7399,7 @@ ${entries.map((entry) => {
|
|
|
7227
7399
|
ctx.effect(() => {
|
|
7228
7400
|
try {
|
|
7229
7401
|
const store = createAnnotationStore();
|
|
7230
|
-
const controller = createSelectionController(() => ctx
|
|
7402
|
+
const controller = createSelectionController(() => currentSessionIdOf(ctx));
|
|
7231
7403
|
const host = document.createElement("div");
|
|
7232
7404
|
host.dataset.dshSidenote = "";
|
|
7233
7405
|
document.body.appendChild(host);
|