@clowder-ai/companion 0.1.0-alpha.3 → 0.1.0-alpha.31

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 (70) hide show
  1. package/NOTICE +7 -2
  2. package/README.md +54 -5
  3. package/manifest.json +3 -3
  4. package/package.json +5 -3
  5. package/plugin.yaml +3 -3
  6. package/renderer/app-assist-controller.mjs +125 -0
  7. package/renderer/call-controls-presentation.mjs +179 -0
  8. package/renderer/call-duration.mjs +59 -0
  9. package/renderer/call-transcript-view.mjs +240 -0
  10. package/renderer/chat-unread.mjs +44 -0
  11. package/renderer/client.mjs +75 -3
  12. package/renderer/compact-size.mjs +8 -0
  13. package/renderer/companion-identity.mjs +42 -0
  14. package/renderer/conversation-draft.mjs +304 -0
  15. package/renderer/conversation-history.mjs +176 -0
  16. package/renderer/conversation-surface.mjs +201 -0
  17. package/renderer/conversation.mjs +155 -21
  18. package/renderer/decision-panel.mjs +122 -0
  19. package/renderer/decision-view.mjs +124 -0
  20. package/renderer/errors.mjs +4 -4
  21. package/renderer/index.html +202 -25
  22. package/renderer/living-body.mjs +147 -0
  23. package/renderer/living-edge.mjs +16 -0
  24. package/renderer/living-geometry.mjs +96 -0
  25. package/renderer/meeting-state.mjs +55 -0
  26. package/renderer/motion-facts.mjs +108 -0
  27. package/renderer/native-window-travel.mjs +89 -0
  28. package/renderer/native-work-motion.mjs +39 -0
  29. package/renderer/peer.mjs +1 -1
  30. package/renderer/pet-controls.mjs +139 -27
  31. package/renderer/pet-motion-assets.mjs +22 -0
  32. package/renderer/pet-motion.mjs +343 -0
  33. package/renderer/recent-bubble.mjs +93 -0
  34. package/renderer/reply-letter-controller.mjs +361 -0
  35. package/renderer/reply-letter-state.mjs +38 -0
  36. package/renderer/reply-letter-view.mjs +116 -0
  37. package/renderer/settings-controller.mjs +171 -0
  38. package/renderer/settings-view.mjs +241 -0
  39. package/renderer/skins/xianxian-codex.webp +0 -0
  40. package/renderer/skins/xianxian-living/clips/carry.webm +0 -0
  41. package/renderer/skins/xianxian-living/clips/peek.webm +0 -0
  42. package/renderer/skins/xianxian-living/clips/peek_fade.webm +0 -0
  43. package/renderer/skins/xianxian-living/clips/pounce.webm +0 -0
  44. package/renderer/skins/xianxian-living/clips/sleep.webm +0 -0
  45. package/renderer/skins/xianxian-living/clips/think.webm +0 -0
  46. package/renderer/skins/xianxian-living/clips/trot.webm +0 -0
  47. package/renderer/skins/xianxian-living/clips/wait.webm +0 -0
  48. package/renderer/skins/xianxian-living/clips/wake.webm +0 -0
  49. package/renderer/skins/xianxian-living/layers/body.webp +0 -0
  50. package/renderer/skins/xianxian-living/layers/closed.webp +0 -0
  51. package/renderer/skins/xianxian-living/layers/earL.webp +0 -0
  52. package/renderer/skins/xianxian-living/layers/earR.webp +0 -0
  53. package/renderer/skins/xianxian-living/layers/head.webp +0 -0
  54. package/renderer/skins/xianxian-living/layers/irisL.webp +0 -0
  55. package/renderer/skins/xianxian-living/layers/irisR.webp +0 -0
  56. package/renderer/skins/xianxian-living/layers/meta.json +88 -0
  57. package/renderer/skins/xianxian-living/layers/mouth.webp +0 -0
  58. package/renderer/skins/xianxian-living/layers/scared.webp +0 -0
  59. package/renderer/skins/xianxian-living/layers/tail.webp +0 -0
  60. package/renderer/skins/xianxian-living/layers/whiteL.webp +0 -0
  61. package/renderer/skins/xianxian-living/layers/whiteR.webp +0 -0
  62. package/renderer/skins/xianxian-sleeping-row.png +0 -0
  63. package/renderer/skins/xianxian-staged-thought-row.png +0 -0
  64. package/renderer/skins/xianxian-working-row.png +0 -0
  65. package/renderer/style.css +325 -27
  66. package/renderer/surface.mjs +308 -51
  67. package/renderer/transcript-view.mjs +117 -15
  68. package/renderer/visible-text-receipt.mjs +241 -0
  69. package/renderer/work-overview.mjs +95 -0
  70. package/source-lock.json +122 -2
@@ -1,61 +1,359 @@
1
1
  @import url("./theme.css");
2
+ :root {
3
+ --pet-scale: 1;
4
+ --desktop-paper: #fffbf6;
5
+ --desktop-work: #fcf7f0;
6
+ --desktop-rail: #efe9e3;
7
+ --desktop-ink: #141413;
8
+ --desktop-body: #3d3d3a;
9
+ --desktop-muted: #6f6b63;
10
+ --desktop-line: #e5dfd5;
11
+ --desktop-line-strong: #d8d1c6;
12
+ --desktop-primary: #b05f45;
13
+ --desktop-danger: #b3362c;
14
+ --desktop-success: #3f8552;
15
+ --desktop-warning: #a8721c;
16
+ }
2
17
  * { box-sizing: border-box; }
3
18
  [hidden] { display: none !important; }
4
- body { margin: 0; overflow: hidden; color: var(--cafe-text); background: transparent; font: 14px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
19
+ body { margin: 0; overflow: hidden; color: var(--desktop-ink); background: transparent; font: 14px Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
5
20
  button, textarea, input { font: inherit; }
6
21
  button { cursor: pointer; color: inherit; }
7
- button:focus-visible, textarea:focus-visible { outline: 2px solid var(--cafe-accent); outline-offset: 3px; }
22
+ button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--cafe-accent); outline-offset: 3px; }
8
23
  button:disabled { opacity: .45; cursor: default; }
9
24
  .icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
10
25
  .icon { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
11
26
  #desktop { position: relative; width: 100vw; height: 100vh; }
12
- #anchor { position: absolute; left: 8px; top: 8px; width: 120px; height: 130px; }
13
- #pet { width: 120px; height: 130px; display: block; border: 0; padding: 0; background: url("./skins/xianxian-codex.webp") 0 0 / 960px 1170px; animation: breathe 4.8s steps(6) infinite; filter: drop-shadow(0 6px 4px #0002); touch-action: none; cursor: grab; }
27
+ #anchor { position: absolute; left: 8px; top: 8px; width: calc(120px * var(--pet-scale)); height: calc(130px * var(--pet-scale)); }
28
+ #pet { width: 120px; height: 130px; display: block; border: 0; padding: 0; background: url("./skins/xianxian-codex.webp") 0 0 / 960px 1170px; filter: drop-shadow(0 6px 4px #0002); touch-action: none; cursor: grab; transform: scale(var(--pet-scale)); transform-origin: left top; }
14
29
  #pet.dragging { cursor: grabbing; }
15
- @keyframes breathe { to { background-position-x: -720px; } }
16
- #indicators { position: absolute; bottom: 0; right: 0; display: flex; gap: 4px; }
17
- #indicators button { width: 32px; height: 32px; border: 1px solid #fff9; border-radius: 50%; display: grid; place-items: center; background: #236b59; color: white; box-shadow: 0 2px 5px #0003; }
30
+ #pet[data-skin="xianxian-codex"] { position: relative; background-image: none; overflow: visible; }
31
+ #living-sit { position: absolute; left: 0; bottom: 10px; width: 120px; height: 120px; overflow: visible; pointer-events: none; }
32
+ #living-video, #living-video-transition { position: absolute; object-fit: fill; pointer-events: none; }
33
+ #pet[data-direction="left"] #living-video, #pet[data-direction="left"] #living-video-transition { transform: scaleX(-1); }
34
+ #pet[data-action="held"] #living-sit { transform: translateY(-4px) scale(.98); transform-origin: 50% 80%; }
35
+ #living-sit [data-layer="tail"] { transform-box: view-box; transform-origin: 168px 456px; animation: living-tail 3.4s ease-in-out infinite; }
36
+ #living-sit [data-layer="head"] { transform-box: view-box; transform-origin: 300px 280px; animation: living-head 5.5s ease-in-out infinite; }
37
+ #living-sit [data-layer="ear-left"], #living-sit [data-layer="ear-right"] { transform-box: view-box; }
38
+ #living-sit [data-layer="ear-left"] { transform-origin: 219px 101px; }
39
+ #living-sit [data-layer="ear-right"] { transform-origin: 391px 100px; }
40
+ #pet[data-pose="listening"] #living-sit [data-layer="ear-left"] { transform: rotate(-8deg); }
41
+ #pet[data-pose="listening"] #living-sit [data-layer="ear-right"] { transform: rotate(8deg); }
42
+ #living-sit [data-layer="closed"] { opacity: 0; animation: living-blink 5.8s linear infinite; }
43
+ #pet[data-action="idle"] #living-sit [data-layer="tail"] { animation: living-idle-tail 4.8s ease-in-out infinite; }
44
+ #pet[data-action="idle"] #living-sit [data-layer="head"] { animation: living-idle-head 6.8s ease-in-out infinite; }
45
+ #pet[data-action="idle"] #living-sit [data-layer="ear-left"] { animation: living-idle-ear-left 8.1s ease-in-out infinite; }
46
+ #pet[data-action="idle"] #living-sit [data-layer="ear-right"] { animation: living-idle-ear-right 7.3s ease-in-out infinite; }
47
+ #pet[data-action="idle"] #living-sit [data-layer="closed"] { animation: living-idle-blink 5.8s steps(1, end) infinite; }
48
+ #living-sit [data-layer="mouth"], #living-sit [data-layer="scared"] { opacity: 0; }
49
+ #pet[data-pose="scared"] #living-sit [data-layer="scared"] { opacity: 1; }
50
+ #pet[data-pose="sleeping"] #living-sit [data-layer="closed"] { opacity: 1; animation: none; }
51
+ @keyframes living-tail { 50% { transform: rotate(5deg); } }
52
+ @keyframes living-head { 50% { transform: rotate(2deg); } }
53
+ @keyframes living-blink { 0%, 96%, 100% { opacity: 0; } 97%, 98% { opacity: 1; } }
54
+ @keyframes living-idle-tail { 0%, 12%, 100% { transform: rotate(0); } 34% { transform: rotate(10deg); } 62% { transform: rotate(-8deg); } 80% { transform: rotate(3deg); } }
55
+ @keyframes living-idle-head { 0%, 12%, 100% { transform: rotate(0); } 35% { transform: rotate(5deg); } 69% { transform: rotate(-3deg); } }
56
+ @keyframes living-idle-ear-left { 0%, 68%, 76%, 100% { transform: rotate(0); } 71% { transform: rotate(-9deg); } 73% { transform: rotate(3deg); } }
57
+ @keyframes living-idle-ear-right { 0%, 30%, 39%, 100% { transform: rotate(0); } 33% { transform: rotate(8deg); } 36% { transform: rotate(-3deg); } }
58
+ @keyframes living-idle-blink { 0%, 24%, 30%, 74%, 80%, 100% { opacity: 0; } 25%, 29%, 75%, 79% { opacity: 1; } }
59
+ @keyframes living-wake-anchor {
60
+ from { left: var(--living-left-start); top: var(--living-top-start); }
61
+ to { left: var(--living-left-end); top: var(--living-top-end); }
62
+ }
63
+ #indicators { position: absolute; inset: 0; pointer-events: none; }
64
+ #indicators button { position: absolute; width: 32px; height: 32px; pointer-events: auto; border: 1px solid #fff9; border-radius: 50%; display: grid; place-items: center; background: #236b59; color: white; box-shadow: 0 2px 5px #0003; }
18
65
  #indicators button:hover { background: #ab4842; }
19
66
  #indicators button[data-state="connecting"] { background: #a77b36; animation: pulse 1.8s infinite; }
20
67
  #indicators button[data-state="muted"] { background: #5f6670; }
68
+ #indicators button[data-state="receive-only"] { background: #476dac; }
21
69
  #indicators svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
22
- #share-badge { background: #476dac !important; }
70
+ #share-badge { right: 0; bottom: 0; background: #476dac !important; }
71
+ #pending-badge { top: 0; right: 0; width: auto !important; min-width: 24px; height: 24px !important; padding: 0 7px; border: 2px solid white !important; border-radius: 999px !important; background: #f2dcc8 !important; color: #7a3f2e !important; font-size: 11px; font-weight: 700; white-space: nowrap; }
72
+ #pet[data-dock-edge="right"] + #indicators #pending-badge,
73
+ #pet[data-dock-edge="right"] + #indicators #share-badge { right: auto; left: 0; }
23
74
  @keyframes pulse { 50% { opacity: .65; } }
24
- .floating { position: absolute; z-index: 3; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--cafe-border-subtle), transparent 30%); background: color-mix(in srgb, var(--cafe-surface-elevated) 96%, transparent); box-shadow: 0 10px 26px -10px #24272c2e, 0 2px 5px #24272c0a; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
75
+ .floating { position: absolute; z-index: 3; border-radius: 12px; border: 1px solid var(--desktop-line-strong); background: var(--desktop-paper); box-shadow: 0 14px 28px #18171526, 0 2px 5px #1817150f; }
25
76
  .floating { max-height: 500px; overflow: auto; }
77
+ #bubble { width: 240px; max-height: 80px; overflow: hidden; padding: 8px 11px; pointer-events: none; }
78
+ #bubble p { margin: 0; display: flex; min-width: 0; font-size: 11px; line-height: 1.45; overflow: hidden; white-space: nowrap; }
79
+ #bubble p + p { margin-top: 4px; }
80
+ #bubble [data-role="user"] { color: var(--cafe-text-secondary); }
81
+ .app-assist { width: 320px; padding: 12px; }
82
+ .app-assist p { margin: 0; color: var(--desktop-body); font-size: 13px; line-height: 1.5; }
83
+ .app-assist p strong { color: var(--desktop-ink); font-weight: 600; }
84
+ .app-assist > div { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; }
85
+ .app-assist > div button { min-height: 30px; padding: 5px 10px; font-size: 12px; }
86
+ #call-bubble { width: 320px; max-height: 80px; overflow: hidden; padding: 9px 11px; pointer-events: none; }
87
+ #call-bubble:not(:has(p:not([hidden]))) { display: none; }
88
+ #call-bubble p { margin: 0; display: flex; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12px; line-height: 1.45; }
89
+ #call-bubble p + p { margin-top: 3px; }
90
+ #call-bubble p[data-role="user"] { color: var(--desktop-muted); }
26
91
  .floating button { border: 0; background: transparent; border-radius: 7px; padding: 8px 11px; font-weight: 400; }
27
92
  .floating button:hover:not(:disabled) { background: var(--cafe-surface); }
28
- .floating .primary { background: var(--accent-100); color: var(--accent-900); }
29
- #actions { padding: 5px; width: max-content; }
93
+ .floating .primary { background: var(--desktop-primary); color: white; }
94
+ .floating .primary:hover:not(:disabled) { background: #8f4730; color: white; }
95
+ .floating .destructive { background: var(--desktop-danger); color: white; font-weight: 500; }
96
+ .floating .destructive:hover:not(:disabled) { background: #942c24; }
97
+ .floating .destructive.compact { min-width: 72px; padding: 6px 12px; }
98
+ #actions { width: 412px; overflow: hidden; padding: 10px; }
99
+ #actions[data-presentation="lite"] { width: max-content; max-width: 320px; border: 0; background: transparent; box-shadow: none; padding: 0; overflow: visible; }
100
+ #actions[data-presentation="lite"] > :not(.call-header) { display: none !important; }
101
+ #actions[data-presentation="lite"] .call-header { min-height: 29px; width: fit-content; border: 1px solid #fff3; border-radius: 8px; background: var(--desktop-ink); box-shadow: 0 3px 8px #1817152e; color: var(--desktop-paper); padding: 5px 10px; }
102
+ #actions[data-presentation="lite"] .call-header > :not(.call-status-line) { display: none !important; }
103
+ #actions[data-presentation="lite"] .call-status-line strong { color: inherit; font-size: 12px; }
104
+ #actions[data-presentation="lite"] .call-status-line span:not(.status-dot) { color: #d8d1c6; font-size: 11px; }
105
+ .call-header { min-width: 0; min-height: 24px; display: flex; align-items: center; gap: 7px; }
30
106
  .action-row { display: flex; align-items: center; gap: 4px; }
31
- .action-row button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; font-size: 12px; white-space: nowrap; }
107
+ .action-row button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 28px; height: 28px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
32
108
  .action-row button .icon { width: 16px; height: 16px; }
33
- #active-actions { border-top: 1px solid var(--cafe-border-subtle); margin-top: 5px; padding-top: 5px; }
34
- #status { max-width: 220px; font-size: 12px; line-height: 1.5; margin: 7px 10px; color: var(--cafe-text-secondary); }
35
- #menu { width: 204px; padding: 5px; }
109
+ #active-actions { margin-top: 6px; }
110
+ #lite-call-compose { display: none; align-items: center; gap: 7px; margin-top: 6px; }
111
+ #actions[data-presentation="controls"] #lite-call-compose { display: flex; }
112
+ #lite-call-message { min-width: 0; height: 30px; flex: 1; border: 1px solid var(--desktop-line-strong); border-radius: 7px; background: var(--desktop-paper); color: var(--desktop-ink); padding: 5px 9px; }
113
+ #lite-call-compose button { height: 30px; min-height: 30px; padding: 5px 11px; }
114
+ #status { font-size: 12px; line-height: 1.45; margin: 8px 0 0; color: var(--desktop-muted); }
115
+ .call-status-line { min-height: 24px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
116
+ .call-status-line strong { font-size: 13px; font-weight: 600; }
117
+ .call-status-line span:not(.status-dot) { color: var(--desktop-muted); font-size: 12px; }
118
+ .status-dot {
119
+ --call-status-color: var(--desktop-success);
120
+ position: relative;
121
+ isolation: isolate;
122
+ z-index: 0;
123
+ width: 8px;
124
+ height: 8px;
125
+ flex: none;
126
+ border-radius: 999px;
127
+ background: var(--call-status-color);
128
+ }
129
+ .status-dot::after {
130
+ content: "";
131
+ position: absolute;
132
+ inset: 0;
133
+ z-index: -1;
134
+ border-radius: inherit;
135
+ background: var(--call-status-color);
136
+ opacity: 0;
137
+ pointer-events: none;
138
+ transform: scale(1);
139
+ }
140
+ [data-connection-state="connected"] .status-dot::after,
141
+ [data-connection-state="recovering"] .status-dot::after { animation: call-status-breathe 2s ease-out infinite; }
142
+ [data-connection-state="recovering"] .status-dot { --call-status-color: var(--desktop-warning); }
143
+ [data-connection-state="connecting"] .status-dot,
144
+ [data-connection-state="idle"] .status-dot { --call-status-color: var(--desktop-muted); }
145
+ @keyframes call-status-breathe {
146
+ from { opacity: .38; transform: scale(1); }
147
+ to { opacity: 0; transform: scale(3); }
148
+ }
149
+ .call-meeting { min-width: 0; margin: 3px 0 0 15px; display: flex; align-items: center; gap: 5px; color: var(--desktop-muted); font-size: 12px; line-height: 1.35; }
150
+ #actions .call-meeting { margin: 0; overflow: hidden; flex: 0 1 auto; }
151
+ #actions .call-work { min-width: 0; margin: 0; overflow: hidden; flex: 0 1 auto; text-overflow: ellipsis; white-space: nowrap; }
152
+ #actions .call-work::before { content: "· "; }
153
+ .call-duration { margin-left: auto; flex: none; color: var(--desktop-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
154
+ .call-context > .call-meeting { grid-column: 1 / -1; margin: 0; }
155
+ .meeting-status-dot { width: 7px; height: 7px; flex: none; border-radius: 999px; background: var(--desktop-success); }
156
+ .call-meeting[data-tone="quiet"] .meeting-status-dot { background: var(--desktop-muted); }
157
+ .call-meeting[data-tone="warning"] .meeting-status-dot { background: var(--desktop-warning); }
158
+ .meeting-label { flex: none; white-space: nowrap; }
159
+ .meeting-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
160
+ .call-work { margin: 3px 0 0 15px; color: var(--desktop-muted); font-size: 12px; }
161
+ .call-share-context { min-width: 0; display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--desktop-muted); white-space: nowrap; }
162
+ .call-share-context .icon { width: 14px; height: 14px; }
163
+ .call-share-context strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
164
+ .call-share-context small { flex: none; }
165
+ .call-share-context > span, .call-share-line > span { display: grid; gap: 1px; min-width: 0; }
166
+ .call-share-context strong, .call-share-line strong { overflow: hidden; color: var(--desktop-body); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
167
+ .call-share-context small, .call-share-line small { color: var(--desktop-muted); font-size: 11px; }
168
+ .recent-speaker { flex: none; }
169
+ .recent-message { min-width: 0; flex: 1 1 auto; overflow: hidden; direction: rtl; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
170
+ .recent-message[data-direction="rtl"] { direction: ltr; }
171
+ .recent-message-text { unicode-bidi: isolate; }
172
+ .call-actions { justify-content: flex-end; }
173
+ .call-actions #end { min-width: 60px; margin-left: auto; }
174
+ .action-unread { min-width: 17px; height: 17px; display: inline-grid; place-items: center; border-radius: 999px; padding: 0 5px; background: #f2dcc8; color: #7a3f2e; font-size: 10px; font-weight: 700; line-height: 1; }
175
+ #menu { width: 340px; max-height: 500px; display: flex; flex-direction: column; overflow: hidden; padding: 8px; }
176
+ .menu-scroll { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; }
36
177
  #menu .menu-title { display: block; padding: 7px 11px 6px; color: var(--cafe-text-muted); font-size: 10px; font-weight: 500; letter-spacing: .04em; }
37
178
  #menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 33px; text-align: left; font-size: 12px; line-height: 1.4; }
38
179
  #menu button .icon { color: var(--cafe-text-secondary); width: 16px; height: 16px; }
180
+ #menu .primary .icon { color: inherit; }
39
181
  #menu button:disabled { opacity: .36; }
40
182
  #menu .menu-status { margin-left: auto; color: var(--cafe-text-muted); font-size: 10px; }
41
183
  #menu [aria-pressed="true"] .menu-status { color: var(--accent-700); }
42
184
  #menu .menu-divider { height: 1px; margin: 4px 8px; background: color-mix(in srgb, var(--cafe-border-subtle), transparent 28%); }
43
185
  #menu .quiet-action { color: var(--cafe-text-secondary); }
44
- #chat { width: 320px; display: flex; flex-direction: column; }
45
- #chat header { padding: 7px 9px 7px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--cafe-border-subtle); }
46
- #chat header button { font-size: 12px; color: var(--cafe-text-secondary); }
47
- #transcript { height: 145px; overflow: auto; padding: 14px; line-height: 1.7; }
48
- #transcript p { margin: 0 0 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
49
- #transcript p:not(.empty) { background: var(--accent-50); padding: 7px 10px; border-radius: 9px; }
186
+ .name-card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px 7px 9px; }
187
+ .name-card-actions button { justify-content: center; }
188
+ #menu-status { margin: 2px 10px 8px; color: var(--desktop-muted); font-size: 12px; line-height: 1.45; }
189
+ .call-context { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 7px; min-height: 40px; padding: 7px 10px; border-bottom: 1px solid var(--desktop-line); color: var(--desktop-muted); font-size: 12px; }
190
+ .call-context strong { color: var(--desktop-ink); font-size: 13px; }
191
+ .call-context > small { grid-column: 2 / 4; }
192
+ .call-share-line { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding-top: 6px; border-top: 1px solid var(--desktop-line); min-width: 0; }
193
+ .call-context-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
194
+ .call-context-inline-actions { grid-column: 4; grid-row: 1; }
195
+ .call-context-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 9px; white-space: nowrap; }
196
+ #menu .call-context { margin: -8px -8px 5px; }
197
+ .menu-footer { flex: none; display: flex; align-items: center; gap: 2px; margin: 4px -8px -8px; border-top: 1px solid var(--desktop-line); padding: 4px; }
198
+ #menu .menu-footer button { width: auto; min-width: 38px; min-height: 33px; padding: 7px 8px; }
199
+ #menu .menu-footer #menu-hide { margin-left: auto; }
200
+ .menu-call-actions { grid-column: 1 / -1; width: 100%; }
201
+ .menu-call-actions button { width: auto !important; min-width: 34px !important; }
202
+ .menu-call-actions button:last-child { margin-left: auto; }
203
+ .work-overview { margin: 3px -8px; border-top: 1px solid var(--desktop-line); border-bottom: 1px solid var(--desktop-line); }
204
+ .work-overview-section + .work-overview-section { border-top: 1px solid var(--desktop-line); }
205
+ .work-overview-section header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 11px 3px; color: var(--desktop-muted); font-size: 11px; }
206
+ .work-overview-section header small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
207
+ #menu .work-overview-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; min-height: 43px; border-radius: 0; padding: 6px 11px; }
208
+ .work-overview-row strong, .work-overview-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
209
+ .work-overview-row strong { color: var(--desktop-ink); font-size: 12px; font-weight: 500; }
210
+ .work-overview-row span { color: var(--desktop-muted); font-size: 10px; }
211
+ #work-notice { margin: 0; padding: 3px 11px 7px; color: var(--desktop-muted); font-size: 10px; }
212
+ #chat { width: 400px; max-height: 500px; display: flex; flex-direction: column; overflow: hidden; }
213
+ #chat[data-reply-mode="compose"] { width: 340px; }
214
+ #chat[data-reply-mode="sent"] { width: max-content; border: 0; background: transparent; box-shadow: none; overflow: visible; }
215
+ #chat[data-reply-mode="reply"] { width: 370px; }
216
+ #chat[data-reply-mode="history"][data-history-presentation="reply"] { width: 370px; }
217
+ #chat-history-header { padding: 7px 9px 7px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--cafe-border-subtle); }
218
+ #chat-history-header button { font-size: 12px; color: var(--cafe-text-secondary); }
219
+ .chat-transcript-shell { position: relative; min-height: 0; flex: 1 1 230px; }
220
+ #chat[data-history-presentation="reply"] .chat-transcript-shell { flex-basis: 480px; }
221
+ #chat-transcript { height: 100%; overflow: auto; padding: 14px; line-height: 1.7; font-size: 13px; }
222
+ .chat-transcript-shell[data-has-newer="true"] #chat-transcript { padding-bottom: 56px; }
223
+ #chat[data-history-presentation="reply"] #chat-transcript { padding-top: 44px; }
224
+ #chat-transcript p { margin: 0 0 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
225
+ #chat-transcript p:not(.empty) { width: fit-content; max-width: 92%; padding: 7px 10px; border-radius: 9px; }
226
+ #chat-transcript p.user { margin-left: auto; background: var(--desktop-rail); }
227
+ #chat-transcript p.assistant { margin-right: auto; background: var(--desktop-work); border: 1px solid var(--desktop-line); }
50
228
  .empty { color: var(--cafe-text-muted); font-size: 13px; }
51
- #compose { display: flex; align-items: flex-end; padding: 10px; gap: 8px; border-top: 1px solid var(--cafe-border-subtle); }
52
- #message { resize: none; border: 0; min-width: 0; flex: 1; background: transparent; padding: 5px; color: inherit; line-height: 1.5; }
53
- #chat small { color: var(--cafe-text-muted); font-size: 10px; padding: 0 14px 10px; }
229
+ #compose { display: flex; align-items: center; padding: 10px; gap: 8px; border-top: 1px solid var(--cafe-border-subtle); }
230
+ #chat[data-reply-mode="compose"] #compose { border: 0; }
231
+ #message { resize: none; border: 1px solid var(--desktop-line-strong); border-radius: 8px; min-width: 0; height: 34px; flex: 1; background: var(--desktop-paper); padding: 6px 9px; color: inherit; line-height: 1.5; }
232
+ #message:focus-visible { border-color: transparent; outline: 2px solid var(--cafe-accent); outline-offset: -2px; }
233
+ .chat-feedback { min-height: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; color: #8f4730; }
234
+ .chat-feedback small { flex: 1; font-size: 11px; }
235
+ .chat-feedback button { color: #8f4730; font-size: 11px; }
236
+ #chat-connection-status, #chat-scope { color: var(--cafe-text-muted); font-size: 10px; padding: 0 14px 10px; }
237
+ #chat-connection-status:empty { display: none; }
238
+ .reply-sent { align-items: center; gap: 5px; background: transparent; padding: 0; }
239
+ .reply-sent:not([hidden]) { display: flex; flex-direction: column; }
240
+ .reply-sent > svg { width: 36px; height: 27px; flex: none; overflow: visible; }
241
+ .reply-sent > svg rect { fill: var(--desktop-paper); stroke: var(--desktop-ink); stroke-width: 1.5; }
242
+ .reply-sent > svg path { fill: none; stroke: var(--desktop-ink); stroke-width: 1.5; stroke-linejoin: round; }
243
+ .reply-sent > span { min-width: 0; }
244
+ .reply-sent strong { display: block; border-radius: 999px; background: var(--desktop-ink); color: var(--desktop-paper); padding: 3px 8px; font-size: 10px; font-weight: 500; white-space: nowrap; }
245
+ .reply-sent small { display: none; }
246
+ .reply-card { position: relative; max-height: 500px; overflow-y: auto; padding: 12px 14px 10px; }
247
+ .reply-head { display: flex; align-items: flex-start; gap: 8px; }
248
+ .reply-input-text { min-width: 0; flex: 1; color: var(--desktop-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
249
+ #chat .reply-ring, #chat .reply-close, #chat .reply-history-close { width: 24px; height: 24px; flex: none; display: grid; place-items: center; padding: 0; color: var(--desktop-muted); }
250
+ .reply-ring svg { width: 18px; height: 18px; transform: rotate(-90deg); }
251
+ .reply-ring circle { fill: none; stroke-width: 1; }
252
+ .reply-ring-track { stroke: var(--desktop-line); }
253
+ .reply-ring-progress { stroke: var(--desktop-muted); stroke-linecap: round; stroke-dasharray: 40.84; stroke-dashoffset: 0; }
254
+ .reply-ring[data-running="true"] .reply-ring-progress { animation: reply-countdown var(--reply-visible-ms) linear forwards; }
255
+ .reply-close svg, .reply-history-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
256
+ .reply-history-close { position: absolute; top: 10px; right: 10px; z-index: 1; background: var(--desktop-rail); }
257
+ .reply-body { margin-top: 7px; color: var(--desktop-ink); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
258
+ .reply-body-status { display: block; margin-top: 6px; color: var(--desktop-muted); font-size: 11px; }
259
+ .reply-history-open { margin-top: 8px; padding: 3px 0; color: var(--desktop-muted); font-size: 11px; }
260
+ .reply-return-latest { position: absolute; left: 50%; bottom: 10px; z-index: 1; transform: translateX(-50%); border: 1px solid var(--desktop-line) !important; background: var(--desktop-ink) !important; box-shadow: 0 2px 8px #1817151a; color: var(--desktop-paper); font-size: 11px; white-space: nowrap; }
261
+ @keyframes reply-countdown { to { stroke-dashoffset: 40.84; } }
262
+ .call-transcript { width: 420px; height: 210px; display: flex; flex-direction: column; overflow: hidden; }
263
+ .call-transcript[data-expanded="true"] { height: 500px; }
264
+ .transcript-call-context { flex: none; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; padding: 7px 8px; }
265
+ .transcript-call-context #transcript-call-state { min-width: 0; overflow-wrap: anywhere; }
266
+ .transcript-call-context #transcript-call-mic-state { grid-column: 2 / 4; grid-row: 2; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
267
+ .transcript-call-context .call-context-actions { grid-column: 3; grid-row: 1; gap: 2px; }
268
+ .transcript-call-context .call-context-actions button { padding: 6px; }
269
+ .transcript-call-context .destructive.compact { min-width: 64px; padding-inline: 9px; }
270
+ .transcript-return { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--desktop-line) !important; background: var(--desktop-work) !important; color: var(--desktop-body); padding: 3px 6px !important; font-size: 11px; font-weight: 500 !important; white-space: nowrap; }
271
+ .transcript-return:hover:not(:disabled) { background: var(--desktop-rail) !important; }
272
+ #call-transcript-log { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 8px 12px 5px; }
273
+ .call-transcript-row { margin: 0 0 7px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
274
+ .call-transcript-row.voice.user { color: var(--desktop-muted); font-size: 13px; font-weight: 400; }
275
+ .call-transcript-row.voice.assistant { color: var(--desktop-ink); font-size: 16px; font-weight: 500; line-height: 1.5; }
276
+ .call-transcript-row.typed.user { width: fit-content; max-width: 88%; margin-left: auto; padding: 7px 11px; border-radius: 12px; background: var(--desktop-rail); color: var(--desktop-ink); font-size: 13px; }
277
+ .call-transcript-row[data-live="true"]::after { content: " 实时"; color: #8f4730; font-size: 11px; font-weight: 500; letter-spacing: .05em; }
278
+ .call-transcript:not([data-expanded="true"]) #call-transcript-log { max-height: 112px; }
279
+ .call-transcript:not([data-expanded="true"]) .call-transcript-row.voice.user { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
280
+ .call-transcript:not([data-expanded="true"]) .call-transcript-row.voice.assistant { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
281
+ .call-transcript[data-expanded="true"] #call-transcript-log[data-has-more="true"] { mask-image: linear-gradient(to bottom, transparent 0, black 28px); }
282
+ #call-compose { flex: none; display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid #e5dfd5; }
283
+ #call-message { min-width: 0; flex: 1; height: 32px; border: 1px solid var(--desktop-line-strong); border-radius: 8px; background: var(--desktop-paper); color: var(--desktop-ink); padding: 6px 10px; }
284
+ #call-compose button { height: 32px; padding: 6px 12px; }
285
+ .new-content { position: absolute; right: 12px; bottom: 53px; border: 1px solid #d8d1c6 !important; background: #fffbf6 !important; color: #8f4730; box-shadow: 0 2px 8px #1817151a; font-size: 11px; }
286
+ #call-transcript-status, .call-transcript-foot { flex: none; color: #5f5d57; font-size: 11px; padding: 0 12px 7px; }
287
+ .call-transcript:not([data-expanded="true"]) .call-transcript-foot { display: none; }
288
+ .settings-panel { width: 360px; max-height: 500px; display: flex; flex-direction: column; overflow: hidden; }
289
+ .settings-head { flex: none; min-height: 44px; display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-bottom: 1px solid var(--desktop-line); }
290
+ .settings-head button { width: 28px; padding: 5px; font-size: 20px; line-height: 1; }
291
+ .settings-head strong { font-size: 14px; }
292
+ .settings-loading, .settings-copy, .settings-empty { color: var(--desktop-muted); font-size: 12px; line-height: 1.55; }
293
+ .settings-loading { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--desktop-line); }
294
+ .settings-page { min-height: 0; overflow-y: auto; }
295
+ .settings-row { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 0 !important; border-bottom: 1px solid var(--desktop-line) !important; padding: 9px 16px !important; text-align: left; }
296
+ .settings-row > span:first-child, .settings-row strong { color: var(--desktop-ink); font-weight: 400; }
297
+ .settings-row small { display: block; margin-top: 2px; color: var(--desktop-muted); font-size: 11px; font-weight: 400; line-height: 1.35; }
298
+ .settings-value { margin-left: auto; color: var(--desktop-muted); font-size: 12px; }
299
+ .settings-row[data-drilldown] .settings-value::after { content: " ›"; }
300
+ .setting-switch i { position: relative; width: 27px; height: 16px; flex: none; border-radius: 999px; background: var(--desktop-line-strong); }
301
+ .setting-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #0003; transition: transform .15s; }
302
+ .setting-switch[data-checked="true"] i { background: var(--desktop-ink); }
303
+ .setting-switch[data-checked="true"] i::after { transform: translateX(11px); }
304
+ .setting-switch[data-settlement="unconfirmed"] i { display: none; }
305
+ .setting-switch[data-settlement="unconfirmed"]::after { content: "未确认"; color: var(--desktop-muted); font-size: 12px; }
306
+ .settings-footer { display: flex; justify-content: space-between; padding: 4px 7px; }
307
+ .settings-footer button { color: var(--desktop-muted); font-size: 12px; }
308
+ .settings-copy { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--desktop-line); }
309
+ .settings-roster { border-bottom: 1px solid var(--desktop-line); }
310
+ .settings-choice { width: 100%; min-height: 48px; display: grid; grid-template-columns: 1fr auto; padding: 7px 16px !important; border-radius: 0 !important; text-align: left; }
311
+ .settings-choice strong, .settings-choice span { grid-column: 1; }
312
+ .settings-choice strong { font-size: 13px; font-weight: 500; }
313
+ .settings-choice span { color: var(--desktop-muted); font-size: 11px; }
314
+ .settings-choice[data-selected="true"]::after { content: "✓"; grid-column: 2; grid-row: 1 / span 2; align-self: center; }
315
+ .settings-field { display: block; padding: 10px 16px; color: var(--desktop-muted); font-size: 11px; }
316
+ .settings-field textarea { width: 100%; margin-top: 6px; resize: none; border: 1px solid var(--desktop-line-strong); border-radius: 8px; background: var(--desktop-paper); color: var(--desktop-ink); padding: 8px 10px; line-height: 1.45; }
317
+ .settings-field > small { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; }
318
+ .settings-field[data-settlement="unconfirmed"]::after { content: "保存结果未确认"; display: block; margin-top: 5px; color: #8f4730; font-size: 11px; }
319
+ .settings-eyebrow { margin: 0; padding: 10px 16px 0; color: var(--desktop-muted); font-size: 11px; }
320
+ .settings-eyebrow + .settings-copy { padding-top: 3px; }
321
+ .settings-skins { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--desktop-line); }
322
+ .settings-skins button { min-height: 46px; border-radius: 0; border-bottom: 1px solid var(--desktop-rail); text-align: left; }
323
+ .settings-skins button[data-selected="true"] { background: var(--desktop-work); font-weight: 500; }
324
+ .settings-skins button[data-selected="true"]::after { content: " ✓"; float: right; }
325
+ .settings-size > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 8px; }
326
+ .settings-size input { width: 100%; accent-color: var(--desktop-ink); }
327
+ .settings-confirm { padding: 16px; }
328
+ .settings-confirm > strong { display: block; font-size: 14px; }
329
+ .settings-confirm p { color: var(--desktop-body); font-size: 13px; line-height: 1.6; }
330
+ .settings-confirm > div { display: flex; justify-content: flex-end; gap: 8px; }
331
+ .settings-confirm #settings-confirm-apply { border: 1px solid var(--desktop-line-strong); background: var(--desktop-paper); }
332
+ .settings-notice { flex: none; margin: 8px 12px 0; border: 1px solid var(--desktop-line); border-radius: 8px; padding: 8px 10px; color: var(--desktop-muted); font-size: 11px; }
333
+ .settings-notice[data-kind="rejected"], .settings-notice[data-kind="reconciled_not_saved"], .settings-notice[data-kind="disable_failed"] { color: #8f4730; }
334
+ .settings-notice-actions { display: flex; justify-content: flex-end; padding: 0 8px; }
335
+ .settings-notice-actions button { color: var(--desktop-muted); font-size: 11px; }
336
+ .settings-empty { padding: 16px; }
54
337
  .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
55
- @media (prefers-reduced-motion: reduce) { #pet, #indicators button { animation: none; } }
338
+ @media (prefers-reduced-motion: reduce) {
339
+ #pet, #indicators button, [data-connection-state] .status-dot::after, .reply-ring[data-running="true"] .reply-ring-progress, #living-sit [data-layer], #pet[data-action="idle"] #living-sit [data-layer] { animation: none; }
340
+ #living-sit [data-layer="closed"] { opacity: 0; }
341
+ }
56
342
  #pet[data-skin="yanyan-codex"] { background-image: url("./skins/yanyan-codex.webp"); }
57
343
  #pet[data-skin="ragdoll-v1"] { background-image: url("./skins/ragdoll-v1.png"); animation: none; background-size: contain; background-repeat: no-repeat; background-position: center; }
58
344
  #pet[data-skin="yarn-ball"] { background-image: url("./skins/yarn-ball.png"); animation: none; background-size: contain; background-repeat: no-repeat; background-position: center; }
59
- #transcript { height: 230px; font-size: 13px; }
60
- #transcript .assistant { background: transparent; }
345
+ #chat-transcript p[data-author]::before { content: attr(data-author); display: block; color: var(--cafe-text-muted); font-size: 10px; margin-bottom: 2px; }
346
+ #chat-transcript p[data-companion]::after { content: attr(data-companion) " · " attr(data-companion-live) " · " attr(data-companion-deep); display: block; color: var(--cafe-text-muted); font-size: 9px; line-height: 1.35; margin-top: 4px; }
347
+ #chat-transcript p[data-live="true"] { border-left: 2px solid var(--cafe-accent); }
61
348
  #history { padding: 0; font-size: 10px; color: var(--cafe-text-secondary); }
349
+ #decisions { width: 320px; min-height: 180px; padding: 8px 12px 12px; display: flex; flex-direction: column; overflow: hidden; }
350
+ #decisions header { display: flex; align-items: center; justify-content: space-between; flex: none; }
351
+ #decisions header strong { font-size: 13px; }
352
+ #decisions header button, #decision-more { font-size: 11px; color: var(--cafe-text-secondary); }
353
+ #decision-status, #decisions small { color: var(--cafe-text-secondary); font-size: 11px; line-height: 1.5; flex: none; }
354
+ #decision-status { margin: 7px 0 4px; }
355
+ #decision-list { list-style: none; margin: 4px 0 8px; padding: 0; max-height: 290px; min-height: 55px; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
356
+ #decision-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 4px; border-top: 1px solid var(--cafe-border-subtle); padding: 9px 2px; line-height: 1.45; overflow-wrap: anywhere; }
357
+ #decision-list li strong { grid-column: 1; display: block; font-size: 12px; font-weight: 600; }
358
+ #decision-list li span { grid-column: 1; display: block; color: var(--cafe-text-secondary); font-size: 10px; margin-top: 2px; }
359
+ #decision-list li button { grid-column: 2; grid-row: 1 / span 2; padding: 5px 6px; font-size: 10px; white-space: nowrap; }