dsh-mnemon-source-memory-spaces 0.5.8 → 0.5.10

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 CHANGED
@@ -167,6 +167,7 @@ window.__ModuleLoader__.load({
167
167
  "overview.providerApiKeyOptional": "未启用鉴权时可留空",
168
168
  "overview.providerApiKeyKeep": "已保存;留空表示保持不变",
169
169
  "overview.providerAccount": "Account",
170
+ "overview.providerDiscoveryUser": "User Key 所属用户(跳过 Admin)",
170
171
  "overview.providerUser": "User",
171
172
  "overview.providerActorPeer": "Actor Peer",
172
173
  "overview.providerField.workspace": "工作区",
@@ -524,6 +525,7 @@ window.__ModuleLoader__.load({
524
525
  "overview.providerApiKeyOptional": "Leave blank when authentication is disabled",
525
526
  "overview.providerApiKeyKeep": "Saved; leave blank to keep unchanged",
526
527
  "overview.providerAccount": "Account",
528
+ "overview.providerDiscoveryUser": "User key owner (skip admin)",
527
529
  "overview.providerUser": "User",
528
530
  "overview.providerActorPeer": "Actor Peer",
529
531
  "overview.providerField.workspace": "Workspace",
@@ -873,7 +875,7 @@ window.__ModuleLoader__.load({
873
875
  };
874
876
  //#endregion
875
877
  //#region \0source-css:/home/runner/work/dsh-mnemon/dsh-mnemon/plugins/dsh-mnemon-source-memory-spaces/presentation/sidebar.module.css.mjs
876
- const css$1 = "._Bh55G_shell ._Bh55G_memoryWorkspace{border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--mn-surface);flex:none;padding:12px 16px 0}._Bh55G_shell ._Bh55G_memoryWorkspace>[class*=pageHeader]{margin-bottom:8px}._Bh55G_shell ._Bh55G_memoryNavigation{flex:none;align-items:flex-end;gap:12px;min-width:0;padding:0;display:flex}._Bh55G_shell ._Bh55G_memoryTabs{scrollbar-width:none;flex:1;gap:2px;min-width:0;display:flex;overflow-x:auto}._Bh55G_shell ._Bh55G_memoryTabs::-webkit-scrollbar{display:none}._Bh55G_shell ._Bh55G_memoryTabs button{min-width:max-content;min-height:0;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;border-radius:6px 6px 0 0;padding:6px 12px;font-size:13px}._Bh55G_shell ._Bh55G_memoryTabs button:hover{background:var(--dsw-alias-interactive-bg-hover)}._Bh55G_shell ._Bh55G_memoryTabs button[data-active]{border-bottom-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-label-primary);font-weight:600}._Bh55G_shell ._Bh55G_memoryWriteButton{flex:none}._Bh55G_shell ._Bh55G_modal section[class*=supervisedComposer]{overflow:visible}._Bh55G_shell ._Bh55G_modal form[class*=supervisedForm]{padding:0}._Bh55G_shell ._Bh55G_modal [class*=supervisedHeading]{margin-bottom:10px}._Bh55G_shell ._Bh55G_modal [class*=supervisedHeading] h3{display:none}._Bh55G_shell ._Bh55G_modal details[class*=advancedWrite]{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:10px;margin-top:14px;overflow:hidden}._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{width:26px;height:26px;min-height:0;color:var(--dsw-alias-label-secondary);background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;padding:0;font-size:13px;display:inline-flex}._Bh55G_shell [class*=inspectorEye]:hover:not(:disabled),._Bh55G_shell [class*=inspectorHeading] button:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover);border:0}._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{cursor:pointer;transition:background-color .12s,color .12s,border-color .12s,outline-color .12s,box-shadow .12s,transform .12s}._Bh55G_shell [class*=inspectorEye]:active:not(:disabled),._Bh55G_shell [class*=inspectorHeading] button:active:not(:disabled){transform:translateY(1px)}._Bh55G_shell [class*=inspectorEye]:disabled{cursor:default;opacity:.45}._Bh55G_shell [class*=searchControls] label,._Bh55G_shell [class*=fieldWide]{color:var(--dsw-alias-label-secondary);gap:5px;font-size:12px;font-weight:500}._Bh55G_shell [class*=searchControls] select,._Bh55G_shell [class*=listToolbar] input,._Bh55G_shell [class*=listToolbar] select,._Bh55G_shell [class*=entitySearch] input{border:1px solid var(--dsw-alias-border-l2);min-height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border-radius:8px;padding:7px 10px;font-size:13px;font-weight:400}._Bh55G_shell [class*=entityHeading]>span,._Bh55G_shell [class*=inspectorHeading]>span{letter-spacing:.06em;font-size:11px}._Bh55G_shell [class*=bodyDirectoryHeader] p,._Bh55G_shell [class*=bodyCard]>p,._Bh55G_shell [class*=graphToolbar],._Bh55G_shell [class*=graphFooter],._Bh55G_shell [class*=manualActions] p{font-size:12px}._Bh55G_shell [class*=bodyDirectoryPath],._Bh55G_shell [class*=bodyCard] footer,._Bh55G_shell [class*=bodyHealth],._Bh55G_shell [class*=badge],._Bh55G_shell [class*=entities] span{font-size:11px}._Bh55G_shell [class*=bodySwitch],._Bh55G_shell [class*=graphCanvasControls] button,._Bh55G_shell [class*=advancedWrite] summary small{font-size:12px}._Bh55G_shell [class*=inspectorMeta] dd{font-size:13px}._Bh55G_shell [class*=bodyGrid]{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr))}._Bh55G_shell article[class*=bodyCard]{border-color:var(--mn-line);background:linear-gradient(90deg, color-mix(in srgb, var(--mn-provider-color) 5%, var(--mn-layer-1)), var(--mn-layer-1) 34%);height:100%;box-shadow:inset 3px 0 0 color-mix(in srgb, var(--mn-provider-color) 68%, transparent);border-radius:8px;flex-direction:column;padding:11px 11px 11px 14px;display:flex}._Bh55G_shell article[class*=bodyCard][data-active]{border-color:var(--mn-line);box-shadow:inset 3px 0 0 color-mix(in srgb, var(--mn-provider-color) 78%, transparent)}._Bh55G_shell ._Bh55G_bodyCardHeader{justify-content:space-between;align-items:flex-start;gap:12px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyDirectoryActions{flex:none;align-items:center;gap:8px;display:flex}._Bh55G_shell ._Bh55G_bodyDirectoryActions>strong{color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 8%, transparent);white-space:nowrap;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:600}._Bh55G_shell ._Bh55G_bodyCardIdentity{flex:1;align-items:flex-start;gap:8px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyCardIdentity>[class*=bodySignal]{flex:none;width:6px;height:6px;margin-top:7px}._Bh55G_shell article[class*=bodyCard][data-reconnecting] ._Bh55G_bodyCardIdentity>[class*=bodySignal]{width:6px;height:6px}._Bh55G_shell ._Bh55G_bodyCardIdentity>div{flex:1;gap:2px;min-width:0;display:grid}._Bh55G_shell ._Bh55G_bodyCardIdentity strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:20px;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardMeta{flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyCardMeta code{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardMeta [class*=bodyHealth]{letter-spacing:0;flex:none;font-size:11px}._Bh55G_shell ._Bh55G_bodyCardHeader>[class*=bodySwitch]{flex:none;min-height:24px}._Bh55G_shell article[class*=bodyCard]>p{-webkit-line-clamp:4;-webkit-box-orient:vertical;min-height:6.2em;max-height:6.2em;margin:12px 0;line-height:1.55;display:-webkit-box;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardFooter{white-space:nowrap;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:10px;min-width:0;margin-top:auto;padding-top:9px;display:grid}._Bh55G_shell ._Bh55G_bodyCardStats{flex-wrap:nowrap;align-items:center;gap:10px;min-width:0;display:flex;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardFooter [class*=bodyCardActions]{flex-wrap:nowrap;flex:none;align-items:center;gap:6px;display:flex}._Bh55G_shell [class*=cardActions]{gap:6px}._Bh55G_shell ._Bh55G_inspectorGlyph{border:1px solid var(--dsw-alias-border-l1);width:44px;height:44px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);font:20px/1 var(--mn-code);opacity:1;border-radius:10px;place-items:center;margin-bottom:10px;display:grid}@media (width<=760px){._Bh55G_shell ._Bh55G_memoryNavigation{padding-inline:12px}._Bh55G_shell ._Bh55G_memoryTabs button{padding-inline:10px}}@media (width<=520px){._Bh55G_shell ._Bh55G_memoryTabs button{padding-inline:8px;font-size:12px}}@media (prefers-reduced-motion:reduce){._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{transition:none}}";
878
+ const css$1 = "._Bh55G_shell ._Bh55G_memoryWorkspace{z-index:12;border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--mn-surface);flex:none;margin:-14px -16px 12px;padding:14px 16px 0;position:sticky;top:0}._Bh55G_shell ._Bh55G_memoryWorkspace>[class*=pageHeader]{margin-bottom:8px}._Bh55G_shell [class*=relatedPane],._Bh55G_shell [class*=entityRail]{position:static}._Bh55G_shell ._Bh55G_memoryNavigation{flex:none;align-items:flex-end;gap:12px;min-width:0;padding:0;display:flex}._Bh55G_shell ._Bh55G_memoryTabs{scrollbar-width:none;flex:1;gap:2px;min-width:0;display:flex;overflow-x:auto}._Bh55G_shell ._Bh55G_memoryTabs::-webkit-scrollbar{display:none}._Bh55G_shell ._Bh55G_memoryTabs button{min-width:max-content;min-height:0;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;border-radius:6px 6px 0 0;padding:6px 12px;font-size:13px}._Bh55G_shell ._Bh55G_memoryTabs button:hover{background:var(--dsw-alias-interactive-bg-hover)}._Bh55G_shell ._Bh55G_memoryTabs button[data-active]{border-bottom-color:var(--dsw-alias-state-business-primary);color:var(--dsw-alias-label-primary);font-weight:600}._Bh55G_shell ._Bh55G_memoryWriteButton{flex:none}._Bh55G_shell ._Bh55G_modal section[class*=supervisedComposer]{overflow:visible}._Bh55G_shell ._Bh55G_modal form[class*=supervisedForm]{padding:0}._Bh55G_shell ._Bh55G_modal [class*=supervisedHeading]{margin-bottom:10px}._Bh55G_shell ._Bh55G_modal [class*=supervisedHeading] h3{display:none}._Bh55G_shell ._Bh55G_modal details[class*=advancedWrite]{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:10px;margin-top:14px;overflow:hidden}._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{width:26px;height:26px;min-height:0;color:var(--dsw-alias-label-secondary);background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;padding:0;font-size:13px;display:inline-flex}._Bh55G_shell [class*=inspectorEye]:hover:not(:disabled),._Bh55G_shell [class*=inspectorHeading] button:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover);border:0}._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{cursor:pointer;transition:background-color .12s,color .12s,border-color .12s,outline-color .12s,box-shadow .12s,transform .12s}._Bh55G_shell [class*=inspectorEye]:active:not(:disabled),._Bh55G_shell [class*=inspectorHeading] button:active:not(:disabled){transform:translateY(1px)}._Bh55G_shell [class*=inspectorEye]:disabled{cursor:default;opacity:.45}._Bh55G_shell [class*=searchControls] label,._Bh55G_shell [class*=fieldWide]{color:var(--dsw-alias-label-secondary);gap:5px;font-size:12px;font-weight:500}._Bh55G_shell [class*=searchControls] select,._Bh55G_shell [class*=listToolbar] input,._Bh55G_shell [class*=listToolbar] select,._Bh55G_shell [class*=entitySearch] input{border:1px solid var(--dsw-alias-border-l2);min-height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border-radius:8px;padding:7px 10px;font-size:13px;font-weight:400}._Bh55G_shell [class*=entityHeading]>span,._Bh55G_shell [class*=inspectorHeading]>span{letter-spacing:.06em;font-size:11px}._Bh55G_shell [class*=bodyDirectoryHeader] p,._Bh55G_shell [class*=bodyCard]>p,._Bh55G_shell [class*=graphToolbar],._Bh55G_shell [class*=graphFooter],._Bh55G_shell [class*=manualActions] p{font-size:12px}._Bh55G_shell [class*=bodyDirectoryPath],._Bh55G_shell [class*=bodyCard] footer,._Bh55G_shell [class*=bodyHealth],._Bh55G_shell [class*=badge],._Bh55G_shell [class*=entities] span{font-size:11px}._Bh55G_shell [class*=bodySwitch],._Bh55G_shell [class*=graphCanvasControls] button,._Bh55G_shell [class*=advancedWrite] summary small{font-size:12px}._Bh55G_shell [class*=inspectorMeta] dd{font-size:13px}._Bh55G_shell [class*=bodyGrid]{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr))}._Bh55G_shell article[class*=bodyCard]{border-color:var(--mn-line);background:linear-gradient(90deg, color-mix(in srgb, var(--mn-provider-color) 5%, var(--mn-layer-1)), var(--mn-layer-1) 34%);height:100%;box-shadow:inset 3px 0 0 color-mix(in srgb, var(--mn-provider-color) 68%, transparent);border-radius:8px;flex-direction:column;padding:11px 11px 11px 14px;display:flex}._Bh55G_shell article[class*=bodyCard][data-active]{border-color:var(--mn-line);box-shadow:inset 3px 0 0 color-mix(in srgb, var(--mn-provider-color) 78%, transparent)}._Bh55G_shell ._Bh55G_bodyCardHeader{justify-content:space-between;align-items:flex-start;gap:12px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyDirectoryActions{flex:none;align-items:center;gap:8px;display:flex}._Bh55G_shell ._Bh55G_bodyDirectoryActions>strong{color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 8%, transparent);white-space:nowrap;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:600}._Bh55G_shell ._Bh55G_bodyCardIdentity{flex:1;align-items:flex-start;gap:8px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyCardIdentity>[class*=bodySignal]{flex:none;width:6px;height:6px;margin-top:7px}._Bh55G_shell article[class*=bodyCard][data-reconnecting] ._Bh55G_bodyCardIdentity>[class*=bodySignal]{width:6px;height:6px}._Bh55G_shell ._Bh55G_bodyCardIdentity>div{flex:1;gap:2px;min-width:0;display:grid}._Bh55G_shell ._Bh55G_bodyCardIdentity strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:20px;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardMeta{flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyCardMeta code{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardMeta [class*=bodyHealth]{letter-spacing:0;flex:none;font-size:11px}._Bh55G_shell ._Bh55G_bodyCardHeader>[class*=bodySwitch]{flex:none;min-height:24px}._Bh55G_shell article[class*=bodyCard]>p{-webkit-line-clamp:4;-webkit-box-orient:vertical;min-height:6.2em;max-height:6.2em;margin:12px 0;line-height:1.55;display:-webkit-box;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardFooter{white-space:nowrap;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:10px;min-width:0;margin-top:auto;padding-top:9px;display:grid}._Bh55G_shell ._Bh55G_bodyCardStats{flex-wrap:nowrap;align-items:center;gap:10px;min-width:0;display:flex;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardFooter [class*=bodyCardActions]{flex-wrap:nowrap;flex:none;align-items:center;gap:6px;display:flex}._Bh55G_shell [class*=cardActions]{gap:6px}._Bh55G_shell ._Bh55G_inspectorGlyph{border:1px solid var(--dsw-alias-border-l1);width:44px;height:44px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);font:20px/1 var(--mn-code);opacity:1;border-radius:10px;place-items:center;margin-bottom:10px;display:grid}@media (width<=760px){._Bh55G_shell ._Bh55G_memoryWorkspace{margin-inline:-12px;padding-inline:12px}._Bh55G_shell ._Bh55G_memoryTabs button{padding-inline:10px}}@media (width<=520px){._Bh55G_shell ._Bh55G_memoryTabs button{padding-inline:8px;font-size:12px}}@media (prefers-reduced-motion:reduce){._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{transition:none}}";
877
879
  const id = "dsh-mnemon-source-memory-spaces/presentation/sidebar.module.css";
878
880
  if (typeof document !== "undefined") {
879
881
  let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(id) + "]");
@@ -2953,6 +2955,7 @@ window.__ModuleLoader__.load({
2953
2955
  const [searched, setSearched] = (0, react.useState)(false);
2954
2956
  const [error, setError] = (0, react.useState)(null);
2955
2957
  const [relatedTo, setRelatedTo] = (0, react.useState)(null);
2958
+ const relatedPaneRef = (0, react.useRef)(null);
2956
2959
  const [related, setRelated] = (0, react.useState)([]);
2957
2960
  const [relatedLoading, setRelatedLoading] = (0, react.useState)(false);
2958
2961
  const [visibleResultLimit, setVisibleResultLimit] = (0, react.useState)(pageSize);
@@ -2961,6 +2964,24 @@ window.__ModuleLoader__.load({
2961
2964
  (0, react.useEffect)(() => {
2962
2965
  if (props.seed !== "") setQuery(props.seed);
2963
2966
  }, [props.seed]);
2967
+ (0, react.useEffect)(() => {
2968
+ if (relatedTo === null || props.onRevealElement === void 0) return;
2969
+ const reveal = () => {
2970
+ if (relatedPaneRef.current !== null && relatedRequests.isCurrent(relatedTo.request)) props.onRevealElement?.(relatedPaneRef.current);
2971
+ };
2972
+ if (typeof window.requestAnimationFrame !== "function") {
2973
+ reveal();
2974
+ return;
2975
+ }
2976
+ const frame = window.requestAnimationFrame(reveal);
2977
+ return () => {
2978
+ if (typeof window.cancelAnimationFrame === "function") window.cancelAnimationFrame(frame);
2979
+ };
2980
+ }, [
2981
+ relatedTo,
2982
+ relatedRequests,
2983
+ props.onRevealElement
2984
+ ]);
2964
2985
  const runSearch = async (withAgent) => {
2965
2986
  if (query.trim() === "") return;
2966
2987
  relatedRequests.begin();
@@ -3008,15 +3029,14 @@ window.__ModuleLoader__.load({
3008
3029
  const searching = searchKind !== null;
3009
3030
  const showRelated = async (insight) => {
3010
3031
  const request = relatedRequests.begin();
3011
- setRelatedTo(insight);
3032
+ setRelatedTo({
3033
+ insight,
3034
+ request
3035
+ });
3012
3036
  setRelated([]);
3013
3037
  setRelatedLoading(true);
3014
3038
  setError(null);
3015
3039
  setVisibleRelatedLimit(pageSize);
3016
- if (typeof window.requestAnimationFrame === "function") window.requestAnimationFrame(() => document.getElementById("mnemon-related-pane")?.scrollIntoView?.({
3017
- block: "nearest",
3018
- behavior: "smooth"
3019
- }));
3020
3040
  try {
3021
3041
  const response = await props.client.related(insight.id, insight.memoryBodyId);
3022
3042
  if (relatedRequests.isCurrent(request)) setRelated(response);
@@ -3030,7 +3050,7 @@ window.__ModuleLoader__.load({
3030
3050
  await props.onForget(insight);
3031
3051
  setResults((items) => items.filter((item) => insightKey(item) !== insightKey(insight)));
3032
3052
  setRelated((items) => items.filter((item) => insightKey(item) !== insightKey(insight)));
3033
- if (relatedTo !== null && insightKey(relatedTo) === insightKey(insight)) setRelatedTo(null);
3053
+ if (relatedTo !== null && insightKey(relatedTo.insight) === insightKey(insight)) setRelatedTo(null);
3034
3054
  };
3035
3055
  const visibleResults = results.slice(0, visibleResultLimit);
3036
3056
  const visibleRelated = related.slice(0, visibleRelatedLimit);
@@ -3173,7 +3193,7 @@ window.__ModuleLoader__.load({
3173
3193
  })
3174
3194
  ]
3175
3195
  }), relatedTo !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
3176
- id: "mnemon-related-pane",
3196
+ ref: relatedPaneRef,
3177
3197
  className: css.relatedPane,
3178
3198
  children: [
3179
3199
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -3191,7 +3211,7 @@ window.__ModuleLoader__.load({
3191
3211
  }),
3192
3212
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3193
3213
  className: css.relatedSource,
3194
- children: relatedTo.content
3214
+ children: relatedTo.insight.content
3195
3215
  }),
3196
3216
  relatedLoading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3197
3217
  className: css.loading,
@@ -4148,6 +4168,10 @@ window.__ModuleLoader__.load({
4148
4168
  const [rememberOpen, setRememberOpen] = (0, react.useState)(props.page === "remember");
4149
4169
  const [strategyOpen, setStrategyOpen] = (0, react.useState)(false);
4150
4170
  const [error, setError] = (0, react.useState)(null);
4171
+ const headerRef = (0, react.useRef)(null);
4172
+ const revealElement = (0, react.useCallback)((element) => {
4173
+ props.onRevealElement?.(element, (headerRef.current?.getBoundingClientRect().height ?? 0) + 14);
4174
+ }, [props.onRevealElement]);
4151
4175
  const refresh = (0, react.useCallback)(() => {
4152
4176
  setRevision((value) => value + 1);
4153
4177
  props.onRefresh?.();
@@ -4161,6 +4185,9 @@ window.__ModuleLoader__.load({
4161
4185
  (0, react.useEffect)(() => {
4162
4186
  if (props.management !== void 0) rememberedPages.set(props.management, page);
4163
4187
  }, [props.management, page]);
4188
+ (0, react.useLayoutEffect)(() => {
4189
+ props.onResetScroll?.();
4190
+ }, [page, props.onResetScroll]);
4164
4191
  (0, react.useEffect)(() => {
4165
4192
  let active = true;
4166
4193
  setError(null);
@@ -4199,6 +4226,7 @@ window.__ModuleLoader__.load({
4199
4226
  }),
4200
4227
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
4201
4228
  className: sidebarCss.memoryWorkspace,
4229
+ ref: headerRef,
4202
4230
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.PageHeader, {
4203
4231
  title: t("nav.spaces"),
4204
4232
  description: t("overview.description"),
@@ -4258,7 +4286,8 @@ window.__ModuleLoader__.load({
4258
4286
  status,
4259
4287
  seed,
4260
4288
  writeEnabled: writable,
4261
- onForget: forget
4289
+ onForget: forget,
4290
+ onRevealElement: revealElement
4262
4291
  }),
4263
4292
  page === "entities" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EntitiesPage, {
4264
4293
  client,
@@ -36,6 +36,7 @@ export declare function ExplorePage(props: {
36
36
  seed: string;
37
37
  writeEnabled: boolean;
38
38
  onForget: (insight: Insight) => Promise<void>;
39
+ onRevealElement?(element: HTMLElement): void;
39
40
  }): JSX.Element;
40
41
  export declare function EntitiesPage(props: {
41
42
  client: MemorySpacesPageClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon-source-memory-spaces",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "Memory Spaces Source and its private Provider SDK.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -62,14 +62,14 @@
62
62
  "@types/node": "^22.0.0",
63
63
  "@types/react": "^18.3.0",
64
64
  "@types/react-dom": "^18.3.0",
65
- "dsh-mnemon": "^0.5.10",
65
+ "dsh-mnemon": "^0.5.16",
66
66
  "dsh-mnemon-provider-byterover": "^0.5.4",
67
67
  "dsh-mnemon-provider-hindsight": "^0.5.4",
68
68
  "dsh-mnemon-provider-holographic": "^0.5.4",
69
69
  "dsh-mnemon-provider-honcho": "^0.5.4",
70
70
  "dsh-mnemon-provider-mem0": "^0.5.4",
71
71
  "dsh-mnemon-provider-mnemon-native": "^0.5.5",
72
- "dsh-mnemon-provider-openviking": "^0.5.5",
72
+ "dsh-mnemon-provider-openviking": "^0.5.6",
73
73
  "dsh-mnemon-provider-retaindb": "^0.5.4",
74
74
  "dsh-mnemon-provider-supermemory": "^0.5.4",
75
75
  "jsdom": "^26.0.0",
@@ -158,6 +158,7 @@
158
158
  "overview.providerApiKeyOptional": "未启用鉴权时可留空",
159
159
  "overview.providerApiKeyKeep": "已保存;留空表示保持不变",
160
160
  "overview.providerAccount": "Account",
161
+ "overview.providerDiscoveryUser": "User Key 所属用户(跳过 Admin)",
161
162
  "overview.providerUser": "User",
162
163
  "overview.providerActorPeer": "Actor Peer",
163
164
  "overview.providerField.workspace": "工作区",
@@ -515,6 +516,7 @@
515
516
  "overview.providerApiKeyOptional": "Leave blank when authentication is disabled",
516
517
  "overview.providerApiKeyKeep": "Saved; leave blank to keep unchanged",
517
518
  "overview.providerAccount": "Account",
519
+ "overview.providerDiscoveryUser": "User key owner (skip admin)",
518
520
  "overview.providerUser": "User",
519
521
  "overview.providerActorPeer": "Actor Peer",
520
522
  "overview.providerField.workspace": "Workspace",
@@ -1,10 +1,16 @@
1
1
  .shell .memoryWorkspace {
2
+ position: sticky;
3
+ z-index: 12;
4
+ top: 0;
2
5
  flex: 0 0 auto;
3
- padding: 12px 16px 0;
6
+ margin: -14px -16px 12px;
7
+ padding: 14px 16px 0;
4
8
  border-bottom: 1px solid var(--dsw-alias-border-l1);
5
9
  background: var(--mn-surface);
6
10
  }
7
11
  .shell .memoryWorkspace > [class*='pageHeader'] { margin-bottom: 8px; }
12
+ /* Keep secondary controls in flow beneath the one pinned Source header. */
13
+ .shell [class*='relatedPane'], .shell [class*='entityRail'] { position: static; }
8
14
 
9
15
  .shell .memoryNavigation {
10
16
  display: flex;
@@ -270,7 +276,7 @@
270
276
  }
271
277
 
272
278
  @media (max-width: 760px) {
273
- .shell .memoryNavigation { padding-inline: 12px; }
279
+ .shell .memoryWorkspace { margin-inline: -12px; padding-inline: 12px; }
274
280
  .shell .memoryTabs button { padding-inline: 10px; }
275
281
  }
276
282