@yuhuanowo/yunui 0.2.16 → 0.2.18

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 (455) hide show
  1. package/README.md +13 -2
  2. package/README.zh-CN.md +14 -1
  3. package/README.zh-TW.md +14 -1
  4. package/dist/ai.d.ts +191 -7
  5. package/dist/ai.js +662 -168
  6. package/dist/ai.js.map +1 -1
  7. package/dist/chat.d.ts +31 -5
  8. package/dist/chat.js +71 -13
  9. package/dist/chat.js.map +1 -1
  10. package/dist/{chunk-5E3O6ANF.js → chunk-AFVENY4D.js} +386 -74
  11. package/dist/chunk-AFVENY4D.js.map +1 -0
  12. package/dist/{chunk-GSPJ5YI6.js → chunk-GAXVET76.js} +36 -24
  13. package/dist/chunk-GAXVET76.js.map +1 -0
  14. package/dist/{chunk-UYYG4XDW.js → chunk-LEBQPP4B.js} +80 -7
  15. package/dist/chunk-LEBQPP4B.js.map +1 -0
  16. package/dist/chunk-ST6TSBVQ.js +208 -0
  17. package/dist/chunk-ST6TSBVQ.js.map +1 -0
  18. package/dist/chunk-V7VJKZ5Q.js +254 -0
  19. package/dist/chunk-V7VJKZ5Q.js.map +1 -0
  20. package/dist/{chunk-5TOGZTAO.js → chunk-YKWRCA2S.js} +184 -208
  21. package/dist/chunk-YKWRCA2S.js.map +1 -0
  22. package/dist/content.d.ts +48 -6
  23. package/dist/content.js +233 -49
  24. package/dist/content.js.map +1 -1
  25. package/dist/index.d.ts +319 -22
  26. package/dist/index.js +4 -4
  27. package/dist/patterns.d.ts +557 -25
  28. package/dist/patterns.js +1076 -186
  29. package/dist/patterns.js.map +1 -1
  30. package/icons/apps/aistudio.webp +0 -0
  31. package/icons/apps/application.png +0 -0
  32. package/icons/apps/baixiaoying.webp +0 -0
  33. package/icons/apps/coze.webp +0 -0
  34. package/icons/apps/dify.webp +0 -0
  35. package/icons/apps/doubao.webp +0 -0
  36. package/icons/apps/flowith.webp +0 -0
  37. package/icons/apps/gemini.webp +0 -0
  38. package/icons/apps/github-copilot.webp +0 -0
  39. package/icons/apps/google.webp +0 -0
  40. package/icons/apps/grok.webp +0 -0
  41. package/icons/apps/kimi.webp +0 -0
  42. package/icons/apps/longcat.webp +0 -0
  43. package/icons/apps/metaso.webp +0 -0
  44. package/icons/apps/monica.webp +0 -0
  45. package/icons/apps/n8n.webp +0 -0
  46. package/icons/apps/nm-search.webp +0 -0
  47. package/icons/apps/notebooklm.webp +0 -0
  48. package/icons/apps/perplexity.webp +0 -0
  49. package/icons/apps/poe.webp +0 -0
  50. package/icons/apps/qingyan.webp +0 -0
  51. package/icons/apps/stepfun.webp +0 -0
  52. package/icons/apps/tiangong.webp +0 -0
  53. package/icons/apps/xiaoyi.webp +0 -0
  54. package/icons/apps/yuanbao.webp +0 -0
  55. package/icons/apps/zai.webp +0 -0
  56. package/icons/models/ai21.webp +0 -0
  57. package/icons/models/aimass.webp +0 -0
  58. package/icons/models/anthropic.webp +0 -0
  59. package/icons/models/baichuan.webp +0 -0
  60. package/icons/models/byte_dance.webp +0 -0
  61. package/icons/models/chatglm.webp +0 -0
  62. package/icons/models/claude.webp +0 -0
  63. package/icons/models/codegeex.webp +0 -0
  64. package/icons/models/cogview3flash.webp +0 -0
  65. package/icons/models/cohere.webp +0 -0
  66. package/icons/models/copilot.webp +0 -0
  67. package/icons/models/dalle.webp +0 -0
  68. package/icons/models/dbrx.webp +0 -0
  69. package/icons/models/deepseek.webp +0 -0
  70. package/icons/models/doubao.webp +0 -0
  71. package/icons/models/flux.webp +0 -0
  72. package/icons/models/gemini.webp +0 -0
  73. package/icons/models/gemma.webp +0 -0
  74. package/icons/models/google.webp +0 -0
  75. package/icons/models/grok.webp +0 -0
  76. package/icons/models/hailuo.webp +0 -0
  77. package/icons/models/huggingface.webp +0 -0
  78. package/icons/models/hunyuan.webp +0 -0
  79. package/icons/models/ibm.webp +0 -0
  80. package/icons/models/ideogram.webp +0 -0
  81. package/icons/models/internlm.webp +0 -0
  82. package/icons/models/jina.webp +0 -0
  83. package/icons/models/llava.webp +0 -0
  84. package/icons/models/luma.webp +0 -0
  85. package/icons/models/magic.webp +0 -0
  86. package/icons/models/microsoft.webp +0 -0
  87. package/icons/models/midjourney.webp +0 -0
  88. package/icons/models/minimax.webp +0 -0
  89. package/icons/models/mistral.webp +0 -0
  90. package/icons/models/moonshot.webp +0 -0
  91. package/icons/models/nousresearch.webp +0 -0
  92. package/icons/models/nvidia.webp +0 -0
  93. package/icons/models/o3.webp +0 -0
  94. package/icons/models/openai.webp +0 -0
  95. package/icons/models/palm.webp +0 -0
  96. package/icons/models/perplexity.webp +0 -0
  97. package/icons/models/qwen.webp +0 -0
  98. package/icons/models/stability.webp +0 -0
  99. package/icons/models/step.webp +0 -0
  100. package/icons/models/suno.webp +0 -0
  101. package/icons/models/upstage.webp +0 -0
  102. package/icons/models/vidu.webp +0 -0
  103. package/icons/models/volcengine.webp +0 -0
  104. package/icons/models/voyageai.webp +0 -0
  105. package/icons/models/wenxin.webp +0 -0
  106. package/icons/models/xirang.png +0 -0
  107. package/icons/models/xirang_dark.png +0 -0
  108. package/icons/models/yi.webp +0 -0
  109. package/icons/models/zai.webp +0 -0
  110. package/icons/models/zero-one.webp +0 -0
  111. package/icons/models/zhipu.webp +0 -0
  112. package/icons/providers/302ai.webp +0 -0
  113. package/icons/providers/DMXAPI-to-img.webp +0 -0
  114. package/icons/providers/Tesseract.js.png +0 -0
  115. package/icons/providers/ace.webp +0 -0
  116. package/icons/providers/adobe.webp +0 -0
  117. package/icons/providers/adobefirefly.webp +0 -0
  118. package/icons/providers/agentvoice.webp +0 -0
  119. package/icons/providers/agui.webp +0 -0
  120. package/icons/providers/ai2.webp +0 -0
  121. package/icons/providers/ai21.webp +0 -0
  122. package/icons/providers/ai302.webp +0 -0
  123. package/icons/providers/ai360.webp +0 -0
  124. package/icons/providers/aiOnly.webp +0 -0
  125. package/icons/providers/aihubmix.webp +0 -0
  126. package/icons/providers/aimass.webp +0 -0
  127. package/icons/providers/aionlabs.webp +0 -0
  128. package/icons/providers/airjelly.webp +0 -0
  129. package/icons/providers/aistudio.webp +0 -0
  130. package/icons/providers/akashchat.webp +0 -0
  131. package/icons/providers/alephalpha.webp +0 -0
  132. package/icons/providers/alibaba.webp +0 -0
  133. package/icons/providers/alibabacloud.webp +0 -0
  134. package/icons/providers/amp.webp +0 -0
  135. package/icons/providers/antgroup.webp +0 -0
  136. package/icons/providers/anthropic.webp +0 -0
  137. package/icons/providers/antigravity.webp +0 -0
  138. package/icons/providers/anyscale.webp +0 -0
  139. package/icons/providers/apertis.webp +0 -0
  140. package/icons/providers/apple.webp +0 -0
  141. package/icons/providers/arcee.webp +0 -0
  142. package/icons/providers/askverdict.webp +0 -0
  143. package/icons/providers/assemblyai.webp +0 -0
  144. package/icons/providers/atlascloud.webp +0 -0
  145. package/icons/providers/automatic.webp +0 -0
  146. package/icons/providers/aws-bedrock.webp +0 -0
  147. package/icons/providers/aws.webp +0 -0
  148. package/icons/providers/aya.webp +0 -0
  149. package/icons/providers/azure.webp +0 -0
  150. package/icons/providers/azureai.webp +0 -0
  151. package/icons/providers/baai.webp +0 -0
  152. package/icons/providers/baichuan.webp +0 -0
  153. package/icons/providers/baidu-cloud.webp +0 -0
  154. package/icons/providers/baidu.webp +0 -0
  155. package/icons/providers/baiducloud.webp +0 -0
  156. package/icons/providers/bailian.webp +0 -0
  157. package/icons/providers/baseten.webp +0 -0
  158. package/icons/providers/bedrock.webp +0 -0
  159. package/icons/providers/bfl.webp +0 -0
  160. package/icons/providers/bigModel.webp +0 -0
  161. package/icons/providers/bilibili.webp +0 -0
  162. package/icons/providers/bilibiliindex.webp +0 -0
  163. package/icons/providers/bing.webp +0 -0
  164. package/icons/providers/briaai.webp +0 -0
  165. package/icons/providers/burncloud.webp +0 -0
  166. package/icons/providers/bytedance.webp +0 -0
  167. package/icons/providers/capcut.webp +0 -0
  168. package/icons/providers/centml.webp +0 -0
  169. package/icons/providers/cephalon.jpeg +0 -0
  170. package/icons/providers/cerebras.webp +0 -0
  171. package/icons/providers/chatglm.webp +0 -0
  172. package/icons/providers/cherryin.png +0 -0
  173. package/icons/providers/cherrystudio.webp +0 -0
  174. package/icons/providers/civitai.webp +0 -0
  175. package/icons/providers/claude.webp +0 -0
  176. package/icons/providers/claudecode.webp +0 -0
  177. package/icons/providers/cline.webp +0 -0
  178. package/icons/providers/clipdrop.webp +0 -0
  179. package/icons/providers/cloudflare.webp +0 -0
  180. package/icons/providers/codebuddy.webp +0 -0
  181. package/icons/providers/codeflicker.webp +0 -0
  182. package/icons/providers/codegeex.webp +0 -0
  183. package/icons/providers/codex.webp +0 -0
  184. package/icons/providers/cogvideo.webp +0 -0
  185. package/icons/providers/cogview.webp +0 -0
  186. package/icons/providers/cogview3flash.webp +0 -0
  187. package/icons/providers/cohere.webp +0 -0
  188. package/icons/providers/colab.webp +0 -0
  189. package/icons/providers/cometapi.webp +0 -0
  190. package/icons/providers/comfyui.webp +0 -0
  191. package/icons/providers/commanda.webp +0 -0
  192. package/icons/providers/copilot.webp +0 -0
  193. package/icons/providers/copilotkit.webp +0 -0
  194. package/icons/providers/coqui.webp +0 -0
  195. package/icons/providers/coze.webp +0 -0
  196. package/icons/providers/crewai.webp +0 -0
  197. package/icons/providers/crusoe.webp +0 -0
  198. package/icons/providers/cursor.webp +0 -0
  199. package/icons/providers/cybercut.webp +0 -0
  200. package/icons/providers/dalle.webp +0 -0
  201. package/icons/providers/dbrx.webp +0 -0
  202. package/icons/providers/deepai.webp +0 -0
  203. package/icons/providers/deepcogito.webp +0 -0
  204. package/icons/providers/deepinfra.webp +0 -0
  205. package/icons/providers/deepl.webp +0 -0
  206. package/icons/providers/deepmind.webp +0 -0
  207. package/icons/providers/deepseek.webp +0 -0
  208. package/icons/providers/devin.webp +0 -0
  209. package/icons/providers/dify.webp +0 -0
  210. package/icons/providers/dmxapi-logo-dark.webp +0 -0
  211. package/icons/providers/dmxapi-logo.webp +0 -0
  212. package/icons/providers/doc2x.webp +0 -0
  213. package/icons/providers/docsearch.webp +0 -0
  214. package/icons/providers/dolphin.webp +0 -0
  215. package/icons/providers/doubao.webp +0 -0
  216. package/icons/providers/dreammachine.webp +0 -0
  217. package/icons/providers/elevenlabs.webp +0 -0
  218. package/icons/providers/elevenx.webp +0 -0
  219. package/icons/providers/essentialai.webp +0 -0
  220. package/icons/providers/exa.webp +0 -0
  221. package/icons/providers/fal.webp +0 -0
  222. package/icons/providers/fastgpt.webp +0 -0
  223. package/icons/providers/featherless.webp +0 -0
  224. package/icons/providers/figma.webp +0 -0
  225. package/icons/providers/fireworks.webp +0 -0
  226. package/icons/providers/fishaudio.webp +0 -0
  227. package/icons/providers/flora.webp +0 -0
  228. package/icons/providers/flowith.webp +0 -0
  229. package/icons/providers/flux.webp +0 -0
  230. package/icons/providers/friendli.webp +0 -0
  231. package/icons/providers/gemini.webp +0 -0
  232. package/icons/providers/geminicli.webp +0 -0
  233. package/icons/providers/gemma.webp +0 -0
  234. package/icons/providers/gitee-ai.webp +0 -0
  235. package/icons/providers/giteeai.webp +0 -0
  236. package/icons/providers/github.webp +0 -0
  237. package/icons/providers/githubcopilot.webp +0 -0
  238. package/icons/providers/glama.webp +0 -0
  239. package/icons/providers/glif.webp +0 -0
  240. package/icons/providers/glmv.webp +0 -0
  241. package/icons/providers/gmi.svg +5 -0
  242. package/icons/providers/google.webp +0 -0
  243. package/icons/providers/googlecloud.webp +0 -0
  244. package/icons/providers/goose.webp +0 -0
  245. package/icons/providers/gradio.webp +0 -0
  246. package/icons/providers/greptile.webp +0 -0
  247. package/icons/providers/grok.webp +0 -0
  248. package/icons/providers/groq.webp +0 -0
  249. package/icons/providers/hailuo.webp +0 -0
  250. package/icons/providers/haiper.webp +0 -0
  251. package/icons/providers/hedra.webp +0 -0
  252. package/icons/providers/hermesagent.webp +0 -0
  253. package/icons/providers/higress.webp +0 -0
  254. package/icons/providers/huawei.webp +0 -0
  255. package/icons/providers/huaweicloud.webp +0 -0
  256. package/icons/providers/huggingface.webp +0 -0
  257. package/icons/providers/hunyuan.webp +0 -0
  258. package/icons/providers/hyperbolic.webp +0 -0
  259. package/icons/providers/ibm.webp +0 -0
  260. package/icons/providers/ideogram.webp +0 -0
  261. package/icons/providers/iflytekcloud.webp +0 -0
  262. package/icons/providers/inception.webp +0 -0
  263. package/icons/providers/inference.webp +0 -0
  264. package/icons/providers/infermatic.webp +0 -0
  265. package/icons/providers/infini.webp +0 -0
  266. package/icons/providers/infinigence.webp +0 -0
  267. package/icons/providers/inflection.webp +0 -0
  268. package/icons/providers/internlm.webp +0 -0
  269. package/icons/providers/jimeng.webp +0 -0
  270. package/icons/providers/jina.webp +0 -0
  271. package/icons/providers/junie.webp +0 -0
  272. package/icons/providers/kilocode.webp +0 -0
  273. package/icons/providers/kimi.webp +0 -0
  274. package/icons/providers/kiro.webp +0 -0
  275. package/icons/providers/kling.webp +0 -0
  276. package/icons/providers/kluster.webp +0 -0
  277. package/icons/providers/kolors.webp +0 -0
  278. package/icons/providers/krea.webp +0 -0
  279. package/icons/providers/kwaikat.webp +0 -0
  280. package/icons/providers/kwaipilot.webp +0 -0
  281. package/icons/providers/lambda.webp +0 -0
  282. package/icons/providers/langchain.webp +0 -0
  283. package/icons/providers/langfuse.webp +0 -0
  284. package/icons/providers/langgraph.webp +0 -0
  285. package/icons/providers/langsmith.webp +0 -0
  286. package/icons/providers/leptonai.webp +0 -0
  287. package/icons/providers/lg.webp +0 -0
  288. package/icons/providers/lightricks.webp +0 -0
  289. package/icons/providers/liquid.webp +0 -0
  290. package/icons/providers/livekit.webp +0 -0
  291. package/icons/providers/llamaindex.webp +0 -0
  292. package/icons/providers/llava.webp +0 -0
  293. package/icons/providers/llmapi.webp +0 -0
  294. package/icons/providers/lmstudio.webp +0 -0
  295. package/icons/providers/lobehub.webp +0 -0
  296. package/icons/providers/longcat.webp +0 -0
  297. package/icons/providers/lovable.webp +0 -0
  298. package/icons/providers/lovart.webp +0 -0
  299. package/icons/providers/luma.webp +0 -0
  300. package/icons/providers/magic.webp +0 -0
  301. package/icons/providers/make.webp +0 -0
  302. package/icons/providers/manus.webp +0 -0
  303. package/icons/providers/mastra.webp +0 -0
  304. package/icons/providers/mcp.webp +0 -0
  305. package/icons/providers/mcpso.webp +0 -0
  306. package/icons/providers/menlo.webp +0 -0
  307. package/icons/providers/meshy.webp +0 -0
  308. package/icons/providers/meta.webp +0 -0
  309. package/icons/providers/metaai.webp +0 -0
  310. package/icons/providers/metagpt.webp +0 -0
  311. package/icons/providers/microsoft.webp +0 -0
  312. package/icons/providers/midjourney.webp +0 -0
  313. package/icons/providers/minimax.webp +0 -0
  314. package/icons/providers/mistral.webp +0 -0
  315. package/icons/providers/modelscope.webp +0 -0
  316. package/icons/providers/monica.webp +0 -0
  317. package/icons/providers/moonshot.webp +0 -0
  318. package/icons/providers/morph.webp +0 -0
  319. package/icons/providers/moxt.webp +0 -0
  320. package/icons/providers/myshell.webp +0 -0
  321. package/icons/providers/n8n.webp +0 -0
  322. package/icons/providers/nanobanana.webp +0 -0
  323. package/icons/providers/nebius.webp +0 -0
  324. package/icons/providers/newapi.webp +0 -0
  325. package/icons/providers/notebooklm.webp +0 -0
  326. package/icons/providers/notion.webp +0 -0
  327. package/icons/providers/nousresearch.webp +0 -0
  328. package/icons/providers/nova.webp +0 -0
  329. package/icons/providers/novelai.webp +0 -0
  330. package/icons/providers/novita.webp +0 -0
  331. package/icons/providers/nplcloud.webp +0 -0
  332. package/icons/providers/nvidia.webp +0 -0
  333. package/icons/providers/o3.webp +0 -0
  334. package/icons/providers/obsidian.webp +0 -0
  335. package/icons/providers/ollama.webp +0 -0
  336. package/icons/providers/openai.webp +0 -0
  337. package/icons/providers/openchat.webp +0 -0
  338. package/icons/providers/openclaw.webp +0 -0
  339. package/icons/providers/opencode.webp +0 -0
  340. package/icons/providers/openhands.webp +0 -0
  341. package/icons/providers/openhuman.webp +0 -0
  342. package/icons/providers/openrouter.webp +0 -0
  343. package/icons/providers/openwebui.webp +0 -0
  344. package/icons/providers/paddleocr.webp +0 -0
  345. package/icons/providers/palm.webp +0 -0
  346. package/icons/providers/parasail.webp +0 -0
  347. package/icons/providers/perplexity.webp +0 -0
  348. package/icons/providers/phidata.webp +0 -0
  349. package/icons/providers/phind.webp +0 -0
  350. package/icons/providers/pika.webp +0 -0
  351. package/icons/providers/pixverse.webp +0 -0
  352. package/icons/providers/player2.webp +0 -0
  353. package/icons/providers/poe.webp +0 -0
  354. package/icons/providers/pollinations.webp +0 -0
  355. package/icons/providers/ppio.webp +0 -0
  356. package/icons/providers/prunaai.webp +0 -0
  357. package/icons/providers/pydanticai.webp +0 -0
  358. package/icons/providers/qingyan.webp +0 -0
  359. package/icons/providers/qiniu.webp +0 -0
  360. package/icons/providers/qoder.webp +0 -0
  361. package/icons/providers/qwen.webp +0 -0
  362. package/icons/providers/railway.webp +0 -0
  363. package/icons/providers/recraft.webp +0 -0
  364. package/icons/providers/relace.webp +0 -0
  365. package/icons/providers/replicate.webp +0 -0
  366. package/icons/providers/replit.webp +0 -0
  367. package/icons/providers/reve.webp +0 -0
  368. package/icons/providers/roocode.webp +0 -0
  369. package/icons/providers/rsshub.webp +0 -0
  370. package/icons/providers/runway.webp +0 -0
  371. package/icons/providers/rwkv.webp +0 -0
  372. package/icons/providers/sambanova.webp +0 -0
  373. package/icons/providers/search1api.webp +0 -0
  374. package/icons/providers/searchapi.webp +0 -0
  375. package/icons/providers/sensenova.webp +0 -0
  376. package/icons/providers/silicon.webp +0 -0
  377. package/icons/providers/siliconcloud.webp +0 -0
  378. package/icons/providers/sillytavern.webp +0 -0
  379. package/icons/providers/skywork.webp +0 -0
  380. package/icons/providers/slock.webp +0 -0
  381. package/icons/providers/smithery.webp +0 -0
  382. package/icons/providers/snowflake.webp +0 -0
  383. package/icons/providers/sophnet.webp +0 -0
  384. package/icons/providers/sora.webp +0 -0
  385. package/icons/providers/spark.webp +0 -0
  386. package/icons/providers/speedai.webp +0 -0
  387. package/icons/providers/stability.webp +0 -0
  388. package/icons/providers/statecloud.webp +0 -0
  389. package/icons/providers/step.webp +0 -0
  390. package/icons/providers/stepfun.webp +0 -0
  391. package/icons/providers/straico.webp +0 -0
  392. package/icons/providers/streamlake.webp +0 -0
  393. package/icons/providers/submodel.webp +0 -0
  394. package/icons/providers/suno.webp +0 -0
  395. package/icons/providers/sync.webp +0 -0
  396. package/icons/providers/targon.webp +0 -0
  397. package/icons/providers/tavily.webp +0 -0
  398. package/icons/providers/tencent-cloud-ti.webp +0 -0
  399. package/icons/providers/tencent.webp +0 -0
  400. package/icons/providers/tencentcloud.webp +0 -0
  401. package/icons/providers/tiangong.webp +0 -0
  402. package/icons/providers/tii.webp +0 -0
  403. package/icons/providers/together.webp +0 -0
  404. package/icons/providers/tokenrouter.png +0 -0
  405. package/icons/providers/topazlabs.webp +0 -0
  406. package/icons/providers/trae.webp +0 -0
  407. package/icons/providers/tripo.webp +0 -0
  408. package/icons/providers/turix.webp +0 -0
  409. package/icons/providers/udio.webp +0 -0
  410. package/icons/providers/unstructured.webp +0 -0
  411. package/icons/providers/upstage.webp +0 -0
  412. package/icons/providers/v0.webp +0 -0
  413. package/icons/providers/vectorizerai.webp +0 -0
  414. package/icons/providers/venice.webp +0 -0
  415. package/icons/providers/vercel.webp +0 -0
  416. package/icons/providers/vertexai.webp +0 -0
  417. package/icons/providers/vidu.webp +0 -0
  418. package/icons/providers/viggle.webp +0 -0
  419. package/icons/providers/vllm.webp +0 -0
  420. package/icons/providers/volcengine.webp +0 -0
  421. package/icons/providers/voyage.webp +0 -0
  422. package/icons/providers/voyageai.webp +0 -0
  423. package/icons/providers/wenxin.webp +0 -0
  424. package/icons/providers/windsurf.webp +0 -0
  425. package/icons/providers/workersai.webp +0 -0
  426. package/icons/providers/worldrouter.webp +0 -0
  427. package/icons/providers/xai.webp +0 -0
  428. package/icons/providers/xiaomimimo.webp +0 -0
  429. package/icons/providers/xinference.webp +0 -0
  430. package/icons/providers/xirang.png +0 -0
  431. package/icons/providers/xpay.webp +0 -0
  432. package/icons/providers/xuanyuan.webp +0 -0
  433. package/icons/providers/yandex.webp +0 -0
  434. package/icons/providers/yi.webp +0 -0
  435. package/icons/providers/youmind.webp +0 -0
  436. package/icons/providers/yuanbao.webp +0 -0
  437. package/icons/providers/zai.webp +0 -0
  438. package/icons/providers/zapier.webp +0 -0
  439. package/icons/providers/zeabur.webp +0 -0
  440. package/icons/providers/zencoder.webp +0 -0
  441. package/icons/providers/zenmux.webp +0 -0
  442. package/icons/providers/zero-one.webp +0 -0
  443. package/icons/providers/zeroone.webp +0 -0
  444. package/icons/providers/zhipu.webp +0 -0
  445. package/package.json +36 -36
  446. package/styles/content.css +3 -1
  447. package/styles/yunui.css +346 -89
  448. package/dist/chunk-5E3O6ANF.js.map +0 -1
  449. package/dist/chunk-5TOGZTAO.js.map +0 -1
  450. package/dist/chunk-AV5TGEJS.js +0 -54
  451. package/dist/chunk-AV5TGEJS.js.map +0 -1
  452. package/dist/chunk-GSPJ5YI6.js.map +0 -1
  453. package/dist/chunk-QEIBYOG2.js +0 -188
  454. package/dist/chunk-QEIBYOG2.js.map +0 -1
  455. package/dist/chunk-UYYG4XDW.js.map +0 -1
