dsh-monkeyai-sessions 0.1.11 → 0.1.13

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 CHANGED
@@ -61,7 +61,7 @@ From a checkout:
61
61
  npm install
62
62
  npm run build
63
63
  npm pack
64
- dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.11.tgz
64
+ dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.13.tgz
65
65
  ```
66
66
 
67
67
  Verified against a real DSH `0.2.2-rc.1` web profile and a live MonkeyAI runtime: authorization, full history loading, prompt delivery, model switching, and turn cancellation all work end to end.
package/README.zh.md CHANGED
@@ -28,7 +28,7 @@ https://artenx.github.io/dsh-monkeyai-sessions/index.json
28
28
  npm install
29
29
  npm run build
30
30
  npm pack
31
- dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.11.tgz
31
+ dsh plugin --profile web add ./dsh-monkeyai-sessions-0.1.13.tgz
32
32
  ```
33
33
 
34
34
  已在真实的 DSH `0.2.2-rc.1` web profile 与在线 MonkeyAI runtime 上端到端验证:授权、完整历史加载、指令下发、模型切换、回合取消均正常工作。
package/client.js CHANGED
@@ -550,11 +550,11 @@ window.__ModuleLoader__.load({
550
550
  subtitle: { margin: 0, fontSize: 12, color: t.text3 },
551
551
  sectionTitle: { margin: 0, fontSize: 12, fontWeight: 650, color: t.text2, textTransform: "uppercase", letterSpacing: "0.04em" },
552
552
  card: { display: "grid", gap: 10, padding: 14, border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
553
- toolbarCard: { display: "grid", gap: 10, padding: "13px 15px", border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
553
+ toolbarCard: { display: "grid", gap: 10, padding: "13px 15px", border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, backgroundImage: "linear-gradient(90deg, #3568e8 0%, #8baaf4 46%, #e7edfc 100%)", backgroundSize: "100% 3px", backgroundPosition: "0 0", backgroundRepeat: "no-repeat", boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
554
554
  workspace: { display: "grid", gridTemplateColumns: "minmax(248px, 292px) minmax(0, 1fr)", gap: 12, minWidth: 0, alignItems: "stretch" },
555
555
  sessionSidebar: { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto", gap: 10, minWidth: 0, padding: 12, border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
556
- sessionList: { display: "grid", gridTemplateColumns: "1fr", alignContent: "start", gap: 6, minHeight: 0, overflowY: "auto", padding: "1px 3px 2px 1px" },
557
- thread: { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto", gap: 10, minWidth: 0, height: "min(70vh, 720px)", minHeight: 440, overflow: "hidden", padding: 12 },
556
+ sessionList: { display: "grid", alignContent: "start", gap: 6, minHeight: 0, overflowY: "auto", padding: "1px 3px 2px 1px" },
557
+ thread: { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto", gap: 10, minWidth: 0, height: "min(70vh, 720px)", minHeight: 440, padding: 12 },
558
558
  emptyThread: { display: "grid", placeContent: "center", justifyItems: "center", gap: 9, minWidth: 0, padding: 28, border: `1px dashed ${t.border2}`, borderRadius: 12, background: "linear-gradient(145deg, #ffffff 0%, #f8faff 100%)", textAlign: "center" },
559
559
  row: { display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" },
560
560
  label: { display: "grid", gap: 4, flex: 1, minWidth: 180, fontSize: 12, fontWeight: 600, color: t.text2 },
@@ -568,7 +568,6 @@ window.__ModuleLoader__.load({
568
568
  statusBadge: { display: "inline-flex", alignItems: "center", gap: 6, padding: "3px 10px", borderRadius: 999, fontSize: 11.5, fontWeight: 600, background: t.surfaceAlt, border: `1px solid ${t.border}`, color: t.text2, whiteSpace: "nowrap", maxWidth: 340, overflow: "hidden", textOverflow: "ellipsis" },
569
569
  dot: { width: 7, height: 7, borderRadius: "50%", flexShrink: 0 },
570
570
  error: { display: "flex", gap: 8, alignItems: "flex-start", color: t.danger, margin: 0, fontSize: 12.5, background: t.dangerBg, border: `1px solid ${t.dangerBorder}`, borderRadius: t.radius, padding: "8px 10px", whiteSpace: "pre-wrap", overflowWrap: "anywhere" },
571
- sessions: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(230px, 1fr))", gap: 8 },
572
571
  session: { display: "grid", gap: 4, textAlign: "left", padding: "10px 12px", borderRadius: t.radius, border: `1px solid ${t.border}`, background: t.surface, color: t.text, cursor: "pointer", transition: "border-color .15s, background .15s" },
573
572
  selected: { border: `1px solid ${t.accent}`, background: t.accentSoft, boxShadow: `0 0 0 1px ${t.accent} inset` },
574
573
  sessionTitle: { fontSize: 13, fontWeight: 650, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
@@ -603,8 +602,7 @@ window.__ModuleLoader__.load({
603
602
  .mai-panel [data-events]::-webkit-scrollbar-thumb:hover { background: #b8c2cf; }
604
603
  .mai-panel .mai-card-hover { transition: border-color .15s, background .15s; }
605
604
  .mai-panel .mai-card-hover:not(:disabled):hover { border-color: #b9cdf3 !important; background: #f7faff !important; }
606
- .mai-panel .mai-toolbar { position: relative; overflow: hidden; }
607
- .mai-panel .mai-toolbar::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #3568e8 0%, #8baaf4 46%, #e7edfc 100%); }
605
+ .mai-panel .mai-toolbar { position: relative; }
608
606
  .mai-panel .mai-workspace { display: grid; grid-template-columns: minmax(248px, 292px) minmax(0, 1fr); gap: 12px; min-width: 0; align-items: stretch; }
609
607
  .mai-panel .mai-session-sidebar { min-height: min(70vh, 720px); }
610
608
  .mai-panel .mai-session-list { scrollbar-gutter: stable; }
@@ -1742,7 +1740,7 @@ window.__ModuleLoader__.load({
1742
1740
  h("h2", { style: style.sectionTitle }, "\u4F1A\u8BDD\u5217\u8868"),
1743
1741
  h("span", { style: style.chip }, String(sessionOptions.length))
1744
1742
  ),
1745
- sessionOptions.length > 0 ? h("div", { style: style.sessions, className: "mai-session-list" }, sessionOptions.map((session) => {
1743
+ sessionOptions.length > 0 ? h("div", { style: style.sessionList, className: "mai-session-list" }, sessionOptions.map((session) => {
1746
1744
  const flag = session.stale ? "\u5DF2\u8FC7\u671F" : session.deviceStatus && session.deviceStatus !== "online" ? session.deviceStatus === "offline" ? "\u79BB\u7EBF" : session.deviceStatus : "";
1747
1745
  return h(
1748
1746
  "button",
@@ -545,11 +545,11 @@ var style = {
545
545
  subtitle: { margin: 0, fontSize: 12, color: t.text3 },
546
546
  sectionTitle: { margin: 0, fontSize: 12, fontWeight: 650, color: t.text2, textTransform: "uppercase", letterSpacing: "0.04em" },
547
547
  card: { display: "grid", gap: 10, padding: 14, border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
548
- toolbarCard: { display: "grid", gap: 10, padding: "13px 15px", border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
548
+ toolbarCard: { display: "grid", gap: 10, padding: "13px 15px", border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, backgroundImage: "linear-gradient(90deg, #3568e8 0%, #8baaf4 46%, #e7edfc 100%)", backgroundSize: "100% 3px", backgroundPosition: "0 0", backgroundRepeat: "no-repeat", boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
549
549
  workspace: { display: "grid", gridTemplateColumns: "minmax(248px, 292px) minmax(0, 1fr)", gap: 12, minWidth: 0, alignItems: "stretch" },
550
550
  sessionSidebar: { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto", gap: 10, minWidth: 0, padding: 12, border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: "0 2px 8px rgba(16,24,40,0.035)" },
551
- sessionList: { display: "grid", gridTemplateColumns: "1fr", alignContent: "start", gap: 6, minHeight: 0, overflowY: "auto", padding: "1px 3px 2px 1px" },
552
- thread: { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto", gap: 10, minWidth: 0, height: "min(70vh, 720px)", minHeight: 440, overflow: "hidden", padding: 12 },
551
+ sessionList: { display: "grid", alignContent: "start", gap: 6, minHeight: 0, overflowY: "auto", padding: "1px 3px 2px 1px" },
552
+ thread: { display: "grid", gridTemplateRows: "auto minmax(0, 1fr) auto", gap: 10, minWidth: 0, height: "min(70vh, 720px)", minHeight: 440, padding: 12 },
553
553
  emptyThread: { display: "grid", placeContent: "center", justifyItems: "center", gap: 9, minWidth: 0, padding: 28, border: `1px dashed ${t.border2}`, borderRadius: 12, background: "linear-gradient(145deg, #ffffff 0%, #f8faff 100%)", textAlign: "center" },
554
554
  row: { display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" },
555
555
  label: { display: "grid", gap: 4, flex: 1, minWidth: 180, fontSize: 12, fontWeight: 600, color: t.text2 },
@@ -563,7 +563,6 @@ var style = {
563
563
  statusBadge: { display: "inline-flex", alignItems: "center", gap: 6, padding: "3px 10px", borderRadius: 999, fontSize: 11.5, fontWeight: 600, background: t.surfaceAlt, border: `1px solid ${t.border}`, color: t.text2, whiteSpace: "nowrap", maxWidth: 340, overflow: "hidden", textOverflow: "ellipsis" },
564
564
  dot: { width: 7, height: 7, borderRadius: "50%", flexShrink: 0 },
565
565
  error: { display: "flex", gap: 8, alignItems: "flex-start", color: t.danger, margin: 0, fontSize: 12.5, background: t.dangerBg, border: `1px solid ${t.dangerBorder}`, borderRadius: t.radius, padding: "8px 10px", whiteSpace: "pre-wrap", overflowWrap: "anywhere" },
566
- sessions: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(230px, 1fr))", gap: 8 },
567
566
  session: { display: "grid", gap: 4, textAlign: "left", padding: "10px 12px", borderRadius: t.radius, border: `1px solid ${t.border}`, background: t.surface, color: t.text, cursor: "pointer", transition: "border-color .15s, background .15s" },
568
567
  selected: { border: `1px solid ${t.accent}`, background: t.accentSoft, boxShadow: `0 0 0 1px ${t.accent} inset` },
569
568
  sessionTitle: { fontSize: 13, fontWeight: 650, lineHeight: 1.35, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
@@ -598,8 +597,7 @@ var PANEL_CSS = `
598
597
  .mai-panel [data-events]::-webkit-scrollbar-thumb:hover { background: #b8c2cf; }
599
598
  .mai-panel .mai-card-hover { transition: border-color .15s, background .15s; }
600
599
  .mai-panel .mai-card-hover:not(:disabled):hover { border-color: #b9cdf3 !important; background: #f7faff !important; }
601
- .mai-panel .mai-toolbar { position: relative; overflow: hidden; }
602
- .mai-panel .mai-toolbar::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #3568e8 0%, #8baaf4 46%, #e7edfc 100%); }
600
+ .mai-panel .mai-toolbar { position: relative; }
603
601
  .mai-panel .mai-workspace { display: grid; grid-template-columns: minmax(248px, 292px) minmax(0, 1fr); gap: 12px; min-width: 0; align-items: stretch; }
604
602
  .mai-panel .mai-session-sidebar { min-height: min(70vh, 720px); }
605
603
  .mai-panel .mai-session-list { scrollbar-gutter: stable; }
@@ -1737,7 +1735,7 @@ function RemoteSessionPage({ api }) {
1737
1735
  h("h2", { style: style.sectionTitle }, "\u4F1A\u8BDD\u5217\u8868"),
1738
1736
  h("span", { style: style.chip }, String(sessionOptions.length))
1739
1737
  ),
1740
- sessionOptions.length > 0 ? h("div", { style: style.sessions, className: "mai-session-list" }, sessionOptions.map((session) => {
1738
+ sessionOptions.length > 0 ? h("div", { style: style.sessionList, className: "mai-session-list" }, sessionOptions.map((session) => {
1741
1739
  const flag = session.stale ? "\u5DF2\u8FC7\u671F" : session.deviceStatus && session.deviceStatus !== "online" ? session.deviceStatus === "offline" ? "\u79BB\u7EBF" : session.deviceStatus : "";
1742
1740
  return h(
1743
1741
  "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-monkeyai-sessions",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "在 DeepSeek Harness 中读取和继续 MonkeyAI 会话:查看完整对话历史、下发新指令,无缝接续之前在 MonkeyAI 客户端上的工作",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,11 +35,11 @@ const style = {
35
35
  subtitle: { margin: 0, fontSize: 12, color: t.text3 },
36
36
  sectionTitle: { margin: 0, fontSize: 12, fontWeight: 650, color: t.text2, textTransform: 'uppercase', letterSpacing: '0.04em' },
37
37
  card: { display: 'grid', gap: 10, padding: 14, border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: '0 2px 8px rgba(16,24,40,0.035)' },
38
- toolbarCard: { display: 'grid', gap: 10, padding: '13px 15px', border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: '0 2px 8px rgba(16,24,40,0.035)' },
38
+ toolbarCard: { display: 'grid', gap: 10, padding: '13px 15px', border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, backgroundImage: 'linear-gradient(90deg, #3568e8 0%, #8baaf4 46%, #e7edfc 100%)', backgroundSize: '100% 3px', backgroundPosition: '0 0', backgroundRepeat: 'no-repeat', boxShadow: '0 2px 8px rgba(16,24,40,0.035)' },
39
39
  workspace: { display: 'grid', gridTemplateColumns: 'minmax(248px, 292px) minmax(0, 1fr)', gap: 12, minWidth: 0, alignItems: 'stretch' },
40
40
  sessionSidebar: { display: 'grid', gridTemplateRows: 'auto minmax(0, 1fr) auto', gap: 10, minWidth: 0, padding: 12, border: `1px solid ${t.border}`, borderRadius: 12, background: t.surface, boxShadow: '0 2px 8px rgba(16,24,40,0.035)' },
41
- sessionList: { display: 'grid', gridTemplateColumns: '1fr', alignContent: 'start', gap: 6, minHeight: 0, overflowY: 'auto', padding: '1px 3px 2px 1px' },
42
- thread: { display: 'grid', gridTemplateRows: 'auto minmax(0, 1fr) auto', gap: 10, minWidth: 0, height: 'min(70vh, 720px)', minHeight: 440, overflow: 'hidden', padding: 12 },
41
+ sessionList: { display: 'grid', alignContent: 'start', gap: 6, minHeight: 0, overflowY: 'auto', padding: '1px 3px 2px 1px' },
42
+ thread: { display: 'grid', gridTemplateRows: 'auto minmax(0, 1fr) auto', gap: 10, minWidth: 0, height: 'min(70vh, 720px)', minHeight: 440, padding: 12 },
43
43
  emptyThread: { display: 'grid', placeContent: 'center', justifyItems: 'center', gap: 9, minWidth: 0, padding: 28, border: `1px dashed ${t.border2}`, borderRadius: 12, background: 'linear-gradient(145deg, #ffffff 0%, #f8faff 100%)', textAlign: 'center' },
44
44
  row: { display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' },
45
45
  label: { display: 'grid', gap: 4, flex: 1, minWidth: 180, fontSize: 12, fontWeight: 600, color: t.text2 },
@@ -53,7 +53,6 @@ const style = {
53
53
  statusBadge: { display: 'inline-flex', alignItems: 'center', gap: 6, padding: '3px 10px', borderRadius: 999, fontSize: 11.5, fontWeight: 600, background: t.surfaceAlt, border: `1px solid ${t.border}`, color: t.text2, whiteSpace: 'nowrap', maxWidth: 340, overflow: 'hidden', textOverflow: 'ellipsis' },
54
54
  dot: { width: 7, height: 7, borderRadius: '50%', flexShrink: 0 },
55
55
  error: { display: 'flex', gap: 8, alignItems: 'flex-start', color: t.danger, margin: 0, fontSize: 12.5, background: t.dangerBg, border: `1px solid ${t.dangerBorder}`, borderRadius: t.radius, padding: '8px 10px', whiteSpace: 'pre-wrap', overflowWrap: 'anywhere' },
56
- sessions: { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(230px, 1fr))', gap: 8 },
57
56
  session: { display: 'grid', gap: 4, textAlign: 'left', padding: '10px 12px', borderRadius: t.radius, border: `1px solid ${t.border}`, background: t.surface, color: t.text, cursor: 'pointer', transition: 'border-color .15s, background .15s' },
58
57
  selected: { border: `1px solid ${t.accent}`, background: t.accentSoft, boxShadow: `0 0 0 1px ${t.accent} inset` },
59
58
  sessionTitle: { fontSize: 13, fontWeight: 650, lineHeight: 1.35, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' },
@@ -89,8 +88,7 @@ const PANEL_CSS = `
89
88
  .mai-panel [data-events]::-webkit-scrollbar-thumb:hover { background: #b8c2cf; }
90
89
  .mai-panel .mai-card-hover { transition: border-color .15s, background .15s; }
91
90
  .mai-panel .mai-card-hover:not(:disabled):hover { border-color: #b9cdf3 !important; background: #f7faff !important; }
92
- .mai-panel .mai-toolbar { position: relative; overflow: hidden; }
93
- .mai-panel .mai-toolbar::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #3568e8 0%, #8baaf4 46%, #e7edfc 100%); }
91
+ .mai-panel .mai-toolbar { position: relative; }
94
92
  .mai-panel .mai-workspace { display: grid; grid-template-columns: minmax(248px, 292px) minmax(0, 1fr); gap: 12px; min-width: 0; align-items: stretch; }
95
93
  .mai-panel .mai-session-sidebar { min-height: min(70vh, 720px); }
96
94
  .mai-panel .mai-session-list { scrollbar-gutter: stable; }
@@ -1102,7 +1100,7 @@ function RemoteSessionPage({ api }) {
1102
1100
  h('h2', { style: style.sectionTitle }, '会话列表'),
1103
1101
  h('span', { style: style.chip }, String(sessionOptions.length))),
1104
1102
  sessionOptions.length > 0
1105
- ? h('div', { style: style.sessions, className: 'mai-session-list' }, sessionOptions.map(session => {
1103
+ ? h('div', { style: style.sessionList, className: 'mai-session-list' }, sessionOptions.map(session => {
1106
1104
  const flag = session.stale ? '已过期' : session.deviceStatus && session.deviceStatus !== 'online' ? (session.deviceStatus === 'offline' ? '离线' : session.deviceStatus) : ''
1107
1105
  return h('button', {
1108
1106
  style: { ...style.session, ...(session.id === sessionId ? style.selected : {}) },