dsh-mobile-plugin 0.5.28 → 0.5.29

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 (350) hide show
  1. package/extensions/catalog.json +10 -1
  2. package/extensions/magpie/agentcompact.js +104 -0
  3. package/extensions/magpie/app.css +4902 -0
  4. package/extensions/magpie/app.js +24474 -0
  5. package/extensions/magpie/autobackup.js +185 -0
  6. package/extensions/magpie/autoresetown.js +151 -0
  7. package/extensions/magpie/balfound.js +38 -0
  8. package/extensions/magpie/boot.js +23 -0
  9. package/extensions/magpie/cfgblocked.js +39 -0
  10. package/extensions/magpie/checkinnow.js +111 -0
  11. package/extensions/magpie/claudemode.js +92 -0
  12. package/extensions/magpie/compat.js +41 -0
  13. package/extensions/magpie/context.css +433 -0
  14. package/extensions/magpie/context.js +1576 -0
  15. package/extensions/magpie/ctxtext.js +223 -0
  16. package/extensions/magpie/fonts.js +42 -0
  17. package/extensions/magpie/i18n.js +18942 -0
  18. package/extensions/magpie/icons/ai21.svg +1 -0
  19. package/extensions/magpie/icons/ai302-color.svg +1 -0
  20. package/extensions/magpie/icons/ai360-color.svg +1 -0
  21. package/extensions/magpie/icons/aihubmix-color.svg +1 -0
  22. package/extensions/magpie/icons/aionui.svg +1 -0
  23. package/extensions/magpie/icons/air.svg +4 -0
  24. package/extensions/magpie/icons/alibaba-color.svg +1 -0
  25. package/extensions/magpie/icons/alibabacloud-color.svg +1 -0
  26. package/extensions/magpie/icons/alma.png +0 -0
  27. package/extensions/magpie/icons/anthropic.svg +1 -0
  28. package/extensions/magpie/icons/antigravity-color.svg +1 -0
  29. package/extensions/magpie/icons/anyscale-color.svg +1 -0
  30. package/extensions/magpie/icons/app-alma.png +0 -0
  31. package/extensions/magpie/icons/app-cc-switch.png +0 -0
  32. package/extensions/magpie/icons/apple-touch-icon.png +0 -0
  33. package/extensions/magpie/icons/aside.svg +28 -0
  34. package/extensions/magpie/icons/astrbot.svg +1 -0
  35. package/extensions/magpie/icons/atomcode.png +0 -0
  36. package/extensions/magpie/icons/aws.svg +1 -0
  37. package/extensions/magpie/icons/azure-color.svg +1 -0
  38. package/extensions/magpie/icons/azureai-color.svg +1 -0
  39. package/extensions/magpie/icons/baichuan-color.svg +1 -0
  40. package/extensions/magpie/icons/baidu-color.svg +1 -0
  41. package/extensions/magpie/icons/baiducloud-color.svg +1 -0
  42. package/extensions/magpie/icons/bailian-color.svg +1 -0
  43. package/extensions/magpie/icons/baseten.svg +1 -0
  44. package/extensions/magpie/icons/bedrock-color.svg +1 -0
  45. package/extensions/magpie/icons/burncloud-color.svg +1 -0
  46. package/extensions/magpie/icons/bytedance-color.svg +1 -0
  47. package/extensions/magpie/icons/cerebras.svg +1 -0
  48. package/extensions/magpie/icons/chatglm-color.svg +1 -0
  49. package/extensions/magpie/icons/cherryin-color.svg +1 -0
  50. package/extensions/magpie/icons/chutes.svg +1 -0
  51. package/extensions/magpie/icons/cindy.png +0 -0
  52. package/extensions/magpie/icons/claude-color.svg +1 -0
  53. package/extensions/magpie/icons/claudecode-color.svg +1 -0
  54. package/extensions/magpie/icons/cline.svg +1 -0
  55. package/extensions/magpie/icons/cloudflare-color.svg +1 -0
  56. package/extensions/magpie/icons/codebuddy-color.svg +1 -0
  57. package/extensions/magpie/icons/codex-color.svg +1 -0
  58. package/extensions/magpie/icons/cohere-color.svg +1 -0
  59. package/extensions/magpie/icons/cometapi-color.svg +1 -0
  60. package/extensions/magpie/icons/commandcode.svg +1 -0
  61. package/extensions/magpie/icons/copilot-color.svg +1 -0
  62. package/extensions/magpie/icons/coze.svg +1 -0
  63. package/extensions/magpie/icons/crush.png +0 -0
  64. package/extensions/magpie/icons/curl.svg +1 -0
  65. package/extensions/magpie/icons/cursor.svg +1 -0
  66. package/extensions/magpie/icons/deepinfra-color.svg +1 -0
  67. package/extensions/magpie/icons/deepmind-color.svg +1 -0
  68. package/extensions/magpie/icons/deepseek-color.svg +1 -0
  69. package/extensions/magpie/icons/deveco-color.svg +12 -0
  70. package/extensions/magpie/icons/devin.svg +1 -0
  71. package/extensions/magpie/icons/doubao-color.svg +1 -0
  72. package/extensions/magpie/icons/empryo-color.svg +1 -0
  73. package/extensions/magpie/icons/factory.svg +1 -0
  74. package/extensions/magpie/icons/favicon.svg +1 -0
  75. package/extensions/magpie/icons/featherless-color.svg +1 -0
  76. package/extensions/magpie/icons/fireworks-color.svg +1 -0
  77. package/extensions/magpie/icons/friendli.svg +1 -0
  78. package/extensions/magpie/icons/fx.svg +1 -0
  79. package/extensions/magpie/icons/gemini-color.svg +1 -0
  80. package/extensions/magpie/icons/geminicli-color.svg +1 -0
  81. package/extensions/magpie/icons/gemma-color.svg +1 -0
  82. package/extensions/magpie/icons/giteeai.svg +1 -0
  83. package/extensions/magpie/icons/github.svg +1 -0
  84. package/extensions/magpie/icons/githubcopilot.svg +1 -0
  85. package/extensions/magpie/icons/glama.svg +1 -0
  86. package/extensions/magpie/icons/gmicloud.svg +1 -0
  87. package/extensions/magpie/icons/google-color.svg +1 -0
  88. package/extensions/magpie/icons/googlecloud-color.svg +1 -0
  89. package/extensions/magpie/icons/goose.svg +1 -0
  90. package/extensions/magpie/icons/grok.svg +1 -0
  91. package/extensions/magpie/icons/groq.svg +1 -0
  92. package/extensions/magpie/icons/hanako.png +0 -0
  93. package/extensions/magpie/icons/hermes.svg +1 -0
  94. package/extensions/magpie/icons/huawei-color.svg +1 -0
  95. package/extensions/magpie/icons/huaweicloud-color.svg +1 -0
  96. package/extensions/magpie/icons/huggingface-color.svg +1 -0
  97. package/extensions/magpie/icons/hunyuan-color.svg +1 -0
  98. package/extensions/magpie/icons/hyperbolic-color.svg +1 -0
  99. package/extensions/magpie/icons/icon-512.png +0 -0
  100. package/extensions/magpie/icons/iflytekcloud-color.svg +1 -0
  101. package/extensions/magpie/icons/inference.svg +1 -0
  102. package/extensions/magpie/icons/infinigence-color.svg +1 -0
  103. package/extensions/magpie/icons/internlm-color.svg +1 -0
  104. package/extensions/magpie/icons/jcode.svg +1 -0
  105. package/extensions/magpie/icons/jina.svg +1 -0
  106. package/extensions/magpie/icons/kilo.svg +1 -0
  107. package/extensions/magpie/icons/kilocode.svg +1 -0
  108. package/extensions/magpie/icons/kimi-code-desktop.png +0 -0
  109. package/extensions/magpie/icons/kimi.svg +1 -0
  110. package/extensions/magpie/icons/kiro-color.svg +1 -0
  111. package/extensions/magpie/icons/kling-color.svg +1 -0
  112. package/extensions/magpie/icons/lambda.svg +1 -0
  113. package/extensions/magpie/icons/leptonai-color.svg +1 -0
  114. package/extensions/magpie/icons/liquid.svg +1 -0
  115. package/extensions/magpie/icons/liveagent-color.svg +1 -0
  116. package/extensions/magpie/icons/llmapi.svg +1 -0
  117. package/extensions/magpie/icons/lmstudio.svg +1 -0
  118. package/extensions/magpie/icons/lody.png +0 -0
  119. package/extensions/magpie/icons/longcat.svg +1 -0
  120. package/extensions/magpie/icons/magpie.svg +1 -0
  121. package/extensions/magpie/icons/meta-color.svg +1 -0
  122. package/extensions/magpie/icons/metaai-color.svg +1 -0
  123. package/extensions/magpie/icons/microsoft-color.svg +1 -0
  124. package/extensions/magpie/icons/mimocode.svg +1 -0
  125. package/extensions/magpie/icons/minimax-color.svg +1 -0
  126. package/extensions/magpie/icons/mistermorph-color.svg +1 -0
  127. package/extensions/magpie/icons/mistral-color.svg +1 -0
  128. package/extensions/magpie/icons/mlx-serve.png +0 -0
  129. package/extensions/magpie/icons/modelscope-color.svg +1 -0
  130. package/extensions/magpie/icons/monica-color.svg +1 -0
  131. package/extensions/magpie/icons/moonshot.svg +1 -0
  132. package/extensions/magpie/icons/morph-color.svg +1 -0
  133. package/extensions/magpie/icons/mothx.png +0 -0
  134. package/extensions/magpie/icons/nebius.svg +1 -0
  135. package/extensions/magpie/icons/newapi-color.svg +1 -0
  136. package/extensions/magpie/icons/nousresearch.svg +1 -0
  137. package/extensions/magpie/icons/nova-color.svg +1 -0
  138. package/extensions/magpie/icons/novita-color.svg +1 -0
  139. package/extensions/magpie/icons/nvidia-color.svg +1 -0
  140. package/extensions/magpie/icons/ollama.svg +1 -0
  141. package/extensions/magpie/icons/omlx.svg +1 -0
  142. package/extensions/magpie/icons/omo.svg +1 -0
  143. package/extensions/magpie/icons/omp.svg +1 -0
  144. package/extensions/magpie/icons/openai.svg +1 -0
  145. package/extensions/magpie/icons/openchamber.svg +11 -0
  146. package/extensions/magpie/icons/openclaw.svg +1 -0
  147. package/extensions/magpie/icons/opencode.svg +1 -0
  148. package/extensions/magpie/icons/openmausbot.svg +1 -0
  149. package/extensions/magpie/icons/openrouter.svg +1 -0
  150. package/extensions/magpie/icons/openwebui.svg +1 -0
  151. package/extensions/magpie/icons/parasail.svg +1 -0
  152. package/extensions/magpie/icons/penguin-color.svg +1 -0
  153. package/extensions/magpie/icons/perplexity-color.svg +1 -0
  154. package/extensions/magpie/icons/phala-color.svg +1 -0
  155. package/extensions/magpie/icons/pi.svg +1 -0
  156. package/extensions/magpie/icons/pipellm-color.svg +5 -0
  157. package/extensions/magpie/icons/poe.svg +1 -0
  158. package/extensions/magpie/icons/ppio-color.svg +1 -0
  159. package/extensions/magpie/icons/prime-agent.svg +1 -0
  160. package/extensions/magpie/icons/qiniu-color.svg +1 -0
  161. package/extensions/magpie/icons/qoder.svg +1 -0
  162. package/extensions/magpie/icons/qwen-color.svg +1 -0
  163. package/extensions/magpie/icons/qwenpaw.svg +1 -0
  164. package/extensions/magpie/icons/raycast.svg +1 -0
  165. package/extensions/magpie/icons/reasonix-color.svg +48 -0
  166. package/extensions/magpie/icons/reka.svg +1 -0
  167. package/extensions/magpie/icons/replicate.svg +1 -0
  168. package/extensions/magpie/icons/roocode.svg +1 -0
  169. package/extensions/magpie/icons/rtk.png +0 -0
  170. package/extensions/magpie/icons/sambanova-color.svg +1 -0
  171. package/extensions/magpie/icons/sensenova-color.svg +1 -0
  172. package/extensions/magpie/icons/siliconcloud-color.svg +1 -0
  173. package/extensions/magpie/icons/snow.png +0 -0
  174. package/extensions/magpie/icons/snowflake-color.svg +1 -0
  175. package/extensions/magpie/icons/sophnet-color.svg +1 -0
  176. package/extensions/magpie/icons/spark-color.svg +1 -0
  177. package/extensions/magpie/icons/stepfun-color.svg +1 -0
  178. package/extensions/magpie/icons/straico-color.svg +1 -0
  179. package/extensions/magpie/icons/submodel-color.svg +1 -0
  180. package/extensions/magpie/icons/t3code.svg +4 -0
  181. package/extensions/magpie/icons/targon-color.svg +1 -0
  182. package/extensions/magpie/icons/tencent-color.svg +1 -0
  183. package/extensions/magpie/icons/tencentcloud-color.svg +1 -0
  184. package/extensions/magpie/icons/tiangong-color.svg +1 -0
  185. package/extensions/magpie/icons/together-color.svg +1 -0
  186. package/extensions/magpie/icons/trae.svg +1 -0
  187. package/extensions/magpie/icons/typesafe.png +0 -0
  188. package/extensions/magpie/icons/upstage-color.svg +1 -0
  189. package/extensions/magpie/icons/venice-color.svg +1 -0
  190. package/extensions/magpie/icons/vercel.svg +1 -0
  191. package/extensions/magpie/icons/vertexai-color.svg +1 -0
  192. package/extensions/magpie/icons/vllm-color.svg +1 -0
  193. package/extensions/magpie/icons/volcengine-color.svg +1 -0
  194. package/extensions/magpie/icons/voyage-color.svg +1 -0
  195. package/extensions/magpie/icons/vscode.svg +1 -0
  196. package/extensions/magpie/icons/wenxin-color.svg +1 -0
  197. package/extensions/magpie/icons/windsurf.svg +1 -0
  198. package/extensions/magpie/icons/workbuddy-color.svg +1 -0
  199. package/extensions/magpie/icons/workersai-color.svg +1 -0
  200. package/extensions/magpie/icons/xai.svg +1 -0
  201. package/extensions/magpie/icons/xiaomimimo.svg +1 -0
  202. package/extensions/magpie/icons/xinference-color.svg +1 -0
  203. package/extensions/magpie/icons/yi.svg +1 -0
  204. package/extensions/magpie/icons/yuanbao-color.svg +1 -0
  205. package/extensions/magpie/icons/yylx.svg +5 -0
  206. package/extensions/magpie/icons/zai.svg +1 -0
  207. package/extensions/magpie/icons/zcode.png +0 -0
  208. package/extensions/magpie/icons/zed.svg +1 -0
  209. package/extensions/magpie/icons/zenmux.svg +1 -0
  210. package/extensions/magpie/icons/zeroone.svg +1 -0
  211. package/extensions/magpie/icons/zhipu-color.svg +1 -0
  212. package/extensions/magpie/icons/zoo-code.png +0 -0
  213. package/extensions/magpie/index.html +572 -0
  214. package/extensions/magpie/kernel.js +274 -0
  215. package/extensions/magpie/keyspend.js +63 -0
  216. package/extensions/magpie/layout.js +26 -0
  217. package/extensions/magpie/manifest.json +37 -0
  218. package/extensions/magpie/navlamp.js +47 -0
  219. package/extensions/magpie/omarchy.css +72 -0
  220. package/extensions/magpie/omarchy.js +46 -0
  221. package/extensions/magpie/passerrors.js +21 -0
  222. package/extensions/magpie/pluginpages.js +405 -0
  223. package/extensions/magpie/plugins/gateway/client.js +1194 -0
  224. package/extensions/magpie/plugins/gateway/keys.js +972 -0
  225. package/extensions/magpie/plugins/gateway/settings.js +459 -0
  226. package/extensions/magpie/plugins/library/client.js +6788 -0
  227. package/extensions/magpie/plugins/library/i18n.js +3228 -0
  228. package/extensions/magpie/plugins/library/library.css +848 -0
  229. package/extensions/magpie/plugins/otel/i18n.js +48 -0
  230. package/extensions/magpie/plugins/otel/page.js +189 -0
  231. package/extensions/magpie/plugins/redact/client.js +46 -0
  232. package/extensions/magpie/plugins/redact/demo.js +461 -0
  233. package/extensions/magpie/plugins/redact/i18n.js +432 -0
  234. package/extensions/magpie/plugins/redact/page.js +985 -0
  235. package/extensions/magpie/plugins/redact/redact.css +385 -0
  236. package/extensions/magpie/plugins/redact/settings.js +248 -0
  237. package/extensions/magpie/plugins/redact/xq_dark.jpg +0 -0
  238. package/extensions/magpie/plugins/redact/xq_dark.webm +0 -0
  239. package/extensions/magpie/plugins/redact/xq_light.jpg +0 -0
  240. package/extensions/magpie/plugins/redact/xq_light.webm +0 -0
  241. package/extensions/magpie/plugins/routing/client.js +8593 -0
  242. package/extensions/magpie/plugins/routing/i18n.js +2696 -0
  243. package/extensions/magpie/plugins/routing/routing.css +1111 -0
  244. package/extensions/magpie/plugins/search/settings.js +460 -0
  245. package/extensions/magpie/plugins/sessions/client.js +1622 -0
  246. package/extensions/magpie/plugins/sessions/i18n.js +360 -0
  247. package/extensions/magpie/plugins/sessions/sessions.css +181 -0
  248. package/extensions/magpie/plugins/sessions/settings.js +100 -0
  249. package/extensions/magpie/plugins/usage/client.js +150 -0
  250. package/extensions/magpie/plugins/usage/i18n.js +984 -0
  251. package/extensions/magpie/plugins/usage/page.js +4307 -0
  252. package/extensions/magpie/plugins.css +319 -0
  253. package/extensions/magpie/plugins.js +1926 -0
  254. package/extensions/magpie/profilerename.js +27 -0
  255. package/extensions/magpie/purposes.js +2 -0
  256. package/extensions/magpie/quitask.js +79 -0
  257. package/extensions/magpie/quotaall.js +142 -0
  258. package/extensions/magpie/ratewindows.js +123 -0
  259. package/extensions/magpie/registry.js +87 -0
  260. package/extensions/magpie/resetask.js +137 -0
  261. package/extensions/magpie/ruleedit.js +53 -0
  262. package/extensions/magpie/scrollends.js +91 -0
  263. package/extensions/magpie/settingshints.js +75 -0
  264. package/extensions/magpie/signsheets.js +86 -0
  265. package/extensions/magpie/start.js +26 -0
  266. package/extensions/magpie/syncfiles.js +216 -0
  267. package/extensions/magpie/theme.js +29 -0
  268. package/extensions/magpie/traywindows.js +41 -0
  269. package/extensions/magpie/webfonts.js +130 -0
  270. package/extensions/magpie/whatsnew.js +252 -0
  271. package/extensions/magpie.zip +0 -0
  272. package/knowledge/apps/baijiahao.md +30 -0
  273. package/knowledge/apps/bilibili.md +1 -0
  274. package/knowledge/apps/dedao.md +33 -0
  275. package/knowledge/apps/feishu.md +35 -0
  276. package/knowledge/apps/gmail.md +33 -0
  277. package/knowledge/apps/jike.md +31 -0
  278. package/knowledge/apps/kuaishou.md +34 -0
  279. package/knowledge/apps/linkedin.md +33 -0
  280. package/knowledge/apps/qqmail.md +30 -0
  281. package/knowledge/apps/telegram.md +27 -0
  282. package/knowledge/apps/toutiao.md +32 -0
  283. package/knowledge/apps/uber-eats.md +26 -0
  284. package/knowledge/apps/uber.md +27 -0
  285. package/knowledge/apps/whatsapp.md +27 -0
  286. package/knowledge/apps/x.md +32 -0
  287. package/knowledge/apps/xiaohongshu.md +1 -0
  288. package/knowledge/apps/zhihu.md +1 -0
  289. package/knowledge/sites/bilibili.com/SITE.md +50 -0
  290. package/knowledge/sites/bilibili.com/references/view-fields.md +17 -0
  291. package/knowledge/sites/github.com/SITE.md +51 -0
  292. package/knowledge/sites/github.com/references/repo-fields.md +13 -0
  293. package/knowledge/sites/x.com/SITE.md +47 -0
  294. package/knowledge/sites/xiaohongshu.com/SITE.md +48 -0
  295. package/knowledge/sites/xiaohongshu.com/references/note-fields.md +18 -0
  296. package/knowledge/sites/youtube.com/SITE.md +49 -0
  297. package/knowledge/sites/youtube.com/references/innertube-fields.md +14 -0
  298. package/knowledge/sites/zhihu.com/SITE.md +47 -0
  299. package/knowledge/sites/zhihu.com/references/api-fields.md +21 -0
  300. package/lib/mobile/extension-catalog.js +41 -1
  301. package/lib/mobile/extension-data.js +224 -0
  302. package/lib/mobile/extension-dev.js +3 -1
  303. package/lib/mobile/file-ops.js +252 -0
  304. package/lib/mobile/history-derive.js +80 -4
  305. package/lib/mobile/host-bridge/endpoints.js +48 -6
  306. package/lib/mobile/host-bridge/event-synthesis.js +33 -6
  307. package/lib/mobile/jobs-control.js +118 -0
  308. package/lib/mobile/memory.js +635 -0
  309. package/lib/mobile/model-badges.js +77 -0
  310. package/lib/mobile/pet-tools.js +50 -4
  311. package/lib/mobile/pets.js +214 -18
  312. package/lib/mobile/phone/access.js +85 -0
  313. package/lib/mobile/phone/evidence.js +228 -0
  314. package/lib/mobile/phone/gate.js +290 -0
  315. package/lib/mobile/phone/grounding.js +314 -0
  316. package/lib/mobile/phone/guard.js +465 -0
  317. package/lib/mobile/phone/irreversible.js +88 -8
  318. package/lib/mobile/phone/knowledge-tools.js +665 -0
  319. package/lib/mobile/phone/learn.js +329 -0
  320. package/lib/mobile/phone/redact.js +237 -0
  321. package/lib/mobile/phone/risk.js +95 -0
  322. package/lib/mobile/phone/routes.js +28 -1
  323. package/lib/mobile/phone/service.js +23 -0
  324. package/lib/mobile/phone/site-commands.js +271 -0
  325. package/lib/mobile/phone/step-summary.js +201 -0
  326. package/lib/mobile/phone/stop-summary.js +235 -0
  327. package/lib/mobile/phone/tool-groups.js +125 -0
  328. package/lib/mobile/phone/tools.js +589 -0
  329. package/lib/mobile/phone/untrusted.js +65 -0
  330. package/lib/mobile/phone-knowledge.js +20 -4
  331. package/lib/mobile/schedule-edit.js +500 -0
  332. package/lib/mobile/schedule.js +5 -0
  333. package/lib/mobile/send-continuation.js +52 -0
  334. package/lib/mobile/session-models.js +27 -31
  335. package/lib/mobile/session-send.js +12 -12
  336. package/lib/mobile/skill-import.js +338 -0
  337. package/lib/mobile/skill-store.js +524 -0
  338. package/lib/routes/mobile-api.js +42 -0
  339. package/package.json +7 -6
  340. package/skills/skill-authoring/SKILL.md +46 -0
  341. package/skills/skill-authoring/references/examples.md +82 -0
  342. package/skills/skill-authoring/references/frontmatter-and-fields.md +46 -0
  343. package/skills/skill-authoring/scripts/check_skill.py +167 -0
  344. package/skills/skill-authoring/scripts/manifest.json +3 -0
  345. package/knowledge/sites/bilibili.com.md +0 -27
  346. package/knowledge/sites/github.com.md +0 -27
  347. package/knowledge/sites/x.com.md +0 -28
  348. package/knowledge/sites/xiaohongshu.com.md +0 -27
  349. package/knowledge/sites/youtube.com.md +0 -28
  350. package/knowledge/sites/zhihu.com.md +0 -27
@@ -0,0 +1,41 @@
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 });
@@ -0,0 +1,433 @@
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; } }