@senguoyun/dsh-arkme 0.1.58 → 0.1.60
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/docs/dsh-input-system-topic.md +7 -3
- package/docs/plugin-release.md +1 -1
- package/lib/client.js +3479 -1686
- package/lib/client.js.map +1 -1
- package/lib/harness-sidebar-client.js +214 -23
- package/lib/index.js +51 -6
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-BnDj8qcY.js → persistent-runtime-DqPfc6RO.js} +411 -66
- package/lib/types/arkme-service.d.ts +3 -0
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/client/ArkmeCalendarSurface.d.ts +22 -1
- package/lib/types/client/ArkmeCalendarSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeCallSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeDshMenu.d.ts +38 -0
- package/lib/types/client/ArkmeDshMenu.d.ts.map +1 -0
- package/lib/types/client/ArkmeGroupChatControls.d.ts +4 -0
- package/lib/types/client/ArkmeGroupChatControls.d.ts.map +1 -1
- package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkmeSourceBreadcrumb.d.ts +6 -2
- package/lib/types/client/ArkmeSourceBreadcrumb.d.ts.map +1 -1
- package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts +4 -2
- package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts.map +1 -1
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
- package/lib/types/client/DeepSeekHarnessSurface.d.ts.map +1 -1
- package/lib/types/client/PrivateChatActions.d.ts +15 -3
- package/lib/types/client/PrivateChatActions.d.ts.map +1 -1
- package/lib/types/client/calendar-invalidation-store.d.ts +10 -1
- package/lib/types/client/calendar-invalidation-store.d.ts.map +1 -1
- package/lib/types/client/calendar-month-cache.d.ts +37 -0
- package/lib/types/client/calendar-month-cache.d.ts.map +1 -0
- package/lib/types/client/conversation-export.d.ts +18 -0
- package/lib/types/client/conversation-export.d.ts.map +1 -0
- package/lib/types/client/conversation-menu-layer.d.ts +27 -0
- package/lib/types/client/conversation-menu-layer.d.ts.map +1 -0
- package/lib/types/client/conversation-menu-scrollbars.d.ts +3 -0
- package/lib/types/client/conversation-menu-scrollbars.d.ts.map +1 -0
- package/lib/types/client/conversation-selector-style.d.ts +34 -0
- package/lib/types/client/conversation-selector-style.d.ts.map +1 -0
- package/lib/types/client/harness-session-dropdown.d.ts.map +1 -1
- package/lib/types/client/harness-session-hover.d.ts +1 -1
- package/lib/types/client/harness-session-hover.d.ts.map +1 -1
- package/lib/types/client/harness-session-menu-bridge.d.ts +2 -0
- package/lib/types/client/harness-session-menu-bridge.d.ts.map +1 -1
- package/lib/types/client/harness-surface-viewport.d.ts +7 -0
- package/lib/types/client/harness-surface-viewport.d.ts.map +1 -0
- package/lib/types/client/live-photo-playback.d.ts.map +1 -1
- package/lib/types/client/navigation-cache.d.ts +6 -1
- package/lib/types/client/navigation-cache.d.ts.map +1 -1
- package/lib/types/client/provider-instance-runtime.d.ts.map +1 -1
- package/lib/types/client/realtime-client-events.d.ts.map +1 -1
- package/lib/types/client/self-topic-directory-cache.d.ts +42 -0
- package/lib/types/client/self-topic-directory-cache.d.ts.map +1 -0
- package/lib/types/client/self-topic-expansion-preference.d.ts +23 -0
- package/lib/types/client/self-topic-expansion-preference.d.ts.map +1 -0
- package/lib/types/client/self-topic-menu-bridge.d.ts +20 -0
- package/lib/types/client/self-topic-menu-bridge.d.ts.map +1 -0
- package/lib/types/client/self-topic-menu-hover.d.ts +3 -0
- package/lib/types/client/self-topic-menu-hover.d.ts.map +1 -0
- package/lib/types/client/use-calendar-month.d.ts +4 -0
- package/lib/types/client/use-calendar-month.d.ts.map +1 -0
- package/lib/types/dsh-agent-input-source.d.ts +2 -0
- package/lib/types/dsh-agent-input-source.d.ts.map +1 -1
- package/lib/types/dsh-remote/session-persistence.d.ts +4 -0
- package/lib/types/dsh-remote/session-persistence.d.ts.map +1 -0
- package/lib/types/dsh-remote/transport-fragment.d.ts.map +1 -1
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/services/calendar-service.d.ts +10 -0
- package/lib/types/services/calendar-service.d.ts.map +1 -1
- package/lib/types/services/call-history-service.d.ts +4 -2
- package/lib/types/services/call-history-service.d.ts.map +1 -1
- package/lib/types/services/chat-realtime-service.d.ts +3 -1
- package/lib/types/services/chat-realtime-service.d.ts.map +1 -1
- package/lib/types/services/chat-service.d.ts +3 -1
- package/lib/types/services/chat-service.d.ts.map +1 -1
- package/lib/types/services/record-service.d.ts.map +1 -1
- package/lib/types/services/service.d.ts +5 -0
- package/lib/types/services/service.d.ts.map +1 -1
- package/lib/types/services/source-service.d.ts +3 -0
- package/lib/types/services/source-service.d.ts.map +1 -1
- package/lib/types/types.d.ts +3 -1
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -71,6 +71,181 @@ window.__ModuleLoader__.load({
|
|
|
71
71
|
const HARNESS_MENU_CLOSE = "arkme:harness-menu-close";
|
|
72
72
|
const HARNESS_MENU_POSITION = "arkme:harness-menu-position";
|
|
73
73
|
//#endregion
|
|
74
|
+
//#region src/client/conversation-selector-style.ts
|
|
75
|
+
/** Native DSH menu metrics, shared by both topic-menu entry points and the session adapter. */
|
|
76
|
+
const CONVERSATION_MENU_LAYOUT = {
|
|
77
|
+
width: 320,
|
|
78
|
+
maxHeight: 560,
|
|
79
|
+
paddingY: 8,
|
|
80
|
+
paddingX: 10,
|
|
81
|
+
rowHeight: 32,
|
|
82
|
+
rowGap: 2,
|
|
83
|
+
titleFontSize: 14,
|
|
84
|
+
secondaryFontSize: 12,
|
|
85
|
+
lineHeight: "20px",
|
|
86
|
+
listBottomPadding: 16,
|
|
87
|
+
fadeHeight: 24,
|
|
88
|
+
createHeight: 38,
|
|
89
|
+
hoverGap: 8,
|
|
90
|
+
viewportInset: 12,
|
|
91
|
+
scrollbarWidth: 8,
|
|
92
|
+
scrollbarContentPadding: 2,
|
|
93
|
+
scrollbarLingerMs: 2e3
|
|
94
|
+
};
|
|
95
|
+
/** Keep the current selection distinct from a transient hover in both menus. */
|
|
96
|
+
const CONVERSATION_MENU_COLORS = {
|
|
97
|
+
selected: "#eef1f8",
|
|
98
|
+
hover: "var(--dsw-alias-interactive-bg-hover, #f3f4f7)"
|
|
99
|
+
};
|
|
100
|
+
const CONVERSATION_MENU_SURFACE = {
|
|
101
|
+
background: "var(--dsw-specific-sidebar-fill, #f9fafb)",
|
|
102
|
+
border: "1px solid var(--dsw-alias-border-l3, #e5e7eb)",
|
|
103
|
+
borderRadius: 10,
|
|
104
|
+
boxShadow: "0 10px 32px #0000001f"
|
|
105
|
+
};
|
|
106
|
+
/** Shared by the native DSH adapter and the self-topic selector, including focus feedback. */
|
|
107
|
+
const CONVERSATION_SELECTOR_CSS = `
|
|
108
|
+
/* Both menus use the native scrollbar tokens and a stable gutter. The list's
|
|
109
|
+
own variables deliberately override the native sidebar's ancestor quietBars. */
|
|
110
|
+
[data-arkme-menu-scroll] {
|
|
111
|
+
--dsh-scrollbar-thumb: transparent;
|
|
112
|
+
--dsh-scrollbar-thumb-hover: transparent;
|
|
113
|
+
scrollbar-gutter: stable;
|
|
114
|
+
padding-right: ${CONVERSATION_MENU_LAYOUT.scrollbarContentPadding}px;
|
|
115
|
+
padding-bottom: ${CONVERSATION_MENU_LAYOUT.listBottomPadding}px;
|
|
116
|
+
}
|
|
117
|
+
[data-arkme-menu-scrollbars="visible"] [data-arkme-menu-scroll] {
|
|
118
|
+
--dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
|
|
119
|
+
--dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
|
|
120
|
+
}
|
|
121
|
+
[data-arkme-menu-scroll]::-webkit-scrollbar { width: ${CONVERSATION_MENU_LAYOUT.scrollbarWidth}px; height: ${CONVERSATION_MENU_LAYOUT.scrollbarWidth}px; }
|
|
122
|
+
[data-arkme-menu-scroll]::-webkit-scrollbar-thumb { background: var(--dsh-scrollbar-thumb); border-radius: 4px; }
|
|
123
|
+
[data-arkme-menu-scroll]::-webkit-scrollbar-thumb:hover { background: var(--dsh-scrollbar-thumb-hover); }
|
|
124
|
+
[data-arkme-menu-scroll]::-webkit-scrollbar-track, [data-arkme-menu-scroll]::-webkit-scrollbar-corner { background: transparent; }
|
|
125
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
126
|
+
[data-arkme-menu-scroll] { scrollbar-width: thin; scrollbar-color: var(--dsh-scrollbar-thumb) transparent; }
|
|
127
|
+
}
|
|
128
|
+
/* Match DSH's solid selector footer and its native New Session / View Options controls. */
|
|
129
|
+
:is([data-arkme-workspace], [data-arkme-self-topic-menu]) .arkme-self-topic-create-button { flex: 1; }
|
|
130
|
+
:is([data-arkme-workspace], [data-arkme-self-topic-menu]) .arkme-self-topic-create-button,
|
|
131
|
+
[data-arkme-session-create] {
|
|
132
|
+
min-width: 0;
|
|
133
|
+
height: 38px;
|
|
134
|
+
border: 1px solid var(--dsw-alias-border-l2, #dfe1e5);
|
|
135
|
+
border-radius: 12px;
|
|
136
|
+
background: var(--dsw-alias-button-elevated-fill, #fff);
|
|
137
|
+
color: var(--dsw-alias-label-primary, #171923);
|
|
138
|
+
padding: 8px 16px;
|
|
139
|
+
gap: 6px;
|
|
140
|
+
font-size: 14px;
|
|
141
|
+
font-weight: 500;
|
|
142
|
+
line-height: 22px;
|
|
143
|
+
white-space: nowrap;
|
|
144
|
+
}
|
|
145
|
+
:is([data-arkme-workspace], [data-arkme-self-topic-menu]) .arkme-self-topic-create-button:hover:not(:disabled),
|
|
146
|
+
[data-arkme-session-create]:hover:not(:disabled) {
|
|
147
|
+
background: var(--dsw-alias-button-floating-hover, #f3f4f7);
|
|
148
|
+
border-color: var(--dsw-alias-border-l2, #d9dade);
|
|
149
|
+
}
|
|
150
|
+
:is([data-arkme-workspace], [data-arkme-self-topic-menu]) .arkme-dsh-view-options-button,
|
|
151
|
+
[data-arkme-session-tools-actions] button {
|
|
152
|
+
corner-shape: round;
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
width: 28px;
|
|
155
|
+
height: 28px;
|
|
156
|
+
flex: none;
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
padding: 0;
|
|
161
|
+
border: none;
|
|
162
|
+
border-radius: 50%;
|
|
163
|
+
background: transparent;
|
|
164
|
+
color: var(--dsw-alias-label-secondary);
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
}
|
|
167
|
+
:is([data-arkme-workspace], [data-arkme-self-topic-menu]) .arkme-dsh-view-options-button:hover,
|
|
168
|
+
[data-arkme-session-tools-actions] button:hover {
|
|
169
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
170
|
+
}
|
|
171
|
+
[data-arkme-conversation-selector] {
|
|
172
|
+
display: inline-flex; align-items: stretch; gap: 0; min-width: 0; max-width: 100%; height: 30px;
|
|
173
|
+
border: 1px solid var(--dsw-alias-border-l3, #d4d6da); border-radius: 10px; padding: 0; margin-left: 0; box-sizing: border-box;
|
|
174
|
+
color: var(--dsw-alias-label-primary, inherit); background: var(--dsw-alias-button-elevated-fill, #fff); font: inherit;
|
|
175
|
+
font-size: 16px; font-weight: 600; line-height: 28px; overflow: hidden; cursor: pointer; outline: none;
|
|
176
|
+
}
|
|
177
|
+
[data-arkme-conversation-selector] > span:first-child { padding: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
178
|
+
[data-arkme-conversation-selector] > span:last-child {
|
|
179
|
+
color: var(--dsw-alias-label-secondary, #626872); flex: none; width: 28px;
|
|
180
|
+
border-left: 1px solid var(--dsw-alias-border-l3, #d4d6da); display: flex; align-items: center; justify-content: center;
|
|
181
|
+
}
|
|
182
|
+
[data-arkme-conversation-selector][aria-expanded="true"] svg { transform: rotate(180deg); }
|
|
183
|
+
[data-arkme-conversation-selector]:hover, [data-arkme-conversation-selector][aria-expanded="true"] { background: var(--dsw-alias-interactive-bg-hover, #f3f4f6); }
|
|
184
|
+
[data-arkme-conversation-selector]:focus-visible { outline: 2px solid #4c70ef; outline-offset: -2px; }
|
|
185
|
+
`;
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/client/conversation-menu-layer.ts
|
|
188
|
+
function conversationMenuPosition(anchor, width, height, viewport) {
|
|
189
|
+
const { hoverGap, viewportInset } = CONVERSATION_MENU_LAYOUT;
|
|
190
|
+
const right = anchor.right + hoverGap;
|
|
191
|
+
const left = right + width <= viewport.width - viewportInset ? right : anchor.left - width - hoverGap;
|
|
192
|
+
return {
|
|
193
|
+
left: Math.max(viewportInset, Math.min(left, viewport.width - width - viewportInset)),
|
|
194
|
+
top: Math.max(viewportInset, Math.min(anchor.top, viewport.height - height - viewportInset))
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/client/conversation-menu-scrollbars.ts
|
|
199
|
+
/** The native DSH recipe: reveal on entry, linger for 2s on exit, never resize. */
|
|
200
|
+
function watchConversationMenuScrollbars(menu, list) {
|
|
201
|
+
const doc = menu.ownerDocument;
|
|
202
|
+
const win = doc.defaultView;
|
|
203
|
+
let timer;
|
|
204
|
+
let visible = false;
|
|
205
|
+
const setVisible = (next) => {
|
|
206
|
+
visible = next;
|
|
207
|
+
menu.setAttribute("data-arkme-menu-scrollbars", next ? "visible" : "quiet");
|
|
208
|
+
};
|
|
209
|
+
const cancel = () => {
|
|
210
|
+
win.clearTimeout(timer);
|
|
211
|
+
timer = void 0;
|
|
212
|
+
};
|
|
213
|
+
const enter = () => {
|
|
214
|
+
cancel();
|
|
215
|
+
setVisible(true);
|
|
216
|
+
};
|
|
217
|
+
const leave = () => {
|
|
218
|
+
if (!visible || timer !== void 0) return;
|
|
219
|
+
timer = win.setTimeout(() => {
|
|
220
|
+
timer = void 0;
|
|
221
|
+
setVisible(false);
|
|
222
|
+
}, CONVERSATION_MENU_LAYOUT.scrollbarLingerMs);
|
|
223
|
+
};
|
|
224
|
+
const move = (event) => {
|
|
225
|
+
if (!visible) return;
|
|
226
|
+
const rect = menu.getBoundingClientRect();
|
|
227
|
+
if (event.clientX >= rect.left && event.clientX < rect.right && event.clientY >= rect.top && event.clientY < rect.bottom) cancel();
|
|
228
|
+
else leave();
|
|
229
|
+
};
|
|
230
|
+
list.setAttribute("data-arkme-menu-scroll", "");
|
|
231
|
+
setVisible(menu.matches(":hover"));
|
|
232
|
+
menu.addEventListener("pointerenter", enter);
|
|
233
|
+
menu.addEventListener("pointerleave", leave);
|
|
234
|
+
menu.addEventListener("dragenter", enter);
|
|
235
|
+
doc.addEventListener("pointermove", move);
|
|
236
|
+
doc.addEventListener("dragover", move);
|
|
237
|
+
return () => {
|
|
238
|
+
cancel();
|
|
239
|
+
menu.removeEventListener("pointerenter", enter);
|
|
240
|
+
menu.removeEventListener("pointerleave", leave);
|
|
241
|
+
menu.removeEventListener("dragenter", enter);
|
|
242
|
+
doc.removeEventListener("pointermove", move);
|
|
243
|
+
doc.removeEventListener("dragover", move);
|
|
244
|
+
menu.removeAttribute("data-arkme-menu-scrollbars");
|
|
245
|
+
list.removeAttribute("data-arkme-menu-scroll");
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
//#endregion
|
|
74
249
|
//#region src/client/harness-session-dropdown.ts
|
|
75
250
|
const PREFIX = "data-arkme-session-";
|
|
76
251
|
const HEADER = "[data-slot=\"conversation.session.header\"] > header";
|
|
@@ -183,6 +358,8 @@ window.__ModuleLoader__.load({
|
|
|
183
358
|
const rowFocusCleanups = /* @__PURE__ */ new Map();
|
|
184
359
|
let toolbarMarks = [];
|
|
185
360
|
let summaryMarks = [];
|
|
361
|
+
let scrollList;
|
|
362
|
+
let stopScrollbars;
|
|
186
363
|
let initiallyCollapsed = false;
|
|
187
364
|
let expandedByUs = false;
|
|
188
365
|
let columnBefore = {
|
|
@@ -196,6 +373,7 @@ window.__ModuleLoader__.load({
|
|
|
196
373
|
trigger.type = "button";
|
|
197
374
|
trigger.setAttribute("aria-haspopup", "dialog");
|
|
198
375
|
trigger.setAttribute("aria-expanded", "false");
|
|
376
|
+
trigger.setAttribute("data-arkme-conversation-selector", "");
|
|
199
377
|
mark(trigger, "trigger");
|
|
200
378
|
const label = doc.createElement("span");
|
|
201
379
|
const arrow = doc.createElement("span");
|
|
@@ -222,26 +400,27 @@ window.__ModuleLoader__.load({
|
|
|
222
400
|
html[${PREFIX}preview] body { visibility: hidden !important; }
|
|
223
401
|
html[${PREFIX}preview] [${PREFIX}column], html[${PREFIX}preview] [role="menu"],
|
|
224
402
|
html[${PREFIX}preview] [role="dialog"], html[${PREFIX}preview] [role="alertdialog"] { visibility: visible !important; }
|
|
225
|
-
[${PREFIX}frame] { grid-template-columns: 0px minmax(0, 1fr) var(--arkme-session-rightbar) !important; }
|
|
403
|
+
[${PREFIX}frame] { grid-template-columns: 0px minmax(0, 1fr) var(--arkme-session-rightbar) !important; transition: none !important; }
|
|
226
404
|
[${PREFIX}frame] > :nth-child(2) { grid-column: 2; }
|
|
227
405
|
[${PREFIX}frame] > [data-rightbar-col] { grid-column: 3; }
|
|
228
406
|
[${PREFIX}frame] > [data-side="sidebar"] { display: none !important; }
|
|
229
407
|
[${PREFIX}column] {
|
|
230
408
|
position: fixed !important; left: var(--arkme-session-left); top: var(--arkme-session-top);
|
|
231
409
|
width: var(--arkme-session-width); height: auto; max-height: var(--arkme-session-height); z-index: 80;
|
|
232
|
-
border:
|
|
233
|
-
box-shadow:
|
|
410
|
+
border: ${CONVERSATION_MENU_SURFACE.border}; border-radius: ${CONVERSATION_MENU_SURFACE.borderRadius}px;
|
|
411
|
+
background: ${CONVERSATION_MENU_SURFACE.background}; box-shadow: ${CONVERSATION_MENU_SURFACE.boxShadow}; box-sizing: border-box; overflow: visible !important;
|
|
234
412
|
display: none !important; pointer-events: none;
|
|
235
413
|
}
|
|
236
414
|
[${PREFIX}column][${PREFIX}open] { display: block !important; pointer-events: auto; }
|
|
237
|
-
[${PREFIX}
|
|
415
|
+
html[data-arkme-harness-viewport] [${PREFIX}column] { box-shadow: none; }
|
|
416
|
+
[${PREFIX}root] { width: 100% !important; height: auto; max-height: var(--arkme-session-height); border-radius: 9px; padding: ${CONVERSATION_MENU_LAYOUT.paddingY}px ${CONVERSATION_MENU_LAYOUT.paddingX}px !important; position: relative; }
|
|
238
417
|
[${PREFIX}brand], [${PREFIX}native-title] { display: none !important; }
|
|
239
418
|
[${PREFIX}create] { order: 10; flex-shrink: 0; margin: 8px 0 0 !important; }
|
|
240
419
|
[${PREFIX}root][${PREFIX}compact-tools] [${PREFIX}create] { width: calc(100% - var(--arkme-session-tools-width) - 8px); }
|
|
241
420
|
[${PREFIX}tools-header] { display: contents !important; }
|
|
242
421
|
[${PREFIX}tools-label], [${PREFIX}tools-search] { display: none !important; }
|
|
243
422
|
[${PREFIX}tools-actions] {
|
|
244
|
-
position: absolute !important; bottom:
|
|
423
|
+
position: absolute !important; bottom: ${CONVERSATION_MENU_LAYOUT.paddingY}px; right: ${CONVERSATION_MENU_LAYOUT.paddingX}px; height: ${CONVERSATION_MENU_LAYOUT.createHeight}px;
|
|
245
424
|
display: flex !important; align-items: center; gap: 4px; max-width: none !important;
|
|
246
425
|
opacity: 1 !important; visibility: visible !important; transform: none !important;
|
|
247
426
|
}
|
|
@@ -253,21 +432,15 @@ window.__ModuleLoader__.load({
|
|
|
253
432
|
[${PREFIX}summary] [data-slot="conversation.session.header.actions"] > * { font-size: inherit; line-height: inherit; }
|
|
254
433
|
[${PREFIX}turn-count] { display: inline-flex; align-items: center; white-space: nowrap; }
|
|
255
434
|
[${PREFIX}summary] [data-slot="conversation.session.header.actions"] > * + [${PREFIX}turn-count]::before { content: '·'; margin: 0 7px; }
|
|
256
|
-
[${PREFIX}anchor][${PREFIX}fallback] {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
border: 1px solid var(--dsw-alias-border-l3, #d4d6da); border-radius: 10px; padding: 0; margin-left: 0; box-sizing: border-box;
|
|
260
|
-
color: var(--dsw-alias-label-primary, inherit); background: var(--dsw-alias-button-elevated-fill, #fff); font: inherit;
|
|
261
|
-
font-size: 16px; font-weight: 600; line-height: 28px; overflow: hidden; cursor: pointer;
|
|
262
|
-
}
|
|
263
|
-
[${PREFIX}trigger] > span:first-child { padding: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
264
|
-
[${PREFIX}trigger] > span:last-child {
|
|
265
|
-
color: var(--dsw-alias-label-secondary, #626872); flex: none; width: 28px;
|
|
266
|
-
border-left: 1px solid var(--dsw-alias-border-l3, #d4d6da); display: flex; align-items: center; justify-content: center;
|
|
435
|
+
[${PREFIX}anchor][${PREFIX}fallback] {
|
|
436
|
+
width: max-content; position: absolute; top: 10px;
|
|
437
|
+
left: 20px; z-index: 10; max-width: calc(100% - 40px);
|
|
267
438
|
}
|
|
268
|
-
|
|
269
|
-
[${PREFIX}
|
|
270
|
-
[${PREFIX}
|
|
439
|
+
${CONVERSATION_SELECTOR_CSS}
|
|
440
|
+
[${PREFIX}column] [role="treeitem"][aria-selected]:hover { background: ${CONVERSATION_MENU_COLORS.hover}; }
|
|
441
|
+
[${PREFIX}column] [role="treeitem"][aria-selected="true"],
|
|
442
|
+
[${PREFIX}column] [role="treeitem"][aria-selected="true"]:hover { background: ${CONVERSATION_MENU_COLORS.selected}; }
|
|
443
|
+
[${PREFIX}column] [role="treeitem"]:focus-visible { outline: 2px solid #4c70ef; outline-offset: -2px; }
|
|
271
444
|
`;
|
|
272
445
|
doc.head.append(style);
|
|
273
446
|
function close(focus = false) {
|
|
@@ -283,6 +456,9 @@ window.__ModuleLoader__.load({
|
|
|
283
456
|
}
|
|
284
457
|
function restore() {
|
|
285
458
|
close();
|
|
459
|
+
stopScrollbars?.();
|
|
460
|
+
stopScrollbars = void 0;
|
|
461
|
+
scrollList = void 0;
|
|
286
462
|
for (const cleanup of rowFocusCleanups.values()) cleanup();
|
|
287
463
|
for (const [node, key] of toolbarMarks) node.removeAttribute(PREFIX + key);
|
|
288
464
|
toolbarMarks = [];
|
|
@@ -320,13 +496,17 @@ window.__ModuleLoader__.load({
|
|
|
320
496
|
function position() {
|
|
321
497
|
if (!current) return;
|
|
322
498
|
const rect = trigger.getBoundingClientRect();
|
|
323
|
-
const width = Math.min(
|
|
499
|
+
const width = Math.min(CONVERSATION_MENU_LAYOUT.width, win.innerWidth - 24);
|
|
324
500
|
const anchor = external?.anchor();
|
|
325
|
-
const
|
|
326
|
-
|
|
501
|
+
const hoverPosition = anchor && conversationMenuPosition(anchor, width, Math.min(CONVERSATION_MENU_LAYOUT.maxHeight, win.innerHeight - 24), {
|
|
502
|
+
width: win.innerWidth,
|
|
503
|
+
height: win.innerHeight
|
|
504
|
+
});
|
|
505
|
+
const top = hoverPosition?.top ?? Math.max(8, Math.min(rect.bottom + 7, win.innerHeight - 100));
|
|
506
|
+
variable(current.column, "--arkme-session-left", `${hoverPosition?.left ?? Math.max(CONVERSATION_MENU_LAYOUT.viewportInset, Math.min(rect.left, win.innerWidth - width - CONVERSATION_MENU_LAYOUT.viewportInset))}px`);
|
|
327
507
|
variable(current.column, "--arkme-session-top", `${top}px`);
|
|
328
508
|
variable(current.column, "--arkme-session-width", `${width}px`);
|
|
329
|
-
variable(current.column, "--arkme-session-height", `${Math.min(
|
|
509
|
+
variable(current.column, "--arkme-session-height", `${Math.min(CONVERSATION_MENU_LAYOUT.maxHeight, win.innerHeight - top - CONVERSATION_MENU_LAYOUT.viewportInset)}px`);
|
|
330
510
|
external?.onLayout();
|
|
331
511
|
}
|
|
332
512
|
function sync() {
|
|
@@ -355,6 +535,17 @@ window.__ModuleLoader__.load({
|
|
|
355
535
|
mark(next.root, "root");
|
|
356
536
|
mark(next.brand, "brand");
|
|
357
537
|
mark(next.create, "create");
|
|
538
|
+
const tree = next.root.querySelector("[data-slot=\"sidebar.workspaces\"] [role=\"tree\"]");
|
|
539
|
+
let list = tree ?? void 0;
|
|
540
|
+
for (let node = tree; node && node !== next.root; node = node.parentElement) if (win.getComputedStyle(node).overflowY === "auto") {
|
|
541
|
+
list = node;
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
if (list !== scrollList) {
|
|
545
|
+
stopScrollbars?.();
|
|
546
|
+
scrollList = list;
|
|
547
|
+
stopScrollbars = list ? watchConversationMenuScrollbars(next.root, list) : void 0;
|
|
548
|
+
}
|
|
358
549
|
const nextTools = compactTools(next);
|
|
359
550
|
for (const [node, key] of toolbarMarks) if (!nextTools.some(([nextNode, nextKey]) => node === nextNode && key === nextKey)) node.removeAttribute(PREFIX + key);
|
|
360
551
|
toolbarMarks = nextTools;
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ARKME_DEFAULT_SHARE_WEBSITE, A as inspectNativeBundleArtifactV3, At as createDesktopLifecycleReader, D as bundleSha256, Dt as ArkmePluginError, E as arkmeSandboxEntryId, Et as normalizeRecentEmojiIds, F as assertExtensionArtifactSize, Ft as __toCommonJS, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeRequiredLinkMetadataFallback, K as arkmeExtensionShareRefFromLink, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, Mt as __esmMin, N as readNativeBundleTarballV3, Nt as __exportAll, O as canonicalBundleJson, Ot as retryAfterMillis, P as renderArkmeSandboxHostEntry, Pt as __require, Q as parseArkmeRecordReeditAttachments, R as unpackArkmeExtension, S as ARKME_BUNDLE_ARTIFACT_KIND, St as sameRecordingImportIdentity, T as ArkmeBundleArtifactError, Tt as isRecentEmojiId, U as ARKME_EXTENSION_RUNTIME_UNAVAILABLE_MESSAGE, W as ArkmeService, X as arkmeRichBackgroundSound, Y as arkmeFileBackgroundSound, Z as ArkmeRecordReeditDraftConflict, _ as arkmeClientContentDigest, _t as SecretValue, at as ARKME_WORLD_PUBLISH_MAX_IMAGE_BYTES, b as verifyExtensionResolutionSignature, bt as isUnresolvedRecordingImportJob, c as persistentExtensionBundleDirectory, ct as mergeMemberJoinEvents, d as readPersistentExtensionActivation, dt as ARKME_TOOL_FILE_MAX_BYTES, et as ARKME_PROVIDER_CONTRACT_VERSION, f as refreshPersistentClientWrapper, ft as arkmeCanInlineLocalFile, g as activeProfileExtensionOwnerConflicts, gt as ArkmeOutgoingCallError, h as renderArkmeBundleClientBundle, ht as isArkmeBotAvatarRef, i as invokePersistentArkmeExtension, it as ARKME_WORLD_PUBLISH_MAX_IMAGES, j as packBundleFiles, jt as __commonJSMin, k as inspectBundleArtifact, kt as recordOwnerId, l as persistentExtensionPackageIdentity, lt as validateMemberUpdate, m as writePersistentExtensionActivation, mt as arkmePickedFileKind, o as persistentArkmeExtensionRuntimeState, ot as applyMemberUpdate, p as repairPersistentExtensionInstallation, pt as arkmeNormalizedFileMimeType, q as arkmeIsGenericLinkMetadataTitle, r as deactivatePersistentArkmeExtension, s as materializePersistentExtensionBundle, st as cachedMemberItem, t as activatePersistentArkmeExtension, u as quarantinePersistentExtension, ut as ARKME_RUNTIME_INSTANCE_ID, v as arkmeClientContentDigestFromSource, vt as ArkmeDirectMessageAdmissionError, w as ARKME_NATIVE_BUNDLE_ARTIFACT_KIND, wt as recordingImportFileNameKey, x as verifyNativeBundleResolutionSignature, xt as recordingImportFileKind, y as verifyBundleResolutionSignature, yt as isRecordingInstantOnOrAfterUnixEpoch, z as ARKME_EXTENSION_FORMAT } from "./persistent-runtime-
|
|
1
|
+
import { $ as ARKME_DEFAULT_SHARE_WEBSITE, A as inspectNativeBundleArtifactV3, At as createDesktopLifecycleReader, D as bundleSha256, Dt as ArkmePluginError, E as arkmeSandboxEntryId, Et as normalizeRecentEmojiIds, F as assertExtensionArtifactSize, Ft as __toCommonJS, G as validateVoiceprintPcm16Wav, I as canonicalExtensionJson, J as arkmeRequiredLinkMetadataFallback, K as arkmeExtensionShareRefFromLink, L as sha256Hex, M as packLocalNativeBundleDirectoryV3, Mt as __esmMin, N as readNativeBundleTarballV3, Nt as __exportAll, O as canonicalBundleJson, Ot as retryAfterMillis, P as renderArkmeSandboxHostEntry, Pt as __require, Q as parseArkmeRecordReeditAttachments, R as unpackArkmeExtension, S as ARKME_BUNDLE_ARTIFACT_KIND, St as sameRecordingImportIdentity, T as ArkmeBundleArtifactError, Tt as isRecentEmojiId, U as ARKME_EXTENSION_RUNTIME_UNAVAILABLE_MESSAGE, W as ArkmeService, X as arkmeRichBackgroundSound, Y as arkmeFileBackgroundSound, Z as ArkmeRecordReeditDraftConflict, _ as arkmeClientContentDigest, _t as SecretValue, at as ARKME_WORLD_PUBLISH_MAX_IMAGE_BYTES, b as verifyExtensionResolutionSignature, bt as isUnresolvedRecordingImportJob, c as persistentExtensionBundleDirectory, ct as mergeMemberJoinEvents, d as readPersistentExtensionActivation, dt as ARKME_TOOL_FILE_MAX_BYTES, et as ARKME_PROVIDER_CONTRACT_VERSION, f as refreshPersistentClientWrapper, ft as arkmeCanInlineLocalFile, g as activeProfileExtensionOwnerConflicts, gt as ArkmeOutgoingCallError, h as renderArkmeBundleClientBundle, ht as isArkmeBotAvatarRef, i as invokePersistentArkmeExtension, it as ARKME_WORLD_PUBLISH_MAX_IMAGES, j as packBundleFiles, jt as __commonJSMin, k as inspectBundleArtifact, kt as recordOwnerId, l as persistentExtensionPackageIdentity, lt as validateMemberUpdate, m as writePersistentExtensionActivation, mt as arkmePickedFileKind, o as persistentArkmeExtensionRuntimeState, ot as applyMemberUpdate, p as repairPersistentExtensionInstallation, pt as arkmeNormalizedFileMimeType, q as arkmeIsGenericLinkMetadataTitle, r as deactivatePersistentArkmeExtension, s as materializePersistentExtensionBundle, st as cachedMemberItem, t as activatePersistentArkmeExtension, u as quarantinePersistentExtension, ut as ARKME_RUNTIME_INSTANCE_ID, v as arkmeClientContentDigestFromSource, vt as ArkmeDirectMessageAdmissionError, w as ARKME_NATIVE_BUNDLE_ARTIFACT_KIND, wt as recordingImportFileNameKey, x as verifyNativeBundleResolutionSignature, xt as recordingImportFileKind, y as verifyBundleResolutionSignature, yt as isRecordingInstantOnOrAfterUnixEpoch, z as ARKME_EXTENSION_FORMAT } from "./persistent-runtime-DqPfc6RO.js";
|
|
2
2
|
import { _ as parsePluginUpdateManifest, b as validatePluginUpdateServiceOrigin, d as writePluginUpdateLifecycleLog, f as PluginUpdateInstallStateStore, g as existingCachedPluginArtifactPath, h as downloadAndCachePluginArtifact, m as PluginUpdateArtifactError, n as buildTargetInstallArgs, o as reconcilePluginUpdaterProfilePolicy, p as ARKME_PLUGIN_PACKAGE_NAME$1, t as assertTargetArtifactIntegrity, u as detachManagedProfilePluginLink, v as pluginUpdateEndpointUrl, y as validatePluginUpdateArtifactOrigin } from "./plugin-updater-helper-y7wzJLOx.js";
|
|
3
3
|
import { a as securePrivateDirectory, c as securePrivateFileSync, i as prepareProfilePackageManager, n as isArkmeProfilePackageName, o as securePrivateDirectorySync, r as localExtensionPnpmArgs, s as securePrivateFile, t as applyArkmeProfileBundlePolicy } from "./profile-bundle-policy-DLXDyohJ.js";
|
|
4
4
|
import { i as invokeArkmeBundle, n as arkmeBundleActive, r as deactivateArkmeBundle } from "./bundle-runtime-CE73h3vS.js";
|
|
@@ -35,6 +35,43 @@ import WebSocket$1, { WebSocket, WebSocketServer } from "ws";
|
|
|
35
35
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
36
36
|
import { AttachmentError, AttachmentId } from "@deepseek-ai/dsh-attachment";
|
|
37
37
|
import { scheduler, setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
38
|
+
//#region src/dsh-remote/session-persistence.ts
|
|
39
|
+
/** Preserve legacy backends; adapt the public handle API introduced in DSH 0.1.5. */
|
|
40
|
+
function adaptSessionPersistence(value) {
|
|
41
|
+
if (value == null) return void 0;
|
|
42
|
+
const service = value;
|
|
43
|
+
if (typeof service.listSnapshots === "function" && typeof service.readFrom === "function") return service;
|
|
44
|
+
if (typeof service.list !== "function" || typeof service.open !== "function") {
|
|
45
|
+
const unsupported = async () => {
|
|
46
|
+
throw new Error("Unsupported DSH session persistence API: expected listSnapshots/readFrom or list/open");
|
|
47
|
+
};
|
|
48
|
+
return {
|
|
49
|
+
listSnapshots: unsupported,
|
|
50
|
+
readFrom: unsupported
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const persistence = service;
|
|
54
|
+
return {
|
|
55
|
+
listSnapshots: async (signal) => [...await persistence.list(signal === void 0 ? void 0 : { signal })],
|
|
56
|
+
readFrom: async (id, offset, signal) => {
|
|
57
|
+
signal?.throwIfAborted();
|
|
58
|
+
const options = signal === void 0 ? void 0 : { signal };
|
|
59
|
+
const handle = await persistence.open(id, "read", options);
|
|
60
|
+
try {
|
|
61
|
+
signal?.throwIfAborted();
|
|
62
|
+
const { events } = await handle.read(offset, void 0, options);
|
|
63
|
+
signal?.throwIfAborted();
|
|
64
|
+
return {
|
|
65
|
+
meta: handle.header,
|
|
66
|
+
events: [...events]
|
|
67
|
+
};
|
|
68
|
+
} finally {
|
|
69
|
+
await handle.close();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
38
75
|
//#region src/tools/shared/output.ts
|
|
39
76
|
const TEXT_OUTPUT$3 = {
|
|
40
77
|
schema: { type: "string" },
|
|
@@ -11521,7 +11558,9 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
11521
11558
|
scope: recordingSpeakerScopeParam(params)
|
|
11522
11559
|
}, requestSignal);
|
|
11523
11560
|
case "calendar.buckets": return await service.calendarBuckets({
|
|
11561
|
+
...params?.background === true ? { background: true } : {},
|
|
11524
11562
|
startDate: stringParam(params, "startDate"),
|
|
11563
|
+
...params?.sourceRef === void 0 ? {} : { sourceRef: stringParam(params, "sourceRef") },
|
|
11525
11564
|
...requestSignal === void 0 ? {} : { signal: requestSignal },
|
|
11526
11565
|
endDate: stringParam(params, "endDate"),
|
|
11527
11566
|
...stringParam(params, "timezone") === "" ? {} : { timezone: stringParam(params, "timezone") }
|
|
@@ -11530,6 +11569,7 @@ async function dispatchArkmeHostOperation(service, operation, params, updateMana
|
|
|
11530
11569
|
const cursor = cursorParam(params);
|
|
11531
11570
|
return await service.calendarRecords({
|
|
11532
11571
|
bucketDate: stringParam(params, "bucketDate"),
|
|
11572
|
+
...params?.sourceRef === void 0 ? {} : { sourceRef: stringParam(params, "sourceRef") },
|
|
11533
11573
|
...requestSignal === void 0 ? {} : { signal: requestSignal },
|
|
11534
11574
|
limit: numberParam(params, "limit", 20),
|
|
11535
11575
|
...stringParam(params, "timezone") === "" ? {} : { timezone: stringParam(params, "timezone") },
|
|
@@ -32021,13 +32061,18 @@ function sha256(value) {
|
|
|
32021
32061
|
* Splits a large typed payload into independently bounded Realtime events.
|
|
32022
32062
|
*/
|
|
32023
32063
|
function dshRemoteOutboundPayloads(envelope, transferSeed) {
|
|
32024
|
-
|
|
32025
|
-
|
|
32064
|
+
let hasEmptyArray = false;
|
|
32065
|
+
const encoded = Buffer.from(JSON.stringify(envelope, (_key, value) => {
|
|
32066
|
+
if (Array.isArray(value) && value.length === 0) hasEmptyArray = true;
|
|
32067
|
+
return value;
|
|
32068
|
+
}));
|
|
32069
|
+
if (encoded.length <= DIRECT_PLAINTEXT_BYTES && !hasEmptyArray) return [{ value: envelope }];
|
|
32026
32070
|
if (encoded.length > 67108864) throw new DshRemoteError("CAPABILITY_UNSUPPORTED", "完整 DSH 事件超过 64MiB 安全上限", false, {
|
|
32027
32071
|
logicalTooLarge: true,
|
|
32028
32072
|
payloadBytes: encoded.length
|
|
32029
32073
|
});
|
|
32030
|
-
const
|
|
32074
|
+
const chunkBytes = encoded.length <= DIRECT_PLAINTEXT_BYTES ? Math.ceil(encoded.length / 2) : FRAGMENT_CHUNK_BYTES;
|
|
32075
|
+
const fragmentCount = Math.ceil(encoded.length / chunkBytes);
|
|
32031
32076
|
if (fragmentCount > MAX_FRAGMENT_COUNT) throw new DshRemoteError("CAPABILITY_UNSUPPORTED", "完整 DSH 事件需要过多远控分片", false, {
|
|
32032
32077
|
logicalTooLarge: true,
|
|
32033
32078
|
fragmentCount
|
|
@@ -32046,7 +32091,7 @@ function dshRemoteOutboundPayloads(envelope, transferSeed) {
|
|
|
32046
32091
|
fragment_count: fragmentCount,
|
|
32047
32092
|
payload_bytes: encoded.length,
|
|
32048
32093
|
payload_sha256: digest,
|
|
32049
|
-
chunk: encoded.subarray(fragmentIndex *
|
|
32094
|
+
chunk: encoded.subarray(fragmentIndex * chunkBytes, Math.min(encoded.length, (fragmentIndex + 1) * chunkBytes)).toString("base64url")
|
|
32050
32095
|
}
|
|
32051
32096
|
}));
|
|
32052
32097
|
}
|
|
@@ -36657,7 +36702,7 @@ function apply(ctx, config) {
|
|
|
36657
36702
|
const attachRemoteApi = (apiCtx, publicApi) => {
|
|
36658
36703
|
if (remoteHost !== void 0) return;
|
|
36659
36704
|
const agentDefaultModel = apiCtx.get("agentDefaultModel");
|
|
36660
|
-
const sessionPersistence = apiCtx.get("sessionPersistence");
|
|
36705
|
+
const sessionPersistence = adaptSessionPersistence(apiCtx.get("sessionPersistence"));
|
|
36661
36706
|
const apiProxy = new DshApiProxyAdapter(publicApi, { ...typeof agentDefaultModel?.currentSelection !== "function" ? {} : { defaultModelSelection: () => agentDefaultModel.currentSelection() } });
|
|
36662
36707
|
service.accountScope.attachGuestConversationProbe(async () => {
|
|
36663
36708
|
try {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as persistentArkmeExtensionActive, i as invokePersistentArkmeExtension, n as applyPersistentArkmeHostExtension, o as persistentArkmeExtensionRuntimeState, r as deactivatePersistentArkmeExtension, t as activatePersistentArkmeExtension } from "./persistent-runtime-
|
|
1
|
+
import { a as persistentArkmeExtensionActive, i as invokePersistentArkmeExtension, n as applyPersistentArkmeHostExtension, o as persistentArkmeExtensionRuntimeState, r as deactivatePersistentArkmeExtension, t as activatePersistentArkmeExtension } from "./persistent-runtime-DqPfc6RO.js";
|
|
2
2
|
export { activatePersistentArkmeExtension, applyPersistentArkmeHostExtension, deactivatePersistentArkmeExtension, invokePersistentArkmeExtension, persistentArkmeExtensionActive, persistentArkmeExtensionRuntimeState };
|