package/dist/ai.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { copyToClipboard } from './chunk-UYYG4XDW.js';
3
- export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-UYYG4XDW.js';
4
- import { ThemeToggle } from './chunk-GSPJ5YI6.js';
5
- import { cn, useAnchoredPosition } from './chunk-AV5TGEJS.js';
2
+ import { capabilityIconColor, copyToClipboard } from './chunk-LEBQPP4B.js';
3
+ export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-LEBQPP4B.js';
4
+ import { TextShimmer, ThemeToggle } from './chunk-GAXVET76.js';
5
+ import { cn, useAnchoredPosition, useDismissOnOutside } from './chunk-V7VJKZ5Q.js';
6
6
  import { useYunUI } from './chunk-3RT24MSH.js';
7
- import { memo, useState, useRef, useMemo, useEffect } from 'react';
7
+ import { memo, useState, useEffect, useRef, useMemo } from 'react';
8
8
  import { AnimatePresence, motion } from 'framer-motion';
9
- import { Pin, MessageSquare, Waves, Code, Eye, Brain, Pencil, Ban, Fingerprint, Layers, SlidersHorizontal, Mic, Video, Music, Box, Radio, ChevronUp, ChevronDown, Check, Copy, Image, PauseCircle, Search, X, Sparkles, Bot, Globe, Menu, Shield, Shuffle, Volume2, Headphones, Palette, Hash, FileText } from 'lucide-react';
9
+ import { Pin, MessageSquare, Waves, Code, Eye, Brain, Pencil, Ban, Fingerprint, Layers, SlidersHorizontal, Mic, Video, Music, Box, Radio, ChevronUp, ChevronDown, Check, Copy, Image, PauseCircle, Search, X, Sparkles, Bot, Globe, Menu, CircleUserRound, LogOut, ShieldAlert, Wrench, FileText, Terminal, Loader2, Shield, Shuffle, Volume2, Headphones, Palette, Hash } from 'lucide-react';
10
10
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
11
11
  import { cva } from 'class-variance-authority';
12
12
 
@@ -53,9 +53,270 @@ function ThinkingBlock({ content, isStreaming, defaultOpen = false, renderConten
53
53
  ) })
54
54
  ] });
55
55
  }
56
- function IDBadge({ text, truncate = true }) {
56
+ var ICONS = {
57
+ terminal: Terminal,
58
+ search: Search,
59
+ globe: Globe,
60
+ image: Image,
61
+ file: FileText,
62
+ tool: Wrench
63
+ };
64
+ function Rail({ children, tone = "muted", isLast }) {
65
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center self-stretch", children: [
66
+ /* @__PURE__ */ jsx(
67
+ "span",
68
+ {
69
+ className: cn(
70
+ "relative z-10 mt-0.5 flex h-[26px] w-[26px] shrink-0 items-center justify-center rounded-full bg-background ring-1 transition-colors",
71
+ tone === "muted" && "text-muted-foreground ring-border",
72
+ tone === "running" && "text-primary ring-primary/40",
73
+ tone === "error" && "text-(--error) ring-(--error)/40",
74
+ tone === "warn" && "text-(--warning) ring-(--warning)/40"
75
+ ),
76
+ children
77
+ }
78
+ ),
79
+ !isLast && /* @__PURE__ */ jsx("span", { className: "my-1 w-0.5 flex-1 rounded-full bg-border" })
80
+ ] });
81
+ }
82
+ function Collapse({ open, children }) {
83
+ return /* @__PURE__ */ jsx(
84
+ "div",
85
+ {
86
+ className: cn(
87
+ "grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",
88
+ open ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
89
+ ),
90
+ children: /* @__PURE__ */ jsx("div", { className: "min-h-0 overflow-hidden", children })
91
+ }
92
+ );
93
+ }
94
+ function Chevron({ open }) {
95
+ return /* @__PURE__ */ jsx(ChevronDown, { size: 14, className: cn("shrink-0 text-muted-foreground/50 transition-transform duration-200", open && "rotate-180") });
96
+ }
97
+ function ReasoningRow({ block, isLast, renderContent }) {
98
+ const [open, setOpen] = useState(block.defaultOpen ?? false);
99
+ const expandable = Boolean(block.content.trim());
100
+ return /* @__PURE__ */ jsxs("div", { className: "flex gap-2.5", children: [
101
+ /* @__PURE__ */ jsx(Rail, { tone: block.active ? "running" : "muted", isLast, children: /* @__PURE__ */ jsxs("span", { className: "relative flex items-center justify-center", children: [
102
+ block.active ? /* @__PURE__ */ jsx(
103
+ "span",
104
+ {
105
+ "aria-hidden": "true",
106
+ className: "absolute h-4 w-4 animate-ping rounded-full bg-primary/15 motion-reduce:hidden"
107
+ }
108
+ ) : null,
109
+ /* @__PURE__ */ jsx(
110
+ Brain,
111
+ {
112
+ size: 13,
113
+ strokeWidth: 1.75,
114
+ className: cn(block.active && "animate-pulse motion-reduce:animate-none")
115
+ }
116
+ )
117
+ ] }) }),
118
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 pb-2", children: /* @__PURE__ */ jsxs(
119
+ "div",
120
+ {
121
+ "data-yunui": "agent-timeline-reasoning-disclosure",
122
+ className: cn(
123
+ "overflow-hidden rounded-lg",
124
+ expandable && "border border-border/60 bg-muted/20"
125
+ ),
126
+ children: [
127
+ /* @__PURE__ */ jsxs(
128
+ "button",
129
+ {
130
+ type: "button",
131
+ onClick: () => expandable && setOpen(!open),
132
+ "aria-expanded": expandable ? open : void 0,
133
+ className: cn(
134
+ "flex h-[30px] w-full items-center gap-2 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
135
+ expandable ? "cursor-pointer rounded-none px-2.5 hover:bg-muted/40" : "cursor-default rounded-md px-1.5"
136
+ ),
137
+ children: [
138
+ block.active ? /* @__PURE__ */ jsx(
139
+ TextShimmer,
140
+ {
141
+ text: block.label,
142
+ className: "min-w-0 flex-1 truncate text-[13px]",
143
+ "data-agent-timeline-active": "true"
144
+ }
145
+ ) : /* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-[13px] text-muted-foreground", children: block.label }),
146
+ expandable ? /* @__PURE__ */ jsx(Chevron, { open }) : null
147
+ ]
148
+ }
149
+ ),
150
+ expandable ? /* @__PURE__ */ jsx(Collapse, { open, children: /* @__PURE__ */ jsx(
151
+ "div",
152
+ {
153
+ "data-yunui": "agent-timeline-reasoning-content",
154
+ className: "border-t border-border/50 px-2.5 pb-2.5 pt-2 text-[12.5px] leading-relaxed text-muted-foreground",
155
+ children: renderContent ? renderContent(block.content) : /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap", children: block.content })
156
+ }
157
+ ) }) : null
158
+ ]
159
+ }
160
+ ) })
161
+ ] });
162
+ }
163
+ function ToolRow({ block, isLast }) {
164
+ const [open, setOpen] = useState(false);
165
+ const Icon = ICONS[block.icon ?? "tool"];
166
+ const error = block.status === "error";
167
+ const expandable = !!block.output || !!block.command;
168
+ const tone = block.status === "running" ? "running" : error ? "error" : "muted";
169
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex gap-2.5", block.indent && "pl-6"), children: [
170
+ /* @__PURE__ */ jsx(Rail, { tone, isLast, children: block.status === "running" ? /* @__PURE__ */ jsx(Loader2, { size: 13, className: "animate-spin" }) : /* @__PURE__ */ jsx(Icon, { size: 13, strokeWidth: 1.75 }) }),
171
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 pb-2", children: [
172
+ /* @__PURE__ */ jsxs(
173
+ "button",
174
+ {
175
+ type: "button",
176
+ onClick: () => expandable && setOpen(!open),
177
+ "aria-expanded": open,
178
+ className: cn(
179
+ "flex h-[30px] w-full items-center gap-2 rounded-md px-1.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
180
+ expandable ? "hover:bg-muted/50 cursor-pointer" : "cursor-default"
181
+ ),
182
+ children: [
183
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[13px] font-medium text-foreground", children: block.verb }),
184
+ block.summary && /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-mono text-[11.5px] text-muted-foreground", children: block.summary }),
185
+ /* @__PURE__ */ jsxs("span", { className: cn("flex shrink-0 items-center gap-2", !block.summary && "ml-auto"), children: [
186
+ block.status === "done" && /* @__PURE__ */ jsx(Check, { size: 14, className: "text-(--success)" }),
187
+ error && /* @__PURE__ */ jsx("span", { className: "rounded bg-(--error)/10 px-1.5 py-0.5 font-mono text-[10.5px] font-semibold uppercase tracking-wide text-(--error)", children: "error" }),
188
+ expandable && /* @__PURE__ */ jsx(Chevron, { open })
189
+ ] })
190
+ ]
191
+ }
192
+ ),
193
+ /* @__PURE__ */ jsx(Collapse, { open, children: /* @__PURE__ */ jsxs("div", { className: cn("mt-1.5 overflow-hidden rounded-lg border font-mono text-xs", error ? "border-(--error)/20 bg-(--error)/5" : "border-border bg-muted/40"), children: [
194
+ block.command && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1.5 border-b px-3 py-1.5 text-muted-foreground", error ? "border-(--error)/20" : "border-border/60"), children: [
195
+ /* @__PURE__ */ jsx("span", { className: "select-none text-muted-foreground/40", children: "$" }),
196
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: block.command })
197
+ ] }),
198
+ /* @__PURE__ */ jsx(
199
+ "div",
200
+ {
201
+ tabIndex: 0,
202
+ role: "region",
203
+ "aria-label": `${block.verb} output`,
204
+ className: cn("max-h-72 overflow-auto whitespace-pre-wrap break-words px-3 py-2.5 leading-relaxed outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", error ? "text-(--error)" : "text-foreground/80"),
205
+ children: block.output || "\u2014"
206
+ }
207
+ )
208
+ ] }) })
209
+ ] })
210
+ ] });
211
+ }
212
+ function ApprovalRow({ block, isLast, onApprove, onReject }) {
213
+ return /* @__PURE__ */ jsxs("div", { className: "flex gap-2.5", children: [
214
+ /* @__PURE__ */ jsx(Rail, { tone: "warn", isLast, children: /* @__PURE__ */ jsx(ShieldAlert, { size: 13, strokeWidth: 1.75 }) }),
215
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 pb-2", children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-(--warning)/25 bg-(--warning)/[0.06] px-3 py-2.5", children: [
216
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[13px] font-medium text-foreground", children: [
217
+ /* @__PURE__ */ jsx("span", { children: block.title }),
218
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-xs text-muted-foreground", children: block.verb })
219
+ ] }),
220
+ block.message && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-[12.5px] text-muted-foreground", children: block.message }),
221
+ block.argsText && /* @__PURE__ */ jsx(
222
+ "pre",
223
+ {
224
+ tabIndex: 0,
225
+ role: "region",
226
+ "aria-label": `${block.title}: ${block.verb}`,
227
+ className: "mt-1.5 max-h-40 overflow-auto rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-[11.5px] text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
228
+ children: block.argsText
229
+ }
230
+ ),
231
+ /* @__PURE__ */ jsx("div", { className: "mt-2.5 flex items-center gap-2", children: block.decision ? /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", block.decision === "approved" ? "text-(--success)" : "text-(--error)"), children: block.decidedLabel }) : /* @__PURE__ */ jsxs(Fragment, { children: [
232
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onApprove?.(block.id), className: "rounded-md bg-primary px-3 py-1 text-xs font-medium text-primary-foreground outline-none transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring", children: block.allowLabel }),
233
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onReject?.(block.id), className: "rounded-md border border-border px-3 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring", children: block.denyLabel })
234
+ ] }) })
235
+ ] }) })
236
+ ] });
237
+ }
238
+ function AgentTimeline({ blocks, renderContent, onApprove, onReject, className }) {
239
+ const visible = blocks.filter((b) => !(b.kind === "reasoning" && !b.content.trim() && !b.active));
240
+ if (!visible.length) return null;
241
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col", className), children: visible.map((b, i) => {
242
+ const isLast = i === visible.length - 1;
243
+ switch (b.kind) {
244
+ case "reasoning":
245
+ return /* @__PURE__ */ jsx(ReasoningRow, { block: b, isLast, renderContent }, b.id);
246
+ case "tool":
247
+ return /* @__PURE__ */ jsx(ToolRow, { block: b, isLast }, b.id);
248
+ case "approval":
249
+ return /* @__PURE__ */ jsx(ApprovalRow, { block: b, isLast, onApprove, onReject }, b.id);
250
+ default:
251
+ return null;
252
+ }
253
+ }) });
254
+ }
255
+ function AgentRunStatus({
256
+ label,
257
+ phase = "thinking",
258
+ active = phase !== "waiting",
259
+ className,
260
+ ...props
261
+ }) {
262
+ return /* @__PURE__ */ jsxs(
263
+ "div",
264
+ {
265
+ role: "status",
266
+ "aria-live": "polite",
267
+ "aria-atomic": "true",
268
+ "data-yunui": "agent-run-status",
269
+ "data-phase": phase,
270
+ "data-active": active || void 0,
271
+ className: cn(
272
+ "flex min-h-9 w-fit max-w-full min-w-0 items-center gap-2 py-1 text-[13.5px] text-muted-foreground",
273
+ className
274
+ ),
275
+ ...props,
276
+ children: [
277
+ /* @__PURE__ */ jsx(
278
+ TextShimmer,
279
+ {
280
+ text: label,
281
+ active,
282
+ "data-run-status-label": true,
283
+ className: "min-w-0 max-w-xl truncate font-medium"
284
+ }
285
+ ),
286
+ /* @__PURE__ */ jsx(
287
+ "span",
288
+ {
289
+ "data-run-status-pulse": true,
290
+ "aria-hidden": "true",
291
+ className: cn(
292
+ "flex shrink-0 items-center gap-0.5 transition-opacity",
293
+ active ? "opacity-80" : "opacity-0"
294
+ ),
295
+ children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx(
296
+ "span",
297
+ {
298
+ className: "h-1 w-1 rounded-full bg-primary/60 motion-safe:animate-pulse",
299
+ style: {
300
+ animationDelay: `${index * 180}ms`,
301
+ animationDuration: "1.1s"
302
+ }
303
+ },
304
+ index
305
+ ))
306
+ }
307
+ )
308
+ ]
309
+ }
310
+ );
311
+ }
312
+ function IDBadge({
313
+ text,
314
+ truncate = true,
315
+ size = "sm"
316
+ }) {
57
317
  const [copied, setCopied] = useState(false);
58
318
  const t = useYunUI().useT("common.badge");
319
+ const sm = size === "sm";
59
320
  const handleCopy = async (e) => {
60
321
  e.preventDefault();
61
322
  e.stopPropagation();
@@ -72,24 +333,24 @@ function IDBadge({ text, truncate = true }) {
72
333
  title: t("clickToCopy", { text }),
73
334
  "aria-label": t("clickToCopy", { text }),
74
335
  children: [
75
- /* @__PURE__ */ jsx("span", { className: `px-2 py-0.5 text-xs font-mono block ${truncate ? "truncate max-w-full min-w-0" : "whitespace-nowrap"}`, children: text }),
76
- /* @__PURE__ */ jsx("span", { className: "opacity-0 group-hover/badge:opacity-100 absolute right-0 inset-y-0 w-5 flex items-center justify-center rounded-r-md bg-muted/90 backdrop-blur-sm transition-opacity duration-200", children: copied ? /* @__PURE__ */ jsx(Check, { size: 10 }) : /* @__PURE__ */ jsx(Copy, { size: 10 }) })
336
+ /* @__PURE__ */ jsx("span", { className: `font-mono block ${sm ? "px-1.5 py-0 text-[11px] leading-5 text-muted-foreground" : "px-2 py-0.5 text-xs"} ${truncate ? "truncate max-w-full min-w-0" : "whitespace-nowrap"}`, children: text }),
337
+ /* @__PURE__ */ jsx("span", { className: `opacity-0 group-hover/badge:opacity-100 absolute right-0 inset-y-0 flex items-center justify-center rounded-r-md bg-muted/90 backdrop-blur-sm transition-opacity duration-200 ${sm ? "w-4" : "w-5"}`, children: copied ? /* @__PURE__ */ jsx(Check, { size: sm ? 9 : 10 }) : /* @__PURE__ */ jsx(Copy, { size: sm ? 9 : 10 }) })
77
338
  ]
78
339
  }
79
340
  );
80
341
  }
81
342
  var CAPABILITY_ICONS = {
82
- streaming: { icon: Waves, color: "text-cyan-500" },
83
- vision: { icon: Eye, color: "text-amber-500" },
84
- thinking: { icon: Brain, color: "text-pink-500" },
85
- function_calling: { icon: Code, color: "text-purple-500" },
86
- image_edit: { icon: Image, color: "text-orange-500" },
87
- negative_prompt: { icon: Ban, color: "text-red-500" },
88
- seed_control: { icon: Fingerprint, color: "text-indigo-500" },
89
- lora: { icon: Layers, color: "text-teal-500" },
90
- guidance_scale: { icon: SlidersHorizontal, color: "text-yellow-500" },
91
- strength: { icon: SlidersHorizontal, color: "text-orange-500" },
92
- batch: { icon: Waves, color: "text-cyan-500" }
343
+ streaming: { color: capabilityIconColor("streaming"), icon: Waves },
344
+ vision: { color: capabilityIconColor("vision"), icon: Eye },
345
+ thinking: { color: capabilityIconColor("thinking"), icon: Brain },
346
+ function_calling: { color: capabilityIconColor("function_calling"), icon: Code },
347
+ image_edit: { color: capabilityIconColor("image_edit"), icon: Image },
348
+ negative_prompt: { color: capabilityIconColor("negative_prompt"), icon: Ban },
349
+ seed_control: { color: capabilityIconColor("seed_control"), icon: Fingerprint },
350
+ lora: { color: capabilityIconColor("lora"), icon: Layers },
351
+ guidance_scale: { color: capabilityIconColor("guidance_scale"), icon: SlidersHorizontal },
352
+ strength: { color: capabilityIconColor("strength"), icon: SlidersHorizontal },
353
+ batch: { color: capabilityIconColor("batch"), icon: Waves }
93
354
  };
94
355
  function ModelCard({
95
356
  name,
@@ -147,7 +408,7 @@ function ModelCard({
147
408
  ] }),
148
409
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
149
410
  context && /* @__PURE__ */ jsx("span", { className: "bg-muted px-1.5 py-0.5 rounded-sm font-medium", children: context }),
150
- tier && tier !== "free" && /* @__PURE__ */ jsx("span", { className: "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 px-1.5 py-0.5 rounded-sm font-medium", children: tier }),
411
+ tier && tier !== "free" && /* @__PURE__ */ jsx("span", { className: "bg-warning-soft text-warning px-1.5 py-0.5 rounded-sm font-medium", children: tier }),
151
412
  price && /* @__PURE__ */ jsx("span", { className: "font-mono", children: price })
152
413
  ] })
153
414
  ] })
@@ -155,6 +416,81 @@ function ModelCard({
155
416
  }
156
417
  );
157
418
  }
419
+ function HScrollRow({ children, className }) {
420
+ const scrollRef = useRef(null);
421
+ const [thumb, setThumb] = useState({ w: 0, x: 0, show: false });
422
+ const sync = () => {
423
+ const el = scrollRef.current;
424
+ if (!el) return;
425
+ const { scrollWidth, clientWidth, scrollLeft } = el;
426
+ const overflow = scrollWidth - clientWidth;
427
+ if (overflow <= 1) {
428
+ setThumb((t) => t.show ? { w: 0, x: 0, show: false } : t);
429
+ return;
430
+ }
431
+ const w = Math.max(clientWidth / scrollWidth * clientWidth, 28);
432
+ const x = scrollLeft / overflow * (clientWidth - w);
433
+ setThumb({ w, x, show: true });
434
+ };
435
+ useEffect(() => {
436
+ const el = scrollRef.current;
437
+ if (!el) return;
438
+ sync();
439
+ el.addEventListener("scroll", sync, { passive: true });
440
+ const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(sync) : null;
441
+ ro?.observe(el);
442
+ if (el.firstElementChild) ro?.observe(el.firstElementChild);
443
+ return () => {
444
+ el.removeEventListener("scroll", sync);
445
+ ro?.disconnect();
446
+ };
447
+ }, []);
448
+ const onThumbDown = (e) => {
449
+ const el = scrollRef.current;
450
+ if (!el) return;
451
+ e.preventDefault();
452
+ e.currentTarget.setPointerCapture(e.pointerId);
453
+ const startX = e.clientX;
454
+ const startScroll = el.scrollLeft;
455
+ const move = (ev) => {
456
+ const { scrollWidth, clientWidth } = el;
457
+ const w = Math.max(clientWidth / scrollWidth * clientWidth, 28);
458
+ const travel = clientWidth - w;
459
+ if (travel <= 0) return;
460
+ el.scrollLeft = startScroll + (ev.clientX - startX) / travel * (scrollWidth - clientWidth);
461
+ };
462
+ const up = () => {
463
+ window.removeEventListener("pointermove", move);
464
+ window.removeEventListener("pointerup", up);
465
+ };
466
+ window.addEventListener("pointermove", move);
467
+ window.addEventListener("pointerup", up);
468
+ };
469
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
470
+ /* @__PURE__ */ jsx(
471
+ "div",
472
+ {
473
+ ref: scrollRef,
474
+ className: cn(
475
+ "overflow-x-auto overflow-y-hidden overscroll-x-contain touch-pan-x [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
476
+ className
477
+ ),
478
+ children
479
+ }
480
+ ),
481
+ thumb.show && /* @__PURE__ */ jsx(
482
+ "div",
483
+ {
484
+ onPointerDown: onThumbDown,
485
+ role: "scrollbar",
486
+ "aria-orientation": "horizontal",
487
+ "aria-hidden": true,
488
+ className: "absolute bottom-0 left-0 h-1.5 rounded-full bg-muted-foreground/40 hover:bg-muted-foreground/60 active:bg-muted-foreground/70 cursor-grab active:cursor-grabbing touch-none transition-colors",
489
+ style: { width: `${thumb.w}px`, transform: `translateX(${thumb.x}px)` }
490
+ }
491
+ )
492
+ ] });
493
+ }
158
494
  function ModelSelect({
159
495
  options,
160
496
  value,
@@ -164,7 +500,9 @@ function ModelSelect({
164
500
  pinned,
165
501
  onTogglePin,
166
502
  filters,
167
- renderFooter
503
+ renderFooter,
504
+ renderHeader,
505
+ filterResetKey
168
506
  }) {
169
507
  const L = {
170
508
  placeholder: "Select a model",
@@ -180,30 +518,25 @@ function ModelSelect({
180
518
  const [search, setSearch] = useState("");
181
519
  const [activeGroup, setActiveGroup] = useState(null);
182
520
  const [activeFilters, setActiveFilters] = useState([]);
521
+ useEffect(() => {
522
+ setSearch("");
523
+ setActiveFilters([]);
524
+ setActiveGroup(null);
525
+ }, [filterResetKey]);
183
526
  const rootRef = useRef(null);
184
527
  const inputRef = useRef(null);
185
528
  const listRef = useRef(null);
186
529
  const panelRef = useRef(null);
187
- const { shift, maxHeight } = useAnchoredPosition(isOpen, panelRef);
530
+ const { shift, maxHeight, placement } = useAnchoredPosition(isOpen, panelRef);
188
531
  const pinnedSet = useMemo(() => new Set(pinned ?? []), [pinned]);
189
- useEffect(() => {
190
- const onDown = (e) => {
191
- if (rootRef.current && !rootRef.current.contains(e.target)) setIsOpen(false);
192
- };
193
- document.addEventListener("mousedown", onDown);
194
- document.addEventListener("touchstart", onDown);
195
- return () => {
196
- document.removeEventListener("mousedown", onDown);
197
- document.removeEventListener("touchstart", onDown);
198
- };
199
- }, []);
532
+ useDismissOnOutside(isOpen, () => setIsOpen(false), rootRef, { escape: false });
200
533
  useEffect(() => {
201
534
  if (!isOpen) return;
202
535
  const t = setTimeout(() => {
203
536
  inputRef.current?.focus();
204
537
  if (value && listRef.current) {
205
538
  const el = listRef.current.querySelector(`[data-model-id="${CSS.escape(value)}"]`);
206
- el?.scrollIntoView({ block: "center" });
539
+ el?.scrollIntoView({ block: "nearest" });
207
540
  }
208
541
  }, 50);
209
542
  return () => clearTimeout(t);
@@ -258,6 +591,7 @@ function ModelSelect({
258
591
  onChange(id);
259
592
  setIsOpen(false);
260
593
  };
594
+ const panelMaxHeight = maxHeight == null ? "min(32rem, calc(100dvh - 7rem))" : `min(${maxHeight}px, 32rem, calc(100dvh - 7rem))`;
261
595
  const flatOptions = useMemo(() => {
262
596
  const out = [...pinnedList];
263
597
  for (const opts of Object.values(grouped)) out.push(...opts);
@@ -303,7 +637,7 @@ function ModelSelect({
303
637
  "aria-expanded": isOpen,
304
638
  "aria-haspopup": "listbox",
305
639
  className: cn(
306
- "flex items-center gap-2 px-3 py-2 bg-card border rounded-xl text-left group transition-all w-full shadow-sm hover:shadow-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
640
+ "flex items-center gap-2 px-3 py-2 bg-card border border-border rounded-xl text-left group transition-all w-full shadow-sm hover:shadow-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
307
641
  isOpen ? "border-ring/60 ring-2 ring-ring/25" : "border-border hover:border-ring"
308
642
  ),
309
643
  children: [
@@ -322,9 +656,11 @@ function ModelSelect({
322
656
  initial: { opacity: 0, y: -8, scale: 0.96 },
323
657
  animate: { opacity: 1, y: 0, scale: 1 },
324
658
  transition: { duration: 0.16, ease: "easeOut" },
325
- style: { maxWidth: "calc(100vw - 1rem)", marginLeft: shift, maxHeight },
326
- className: "origin-top absolute z-50 top-full left-0 mt-2 w-96 max-w-[calc(100vw-1rem)] flex flex-col bg-background/60 backdrop-blur-2xl border border-border rounded-2xl shadow-lg shadow-black/5 text-popover-foreground overflow-hidden",
659
+ "data-yunui": "model-select-panel",
660
+ style: { maxWidth: "calc(100vw - 1rem)", marginLeft: shift, maxHeight: panelMaxHeight },
661
+ className: `absolute z-50 left-0 ${placement === "top" ? "bottom-full mb-2 origin-bottom" : "top-full mt-2 origin-top"} w-96 max-w-[calc(100vw-1rem)] flex flex-col bg-popover border border-border rounded-2xl shadow-lg shadow-black/5 text-popover-foreground overflow-hidden`,
327
662
  children: [
663
+ renderHeader && /* @__PURE__ */ jsx("div", { className: "p-2.5 border-b border-border/50", children: renderHeader() }),
328
664
  /* @__PURE__ */ jsxs("div", { className: "p-2.5 border-b border-border/50", children: [
329
665
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
330
666
  /* @__PURE__ */ jsx(Search, { size: 15, className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none" }),
@@ -341,20 +677,20 @@ function ModelSelect({
341
677
  "aria-expanded": isOpen,
342
678
  "aria-controls": "yunui-ms-listbox",
343
679
  "aria-activedescendant": activeId ? rowDomId(activeId) : void 0,
344
- className: "w-full pl-9 pr-8 py-2 text-sm bg-muted/50 border border-transparent rounded-xl outline-none focus:border-ring focus:bg-background transition-colors"
680
+ className: "w-full pl-9 pr-8 py-2 text-base md:text-sm bg-muted/50 border border-transparent rounded-xl outline-none focus:border-ring focus:bg-background transition-colors"
345
681
  }
346
682
  ),
347
683
  search && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setSearch(""), title: L.clearSearch, "aria-label": L.clearSearch, className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded-md hover:bg-muted outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { size: 13 }) })
348
684
  ] }),
349
- filters && filters.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-2 px-1", children: [
685
+ filters && filters.length > 0 && /* @__PURE__ */ jsx(HScrollRow, { className: "mt-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 px-2.5 pb-2 w-max", children: [
350
686
  filters.map((f) => {
351
687
  const on = activeFilters.includes(f.key);
352
- return /* @__PURE__ */ jsx("button", { type: "button", title: f.title, "aria-label": f.title, "aria-pressed": on, onClick: () => setActiveFilters((p) => p.includes(f.key) ? p.filter((k) => k !== f.key) : [...p, f.key]), className: cn("p-1 rounded-md transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring", on ? "bg-foreground/10" : "hover:bg-muted"), children: f.node }, f.key);
688
+ return /* @__PURE__ */ jsx("button", { type: "button", title: f.title, "aria-label": f.title, "aria-pressed": on, onClick: () => setActiveFilters((p) => p.includes(f.key) ? p.filter((k) => k !== f.key) : [...p, f.key]), className: cn("shrink-0 p-1 rounded-md transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring", on ? "bg-foreground/10" : "hover:bg-muted"), children: f.node }, f.key);
353
689
  }),
354
- activeFilters.length > 0 && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setActiveFilters([]), title: L.clearFilters, "aria-label": L.clearFilters, className: "p-1 rounded-md text-muted-foreground hover:bg-muted outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { size: 14 }) })
355
- ] })
690
+ activeFilters.length > 0 && /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setActiveFilters([]), title: L.clearFilters, "aria-label": L.clearFilters, className: "shrink-0 p-1 rounded-md text-muted-foreground hover:bg-muted outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { size: 14 }) })
691
+ ] }) })
356
692
  ] }),
357
- groups.length > 1 && /* @__PURE__ */ jsx("div", { className: "px-2.5 py-2 border-b border-border/50 overflow-x-auto overflow-y-hidden overscroll-x-contain", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1 min-w-max", children: [
693
+ groups.length > 1 && /* @__PURE__ */ jsx("div", { className: "border-b border-border/50", children: /* @__PURE__ */ jsx(HScrollRow, { children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1 px-2.5 pt-2 pb-2.5 w-max", children: [
358
694
  /* @__PURE__ */ jsxs("button", { type: "button", onClick: () => setActiveGroup(null), "aria-pressed": !activeGroup, className: cn("px-2.5 py-1.5 text-xs rounded-lg font-medium transition-colors whitespace-nowrap outline-none focus-visible:ring-2 focus-visible:ring-ring", !activeGroup ? "bg-foreground text-background" : "bg-muted text-muted-foreground hover:bg-muted/80"), children: [
359
695
  L.all,
360
696
  " (",
@@ -365,7 +701,7 @@ function ModelSelect({
365
701
  groupIcon[g],
366
702
  groupLabel[g] ?? g
367
703
  ] }, g))
368
- ] }) }),
704
+ ] }) }) }),
369
705
  /* @__PURE__ */ jsxs("div", { ref: listRef, onWheel, onMouseMove: clearActiveOnPointer, id: "yunui-ms-listbox", role: "listbox", className: "flex-1 min-h-0 max-h-96 overflow-y-auto overscroll-contain", children: [
370
706
  pinnedList.length > 0 && /* @__PURE__ */ jsxs("div", { className: "px-1.5 py-1.5 border-b border-border/40", children: [
371
707
  /* @__PURE__ */ jsxs("div", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide px-2 mb-1 flex items-center gap-1", children: [
@@ -425,8 +761,9 @@ var ModelRow = memo(function ModelRow2({
425
761
  /* @__PURE__ */ jsx(
426
762
  "div",
427
763
  {
764
+ style: { left: "5px" },
428
765
  className: cn(
429
- "absolute left-1.5 top-1/2 w-1 h-6 rounded-full bg-primary transition-all duration-150 -translate-y-1/2",
766
+ "absolute top-1/2 w-1 h-6 rounded-full bg-primary transition-all duration-150 -translate-y-1/2",
430
767
  selected ? "opacity-100 translate-x-0" : "opacity-0 -translate-x-1.5 group-hover:opacity-50 group-hover:translate-x-0"
431
768
  )
432
769
  }
@@ -511,37 +848,37 @@ function ModelManagerCard({
511
848
  );
512
849
  }
513
850
  var llmCapabilityConfig = [
514
- { value: "chat", icon: MessageSquare, iconColor: "text-blue-500", color: "bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 hover:bg-blue-500/20" },
515
- { value: "streaming", icon: Waves, iconColor: "text-cyan-500", color: "bg-cyan-500/10 text-cyan-600 dark:text-cyan-400 border-cyan-500/20 hover:bg-cyan-500/20" },
516
- { value: "function_calling", icon: Code, iconColor: "text-purple-500", color: "bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20 hover:bg-purple-500/20" },
517
- { value: "vision", icon: Eye, iconColor: "text-amber-500", color: "bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20 hover:bg-amber-500/20" },
518
- { value: "thinking", icon: Brain, iconColor: "text-pink-500", color: "bg-pink-500/10 text-pink-600 dark:text-pink-400 border-pink-500/20 hover:bg-pink-500/20" }
851
+ { value: "chat", icon: MessageSquare, iconColor: "text-blue-500", color: "bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20 hover:bg-blue-500/20" },
852
+ { value: "streaming", icon: Waves, iconColor: "text-cyan-500", color: "bg-cyan-500/10 text-cyan-700 dark:text-cyan-400 border-cyan-500/20 hover:bg-cyan-500/20" },
853
+ { value: "function_calling", icon: Code, iconColor: "text-purple-500", color: "bg-purple-500/10 text-purple-700 dark:text-purple-400 border-purple-500/20 hover:bg-purple-500/20" },
854
+ { value: "vision", icon: Eye, iconColor: "text-amber-500", color: "bg-amber-500/10 text-amber-700 dark:text-amber-400 border-amber-500/20 hover:bg-amber-500/20" },
855
+ { value: "thinking", icon: Brain, iconColor: "text-pink-500", color: "bg-pink-500/10 text-pink-700 dark:text-pink-400 border-pink-500/20 hover:bg-pink-500/20" }
519
856
  ];
520
857
  var imageCapabilityConfig = [
521
- { value: "image_edit", icon: Pencil, iconColor: "text-orange-500", color: "bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20 hover:bg-orange-500/20" },
522
- { value: "negative_prompt", icon: Ban, iconColor: "text-red-500", color: "bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20 hover:bg-red-500/20" },
523
- { value: "seed_control", icon: Fingerprint, iconColor: "text-indigo-500", color: "bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-500/20 hover:bg-indigo-500/20" },
524
- { value: "lora", icon: Layers, iconColor: "text-teal-500", color: "bg-teal-500/10 text-teal-600 dark:text-teal-400 border-teal-500/20 hover:bg-teal-500/20" },
525
- { value: "guidance_scale", icon: SlidersHorizontal, iconColor: "text-yellow-500", color: "bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 border-yellow-500/20 hover:bg-yellow-500/20" },
526
- { value: "strength", icon: SlidersHorizontal, iconColor: "text-orange-500", color: "bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20 hover:bg-orange-500/20" },
527
- { value: "batch", icon: Waves, iconColor: "text-cyan-500", color: "bg-cyan-500/10 text-cyan-600 dark:text-cyan-400 border-cyan-500/20 hover:bg-cyan-500/20" }
858
+ { value: "image_edit", icon: Pencil, iconColor: "text-orange-500", color: "bg-orange-500/10 text-orange-700 dark:text-orange-400 border-orange-500/20 hover:bg-orange-500/20" },
859
+ { value: "negative_prompt", icon: Ban, iconColor: "text-red-500", color: "bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20 hover:bg-red-500/20" },
860
+ { value: "seed_control", icon: Fingerprint, iconColor: "text-indigo-500", color: "bg-indigo-500/10 text-indigo-700 dark:text-indigo-400 border-indigo-500/20 hover:bg-indigo-500/20" },
861
+ { value: "lora", icon: Layers, iconColor: "text-teal-500", color: "bg-teal-500/10 text-teal-700 dark:text-teal-400 border-teal-500/20 hover:bg-teal-500/20" },
862
+ { value: "guidance_scale", icon: SlidersHorizontal, iconColor: "text-yellow-500", color: "bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20 hover:bg-yellow-500/20" },
863
+ { value: "strength", icon: SlidersHorizontal, iconColor: "text-orange-500", color: "bg-orange-500/10 text-orange-700 dark:text-orange-400 border-orange-500/20 hover:bg-orange-500/20" },
864
+ { value: "batch", icon: Waves, iconColor: "text-cyan-500", color: "bg-cyan-500/10 text-cyan-700 dark:text-cyan-400 border-cyan-500/20 hover:bg-cyan-500/20" }
528
865
  ];
529
866
  var audioCapabilityConfig = [
530
- { value: "tts", icon: Mic, iconColor: "text-green-500", color: "bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20 hover:bg-green-500/20" },
531
- { value: "stt", icon: MessageSquare, iconColor: "text-blue-500", color: "bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 hover:bg-blue-500/20" },
532
- { value: "audio_translation", icon: Waves, iconColor: "text-purple-500", color: "bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20 hover:bg-purple-500/20" }
867
+ { value: "tts", icon: Mic, iconColor: "text-green-500", color: "bg-green-500/10 text-green-700 dark:text-green-400 border-green-500/20 hover:bg-green-500/20" },
868
+ { value: "stt", icon: MessageSquare, iconColor: "text-blue-500", color: "bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20 hover:bg-blue-500/20" },
869
+ { value: "audio_translation", icon: Waves, iconColor: "text-purple-500", color: "bg-purple-500/10 text-purple-700 dark:text-purple-400 border-purple-500/20 hover:bg-purple-500/20" }
533
870
  ];
534
871
  var videoCapabilityConfig = [
535
- { value: "video_generation", icon: Video, iconColor: "text-red-500", color: "bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20 hover:bg-red-500/20" }
872
+ { value: "video_generation", icon: Video, iconColor: "text-red-500", color: "bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20 hover:bg-red-500/20" }
536
873
  ];
537
874
  var musicCapabilityConfig = [
538
- { value: "music_generation", icon: Music, iconColor: "text-pink-500", color: "bg-pink-500/10 text-pink-600 dark:text-pink-400 border-pink-500/20 hover:bg-pink-500/20" }
875
+ { value: "music_generation", icon: Music, iconColor: "text-pink-500", color: "bg-pink-500/10 text-pink-700 dark:text-pink-400 border-pink-500/20 hover:bg-pink-500/20" }
539
876
  ];
540
877
  var threedCapabilityConfig = [
541
- { value: "threed_generation", icon: Box, iconColor: "text-indigo-500", color: "bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-500/20 hover:bg-indigo-500/20" }
878
+ { value: "threed_generation", icon: Box, iconColor: "text-indigo-500", color: "bg-indigo-500/10 text-indigo-700 dark:text-indigo-400 border-indigo-500/20 hover:bg-indigo-500/20" }
542
879
  ];
543
880
  var realtimeCapabilityConfig = [
544
- { value: "realtime_voice", icon: Radio, iconColor: "text-yellow-500", color: "bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 border-yellow-500/20 hover:bg-yellow-500/20" }
881
+ { value: "realtime_voice", icon: Radio, iconColor: "text-yellow-500", color: "bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20 hover:bg-yellow-500/20" }
545
882
  ];
546
883
  function CapabilitySelector({ selected, onChange, disabled = false, size = "md", columns = 4, modelType }) {
547
884
  const t = useYunUI().useT("capabilities");
@@ -1035,6 +1372,41 @@ var developerIconMap = {
1035
1372
  minicpm: "minicpm.webp",
1036
1373
  nousresearch: "nousresearch.webp"
1037
1374
  };
1375
+ var modelDeveloperPatterns = [
1376
+ [/claude|anthropic/, "claude"],
1377
+ [/gemini/, "gemini"],
1378
+ [/gemma/, "gemma"],
1379
+ [/palm|bison/, "palm"],
1380
+ [/gpt|openai|davinci|chatgpt|text-embedding|dall-?e|whisper|codex|o[134]-/, "openai"],
1381
+ [/glm|chatglm|zhipu|z\.?ai/, "zai"],
1382
+ [/minimax|hailuo|abab/, "minimax"],
1383
+ [/qwen|qwq|dashscope|alibaba|tongyi/, "qwen"],
1384
+ [/deepseek/, "deepseek"],
1385
+ [/llama|meta-/, "meta"],
1386
+ [/mistral|mixtral|codestral|pixtral|magistral|ministral/, "mistral"],
1387
+ [/grok|x-?ai/, "xai"],
1388
+ [/moonshot|kimi/, "moonshot"],
1389
+ [/doubao/, "doubao"],
1390
+ [/hunyuan/, "hunyuan"],
1391
+ [/ernie|wenxin|baidu/, "wenxin"],
1392
+ [/step-|stepfun/, "stepfun"],
1393
+ [/yi-|zero-one|01-ai/, "yi"],
1394
+ [/command|cohere/, "cohere"],
1395
+ [/phi-\d|microsoft/, "microsoft"],
1396
+ [/nemotron|nvidia/, "nvidia"],
1397
+ [/internlm|internvl/, "internlm"],
1398
+ [/flux/, "flux"]
1399
+ ];
1400
+ function getModelDeveloperId(...identifiers) {
1401
+ const haystack = identifiers.filter(Boolean).join(" ").toLowerCase();
1402
+ for (const [pattern, developer] of modelDeveloperPatterns) {
1403
+ if (pattern.test(haystack)) return developer;
1404
+ }
1405
+ const first = identifiers.find((value) => Boolean(value));
1406
+ if (!first) return "";
1407
+ const parts = first.split("/").filter(Boolean);
1408
+ return parts.at(-1) || first;
1409
+ }
1038
1410
  function getDeveloperIconPath(developer) {
1039
1411
  if (!developer) return null;
1040
1412
  const file = getDeveloperIconFile(developer);
@@ -1123,6 +1495,7 @@ var providerIconMap = {
1123
1495
  ppio: "ppio.webp",
1124
1496
  vertexai: "vertexai.webp",
1125
1497
  gcp: "vertexai.webp",
1498
+ gmi: "gmi.svg",
1126
1499
  "302ai": "302ai.webp",
1127
1500
  aihubmix: "aihubmix.webp",
1128
1501
  dmxapi: "DMXAPI.png",
@@ -1339,6 +1712,7 @@ var ProviderNames = {
1339
1712
  ppio: "PPIO",
1340
1713
  vertexai: "Vertex AI",
1341
1714
  gcp: "Vertex AI",
1715
+ gmi: "GMI Cloud",
1342
1716
  "302ai": "302.AI",
1343
1717
  aihubmix: "AiHubMix",
1344
1718
  dmxapi: "DMXAPI",
@@ -1482,20 +1856,20 @@ function ProviderIconImg({ provider, size = 16 }) {
1482
1856
  return /* @__PURE__ */ jsx(ProviderIcon, { provider, size, rounded: true });
1483
1857
  }
1484
1858
  var MODEL_TYPE_ICONS = {
1485
- chat: /* @__PURE__ */ jsx(MessageSquare, { size: 16, className: "text-blue-500" }),
1486
- completion: /* @__PURE__ */ jsx(FileText, { size: 16, className: "text-gray-500" }),
1487
- embedding: /* @__PURE__ */ jsx(Hash, { size: 16, className: "text-purple-500" }),
1488
- image_generation: /* @__PURE__ */ jsx(Palette, { size: 16, className: "text-pink-500" }),
1489
- audio: /* @__PURE__ */ jsx(Headphones, { size: 16, className: "text-orange-500" }),
1490
- tts: /* @__PURE__ */ jsx(Volume2, { size: 16, className: "text-green-500" }),
1491
- stt: /* @__PURE__ */ jsx(Mic, { size: 16, className: "text-red-500" }),
1492
- video: /* @__PURE__ */ jsx(Video, { size: 16, className: "text-cyan-500" }),
1493
- video_generation: /* @__PURE__ */ jsx(Video, { size: 16, className: "text-cyan-400" }),
1494
- music_generation: /* @__PURE__ */ jsx(Music, { size: 16, className: "text-orange-400" }),
1495
- rerank: /* @__PURE__ */ jsx(Shuffle, { size: 16, className: "text-indigo-500" }),
1496
- moderation: /* @__PURE__ */ jsx(Shield, { size: 16, className: "text-yellow-500" }),
1497
- "3d": /* @__PURE__ */ jsx(Box, { size: 16, className: "text-amber-500" }),
1498
- realtime: /* @__PURE__ */ jsx(Radio, { size: 16, className: "text-yellow-400" })
1859
+ chat: /* @__PURE__ */ jsx(MessageSquare, { size: 16, className: "text-blue-600" }),
1860
+ completion: /* @__PURE__ */ jsx(FileText, { size: 16, className: "text-gray-600" }),
1861
+ embedding: /* @__PURE__ */ jsx(Hash, { size: 16, className: "text-purple-600" }),
1862
+ image_generation: /* @__PURE__ */ jsx(Palette, { size: 16, className: "text-pink-600" }),
1863
+ audio: /* @__PURE__ */ jsx(Headphones, { size: 16, className: "text-orange-600" }),
1864
+ tts: /* @__PURE__ */ jsx(Volume2, { size: 16, className: "text-green-600" }),
1865
+ stt: /* @__PURE__ */ jsx(Mic, { size: 16, className: "text-red-600" }),
1866
+ video: /* @__PURE__ */ jsx(Video, { size: 16, className: "text-cyan-600" }),
1867
+ video_generation: /* @__PURE__ */ jsx(Video, { size: 16, className: "text-cyan-600" }),
1868
+ music_generation: /* @__PURE__ */ jsx(Music, { size: 16, className: "text-orange-600" }),
1869
+ rerank: /* @__PURE__ */ jsx(Shuffle, { size: 16, className: "text-indigo-600" }),
1870
+ moderation: /* @__PURE__ */ jsx(Shield, { size: 16, className: "text-yellow-600" }),
1871
+ "3d": /* @__PURE__ */ jsx(Box, { size: 16, className: "text-amber-600" }),
1872
+ realtime: /* @__PURE__ */ jsx(Radio, { size: 16, className: "text-yellow-600" })
1499
1873
  };
1500
1874
  function ModelTypeIcon({ type, size = 16 }) {
1501
1875
  const icon = MODEL_TYPE_ICONS[type.toLowerCase()];
@@ -1505,13 +1879,13 @@ function ModelTypeIcon({ type, size = 16 }) {
1505
1879
  return /* @__PURE__ */ jsx(Bot, { size, className: "text-muted-foreground" });
1506
1880
  }
1507
1881
  var variants = {
1508
- primary: "bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80 disabled:bg-fd-secondary disabled:text-fd-secondary-foreground",
1509
- outline: "border hover:bg-fd-accent hover:text-fd-accent-foreground",
1510
- ghost: "hover:bg-fd-accent hover:text-fd-accent-foreground",
1511
- secondary: "border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground"
1882
+ primary: "bg-primary text-primary-foreground hover:bg-primary/80 disabled:bg-secondary disabled:text-secondary-foreground",
1883
+ outline: "border border-border hover:bg-accent hover:text-accent-foreground",
1884
+ ghost: "hover:bg-accent hover:text-accent-foreground",
1885
+ secondary: "border border-border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
1512
1886
  };
1513
1887
  var buttonVariants = cva(
1514
- "inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring",
1888
+ "inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1515
1889
  {
1516
1890
  variants: {
1517
1891
  variant: variants,
@@ -1540,16 +1914,8 @@ function LanguageSwitcher({
1540
1914
  const containerRef = useRef(null);
1541
1915
  const triggerRef = useRef(null);
1542
1916
  const panelRef = useRef(null);
1543
- const { shift, maxHeight } = useAnchoredPosition(isOpen, panelRef);
1544
- useEffect(() => {
1545
- const handleClickOutside = (e) => {
1546
- if (containerRef.current && !containerRef.current.contains(e.target)) {
1547
- setIsOpen(false);
1548
- }
1549
- };
1550
- document.addEventListener("mousedown", handleClickOutside);
1551
- return () => document.removeEventListener("mousedown", handleClickOutside);
1552
- }, []);
1917
+ const { shift, maxHeight, placement } = useAnchoredPosition(isOpen, panelRef);
1918
+ useDismissOnOutside(isOpen, () => setIsOpen(false), containerRef, { escape: false });
1553
1919
  useEffect(() => {
1554
1920
  if (!isOpen) return;
1555
1921
  const onKey = (e) => {
@@ -1567,53 +1933,57 @@ function LanguageSwitcher({
1567
1933
  onChange(newLocale);
1568
1934
  };
1569
1935
  const currentLabel = locales.find((l) => l.value === currentLocale)?.label ?? currentLocale;
1570
- return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: `relative ${className}`, children: [
1571
- variant === "pill" ? /* @__PURE__ */ jsxs(
1572
- "button",
1573
- {
1574
- ref: triggerRef,
1575
- onClick: () => setIsOpen(!isOpen),
1576
- className: "flex items-center gap-1.5 h-9 px-2.5 sm:px-3 rounded-full text-sm font-medium transition-all bg-(--bg-elevated) hover:bg-(--bg-elevated)/80 border border-(--border-hairline) text-(--text-secondary) hover:text-(--text-primary) disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1577
- disabled: pending,
1578
- "aria-label": label,
1579
- "aria-expanded": isOpen,
1580
- "aria-haspopup": "listbox",
1581
- children: [
1582
- /* @__PURE__ */ jsx(Globe, { size: 14, className: "shrink-0" }),
1583
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: currentLabel })
1584
- ]
1585
- }
1586
- ) : /* @__PURE__ */ jsx(
1587
- "button",
1588
- {
1589
- ref: triggerRef,
1590
- onClick: () => setIsOpen(!isOpen),
1591
- className: "w-9 h-9 rounded-lg flex items-center justify-center hover:bg-foreground/5 transition-colors disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1592
- disabled: pending,
1593
- "aria-label": label,
1594
- "aria-expanded": isOpen,
1595
- "aria-haspopup": "listbox",
1596
- children: /* @__PURE__ */ jsx(Globe, { className: "h-[1.2rem] w-[1.2rem]" })
1597
- }
1598
- ),
1599
- isOpen && /* @__PURE__ */ jsx(
1600
- "div",
1601
- {
1602
- ref: panelRef,
1603
- style: { marginLeft: shift, maxHeight },
1604
- className: `absolute ${align === "left" ? "left-0" : "right-0"} top-full mt-2 z-50 flex flex-col overflow-hidden rounded-2xl border border-border bg-background/60 backdrop-blur-2xl text-popover-foreground shadow-lg shadow-black/5 animate-in fade-in-0 zoom-in-95 duration-200`,
1605
- children: /* @__PURE__ */ jsx("div", { className: "p-1 flex-1 min-h-0 overflow-y-auto", children: locales.map((lang) => /* @__PURE__ */ jsx(
1606
- "button",
1607
- {
1608
- onClick: () => handleLocaleChange(lang.value),
1609
- className: `dropdown-item w-full text-left ${currentLocale === lang.value ? "active" : ""}`,
1610
- children: /* @__PURE__ */ jsx("span", { className: "flex-1", children: lang.label })
1611
- },
1612
- lang.value
1613
- )) })
1614
- }
1615
- )
1616
- ] });
1936
+ return (
1937
+ // inline-flex so the root shrink-wraps the trigger; a block root filled the row and made the
1938
+ // right-0 dropdown anchor to the row's far edge instead of the trigger.
1939
+ /* @__PURE__ */ jsxs("div", { ref: containerRef, className: `relative inline-flex ${className}`, children: [
1940
+ variant === "pill" ? /* @__PURE__ */ jsxs(
1941
+ "button",
1942
+ {
1943
+ ref: triggerRef,
1944
+ onClick: () => setIsOpen(!isOpen),
1945
+ className: "flex items-center gap-1.5 h-9 px-2.5 sm:px-3 rounded-full text-sm font-medium transition-all bg-(--bg-elevated) hover:bg-(--bg-elevated)/80 border border-(--border-hairline) text-(--text-secondary) hover:text-(--text-primary) disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1946
+ disabled: pending,
1947
+ "aria-label": label,
1948
+ "aria-expanded": isOpen,
1949
+ "aria-haspopup": "listbox",
1950
+ children: [
1951
+ /* @__PURE__ */ jsx(Globe, { size: 14, className: "shrink-0" }),
1952
+ /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: currentLabel })
1953
+ ]
1954
+ }
1955
+ ) : /* @__PURE__ */ jsx(
1956
+ "button",
1957
+ {
1958
+ ref: triggerRef,
1959
+ onClick: () => setIsOpen(!isOpen),
1960
+ className: "w-9 h-9 rounded-lg flex items-center justify-center hover:bg-foreground/5 transition-colors disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
1961
+ disabled: pending,
1962
+ "aria-label": label,
1963
+ "aria-expanded": isOpen,
1964
+ "aria-haspopup": "listbox",
1965
+ children: /* @__PURE__ */ jsx(Globe, { className: "h-[1.2rem] w-[1.2rem]" })
1966
+ }
1967
+ ),
1968
+ isOpen && /* @__PURE__ */ jsx(
1969
+ "div",
1970
+ {
1971
+ ref: panelRef,
1972
+ style: { marginLeft: shift, maxHeight },
1973
+ className: `absolute ${align === "left" ? "left-0" : "right-0"} ${placement === "top" ? "bottom-full mb-2 origin-bottom" : "top-full mt-2 origin-top"} z-50 flex flex-col overflow-hidden rounded-2xl border border-border bg-popover/95 backdrop-blur-2xl text-popover-foreground shadow-lg shadow-black/5 animate-in fade-in-0 zoom-in-95 duration-200`,
1974
+ children: /* @__PURE__ */ jsx("div", { className: "p-1 flex-1 min-h-0 overflow-y-auto", children: locales.map((lang) => /* @__PURE__ */ jsx(
1975
+ "button",
1976
+ {
1977
+ onClick: () => handleLocaleChange(lang.value),
1978
+ className: `dropdown-item w-full text-left ${currentLocale === lang.value ? "active" : ""}`,
1979
+ children: /* @__PURE__ */ jsx("span", { className: "flex-1", children: lang.label })
1980
+ },
1981
+ lang.value
1982
+ )) })
1983
+ }
1984
+ )
1985
+ ] })
1986
+ );
1617
1987
  }
1618
1988
  function Navbar({
1619
1989
  appName,
@@ -1626,7 +1996,14 @@ function Navbar({
1626
1996
  themeToggle,
1627
1997
  homeHref = "/",
1628
1998
  loginHref = "/login",
1629
- signupHref = "/signup"
1999
+ signupHref = "/signup",
2000
+ account,
2001
+ brand,
2002
+ actions,
2003
+ mobileMenuHeader,
2004
+ mobileMenuFooter,
2005
+ label,
2006
+ className
1630
2007
  }) {
1631
2008
  const { Link, Image } = useYunUI();
1632
2009
  const [scrollSection, setScrollSection] = useState("");
@@ -1678,12 +2055,13 @@ function Navbar({
1678
2055
  "nav",
1679
2056
  {
1680
2057
  style: { top: "max(1.5rem, env(safe-area-inset-top))" },
1681
- className: "fixed left-1/2 -translate-x-1/2 z-50 px-6 py-2.5 max-w-6xl w-[calc(100%-48px)] bg-background/80 backdrop-blur-xl border border-border rounded-full shadow-md flex items-center justify-between",
2058
+ "aria-label": label,
2059
+ className: `fixed inset-x-0 mx-auto z-50 px-6 py-2.5 max-w-6xl w-[calc(100%-48px)] bg-background/80 backdrop-blur-xl border border-border rounded-full shadow-md flex items-center justify-between${className ? ` ${className}` : ""}`,
1682
2060
  children: [
1683
- /* @__PURE__ */ jsxs(Link, { href: homeHref, className: "flex items-center gap-2 min-w-0 rounded-lg px-2 py-1 -mx-2 hover:bg-foreground/5 transition-colors duration-200", children: [
2061
+ /* @__PURE__ */ jsx(Link, { href: homeHref, className: "flex items-center gap-2 min-w-0 rounded-lg px-2 py-1 -mx-2 hover:bg-foreground/5 transition-colors duration-200", children: brand ?? /* @__PURE__ */ jsxs(Fragment, { children: [
1684
2062
  /* @__PURE__ */ jsx(Image, { src: logoSrc, alt: appName, width: 28, height: 28, className: "w-7 h-7 shrink-0" }),
1685
2063
  /* @__PURE__ */ jsx("span", { className: "font-semibold text-sm tracking-tight truncate", children: appName })
1686
- ] }),
2064
+ ] }) }),
1687
2065
  variant === "public" && /* @__PURE__ */ jsx("div", { className: "hidden md:flex items-center gap-6 lg:gap-8 absolute left-1/2 -translate-x-1/2", children: links.map((link) => /* @__PURE__ */ jsxs(
1688
2066
  Link,
1689
2067
  {
@@ -1697,9 +2075,11 @@ function Navbar({
1697
2075
  link.href
1698
2076
  )) }),
1699
2077
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 shrink-0", children: [
1700
- /* @__PURE__ */ jsx("span", { className: "hidden md:flex items-center gap-1.5", children: languageSwitcher }),
2078
+ actions && /* @__PURE__ */ jsx("span", { className: "hidden md:flex items-center gap-1.5", children: actions }),
2079
+ languageSwitcher && /* @__PURE__ */ jsx("span", { className: "hidden md:flex items-center gap-1.5", children: languageSwitcher }),
1701
2080
  themeToggle ?? /* @__PURE__ */ jsx(ThemeToggle, { variant: "pill" }),
1702
- variant !== "minimal" && /* @__PURE__ */ jsxs(Fragment, { children: [
2081
+ variant !== "minimal" && account,
2082
+ variant !== "minimal" && !account && /* @__PURE__ */ jsxs(Fragment, { children: [
1703
2083
  /* @__PURE__ */ jsx(
1704
2084
  Link,
1705
2085
  {
@@ -1731,7 +2111,8 @@ function Navbar({
1731
2111
  ] }),
1732
2112
  variant === "public" && menuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
1733
2113
  /* @__PURE__ */ jsx("div", { className: "md:hidden fixed inset-0 -z-10", "aria-hidden": "true", onClick: () => setMenuOpen(false) }),
1734
- /* @__PURE__ */ jsxs("div", { className: "md:hidden absolute top-full left-0 right-0 mt-3 p-2 bg-background/60 backdrop-blur-2xl border border-border rounded-2xl shadow-lg shadow-black/5 flex flex-col gap-0.5", children: [
2114
+ /* @__PURE__ */ jsxs("div", { className: "md:hidden absolute top-full left-0 right-0 mt-3 p-2 bg-popover border border-border rounded-2xl shadow-lg shadow-black/5 flex flex-col gap-0.5", children: [
2115
+ mobileMenuHeader,
1735
2116
  links.map((link) => /* @__PURE__ */ jsx(
1736
2117
  Link,
1737
2118
  {
@@ -1743,32 +2124,145 @@ function Navbar({
1743
2124
  link.href
1744
2125
  )),
1745
2126
  /* @__PURE__ */ jsx("div", { className: "my-1 border-t border-border" }),
1746
- languageSwitcher && /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5", children: languageSwitcher }),
1747
- /* @__PURE__ */ jsx(
1748
- Link,
1749
- {
1750
- href: loginHref,
1751
- onClick: () => setMenuOpen(false),
1752
- className: "px-4 py-2.5 rounded-xl text-sm text-muted-foreground transition-colors hover:bg-foreground/5",
1753
- children: signIn
1754
- }
1755
- ),
1756
- /* @__PURE__ */ jsx(
1757
- Link,
1758
- {
1759
- href: signupHref,
1760
- onClick: () => setMenuOpen(false),
1761
- className: "mt-0.5 px-4 py-2.5 rounded-xl text-sm font-medium text-center bg-foreground text-background hover:bg-foreground/90 transition-colors yunui-accent-bg yunui-accent-on",
1762
- children: signUp
1763
- }
1764
- )
2127
+ mobileMenuFooter ?? (languageSwitcher && /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5", children: languageSwitcher })),
2128
+ !account && /* @__PURE__ */ jsxs(Fragment, { children: [
2129
+ /* @__PURE__ */ jsx(
2130
+ Link,
2131
+ {
2132
+ href: loginHref,
2133
+ onClick: () => setMenuOpen(false),
2134
+ className: "px-4 py-2.5 rounded-xl text-sm text-muted-foreground transition-colors hover:bg-foreground/5",
2135
+ children: signIn
2136
+ }
2137
+ ),
2138
+ /* @__PURE__ */ jsx(
2139
+ Link,
2140
+ {
2141
+ href: signupHref,
2142
+ onClick: () => setMenuOpen(false),
2143
+ className: "mt-0.5 px-4 py-2.5 rounded-xl text-sm font-medium text-center bg-foreground text-background hover:bg-foreground/90 transition-colors yunui-accent-bg yunui-accent-on",
2144
+ children: signUp
2145
+ }
2146
+ )
2147
+ ] })
1765
2148
  ] })
1766
2149
  ] })
1767
2150
  ]
1768
2151
  }
1769
2152
  );
1770
2153
  }
2154
+ function AccountMenu({
2155
+ user,
2156
+ items = [],
2157
+ signInHref,
2158
+ onSignOut,
2159
+ labels,
2160
+ className
2161
+ }) {
2162
+ const { Link } = useYunUI();
2163
+ const [open, setOpen] = useState(false);
2164
+ const ref = useRef(null);
2165
+ const signInLabel = labels?.signIn ?? "Sign in";
2166
+ const signOutLabel = labels?.signOut ?? "Sign out";
2167
+ const fallbackName = labels?.fallbackName ?? "Account";
2168
+ useDismissOnOutside(open, () => setOpen(false), ref);
2169
+ if (user === void 0) {
2170
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("block h-9 w-9", className) });
2171
+ }
2172
+ if (user === null) {
2173
+ return /* @__PURE__ */ jsx(
2174
+ Link,
2175
+ {
2176
+ href: signInHref,
2177
+ "aria-label": signInLabel,
2178
+ className: cn(
2179
+ "flex h-9 w-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-foreground/5 hover:text-foreground",
2180
+ className
2181
+ ),
2182
+ children: /* @__PURE__ */ jsx(CircleUserRound, { className: "h-4 w-4" })
2183
+ }
2184
+ );
2185
+ }
2186
+ const name = user.name || fallbackName;
2187
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative", className), children: [
2188
+ /* @__PURE__ */ jsx(
2189
+ "button",
2190
+ {
2191
+ type: "button",
2192
+ onClick: () => setOpen((v) => !v),
2193
+ "aria-haspopup": "menu",
2194
+ "aria-expanded": open,
2195
+ "aria-label": labels?.menu ?? name,
2196
+ className: "flex h-9 w-9 items-center justify-center overflow-hidden rounded-full transition-colors hover:bg-foreground/5 outline-none focus-visible:ring-2 focus-visible:ring-ring",
2197
+ children: user.avatarUrl ? (
2198
+ // eslint-disable-next-line @next/next/no-img-element
2199
+ /* @__PURE__ */ jsx("img", { src: user.avatarUrl, alt: "", width: 28, height: 28, className: "h-7 w-7 rounded-full" })
2200
+ ) : /* @__PURE__ */ jsx(CircleUserRound, { className: "h-4 w-4 text-muted-foreground" })
2201
+ }
2202
+ ),
2203
+ open && /* @__PURE__ */ jsxs(
2204
+ "div",
2205
+ {
2206
+ role: "menu",
2207
+ className: "absolute right-0 top-full z-50 mt-2 w-56 rounded-2xl border border-border bg-popover/95 p-1.5 shadow-lg shadow-black/5 backdrop-blur-2xl",
2208
+ children: [
2209
+ /* @__PURE__ */ jsxs("div", { className: "border-b border-border px-3 py-2.5", children: [
2210
+ /* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium", children: name }),
2211
+ user.email && /* @__PURE__ */ jsx("p", { className: "text-caption truncate", children: user.email })
2212
+ ] }),
2213
+ items.map((item) => {
2214
+ const Icon = item.icon;
2215
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
2216
+ Icon && /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4", "aria-hidden": true }),
2217
+ item.label
2218
+ ] });
2219
+ const rowClass = "mt-1 flex w-full items-center gap-2.5 rounded-xl px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-foreground/5 hover:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring";
2220
+ return item.onSelect ? /* @__PURE__ */ jsx(
2221
+ "button",
2222
+ {
2223
+ type: "button",
2224
+ role: "menuitem",
2225
+ onClick: () => {
2226
+ item.onSelect?.();
2227
+ setOpen(false);
2228
+ },
2229
+ className: rowClass,
2230
+ children: body
2231
+ },
2232
+ item.key
2233
+ ) : /* @__PURE__ */ jsx(
2234
+ Link,
2235
+ {
2236
+ href: item.href ?? "#",
2237
+ onClick: () => setOpen(false),
2238
+ className: rowClass,
2239
+ children: body
2240
+ },
2241
+ item.key
2242
+ );
2243
+ }),
2244
+ onSignOut && /* @__PURE__ */ jsxs(
2245
+ "button",
2246
+ {
2247
+ type: "button",
2248
+ role: "menuitem",
2249
+ onClick: () => {
2250
+ onSignOut();
2251
+ setOpen(false);
2252
+ },
2253
+ className: "mt-1 flex w-full items-center gap-2.5 rounded-xl px-3 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-foreground/5 hover:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring",
2254
+ children: [
2255
+ /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4", "aria-hidden": true }),
2256
+ signOutLabel
2257
+ ]
2258
+ }
2259
+ )
2260
+ ]
2261
+ }
2262
+ )
2263
+ ] });
2264
+ }
1771
2265
 
1772
- export { CapabilityIcon, CapabilitySelector, IDBadge, LanguageSwitcher, ModelAvatar, ModelCard, ModelIcon, ModelManagerCard, ModelSelect, ModelTypeIcon, Navbar, PROVIDER_ICON_SLUGS, ProviderAvatar, ProviderIcon, ProviderIconImg, ProviderNames, ThinkingBlock, buttonVariants, getDeveloperIconPath, getIconPath, getProviderIconOptions, getProviderName, isKnownCapability, normalizeProviderId };
2266
+ export { AccountMenu, AgentRunStatus, AgentTimeline, CapabilityIcon, CapabilitySelector, IDBadge, LanguageSwitcher, ModelAvatar, ModelCard, ModelIcon, ModelManagerCard, ModelSelect, ModelTypeIcon, Navbar, PROVIDER_ICON_SLUGS, ProviderAvatar, ProviderIcon, ProviderIconImg, ProviderNames, ThinkingBlock, buttonVariants, getDeveloperIconPath, getIconPath, getModelDeveloperId, getProviderIconOptions, getProviderName, isKnownCapability, normalizeProviderId };
1773
2267
  //# sourceMappingURL=ai.js.map
1774
2268
  //# sourceMappingURL=ai.js.map