sage-mem 0.9.9 → 0.9.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.
Files changed (2) hide show
  1. package/lib/client.js +15 -1
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -1930,6 +1930,15 @@ const StarmapRuntime = (function (require, _react) {
1930
1930
  const CSS = [
1931
1931
  ".smem-root{display:flex;flex-direction:column;gap:12px;font-size:13px;line-height:1.55;color:var(--dsw-alias-label-primary);max-width:760px;}",
1932
1932
  ".smem-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}",
1933
+ /**
1934
+ * 头部带里的「弹簧」:吃掉本行的剩余空间,把后面的主操作顶到右边。
1935
+ *
1936
+ * 为什么不用 `margin-left:auto`:那个写法在**换行之后依然把它推到最右**,
1937
+ * 于是窗口一窄(或状态徽标一多)主操作就被挤到下一行的右端,看着像跑出了格子。
1938
+ * 弹簧换成 `flex:1 1 auto` 之后 —— 放得下时它撑开(主操作靠右),
1939
+ * 放不下时主操作换行、而弹簧留在上一行,**下一行就是左顶格**。
1940
+ */
1941
+ ".smem-head-spacer{flex:1 1 auto;min-width:0;}",
1933
1942
  ".smem-title{font-size:15px;font-weight:600;}",
1934
1943
  ".smem-dot{width:8px;height:8px;border-radius:50%;background:var(--dsw-alias-state-success-primary,#22c55e);flex:none;}",
1935
1944
  ".smem-dot--bad{background:var(--dsw-alias-state-error-primary,#ef4444);}",
@@ -1998,7 +2007,8 @@ const StarmapRuntime = (function (require, _react) {
1998
2007
  ".smem-status--bad{color:var(--dsw-alias-state-error-primary,#dc2626);font-weight:600;}",
1999
2008
  // 头部带:三个 tab 共用的一条「我在哪 + 现在什么状态 + 主操作」。
2000
2009
  ".smem-head-job{font-size:12.5px;font-weight:600;}",
2001
- ".smem-head-actions{margin-left:auto;display:flex;align-items:center;gap:6px;}",
2010
+ // 头部带主操作:**不用 margin-left:auto**(见 .smem-head-spacer 的注释)
2011
+ ".smem-head-actions{display:flex;align-items:center;gap:6px;}",
2002
2012
  ".smem-tool-panel{border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-1);padding:10px 12px;display:flex;flex-direction:column;gap:8px;}",
2003
2013
  // 独立成屏的工具面板(现在的「体检」):显式占满**可用宽度**。
2004
2014
  // 整个面板的宽度上限在 `.smem-root`(760px)上,这里只要确保它在任何父容器里
@@ -4345,6 +4355,10 @@ const StarmapRuntime = (function (require, _react) {
4345
4355
  }, (pendingDiff ? (pendingDiff + " 项") : "") + "待重启生效")
4346
4356
  : null,
4347
4357
  // 主操作:只放当前 tab 的那一个(星图/自动做梦的主操作在各自面板里,不重复摆一份)。
4358
+ // 弹簧:把主操作顶到右边。**换行时它留在上一行**,主操作于是落到下一行、
4359
+ // 左顶格 —— 这正是用 `margin-left:auto` 做不到的(那会把换行后的主操作
4360
+ // 也推到最右,看起来像"跑出格子了")。
4361
+ h("span", { className: "smem-head-spacer", key: "sp" }),
4348
4362
  h("span", { className: "smem-head-actions", key: "act" }, tab === "files" ? [
4349
4363
  h("button", { type: "button", className: "smem-btn", key: "refresh", disabled: busy || loading, onClick: load }, "刷新"),
4350
4364
  h("button", { type: "button", className: "smem-btn smem-btn-primary", key: "add", onClick: openAdd }, "+ 添加记忆"),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sage-mem",
3
3
  "description": "File-based memory plugin for DeepSeek Harness (DSH) — cross-session memory in plain markdown files, with a memory star-map view, type/tag filtering, retrieval aliases, and an optional autodream pass that consolidates memories on demand or on a schedule — with per-run rollback points, a per-file change declaration (what changed and why), and a separately selectable model for the consolidation pass",
4
- "version": "0.9.9",
4
+ "version": "0.9.10",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {