dsh-mobile-plugin 0.5.38 → 0.5.40

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 (293) hide show
  1. package/README.md +3 -4
  2. package/docs/extension-authoring.md +749 -0
  3. package/docs/extension-sample/README.md +40 -0
  4. package/docs/extension-sample/index.html +236 -0
  5. package/docs/extension-sample/manifest.json +13 -0
  6. package/extensions/README.md +7 -3
  7. package/extensions/catalog.json +1 -8
  8. package/lib/client.js +1 -40
  9. package/lib/mobile/events.js +4 -1
  10. package/lib/mobile/extension-data.js +8 -82
  11. package/lib/mobile/extension-dev.js +56 -0
  12. package/lib/mobile/permissions.js +2 -3
  13. package/lib/mobile/stream.js +7 -4
  14. package/lib/mobile/third-party-extensions.js +49 -2
  15. package/lib/mobile/uploads.js +3 -31
  16. package/lib/panel/index.html +11 -11
  17. package/lib/routes/control-plane.js +0 -41
  18. package/lib/routes/mobile-api.js +2 -14
  19. package/package.json +11 -7
  20. package/extensions/magpie/agentcompact.js +0 -104
  21. package/extensions/magpie/app.css +0 -4902
  22. package/extensions/magpie/app.js +0 -24474
  23. package/extensions/magpie/autobackup.js +0 -185
  24. package/extensions/magpie/autoresetown.js +0 -151
  25. package/extensions/magpie/balfound.js +0 -38
  26. package/extensions/magpie/boot.js +0 -23
  27. package/extensions/magpie/cfgblocked.js +0 -39
  28. package/extensions/magpie/checkinnow.js +0 -111
  29. package/extensions/magpie/claudemode.js +0 -92
  30. package/extensions/magpie/compat.js +0 -41
  31. package/extensions/magpie/context.css +0 -433
  32. package/extensions/magpie/context.js +0 -1576
  33. package/extensions/magpie/ctxtext.js +0 -223
  34. package/extensions/magpie/fonts.js +0 -42
  35. package/extensions/magpie/i18n.js +0 -18942
  36. package/extensions/magpie/icons/ai21.svg +0 -1
  37. package/extensions/magpie/icons/ai302-color.svg +0 -1
  38. package/extensions/magpie/icons/ai360-color.svg +0 -1
  39. package/extensions/magpie/icons/aihubmix-color.svg +0 -1
  40. package/extensions/magpie/icons/aionui.svg +0 -1
  41. package/extensions/magpie/icons/air.svg +0 -4
  42. package/extensions/magpie/icons/alibaba-color.svg +0 -1
  43. package/extensions/magpie/icons/alibabacloud-color.svg +0 -1
  44. package/extensions/magpie/icons/alma.png +0 -0
  45. package/extensions/magpie/icons/anthropic.svg +0 -1
  46. package/extensions/magpie/icons/antigravity-color.svg +0 -1
  47. package/extensions/magpie/icons/anyscale-color.svg +0 -1
  48. package/extensions/magpie/icons/app-alma.png +0 -0
  49. package/extensions/magpie/icons/app-cc-switch.png +0 -0
  50. package/extensions/magpie/icons/apple-touch-icon.png +0 -0
  51. package/extensions/magpie/icons/aside.svg +0 -28
  52. package/extensions/magpie/icons/astrbot.svg +0 -1
  53. package/extensions/magpie/icons/atomcode.png +0 -0
  54. package/extensions/magpie/icons/aws.svg +0 -1
  55. package/extensions/magpie/icons/azure-color.svg +0 -1
  56. package/extensions/magpie/icons/azureai-color.svg +0 -1
  57. package/extensions/magpie/icons/baichuan-color.svg +0 -1
  58. package/extensions/magpie/icons/baidu-color.svg +0 -1
  59. package/extensions/magpie/icons/baiducloud-color.svg +0 -1
  60. package/extensions/magpie/icons/bailian-color.svg +0 -1
  61. package/extensions/magpie/icons/baseten.svg +0 -1
  62. package/extensions/magpie/icons/bedrock-color.svg +0 -1
  63. package/extensions/magpie/icons/burncloud-color.svg +0 -1
  64. package/extensions/magpie/icons/bytedance-color.svg +0 -1
  65. package/extensions/magpie/icons/cerebras.svg +0 -1
  66. package/extensions/magpie/icons/chatglm-color.svg +0 -1
  67. package/extensions/magpie/icons/cherryin-color.svg +0 -1
  68. package/extensions/magpie/icons/chutes.svg +0 -1
  69. package/extensions/magpie/icons/cindy.png +0 -0
  70. package/extensions/magpie/icons/claude-color.svg +0 -1
  71. package/extensions/magpie/icons/claudecode-color.svg +0 -1
  72. package/extensions/magpie/icons/cline.svg +0 -1
  73. package/extensions/magpie/icons/cloudflare-color.svg +0 -1
  74. package/extensions/magpie/icons/codebuddy-color.svg +0 -1
  75. package/extensions/magpie/icons/codex-color.svg +0 -1
  76. package/extensions/magpie/icons/cohere-color.svg +0 -1
  77. package/extensions/magpie/icons/cometapi-color.svg +0 -1
  78. package/extensions/magpie/icons/commandcode.svg +0 -1
  79. package/extensions/magpie/icons/copilot-color.svg +0 -1
  80. package/extensions/magpie/icons/coze.svg +0 -1
  81. package/extensions/magpie/icons/crush.png +0 -0
  82. package/extensions/magpie/icons/curl.svg +0 -1
  83. package/extensions/magpie/icons/cursor.svg +0 -1
  84. package/extensions/magpie/icons/deepinfra-color.svg +0 -1
  85. package/extensions/magpie/icons/deepmind-color.svg +0 -1
  86. package/extensions/magpie/icons/deepseek-color.svg +0 -1
  87. package/extensions/magpie/icons/deveco-color.svg +0 -12
  88. package/extensions/magpie/icons/devin.svg +0 -1
  89. package/extensions/magpie/icons/doubao-color.svg +0 -1
  90. package/extensions/magpie/icons/empryo-color.svg +0 -1
  91. package/extensions/magpie/icons/factory.svg +0 -1
  92. package/extensions/magpie/icons/favicon.svg +0 -1
  93. package/extensions/magpie/icons/featherless-color.svg +0 -1
  94. package/extensions/magpie/icons/fireworks-color.svg +0 -1
  95. package/extensions/magpie/icons/friendli.svg +0 -1
  96. package/extensions/magpie/icons/fx.svg +0 -1
  97. package/extensions/magpie/icons/gemini-color.svg +0 -1
  98. package/extensions/magpie/icons/geminicli-color.svg +0 -1
  99. package/extensions/magpie/icons/gemma-color.svg +0 -1
  100. package/extensions/magpie/icons/giteeai.svg +0 -1
  101. package/extensions/magpie/icons/github.svg +0 -1
  102. package/extensions/magpie/icons/githubcopilot.svg +0 -1
  103. package/extensions/magpie/icons/glama.svg +0 -1
  104. package/extensions/magpie/icons/gmicloud.svg +0 -1
  105. package/extensions/magpie/icons/google-color.svg +0 -1
  106. package/extensions/magpie/icons/googlecloud-color.svg +0 -1
  107. package/extensions/magpie/icons/goose.svg +0 -1
  108. package/extensions/magpie/icons/grok.svg +0 -1
  109. package/extensions/magpie/icons/groq.svg +0 -1
  110. package/extensions/magpie/icons/hanako.png +0 -0
  111. package/extensions/magpie/icons/hermes.svg +0 -1
  112. package/extensions/magpie/icons/huawei-color.svg +0 -1
  113. package/extensions/magpie/icons/huaweicloud-color.svg +0 -1
  114. package/extensions/magpie/icons/huggingface-color.svg +0 -1
  115. package/extensions/magpie/icons/hunyuan-color.svg +0 -1
  116. package/extensions/magpie/icons/hyperbolic-color.svg +0 -1
  117. package/extensions/magpie/icons/icon-512.png +0 -0
  118. package/extensions/magpie/icons/iflytekcloud-color.svg +0 -1
  119. package/extensions/magpie/icons/inference.svg +0 -1
  120. package/extensions/magpie/icons/infinigence-color.svg +0 -1
  121. package/extensions/magpie/icons/internlm-color.svg +0 -1
  122. package/extensions/magpie/icons/jcode.svg +0 -1
  123. package/extensions/magpie/icons/jina.svg +0 -1
  124. package/extensions/magpie/icons/kilo.svg +0 -1
  125. package/extensions/magpie/icons/kilocode.svg +0 -1
  126. package/extensions/magpie/icons/kimi-code-desktop.png +0 -0
  127. package/extensions/magpie/icons/kimi.svg +0 -1
  128. package/extensions/magpie/icons/kiro-color.svg +0 -1
  129. package/extensions/magpie/icons/kling-color.svg +0 -1
  130. package/extensions/magpie/icons/lambda.svg +0 -1
  131. package/extensions/magpie/icons/leptonai-color.svg +0 -1
  132. package/extensions/magpie/icons/liquid.svg +0 -1
  133. package/extensions/magpie/icons/liveagent-color.svg +0 -1
  134. package/extensions/magpie/icons/llmapi.svg +0 -1
  135. package/extensions/magpie/icons/lmstudio.svg +0 -1
  136. package/extensions/magpie/icons/lody.png +0 -0
  137. package/extensions/magpie/icons/longcat.svg +0 -1
  138. package/extensions/magpie/icons/magpie.svg +0 -1
  139. package/extensions/magpie/icons/meta-color.svg +0 -1
  140. package/extensions/magpie/icons/metaai-color.svg +0 -1
  141. package/extensions/magpie/icons/microsoft-color.svg +0 -1
  142. package/extensions/magpie/icons/mimocode.svg +0 -1
  143. package/extensions/magpie/icons/minimax-color.svg +0 -1
  144. package/extensions/magpie/icons/mistermorph-color.svg +0 -1
  145. package/extensions/magpie/icons/mistral-color.svg +0 -1
  146. package/extensions/magpie/icons/mlx-serve.png +0 -0
  147. package/extensions/magpie/icons/modelscope-color.svg +0 -1
  148. package/extensions/magpie/icons/monica-color.svg +0 -1
  149. package/extensions/magpie/icons/moonshot.svg +0 -1
  150. package/extensions/magpie/icons/morph-color.svg +0 -1
  151. package/extensions/magpie/icons/mothx.png +0 -0
  152. package/extensions/magpie/icons/nebius.svg +0 -1
  153. package/extensions/magpie/icons/newapi-color.svg +0 -1
  154. package/extensions/magpie/icons/nousresearch.svg +0 -1
  155. package/extensions/magpie/icons/nova-color.svg +0 -1
  156. package/extensions/magpie/icons/novita-color.svg +0 -1
  157. package/extensions/magpie/icons/nvidia-color.svg +0 -1
  158. package/extensions/magpie/icons/ollama.svg +0 -1
  159. package/extensions/magpie/icons/omlx.svg +0 -1
  160. package/extensions/magpie/icons/omo.svg +0 -1
  161. package/extensions/magpie/icons/omp.svg +0 -1
  162. package/extensions/magpie/icons/openai.svg +0 -1
  163. package/extensions/magpie/icons/openchamber.svg +0 -11
  164. package/extensions/magpie/icons/openclaw.svg +0 -1
  165. package/extensions/magpie/icons/opencode.svg +0 -1
  166. package/extensions/magpie/icons/openmausbot.svg +0 -1
  167. package/extensions/magpie/icons/openrouter.svg +0 -1
  168. package/extensions/magpie/icons/openwebui.svg +0 -1
  169. package/extensions/magpie/icons/parasail.svg +0 -1
  170. package/extensions/magpie/icons/penguin-color.svg +0 -1
  171. package/extensions/magpie/icons/perplexity-color.svg +0 -1
  172. package/extensions/magpie/icons/phala-color.svg +0 -1
  173. package/extensions/magpie/icons/pi.svg +0 -1
  174. package/extensions/magpie/icons/pipellm-color.svg +0 -5
  175. package/extensions/magpie/icons/poe.svg +0 -1
  176. package/extensions/magpie/icons/ppio-color.svg +0 -1
  177. package/extensions/magpie/icons/prime-agent.svg +0 -1
  178. package/extensions/magpie/icons/qiniu-color.svg +0 -1
  179. package/extensions/magpie/icons/qoder.svg +0 -1
  180. package/extensions/magpie/icons/qwen-color.svg +0 -1
  181. package/extensions/magpie/icons/qwenpaw.svg +0 -1
  182. package/extensions/magpie/icons/raycast.svg +0 -1
  183. package/extensions/magpie/icons/reasonix-color.svg +0 -48
  184. package/extensions/magpie/icons/reka.svg +0 -1
  185. package/extensions/magpie/icons/replicate.svg +0 -1
  186. package/extensions/magpie/icons/roocode.svg +0 -1
  187. package/extensions/magpie/icons/rtk.png +0 -0
  188. package/extensions/magpie/icons/sambanova-color.svg +0 -1
  189. package/extensions/magpie/icons/sensenova-color.svg +0 -1
  190. package/extensions/magpie/icons/siliconcloud-color.svg +0 -1
  191. package/extensions/magpie/icons/snow.png +0 -0
  192. package/extensions/magpie/icons/snowflake-color.svg +0 -1
  193. package/extensions/magpie/icons/sophnet-color.svg +0 -1
  194. package/extensions/magpie/icons/spark-color.svg +0 -1
  195. package/extensions/magpie/icons/stepfun-color.svg +0 -1
  196. package/extensions/magpie/icons/straico-color.svg +0 -1
  197. package/extensions/magpie/icons/submodel-color.svg +0 -1
  198. package/extensions/magpie/icons/t3code.svg +0 -4
  199. package/extensions/magpie/icons/targon-color.svg +0 -1
  200. package/extensions/magpie/icons/tencent-color.svg +0 -1
  201. package/extensions/magpie/icons/tencentcloud-color.svg +0 -1
  202. package/extensions/magpie/icons/tiangong-color.svg +0 -1
  203. package/extensions/magpie/icons/together-color.svg +0 -1
  204. package/extensions/magpie/icons/trae.svg +0 -1
  205. package/extensions/magpie/icons/typesafe.png +0 -0
  206. package/extensions/magpie/icons/upstage-color.svg +0 -1
  207. package/extensions/magpie/icons/venice-color.svg +0 -1
  208. package/extensions/magpie/icons/vercel.svg +0 -1
  209. package/extensions/magpie/icons/vertexai-color.svg +0 -1
  210. package/extensions/magpie/icons/vllm-color.svg +0 -1
  211. package/extensions/magpie/icons/volcengine-color.svg +0 -1
  212. package/extensions/magpie/icons/voyage-color.svg +0 -1
  213. package/extensions/magpie/icons/vscode.svg +0 -1
  214. package/extensions/magpie/icons/wenxin-color.svg +0 -1
  215. package/extensions/magpie/icons/windsurf.svg +0 -1
  216. package/extensions/magpie/icons/workbuddy-color.svg +0 -1
  217. package/extensions/magpie/icons/workersai-color.svg +0 -1
  218. package/extensions/magpie/icons/xai.svg +0 -1
  219. package/extensions/magpie/icons/xiaomimimo.svg +0 -1
  220. package/extensions/magpie/icons/xinference-color.svg +0 -1
  221. package/extensions/magpie/icons/yi.svg +0 -1
  222. package/extensions/magpie/icons/yuanbao-color.svg +0 -1
  223. package/extensions/magpie/icons/yylx.svg +0 -5
  224. package/extensions/magpie/icons/zai.svg +0 -1
  225. package/extensions/magpie/icons/zcode.png +0 -0
  226. package/extensions/magpie/icons/zed.svg +0 -1
  227. package/extensions/magpie/icons/zenmux.svg +0 -1
  228. package/extensions/magpie/icons/zeroone.svg +0 -1
  229. package/extensions/magpie/icons/zhipu-color.svg +0 -1
  230. package/extensions/magpie/icons/zoo-code.png +0 -0
  231. package/extensions/magpie/index.html +0 -572
  232. package/extensions/magpie/kernel.js +0 -274
  233. package/extensions/magpie/keyspend.js +0 -63
  234. package/extensions/magpie/layout.js +0 -26
  235. package/extensions/magpie/manifest.json +0 -37
  236. package/extensions/magpie/navlamp.js +0 -47
  237. package/extensions/magpie/omarchy.css +0 -72
  238. package/extensions/magpie/omarchy.js +0 -46
  239. package/extensions/magpie/passerrors.js +0 -21
  240. package/extensions/magpie/pluginpages.js +0 -405
  241. package/extensions/magpie/plugins/gateway/client.js +0 -1194
  242. package/extensions/magpie/plugins/gateway/keys.js +0 -972
  243. package/extensions/magpie/plugins/gateway/settings.js +0 -459
  244. package/extensions/magpie/plugins/library/client.js +0 -6788
  245. package/extensions/magpie/plugins/library/i18n.js +0 -3228
  246. package/extensions/magpie/plugins/library/library.css +0 -848
  247. package/extensions/magpie/plugins/otel/i18n.js +0 -48
  248. package/extensions/magpie/plugins/otel/page.js +0 -189
  249. package/extensions/magpie/plugins/redact/client.js +0 -46
  250. package/extensions/magpie/plugins/redact/demo.js +0 -461
  251. package/extensions/magpie/plugins/redact/i18n.js +0 -432
  252. package/extensions/magpie/plugins/redact/page.js +0 -985
  253. package/extensions/magpie/plugins/redact/redact.css +0 -385
  254. package/extensions/magpie/plugins/redact/settings.js +0 -248
  255. package/extensions/magpie/plugins/redact/xq_dark.jpg +0 -0
  256. package/extensions/magpie/plugins/redact/xq_dark.webm +0 -0
  257. package/extensions/magpie/plugins/redact/xq_light.jpg +0 -0
  258. package/extensions/magpie/plugins/redact/xq_light.webm +0 -0
  259. package/extensions/magpie/plugins/routing/client.js +0 -8593
  260. package/extensions/magpie/plugins/routing/i18n.js +0 -2696
  261. package/extensions/magpie/plugins/routing/routing.css +0 -1111
  262. package/extensions/magpie/plugins/search/settings.js +0 -460
  263. package/extensions/magpie/plugins/sessions/client.js +0 -1622
  264. package/extensions/magpie/plugins/sessions/i18n.js +0 -360
  265. package/extensions/magpie/plugins/sessions/sessions.css +0 -181
  266. package/extensions/magpie/plugins/sessions/settings.js +0 -100
  267. package/extensions/magpie/plugins/usage/client.js +0 -150
  268. package/extensions/magpie/plugins/usage/i18n.js +0 -984
  269. package/extensions/magpie/plugins/usage/page.js +0 -4307
  270. package/extensions/magpie/plugins.css +0 -319
  271. package/extensions/magpie/plugins.js +0 -1926
  272. package/extensions/magpie/profilerename.js +0 -27
  273. package/extensions/magpie/purposes.js +0 -2
  274. package/extensions/magpie/quitask.js +0 -79
  275. package/extensions/magpie/quotaall.js +0 -142
  276. package/extensions/magpie/ratewindows.js +0 -123
  277. package/extensions/magpie/registry.js +0 -87
  278. package/extensions/magpie/resetask.js +0 -137
  279. package/extensions/magpie/ruleedit.js +0 -53
  280. package/extensions/magpie/scrollends.js +0 -91
  281. package/extensions/magpie/settingshints.js +0 -75
  282. package/extensions/magpie/signsheets.js +0 -86
  283. package/extensions/magpie/start.js +0 -26
  284. package/extensions/magpie/syncfiles.js +0 -216
  285. package/extensions/magpie/theme.js +0 -29
  286. package/extensions/magpie/traywindows.js +0 -41
  287. package/extensions/magpie/webfonts.js +0 -130
  288. package/extensions/magpie/whatsnew.js +0 -252
  289. package/extensions/magpie.zip +0 -0
  290. package/lib/canvas-app.html +0 -442
  291. package/lib/mobile/canvas-store.js +0 -365
  292. package/lib/mobile/magpie-web.js +0 -425
  293. package/lib/routes/canvas-desktop.js +0 -196
@@ -1,41 +0,0 @@
1
- // The page runs in the system's WebKit: on macOS 12 that can be Safari
2
- // 15.0's (#220), older than what the rest of the code was written against.
3
- // Loaded before every other script, this fills in the few built-ins they
4
- // use that came later, each only where it is missing. The syntax the
5
- // scripts may use is held by tests/old-webkit.test.cjs.
6
-
7
- // Safari 15.4
8
- if (!Array.prototype.at) {
9
- Object.defineProperty(Array.prototype, "at", {
10
- configurable: true, writable: true,
11
- value(i) { i = Math.trunc(i) || 0; if (i < 0) i += this.length; return this[i]; },
12
- });
13
- }
14
- if (!Array.prototype.findLast) {
15
- Object.defineProperty(Array.prototype, "findLast", {
16
- configurable: true, writable: true,
17
- value(f, self) { for (let i = this.length - 1; i >= 0; i--) if (f.call(self, this[i], i, this)) return this[i]; },
18
- });
19
- }
20
- if (!Array.prototype.findLastIndex) {
21
- Object.defineProperty(Array.prototype, "findLastIndex", {
22
- configurable: true, writable: true,
23
- value(f, self) { for (let i = this.length - 1; i >= 0; i--) if (f.call(self, this[i], i, this)) return i; return -1; },
24
- });
25
- }
26
- if (!Object.hasOwn) {
27
- Object.defineProperty(Object, "hasOwn", {
28
- configurable: true, writable: true,
29
- value: (o, k) => Object.prototype.hasOwnProperty.call(o, k),
30
- });
31
- }
32
- // the page only copies plain data (what the API sent), so JSON is enough
33
- if (!window.structuredClone) {
34
- window.structuredClone = (v) => (v === undefined ? v : JSON.parse(JSON.stringify(v)));
35
- }
36
- // Safari 16: overscroll-behavior. A box app.js marks .holds, wheeled past
37
- // an end, would scroll the page; it keeps the wheel here instead
38
- if (!CSS.supports("overscroll-behavior-y", "contain")) addEventListener("wheel", (e) => {
39
- const b = e.target.closest?.(".holds");
40
- if (b && e.deltaY && (e.deltaY < 0 ? b.scrollTop < 1 : b.scrollTop >= b.scrollHeight - b.clientHeight - 1)) e.preventDefault();
41
- }, { passive: false });
@@ -1,433 +0,0 @@
1
- /* Context windows: a request's prompt as a card (Routing, the Usage page's
2
- Context tab) and each agent's score and tags. */
3
- :root {
4
- --k-system: var(--c6); --k-tools: var(--c2); --k-skills: var(--c7); --k-memory: var(--c4);
5
- --k-files: var(--c3); --k-chat: var(--c1);
6
- --k-free: color-mix(in srgb, var(--fg) 7%, transparent);
7
- }
8
- /* results in orange, its own hue: the palette's pink sank to maroon on a
9
- dark tile. Colorblind mode keeps its palette's */
10
- :root { --k-results: #ea580c; }
11
- @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --k-results: #fdba74; } }
12
- :root[data-theme="dark"] { --k-results: #fdba74; }
13
- :root[data-colorblind="1"] { --k-results: var(--c5); }
14
- .k-system { --k: var(--k-system); }
15
- .k-tools { --k: var(--k-tools); }
16
- .k-skills { --k: var(--k-skills); }
17
- .k-memory { --k: var(--k-memory); }
18
- .k-files { --k: var(--k-files); }
19
- .k-results { --k: var(--k-results); }
20
- .k-chat { --k: var(--k-chat); }
21
- i.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 2.5px; background: var(--k); }
22
- i.dot.free { background: var(--k-free); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent); }
23
-
24
- .ctx-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 14px; min-width: 0; font-variant-numeric: tabular-nums; }
25
- .ctx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
26
- /* the route and the state, kept together at the end of the head: beside
27
- the title while the whole model id fits there, else on a line of their
28
- own, where the id ends in an ellipsis */
29
- .ctx-end { display: flex; flex: 1 1 auto; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
30
- .ctx-head .grow, .ctx-foot .grow, .ctx-contents-head .grow, .ctx-agent-head .grow, .ctx-agent-foot .grow, .ctx-sess-head .grow { flex: 1; }
31
- .ctx-title { flex: none; font-size: 13px; font-weight: 600; color: var(--fg); white-space: nowrap; }
32
- .ctx-route, .ctx-who, .ctx-what { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
33
- /* the title never gives way: the model id does, down to its ellipsis, and
34
- past that the route is cut at its own edge, so nothing in it is drawn
35
- over the title or the state (packinggoods on Discord: in a narrow window
36
- the provider's icon sat on the end of "Context window") */
37
- .ctx-route { gap: 6px; font-size: 12px; overflow: hidden; }
38
- .ctx-who { flex: none; color: var(--fg-2); font-weight: 500; white-space: nowrap; }
39
- .ctx-who .ic { width: 14px; height: 14px; }
40
- .ctx-what .ic { flex: none; width: 12px; height: 12px; }
41
- .ctx-sep { flex: none; color: var(--faint); }
42
- :where(.ctx-card.max420) :is(.ctx-who-n, .ctx-sep) { display: none; }
43
- .ctx-model { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--code-font, var(--code)); font-size: 11px; color: var(--muted); }
44
- .ctx-state { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 500; background: var(--pill); color: var(--fg-2); }
45
- .ctx-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
46
- .ctx-state.counted i { background: var(--green); }
47
- .ctx-state.live { background: var(--green-soft); color: var(--green); }
48
- .ctx-state.live i { background: var(--green); animation: ctx-pulse 1.4s ease-in-out infinite; }
49
- /* every word of the state in one cell, the one that is on shown: the pill
50
- is as wide whatever the request's state, so nothing beside it moves */
51
- .ctx-state-w { display: inline-grid; }
52
- .ctx-state-w > span { grid-area: 1 / 1; text-align: center; white-space: nowrap; }
53
- .ctx-state-w > span:not(.on) { visibility: hidden; }
54
- @keyframes ctx-pulse { 50% { opacity: .35; transform: scale(.8); } }
55
-
56
- .ctx-k { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
57
- :root[lang="zh"] .ctx-k, :root[lang="ja"] .ctx-k { letter-spacing: .02em; }
58
- .ctx-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 28px; }
59
- .ctx-top > :only-child { grid-column: 1 / -1; }
60
- .ctx-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
61
- /* the figure and its words apart: a flex item's leading space is dropped,
62
- so the gap is the space ("—命中" read as one, dumplings on Discord) */
63
- .ctx-big { display: flex; align-items: baseline; gap: .35em; white-space: nowrap; color: var(--muted); font-size: 13px; }
64
- .ctx-big b { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; color: var(--fg); }
65
- .ctx-sub { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
66
- :root[lang="zh"] .ctx-sub, :root[lang="ja"] .ctx-sub { letter-spacing: .02em; }
67
- .ctx-health { height: 17px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 9px; font-size: 10px; letter-spacing: .03em; }
68
- .ctx-health.ok { background: var(--green-soft); color: var(--green); }
69
- .ctx-health.warn { background: var(--amber-soft); color: var(--amber); }
70
- .ctx-health.bad { background: var(--red-soft); color: var(--red); }
71
- .ctx-bar { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--k-free); overflow: hidden; }
72
- .ctx-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--green); transform-origin: left; animation: ctx-grow .7s var(--ease, ease) backwards; }
73
- .ctx-cache .ctx-bar { margin: 3px 0 2px; }
74
- .ctx-cache .ctx-bar i { transition: width .3s var(--ease, ease); }
75
- /* under way: the last request's cache, dimmed till this one's comes */
76
- .ctx-cache :is(.ctx-big, .ctx-bar) { transition: opacity .3s var(--ease, ease); }
77
- .ctx-cache.was :is(.ctx-big, .ctx-bar) { opacity: .45; }
78
- /* nothing to show: a dash and the words why, no empty bar; the bar keeps
79
- its room, so the card doesn't move when the figure comes */
80
- .ctx-cache.none .ctx-big b { color: var(--faint); }
81
- .ctx-cache.none .ctx-bar { visibility: hidden; }
82
- @media (prefers-reduced-motion: reduce) { .ctx-cache .ctx-bar i, .ctx-cache :is(.ctx-big, .ctx-bar) { transition: none; } }
83
- @keyframes ctx-grow { from { transform: scaleX(0); } }
84
-
85
- /* the window, a cell for each 1/400 of it */
86
- .ctx-waffle { display: grid; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 2px; }
87
- /* a card 520px wide or less (context.js sets max520 by its width) */
88
- :where(.ctx-card.max520) .ctx-waffle { grid-template-columns: repeat(25, minmax(0, 1fr)); }
89
- .ctx-waffle > i { aspect-ratio: 1; border-radius: 2px; background: var(--k, var(--k-free)); transition: opacity .16s, transform .16s; animation: ctx-cell .32s var(--ease, ease) backwards; animation-delay: var(--d, 0ms); }
90
- .ctx-waffle > i.free { --k: var(--k-free); }
91
- @keyframes ctx-cell { from { opacity: 0; transform: scale(.4); } }
92
- .ctx-waffle[data-f] > i { opacity: .16; }
93
- .ctx-waffle[data-f="system"] > i.k-system, .ctx-waffle[data-f="tools"] > i.k-tools, .ctx-waffle[data-f="skills"] > i.k-skills,
94
- .ctx-waffle[data-f="memory"] > i.k-memory, .ctx-waffle[data-f="files"] > i.k-files,
95
- .ctx-waffle[data-f="results"] > i.k-results, .ctx-waffle[data-f="chat"] > i.k-chat,
96
- .ctx-waffle[data-f="free"] > i.free, .ctx-waffle[data-f="item"] > i.on { opacity: 1; }
97
- .ctx-waffle[data-f="item"] > i.on { transform: scale(1.12); }
98
- .ctx-tip { position: absolute; z-index: 5; min-width: 190px; max-width: 280px; padding: 8px 10px; border-radius: 9px; background: #17171b; color: #ededf1; box-shadow: 0 10px 30px rgba(0, 0, 0, .28); font-size: 11.5px; pointer-events: none; display: flex; flex-direction: column; gap: 3px; }
99
- .ctx-tip[hidden] { display: none; }
100
- .ctx-tip-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
101
- .ctx-tip-head .grow { flex: 1; }
102
- .ctx-tip-head span:last-child { color: #a1a1aa; }
103
- .ctx-tip-row { display: flex; gap: 10px; color: #b9b9c1; }
104
- .ctx-tip-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
105
- .ctx-tip-row.on { color: #fff; font-weight: 500; }
106
- .ctx-tip-more { color: #85858d; font-size: 10.5px; }
107
-
108
- .ctx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: -4px; }
109
- .ctx-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-2); cursor: default; padding: 2px 0; }
110
- .ctx-leg .v { color: var(--muted); }
111
- .ctx-leg:hover .n { color: var(--fg); }
112
-
113
- .ctx-contents { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
114
- .ctx-contents-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
115
- .ctx-contents-head .segs { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex: none; }
116
- .ctx-contents-head .segs .opt { height: 20px; padding: 0 9px; font-size: 11px; white-space: nowrap; flex: none; }
117
- :where(.ctx-card.max520) .ctx-contents-head { flex-wrap: wrap; }
118
- :where(.ctx-card.max520) .ctx-contents-head .segs { flex: 1 1 100%; }
119
- .ctx-rows { display: flex; flex-direction: column; }
120
- .ctx-row { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 0 6px; margin: 0 -6px; border-radius: 6px; font-size: 12px; }
121
- .ctx-row:hover { background: var(--pill); }
122
- .ctx-name { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; white-space: nowrap; }
123
- .ctx-name b { font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 100%; }
124
- .ctx-name small { color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; min-width: 0; }
125
- .ctx-x { font-size: 11px; color: var(--muted); }
126
- .ctx-tag { flex: none; font-family: var(--code-font, var(--code)); font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--pill); color: var(--muted); }
127
- .ctx-mini { flex: none; width: 72px; height: 4px; border-radius: 2px; background: var(--k-free); overflow: hidden; }
128
- .ctx-mini i { display: block; height: 100%; border-radius: 2px; background: var(--k); }
129
- .ctx-v { flex: none; width: 48px; text-align: right; color: var(--fg-2); font-size: 11.5px; }
130
- :where(.ctx-card.max420) :is(.ctx-mini, .ctx-tag) { display: none; }
131
- .ctx-empty { font-size: 12px; color: var(--muted); padding: 4px 0; }
132
- .ctx-more { align-self: flex-start; margin-top: 2px; font-size: 11.5px; }
133
-
134
- .ctx-foot { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 11px; color: var(--muted); }
135
- .ctx-crumbs { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--code-font, var(--code)); font-size: 10.5px; color: var(--muted); }
136
- .ctx-note { white-space: nowrap; flex: none; }
137
- .ctx-session { display: flex; align-items: center; gap: 12px; margin-top: -4px; }
138
- .ctx-session .ctx-spark { flex: 1; height: 34px; }
139
- .ctx-spark { position: relative; display: block; width: 100%; }
140
- .ctx-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
141
- .ctx-spark .at { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--card); border: 1.6px solid var(--k-chat); box-sizing: border-box; pointer-events: none; }
142
- .ctx-spark .win { stroke: var(--line); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
143
- .ctx-spark .area { fill: color-mix(in srgb, var(--k-chat) 14%, transparent); }
144
- .ctx-spark .line { fill: none; stroke: var(--k-chat); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
145
- .ctx-spark .hit { fill: transparent; cursor: pointer; }
146
- .ctx-spark .hit:hover { fill: color-mix(in srgb, var(--fg) 7%, transparent); }
147
-
148
- /* Routing: the card under the story of the request */
149
- .rt-log .ctx-card { margin-top: 12px; }
150
- /* folded: its head alone, how full it is beside the title */
151
- .ctx-fold { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 22px; margin: -1px 0 -1px -4px; padding: 0 6px 0 4px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
152
- .ctx-fold:hover { background: var(--pill); }
153
- .ctx-fold .tw { display: inline-flex; width: 10px; flex: none; color: var(--faint); }
154
- .ctx-fold .tw svg { transition: transform .2s var(--ease, ease); }
155
- .ctx-card.shut .ctx-fold .tw svg { transform: rotate(-90deg); }
156
- .ctx-short { display: none; flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
157
- .ctx-card.shut .ctx-short { display: inline; }
158
- /* the padding is the open card's, so the title stays where it is when it
159
- opens and the page doesn't follow it (it moved 4px with a 10px one) */
160
- .ctx-card.shut > :not(.ctx-head) { display: none; }
161
- /* its head alone, the space under it is the space over it */
162
- .ctx-card.shut { padding-bottom: 14px; }
163
- /* folded, the head is one line of a fixed height whatever a live request
164
- puts in it, so nothing under it moves; a thin bar of what fills the
165
- window, a part each, takes the room between the figure and the model */
166
- .ctx-card.shut .ctx-head { height: 20px; white-space: nowrap; flex-wrap: nowrap; }
167
- /* folded, the bar takes the room and the model id gives it up first. A
168
- narrower card keeps the agent's icon alone, a narrow one no route and
169
- the state's dot without its word; only past that is the figure cut, so
170
- nothing is drawn over another */
171
- .ctx-card.shut .ctx-end { flex: 0 1 auto; }
172
- .ctx-card.shut.max520 :is(.ctx-who-n, .ctx-sep, .ctx-what) { display: none; }
173
- .ctx-card.shut.max420 .ctx-route { display: none; }
174
- .ctx-card.shut.max420 .ctx-end { flex: none; }
175
- .ctx-card.shut.max420 .ctx-state { padding: 0 7px; }
176
- .ctx-card.shut.max420 .ctx-state-w { display: none; }
177
- .ctx-card.shut.max420 .ctx-short { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
178
- .ctx-stack { display: none; flex: 1 1 0; min-width: 24px; max-width: 360px; height: 6px; border-radius: 3px; background: var(--k-free); overflow: hidden; }
179
- .ctx-card.shut .ctx-stack { display: flex; }
180
- .ctx-stack i { flex: none; height: 100%; background: var(--k); transition: width .3s var(--ease, ease); }
181
- @media (prefers-reduced-motion: reduce) { .ctx-stack i { transition: none; } }
182
-
183
- /* the Usage page's Context tab */
184
- .ctx-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; margin: 4px 0 18px; }
185
- .ctx-agent, .ctx-tune { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-variant-numeric: tabular-nums; }
186
- .ctx-agent-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
187
- .ctx-who-box { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
188
- .ctx-who-box .ctx-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
189
- .ctx-who-box .ctx-who .ic { width: 20px; height: 20px; flex: none; }
190
- .ctx-who-box .ctx-who b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
191
- .ctx-who-sub { font-size: 11px; color: var(--muted); }
192
- .ctx-grade { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
193
- .ctx-grade-word { font-size: 10.5px; font-weight: 600; }
194
- .ctx-ring { position: relative; width: 52px; height: 52px; --tone: var(--accent); }
195
- .ctx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
196
- .ctx-ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
197
- .ctx-ring .track { stroke: var(--k-free); }
198
- .ctx-ring .arc { stroke: var(--tone); stroke-dashoffset: var(--to); animation: ctx-arc .9s var(--ease, ease) backwards; }
199
- .ctx-pane.still .ctx-waffle > i, .ctx-pane.still .ctx-bar i, .ctx-pane.still .ctx-ring .arc { animation: none; }
200
- @keyframes ctx-arc { from { stroke-dashoffset: 163.36; } }
201
- .ctx-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
202
- .ctx-ring.great, .ctx-grade-word.great { --tone: var(--green); color: var(--green); }
203
- .ctx-ring.good, .ctx-grade-word.good { --tone: var(--c2); color: var(--c2); }
204
- .ctx-ring.fair, .ctx-grade-word.fair { --tone: var(--amber); color: var(--amber); }
205
- .ctx-ring.poor, .ctx-grade-word.poor { --tone: var(--red); color: var(--red); }
206
- /* colorblind mode turns --c2 amber, as fair's; good keeps a blue, its
207
- palette's --c1 (#2073) */
208
- :root[data-colorblind="1"] :is(.ctx-ring, .ctx-grade-word).good { --tone: var(--c1); color: var(--c1); }
209
- .ctx-ring b { color: var(--fg); }
210
- .ctx-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
211
- .ctx-score { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; color: var(--fg-2); cursor: default; }
212
- .ctx-score .ctx-bar { height: 4px; }
213
- .ctx-score .ctx-bar i { background: var(--green); }
214
- .ctx-score.warn .ctx-bar i { background: var(--amber); }
215
- .ctx-score.bad .ctx-bar i { background: var(--red); }
216
- .ctx-score .v { color: var(--muted); font-size: 10.5px; }
217
- .ctx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
218
- .ctx-tags:empty { display: none; }
219
- .ctx-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 500; background: var(--pill); color: var(--fg-2); cursor: default; }
220
- .ctx-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c7); }
221
- .ctx-chip.good { background: var(--green-soft); color: var(--green); }
222
- .ctx-chip.good i { background: var(--green); }
223
- .ctx-chip.warn { background: var(--amber-soft); color: var(--amber); }
224
- .ctx-chip.warn i { background: var(--amber); }
225
- .ctx-chip.info i { background: var(--accent); }
226
- .ctx-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
227
- .ctx-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: default; }
228
- .ctx-fact b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
229
- .ctx-fact .ctx-k { font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; display: block; }
230
- .ctx-mix { display: flex; flex-direction: column; gap: 6px; }
231
- .ctx-share { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--k-free); }
232
- .ctx-share i { display: block; min-width: 3px; background: var(--k); }
233
- .ctx-mix-keys { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 11px; color: var(--muted); }
234
- .ctx-mix-keys span { display: inline-flex; align-items: center; gap: 5px; }
235
- .ctx-agent-foot { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: auto; }
236
- .ctx-models { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
237
- .ctx-models code { font-family: var(--code-font, var(--code)); font-size: 10.5px; padding: 2px 6px; border-radius: 5px; background: var(--pill); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
238
- .ctx-agent-foot .text { flex: none; font-size: 11.5px; }
239
-
240
- .ctx-sess-head { margin-top: 6px; }
241
- .ctx-sess-head .segs .opt { height: 20px; padding: 0 9px; font-size: 11px; }
242
- .ctx-sess-list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
243
- .ctx-sess + .ctx-sess { border-top: 1px solid var(--line-2, var(--line)); }
244
- .ctx-sess-row { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 20px minmax(0, 1.3fr) minmax(80px, 1fr) 44px minmax(0, auto) 92px; align-items: center; gap: 12px; padding: 8px 14px; cursor: pointer; font-size: 12px; font-variant-numeric: tabular-nums; }
245
- .ctx-sess-row:hover { background: var(--pill); }
246
- .ctx-sess-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
247
- .ctx-sess-row .ic { width: 18px; height: 18px; }
248
- .ctx-sess-name { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
249
- .ctx-sess-name b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
250
- .ctx-sess-name b.raw { font-family: var(--code-font, var(--code)); font-weight: 500; letter-spacing: .02em; }
251
- .ctx-sess-name code { font-family: var(--code-font, var(--code)); font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
252
- .ctx-sess-row .ctx-spark { height: 24px; }
253
- .ctx-sess-peak { justify-self: end; font-weight: 600; }
254
- .ctx-sess-peak.ok { color: var(--green); }
255
- .ctx-sess-peak.warn { color: var(--amber); }
256
- .ctx-sess-peak.bad { color: var(--red); }
257
- .ctx-sess-meta, .ctx-sess-when { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
258
- .ctx-sess-when { text-align: right; }
259
- .ctx-sess.open { background: var(--card-2); }
260
- .ctx-sess.open > .ctx-card { margin: 0 12px 12px; }
261
- @media (max-width: 640px) {
262
- .ctx-sess-row { grid-template-columns: 20px minmax(0, 1fr) 64px 40px; }
263
- .ctx-sess-meta, .ctx-sess-when { display: none; }
264
- .ctx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
265
- .ctx-scores { grid-template-columns: 1fr; }
266
- .ctx-top { grid-template-columns: 1fr; }
267
- }
268
- .ctx-none { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 48px 16px; color: var(--muted); font-size: 12.5px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
269
- .ctx-none b { color: var(--fg); font-size: 13.5px; font-weight: 600; }
270
-
271
- @media (prefers-reduced-motion: reduce) {
272
- .ctx-waffle > i, .ctx-bar i, .ctx-ring .arc, .ctx-state.live i { animation: none; }
273
- .ctx-waffle > i { transition: none; }
274
- }
275
-
276
- /* Safari 15: no color-mix, so the free cells and the line's area are
277
- tinted by opacity */
278
- @supports not (color: color-mix(in srgb, red 50%, blue)) {
279
- :root { --k-free: rgba(128, 128, 128, .12); }
280
- i.dot.free { box-shadow: inset 0 0 0 1px var(--line); }
281
- .ctx-spark .area { fill: var(--k-chat); fill-opacity: .14; }
282
- .ctx-spark .hit:hover { fill: var(--line); }
283
- }
284
-
285
- /* tuned for you */
286
- .ctx-tune { gap: 10px; }
287
- .ctx-tune-total { font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-soft); border-radius: 11px; padding: 3px 10px; white-space: nowrap; }
288
- .ctx-tune-row { display: flex; flex-direction: column; gap: 10px; padding: 14px 0 4px; border-top: 1px solid var(--line); min-width: 0; }
289
- .ctx-tune-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
290
- .ctx-tune-title b { font-size: 13px; font-weight: 600; flex: none; }
291
- .ctx-tunes { align-items: start; }
292
- .ctx-tunes > :only-child { grid-column: 1 / -1; }
293
- .ctx-tune-title code { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
294
- .ctx-tune-vals { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
295
- .ctx-tune-val { display: flex; flex-direction: column; gap: 2px; flex: none; }
296
- .ctx-tune-val .ctx-k { font-size: 9.5px; }
297
- .ctx-tune-val b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
298
- .ctx-tune-val.now b { color: var(--fg-2); }
299
- .ctx-tune-row:not(.done) .ctx-tune-val.now b { text-decoration: line-through; text-decoration-color: var(--muted); text-decoration-thickness: 1px; color: var(--muted); }
300
- .ctx-tune-val.best b { color: var(--green); }
301
- .ctx-tune-arrow { color: var(--muted); font-size: 14px; padding-bottom: 3px; }
302
- .ctx-tune-chart { position: relative; height: 112px; margin: 2px 6px 0; cursor: default; }
303
- .ctx-tc-plot { position: absolute; inset: 0 0 18px; }
304
- .ctx-tc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
305
- .ctx-tune-chart .hot { stop-color: var(--red); stop-opacity: .32; }
306
- .ctx-tune-chart .cool { stop-color: var(--red); stop-opacity: .02; }
307
- .ctx-tune-chart .level { stroke: var(--green); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; opacity: .7; }
308
- .ctx-tune-chart .line { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
309
- .ctx-tc-plot svg { animation: ctx-draw 1s var(--ease, ease) backwards; }
310
- @keyframes ctx-draw { from { clip-path: inset(-20px 100% -20px 0); } to { clip-path: inset(-20px 0 -20px 0); } }
311
- @keyframes ctx-pop { from { opacity: 0; transform: scale(.4); } }
312
- .ctx-tc-dot { animation: ctx-pop .35s .8s var(--ease, ease) backwards; }
313
- .ctx-tc-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; border: 2px solid var(--card); box-sizing: border-box; }
314
- .ctx-tc-dot.now { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 22%, transparent); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
315
- .ctx-tc-dot.worst { background: color-mix(in srgb, var(--red) 55%, var(--card)); }
316
- .ctx-tc-dot.best { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent), 0 0 14px color-mix(in srgb, var(--green) 60%, transparent); width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
317
- .ctx-tc-tag { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--red); letter-spacing: -.01em; }
318
- .ctx-tc-dot.best .ctx-tc-tag { color: var(--green); }
319
- .ctx-tc-dot.worst .ctx-tc-tag { font-weight: 600; opacity: .8; }
320
- .ctx-tc-tag.start { left: -4px; transform: none; }
321
- .ctx-tc-tag.end { left: auto; right: -4px; transform: none; }
322
- .ctx-tc-x { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; font-size: 10px; color: var(--muted); }
323
- .ctx-tc-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
324
- .ctx-tc-x span.start { transform: none; margin-left: -6px; }
325
- .ctx-tc-x span.end { transform: translateX(-100%); margin-left: 6px; }
326
- .ctx-tc-x span.best { color: var(--green); font-weight: 600; }
327
- .ctx-tc-x span.now { color: var(--red); font-weight: 600; }
328
- .ctx-pane.tune-still .ctx-tune-chart :is(svg, .ctx-tc-dot) { animation: none; }
329
- @media (prefers-reduced-motion: reduce) { .ctx-tune-chart :is(svg, .ctx-tc-dot) { animation: none; } }
330
- .ctx-tune-note { padding: 0 4px 12px; }
331
- .ctx-tune-why { margin: 0; font-size: 12px; line-height: 1.5; color: var(--fg-2); }
332
- /* what the advice doesn't weigh (#1854), quieter than the facts it follows */
333
- .ctx-tune-caveat { margin: -4px 0 0; font-size: 11px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
334
- .ctx-tune-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
335
- .ctx-tune-src { font-size: 11px; color: var(--muted); margin-top: -7px; overflow-wrap: anywhere; }
336
- .ctx-tune-foot .grow { flex: 1; }
337
-
338
- /* a part, a cell or an item clicked opens its text (masaka on Discord) */
339
- .ctx-click { cursor: pointer; }
340
- .ctx-leg.ctx-click { border-radius: 5px; }
341
- .ctx-click:focus-visible { outline: 2px solid var(--accent, var(--fg)); outline-offset: 1px; }
342
- .ctx-waffle > i:not(.free) { cursor: pointer; }
343
- .modal .dialog.wide { width: min(880px, 100%); }
344
- .modal .editor.ctx-view { height: min(760px, calc(100vh - 80px)); }
345
- .modal .editor.ctx-view > .ehead { gap: 8px; }
346
- .modal .editor.ctx-view > .ehead b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
347
- .ctx-view-total { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
348
- .modal .editor.ctx-view > .ebody { display: block; }
349
- .ctx-view-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
350
- .ctx-view-note { margin: 0; font-size: 11.5px; color: var(--muted); }
351
- .ctx-view-wait, .ctx-view-gone { margin: 0; padding: 12px 0; font-size: 12px; color: var(--muted); }
352
- .ctx-vi-list { display: flex; flex-direction: column; gap: 2px; }
353
- .ctx-vi { min-width: 0; border-radius: 8px; }
354
- .ctx-vi.open { background: color-mix(in srgb, var(--fg) 3%, transparent); }
355
- .ctx-vi-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
356
- .ctx-vi-head:hover { background: var(--pill); }
357
- .ctx-vi-head .grow { flex: 1; }
358
- .ctx-vi-head .ctx-name { min-width: 0; }
359
- .ctx-vi-head .tw { display: inline-flex; width: 10px; flex: none; color: var(--faint); }
360
- .ctx-vi-head .tw svg { transform: rotate(-90deg); transition: transform .2s var(--ease, ease); }
361
- .ctx-vi.open > .ctx-vi-head .tw svg { transform: none; }
362
- .ctx-vi-text { display: flex; flex-direction: column; gap: 10px; padding: 4px 8px 10px 26px; min-width: 0; }
363
- .ctx-piece { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
364
- .ctx-piece-head { display: flex; align-items: center; gap: 6px; min-height: 22px; }
365
- .ctx-piece-head .grow { flex: 1; }
366
- .ctx-role { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
367
- .ctx-piece-name { font-family: var(--code-font, var(--code)); font-size: 11px; color: var(--fg-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
368
- .ctx-piece-note { font-size: 11.5px; color: var(--muted); }
369
- .ctx-text-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
370
- .ctx-text { margin: 0; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 6px; background: var(--pill); font-family: var(--code-font, var(--code)); font-size: 11.5px; line-height: 1.5; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
371
- .ctx-text-more[hidden] { display: none; }
372
- .ctx-view-all { margin-right: auto; }
373
-
374
- /* the window as a map (flohoeller's context map): each item a tile sized
375
- by its tokens inside its part's, the free space hatched. The tiles glide
376
- to their sizes as a live request grows; context.js lays them out */
377
- .ctx-viz { position: relative; }
378
- .ctx-viz[data-look="map"] > .ctx-waffle, .ctx-viz[data-look="grid"] > .ctx-map { display: none; }
379
- .ctx-map { position: relative; width: 100%; aspect-ratio: 3.1 / 1; min-height: 132px; max-height: 232px; margin: -1.5px 0; }
380
- :where(.ctx-card.max520) .ctx-map { aspect-ratio: 2 / 1; }
381
- .ctx-tile {
382
- --t-ease: cubic-bezier(.32, .72, 0, 1);
383
- position: absolute; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
384
- padding: 7px 9px; border-radius: 7px; cursor: pointer;
385
- background: color-mix(in srgb, var(--k) 11%, var(--card));
386
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 24%, transparent);
387
- transition: left .62s var(--t-ease), top .62s var(--t-ease), width .62s var(--t-ease), height .62s var(--t-ease),
388
- background-color .22s ease, box-shadow .22s ease, opacity .24s ease;
389
- }
390
- .ctx-tile .n { font-size: 11.5px; font-weight: 550; line-height: 1.25; color: color-mix(in srgb, var(--k) 72%, var(--fg)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
391
- .ctx-tile .v { font-size: 10.5px; line-height: 1.25; color: color-mix(in srgb, var(--k) 42%, var(--muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
392
- .ctx-tile.low { padding-top: 5px; padding-bottom: 5px; }
393
- .ctx-tile.low .v { display: none; }
394
- .ctx-tile.bare > * { visibility: hidden; }
395
- /* a bare tile can be slimmer than its padding: none, so it keeps to its place
396
- and the gap beside it (noahhrreion on Discord) */
397
- .ctx-tile.bare { padding: 0; }
398
- .ctx-tile:hover, .ctx-tile.on {
399
- background: color-mix(in srgb, var(--k) 19%, var(--card));
400
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 48%, transparent);
401
- }
402
- .ctx-tile.free {
403
- --k: var(--fg); cursor: default;
404
- background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--fg) 5.5%, transparent) 0 1px, transparent 1px 6px), color-mix(in srgb, var(--fg) 1.5%, var(--card));
405
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 9%, transparent);
406
- }
407
- .ctx-tile.free .n { color: var(--muted); font-weight: 500; }
408
- .ctx-tile.free .v { color: color-mix(in srgb, var(--muted) 78%, transparent); }
409
- .ctx-tile.gone { pointer-events: none; }
410
- .ctx-map[data-f] > .ctx-tile { opacity: .32; }
411
- .ctx-map[data-f="system"] > .k-system, .ctx-map[data-f="tools"] > .k-tools, .ctx-map[data-f="skills"] > .k-skills,
412
- .ctx-map[data-f="memory"] > .k-memory, .ctx-map[data-f="files"] > .k-files,
413
- .ctx-map[data-f="results"] > .k-results, .ctx-map[data-f="chat"] > .k-chat,
414
- .ctx-map[data-f="free"] > .free, .ctx-map[data-f="tile"] > .on { opacity: 1; }
415
- .ctx-pane.still .ctx-tile { transition: none; }
416
- @media (prefers-reduced-motion: reduce) { .ctx-tile { transition: background-color .2s, box-shadow .2s, opacity .2s; } }
417
- .ctx-tip-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
418
- .ctx-tip-sub { color: #a1a1aa; font-size: 11px; }
419
-
420
- /* the look: the map or the grid, the reader's pick */
421
- .ctx-look { display: inline-flex; gap: 2px; margin-left: auto; padding: 2px; border-radius: 7px; background: var(--pill); align-self: center; }
422
- .ctx-look-b { display: inline-grid; place-items: center; width: 24px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--faint); cursor: pointer; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
423
- .ctx-look-b svg { fill: currentColor; }
424
- .ctx-look-b:hover { color: var(--fg-2); }
425
- .ctx-look-b.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 .5px color-mix(in srgb, var(--fg) 10%, transparent); }
426
-
427
- /* an image the request carried, in its text */
428
- .ctx-pic { display: block; width: fit-content; max-width: 100%; margin: 4px 0 2px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--fg) 4%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 9%, transparent); cursor: zoom-in; transform-origin: top left; opacity: 0; transition: opacity .4s ease; }
429
- .ctx-pic.in { opacity: 1; }
430
- .ctx-pic img { display: block; max-width: min(100%, 420px); max-height: 240px; width: auto; height: auto; object-fit: contain; }
431
- .ctx-pic.open { cursor: zoom-out; }
432
- .ctx-pic.open img { max-width: 100%; max-height: none; }
433
- @media (prefers-reduced-motion: reduce) { .ctx-pic { transition: none; } }