dsh-sidenote 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/lib/client.js +119 -114
- package/lib/index.js +87 -3955
- package/lib/types/client/reflow.d.ts +1 -1
- package/lib/types/index.d.ts +10 -1
- package/package.json +4 -4
- package/src/client/reflow.ts +9 -4
- package/src/index.ts +20 -7
package/README.md
CHANGED
|
@@ -82,7 +82,9 @@ dsh plugin --profile web add dsh-sidenote
|
|
|
82
82
|
|
|
83
83
|
## 兼容与帮助
|
|
84
84
|
|
|
85
|
-
已验证的原生侧栏组合为 **DSH 0.1.5-rc.2、0.1.7-rc.2、0.2.0-rc.2、0.2.1-rc.2**;旧版的三组 BS 组合继续保留验收。支持范围以[兼容与维护政策](docs/compatibility.md)中的精确版本为准;已发布版本请查看对应 Release。
|
|
85
|
+
已验证的原生侧栏组合为 **DSH 0.1.5-rc.2、0.1.7-rc.2、0.2.0-rc.2、0.2.1-rc.2、0.2.1-rc.3**;旧版的三组 BS 组合继续保留验收。支持范围以[兼容与维护政策](docs/compatibility.md)中的精确版本为准;已发布版本请查看对应 Release。
|
|
86
|
+
|
|
87
|
+
0.6.5 包含 DSH 0.2.1-rc.3 适配、V4 回流来源修复和逐项投递确认。0.6.4 及更早版本不声明支持 rc.3。0.6.5 是原生 Conversation 重构前的兼容修复快照;后续新版的原生宿主范围以对应 Release 为准,窗口外可固定 `dsh-sidenote@0.6.5`。
|
|
86
88
|
|
|
87
89
|
遇到问题时,可在 **设置 → 通用设置 → dsh-sidenote 诊断模式** 开启诊断,查看并手动导出接入状态。[报告问题或提出建议](https://github.com/g-yixuan/dsh-sidenote/issues/new/choose)。
|
|
88
90
|
|
package/lib/client.js
CHANGED
|
@@ -619,7 +619,7 @@ window.__ModuleLoader__.load({
|
|
|
619
619
|
let dockRegistered = false;
|
|
620
620
|
let report = {
|
|
621
621
|
versions: {
|
|
622
|
-
sidenote: "0.6.
|
|
622
|
+
sidenote: "0.6.5",
|
|
623
623
|
dsh: "unknown",
|
|
624
624
|
betterSidebar: null
|
|
625
625
|
},
|
|
@@ -1236,15 +1236,15 @@ window.__ModuleLoader__.load({
|
|
|
1236
1236
|
document.head.appendChild(tag);
|
|
1237
1237
|
}
|
|
1238
1238
|
var diagnostics_module_css_default = {
|
|
1239
|
-
"
|
|
1240
|
-
"
|
|
1241
|
-
"versions": "tGe0LW_versions",
|
|
1239
|
+
"description": "tGe0LW_description",
|
|
1240
|
+
"trigger": "tGe0LW_trigger",
|
|
1242
1241
|
"settingTitle": "tGe0LW_settingTitle",
|
|
1243
|
-
"actions": "tGe0LW_actions",
|
|
1244
1242
|
"panel": "tGe0LW_panel",
|
|
1243
|
+
"versions": "tGe0LW_versions",
|
|
1244
|
+
"list": "tGe0LW_list",
|
|
1245
1245
|
"setting": "tGe0LW_setting",
|
|
1246
|
-
"
|
|
1247
|
-
"
|
|
1246
|
+
"header": "tGe0LW_header",
|
|
1247
|
+
"actions": "tGe0LW_actions"
|
|
1248
1248
|
};
|
|
1249
1249
|
//#endregion
|
|
1250
1250
|
//#region src/client/diagnostics/index.tsx
|
|
@@ -1474,7 +1474,7 @@ window.__ModuleLoader__.load({
|
|
|
1474
1474
|
*/
|
|
1475
1475
|
/**
|
|
1476
1476
|
* reflow 注入通道(Workitem_06):优先经宿主路由 /sidenote/reflow 以
|
|
1477
|
-
* agent.inject
|
|
1477
|
+
* agent.inject 落父会话日志(插件自有 source 独立事件,context row 折叠);
|
|
1478
1478
|
* 路由缺席/父会话无 live agent/超时 → 调用方回落搭车形态(发送拦截器
|
|
1479
1479
|
* 序列化前缀)。逐个 item 投递;成功项由调用方从 store 移除(不等发送
|
|
1480
1480
|
* 确认——注入已入 inbox,chip 消失表达「已注入」)。
|
|
@@ -1482,7 +1482,7 @@ window.__ModuleLoader__.load({
|
|
|
1482
1482
|
* 有界等待:注入尝试绝不能拖住发送手势——300ms 超时即回落搭车。
|
|
1483
1483
|
*/
|
|
1484
1484
|
const REFLOW_ROUTE_TIMEOUT_MS = 300;
|
|
1485
|
-
/**
|
|
1485
|
+
/** 只消费宿主明确确认的项;未注入项由调用方搭车,发送拒绝时继续保留。 */
|
|
1486
1486
|
async function tryInjectReflows(parentSessionId, items) {
|
|
1487
1487
|
if (items.length === 0) return { injectedIds: /* @__PURE__ */ new Set() };
|
|
1488
1488
|
const empty = { injectedIds: /* @__PURE__ */ new Set() };
|
|
@@ -1509,7 +1509,12 @@ window.__ModuleLoader__.load({
|
|
|
1509
1509
|
clearTimeout(timer);
|
|
1510
1510
|
}
|
|
1511
1511
|
if (!res.ok) return empty;
|
|
1512
|
-
|
|
1512
|
+
const data = await res.json();
|
|
1513
|
+
if (Array.isArray(data.injectedIndexes)) {
|
|
1514
|
+
const indexes = data.injectedIndexes.filter((index) => typeof index === "number" && Number.isInteger(index) && index >= 0 && index < items.length);
|
|
1515
|
+
return { injectedIds: new Set(indexes.map((index) => items[index].id)) };
|
|
1516
|
+
}
|
|
1517
|
+
if (data.ok !== true) return empty;
|
|
1513
1518
|
return { injectedIds: new Set(items.map((item) => item.id)) };
|
|
1514
1519
|
} catch {
|
|
1515
1520
|
return empty;
|
|
@@ -3229,96 +3234,96 @@ window.__ModuleLoader__.load({
|
|
|
3229
3234
|
}
|
|
3230
3235
|
var sidechat_module_css_default = {
|
|
3231
3236
|
"userRow": "_5KEEsG_userRow",
|
|
3232
|
-
"userBubble": "_5KEEsG_userBubble",
|
|
3233
|
-
"stateScreen": "_5KEEsG_stateScreen",
|
|
3234
|
-
"todoText": "_5KEEsG_todoText",
|
|
3235
|
-
"todoItem": "_5KEEsG_todoItem",
|
|
3236
|
-
"toolLocations": "_5KEEsG_toolLocations",
|
|
3237
|
-
"pendingQuestion": "_5KEEsG_pendingQuestion",
|
|
3238
|
-
"pendingQHeader": "_5KEEsG_pendingQHeader",
|
|
3239
|
-
"nativeHost": "_5KEEsG_nativeHost",
|
|
3240
|
-
"emptyText": "_5KEEsG_emptyText",
|
|
3241
|
-
"empty": "_5KEEsG_empty",
|
|
3242
|
-
"stopButton": "_5KEEsG_stopButton",
|
|
3243
|
-
"body": "_5KEEsG_body",
|
|
3244
|
-
"input": "_5KEEsG_input",
|
|
3245
|
-
"flowRow": "_5KEEsG_flowRow",
|
|
3246
|
-
"flowRowError": "_5KEEsG_flowRowError",
|
|
3247
|
-
"slashItemName": "_5KEEsG_slashItemName",
|
|
3248
3237
|
"attachImg": "_5KEEsG_attachImg",
|
|
3249
|
-
"
|
|
3250
|
-
"
|
|
3251
|
-
"
|
|
3252
|
-
"
|
|
3253
|
-
"
|
|
3254
|
-
"pendingActions": "_5KEEsG_pendingActions",
|
|
3255
|
-
"rowActions": "_5KEEsG_rowActions",
|
|
3256
|
-
"jumpBottom": "_5KEEsG_jumpBottom",
|
|
3238
|
+
"rowPreview": "_5KEEsG_rowPreview",
|
|
3239
|
+
"streamingHint": "_5KEEsG_streamingHint",
|
|
3240
|
+
"errorRow": "_5KEEsG_errorRow",
|
|
3241
|
+
"headerSide": "_5KEEsG_headerSide",
|
|
3242
|
+
"snapshotBody": "_5KEEsG_snapshotBody",
|
|
3257
3243
|
"quoteBody": "_5KEEsG_quoteBody",
|
|
3244
|
+
"toolLocations": "_5KEEsG_toolLocations",
|
|
3245
|
+
"composerChips": "_5KEEsG_composerChips",
|
|
3246
|
+
"slashItemDetail": "_5KEEsG_slashItemDetail",
|
|
3247
|
+
"attachThumb": "_5KEEsG_attachThumb",
|
|
3248
|
+
"pendingOptionActive": "_5KEEsG_pendingOptionActive",
|
|
3249
|
+
"toolHead": "_5KEEsG_toolHead",
|
|
3258
3250
|
"pendingCustom": "_5KEEsG_pendingCustom",
|
|
3251
|
+
"pendingBtnGhost": "_5KEEsG_pendingBtnGhost",
|
|
3259
3252
|
"writeNoticeClose": "_5KEEsG_writeNoticeClose",
|
|
3260
|
-
"
|
|
3253
|
+
"pendingTitle": "_5KEEsG_pendingTitle",
|
|
3254
|
+
"dotIdle": "_5KEEsG_dotIdle",
|
|
3255
|
+
"composer": "_5KEEsG_composer",
|
|
3256
|
+
"stopButton": "_5KEEsG_stopButton",
|
|
3257
|
+
"visibilitySetting": "_5KEEsG_visibilitySetting",
|
|
3258
|
+
"dotPending": "_5KEEsG_dotPending",
|
|
3259
|
+
"assistantRow": "_5KEEsG_assistantRow",
|
|
3261
3260
|
"composerFoot": "_5KEEsG_composerFoot",
|
|
3262
|
-
"
|
|
3261
|
+
"toolBodyText": "_5KEEsG_toolBodyText",
|
|
3262
|
+
"densityToggle": "_5KEEsG_densityToggle",
|
|
3263
|
+
"pendingQHeader": "_5KEEsG_pendingQHeader",
|
|
3264
|
+
"todoDot": "_5KEEsG_todoDot",
|
|
3265
|
+
"pendingQText": "_5KEEsG_pendingQText",
|
|
3266
|
+
"dotRunning": "_5KEEsG_dotRunning",
|
|
3267
|
+
"rowActions": "_5KEEsG_rowActions",
|
|
3268
|
+
"stateDetail": "_5KEEsG_stateDetail",
|
|
3269
|
+
"reasoning": "_5KEEsG_reasoning",
|
|
3270
|
+
"snapshotText": "_5KEEsG_snapshotText",
|
|
3271
|
+
"reflowButton": "_5KEEsG_reflowButton",
|
|
3272
|
+
"stateScreen": "_5KEEsG_stateScreen",
|
|
3263
3273
|
"sentChip": "_5KEEsG_sentChip",
|
|
3264
|
-
"
|
|
3265
|
-
"
|
|
3266
|
-
"
|
|
3267
|
-
"
|
|
3268
|
-
"
|
|
3269
|
-
"
|
|
3270
|
-
"
|
|
3271
|
-
"
|
|
3272
|
-
"
|
|
3273
|
-
"
|
|
3274
|
-
"rowPreview": "_5KEEsG_rowPreview",
|
|
3275
|
-
"assistantBody": "_5KEEsG_assistantBody",
|
|
3274
|
+
"nativeHost": "_5KEEsG_nativeHost",
|
|
3275
|
+
"toolBody": "_5KEEsG_toolBody",
|
|
3276
|
+
"modelLabel": "_5KEEsG_modelLabel",
|
|
3277
|
+
"sentChipRow": "_5KEEsG_sentChipRow",
|
|
3278
|
+
"slashItem": "_5KEEsG_slashItem",
|
|
3279
|
+
"slashItemName": "_5KEEsG_slashItemName",
|
|
3280
|
+
"pendingDesc": "_5KEEsG_pendingDesc",
|
|
3281
|
+
"pendingOptionDesc": "_5KEEsG_pendingOptionDesc",
|
|
3282
|
+
"pendingActions": "_5KEEsG_pendingActions",
|
|
3283
|
+
"flowRow": "_5KEEsG_flowRow",
|
|
3276
3284
|
"slashGroupTitle": "_5KEEsG_slashGroupTitle",
|
|
3285
|
+
"sidechat-pulse": "_5KEEsG_sidechat-pulse",
|
|
3286
|
+
"todoText": "_5KEEsG_todoText",
|
|
3287
|
+
"actionGroup": "_5KEEsG_actionGroup",
|
|
3288
|
+
"flowRowError": "_5KEEsG_flowRowError",
|
|
3289
|
+
"attachRemove": "_5KEEsG_attachRemove",
|
|
3277
3290
|
"slashItemActive": "_5KEEsG_slashItemActive",
|
|
3278
|
-
"
|
|
3291
|
+
"toolError": "_5KEEsG_toolError",
|
|
3279
3292
|
"toolCard": "_5KEEsG_toolCard",
|
|
3280
|
-
"
|
|
3281
|
-
"
|
|
3282
|
-
"
|
|
3283
|
-
"
|
|
3284
|
-
"
|
|
3293
|
+
"pendingCard": "_5KEEsG_pendingCard",
|
|
3294
|
+
"pendingQuestion": "_5KEEsG_pendingQuestion",
|
|
3295
|
+
"body": "_5KEEsG_body",
|
|
3296
|
+
"empty": "_5KEEsG_empty",
|
|
3297
|
+
"emptyIcon": "_5KEEsG_emptyIcon",
|
|
3285
3298
|
"slashMenu": "_5KEEsG_slashMenu",
|
|
3286
|
-
"
|
|
3287
|
-
"
|
|
3288
|
-
"
|
|
3289
|
-
"
|
|
3290
|
-
"
|
|
3291
|
-
"
|
|
3292
|
-
"pendingBtnPrimary": "_5KEEsG_pendingBtnPrimary",
|
|
3293
|
-
"dotRunning": "_5KEEsG_dotRunning",
|
|
3294
|
-
"errorRow": "_5KEEsG_errorRow",
|
|
3295
|
-
"slashItemDetail": "_5KEEsG_slashItemDetail",
|
|
3296
|
-
"composer": "_5KEEsG_composer",
|
|
3297
|
-
"densityRow": "_5KEEsG_densityRow",
|
|
3298
|
-
"modelLabel": "_5KEEsG_modelLabel",
|
|
3299
|
-
"toolHead": "_5KEEsG_toolHead",
|
|
3300
|
-
"toolGenericBody": "_5KEEsG_toolGenericBody",
|
|
3301
|
-
"slashItem": "_5KEEsG_slashItem",
|
|
3299
|
+
"transcript": "_5KEEsG_transcript",
|
|
3300
|
+
"sendButton": "_5KEEsG_sendButton",
|
|
3301
|
+
"input": "_5KEEsG_input",
|
|
3302
|
+
"toolRunning": "_5KEEsG_toolRunning",
|
|
3303
|
+
"userBubble": "_5KEEsG_userBubble",
|
|
3304
|
+
"jumpBottom": "_5KEEsG_jumpBottom",
|
|
3302
3305
|
"pendingOption": "_5KEEsG_pendingOption",
|
|
3303
|
-
"
|
|
3304
|
-
"
|
|
3305
|
-
"dotIdle": "_5KEEsG_dotIdle",
|
|
3306
|
-
"todoDot": "_5KEEsG_todoDot",
|
|
3307
|
-
"attachRemove": "_5KEEsG_attachRemove",
|
|
3308
|
-
"pendingBtnGhost": "_5KEEsG_pendingBtnGhost",
|
|
3309
|
-
"noticeRow": "_5KEEsG_noticeRow",
|
|
3310
|
-
"pendingOptionActive": "_5KEEsG_pendingOptionActive",
|
|
3311
|
-
"snapshotBody": "_5KEEsG_snapshotBody",
|
|
3312
|
-
"densityToggle": "_5KEEsG_densityToggle",
|
|
3313
|
-
"assistantRow": "_5KEEsG_assistantRow",
|
|
3314
|
-
"composerChips": "_5KEEsG_composerChips",
|
|
3306
|
+
"todoItem": "_5KEEsG_todoItem",
|
|
3307
|
+
"toolGenericBody": "_5KEEsG_toolGenericBody",
|
|
3315
3308
|
"attachRail": "_5KEEsG_attachRail",
|
|
3309
|
+
"pendingReason": "_5KEEsG_pendingReason",
|
|
3310
|
+
"root": "_5KEEsG_root",
|
|
3316
3311
|
"composerCard": "_5KEEsG_composerCard",
|
|
3317
|
-
"transcript": "_5KEEsG_transcript",
|
|
3318
|
-
"pendingBar": "_5KEEsG_pendingBar",
|
|
3319
|
-
"dotPending": "_5KEEsG_dotPending",
|
|
3320
3312
|
"emptyTitle": "_5KEEsG_emptyTitle",
|
|
3321
|
-
"
|
|
3313
|
+
"inheritedBody": "_5KEEsG_inheritedBody",
|
|
3314
|
+
"pendingBtnPrimary": "_5KEEsG_pendingBtnPrimary",
|
|
3315
|
+
"writeNotice": "_5KEEsG_writeNotice",
|
|
3316
|
+
"modelSelect": "_5KEEsG_modelSelect",
|
|
3317
|
+
"pendingHead": "_5KEEsG_pendingHead",
|
|
3318
|
+
"parentStrip": "_5KEEsG_parentStrip",
|
|
3319
|
+
"assistantBody": "_5KEEsG_assistantBody",
|
|
3320
|
+
"emptyText": "_5KEEsG_emptyText",
|
|
3321
|
+
"noticeRow": "_5KEEsG_noticeRow",
|
|
3322
|
+
"pendingBar": "_5KEEsG_pendingBar",
|
|
3323
|
+
"attachButton": "_5KEEsG_attachButton",
|
|
3324
|
+
"reasoningBody": "_5KEEsG_reasoningBody",
|
|
3325
|
+
"todoBody": "_5KEEsG_todoBody",
|
|
3326
|
+
"densityRow": "_5KEEsG_densityRow"
|
|
3322
3327
|
};
|
|
3323
3328
|
//#endregion
|
|
3324
3329
|
//#region src/client/chat/ToolCard.tsx
|
|
@@ -5301,17 +5306,17 @@ ${entries.map((entry) => {
|
|
|
5301
5306
|
document.head.appendChild(tag);
|
|
5302
5307
|
}
|
|
5303
5308
|
var annotations_module_css_default = {
|
|
5304
|
-
"
|
|
5305
|
-
"chipClearAll": "SVnebq_chipClearAll",
|
|
5309
|
+
"storageNotice": "SVnebq_storageNotice",
|
|
5306
5310
|
"chipRemove": "SVnebq_chipRemove",
|
|
5307
|
-
"chipText": "SVnebq_chipText",
|
|
5308
5311
|
"chipRow": "SVnebq_chipRow",
|
|
5309
|
-
"
|
|
5310
|
-
"
|
|
5311
|
-
"storageNotice": "SVnebq_storageNotice",
|
|
5312
|
+
"chipWrap": "SVnebq_chipWrap",
|
|
5313
|
+
"chipText": "SVnebq_chipText",
|
|
5312
5314
|
"chip": "SVnebq_chip",
|
|
5315
|
+
"chipPanel": "SVnebq_chipPanel",
|
|
5316
|
+
"side": "SVnebq_side",
|
|
5317
|
+
"chipClearAll": "SVnebq_chipClearAll",
|
|
5313
5318
|
"chipNote": "SVnebq_chipNote",
|
|
5314
|
-
"
|
|
5319
|
+
"chipNumber": "SVnebq_chipNumber"
|
|
5315
5320
|
};
|
|
5316
5321
|
//#endregion
|
|
5317
5322
|
//#region src/client/annotations/chip.tsx
|
|
@@ -7819,34 +7824,34 @@ ${entries.map((entry) => {
|
|
|
7819
7824
|
document.head.appendChild(tag);
|
|
7820
7825
|
}
|
|
7821
7826
|
var annotate_module_css_default = {
|
|
7822
|
-
"
|
|
7823
|
-
"
|
|
7824
|
-
"
|
|
7827
|
+
"hint": "_SVViG_hint",
|
|
7828
|
+
"toolbar": "_SVViG_toolbar",
|
|
7829
|
+
"editorTextarea": "_SVViG_editorTextarea",
|
|
7825
7830
|
"editorAskRow": "_SVViG_editorAskRow",
|
|
7826
|
-
"
|
|
7827
|
-
"
|
|
7828
|
-
"
|
|
7829
|
-
"
|
|
7830
|
-
"deleteButton": "_SVViG_deleteButton",
|
|
7831
|
-
"badgeSent": "_SVViG_badgeSent",
|
|
7832
|
-
"editorError": "_SVViG_editorError",
|
|
7831
|
+
"saveButton": "_SVViG_saveButton",
|
|
7832
|
+
"editorNew": "_SVViG_editorNew",
|
|
7833
|
+
"badge": "_SVViG_badge",
|
|
7834
|
+
"sentChip": "_SVViG_sentChip",
|
|
7833
7835
|
"sentCardQuote": "_SVViG_sentCardQuote",
|
|
7836
|
+
"editorInput": "_SVViG_editorInput",
|
|
7837
|
+
"dshSidenoteHintIn": "_SVViG_dshSidenoteHintIn",
|
|
7838
|
+
"hintClose": "_SVViG_hintClose",
|
|
7834
7839
|
"editorSpacer": "_SVViG_editorSpacer",
|
|
7835
7840
|
"sentChipRow": "_SVViG_sentChipRow",
|
|
7836
|
-
"
|
|
7837
|
-
"confirmButton": "_SVViG_confirmButton",
|
|
7838
|
-
"editorFooter": "_SVViG_editorFooter",
|
|
7841
|
+
"editorAsk": "_SVViG_editorAsk",
|
|
7839
7842
|
"highlight": "_SVViG_highlight",
|
|
7840
|
-
"hintClose": "_SVViG_hintClose",
|
|
7841
|
-
"badge": "_SVViG_badge",
|
|
7842
7843
|
"editorTarget": "_SVViG_editorTarget",
|
|
7843
|
-
"
|
|
7844
|
-
"sentChip": "_SVViG_sentChip",
|
|
7844
|
+
"editorFooter": "_SVViG_editorFooter",
|
|
7845
7845
|
"editorEdit": "_SVViG_editorEdit",
|
|
7846
|
-
"
|
|
7847
|
-
"
|
|
7848
|
-
"
|
|
7849
|
-
"
|
|
7846
|
+
"toolbarBelow": "_SVViG_toolbarBelow",
|
|
7847
|
+
"editorError": "_SVViG_editorError",
|
|
7848
|
+
"deleteButton": "_SVViG_deleteButton",
|
|
7849
|
+
"toolbarButton": "_SVViG_toolbarButton",
|
|
7850
|
+
"cancelButton": "_SVViG_cancelButton",
|
|
7851
|
+
"confirmButton": "_SVViG_confirmButton",
|
|
7852
|
+
"badgeSent": "_SVViG_badgeSent",
|
|
7853
|
+
"sentCardTitle": "_SVViG_sentCardTitle",
|
|
7854
|
+
"sentCardNote": "_SVViG_sentCardNote"
|
|
7850
7855
|
};
|
|
7851
7856
|
//#endregion
|
|
7852
7857
|
//#region src/client/annotate/hint.tsx
|