@yuhuanowo/yunui 0.2.15 → 0.2.17

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 (453) hide show
  1. package/README.md +11 -0
  2. package/README.zh-CN.md +9 -0
  3. package/README.zh-TW.md +9 -0
  4. package/dist/adapters.js +1 -1
  5. package/dist/ai.d.ts +94 -6
  6. package/dist/ai.js +466 -76
  7. package/dist/ai.js.map +1 -1
  8. package/dist/chat.d.ts +152 -0
  9. package/dist/chat.js +321 -0
  10. package/dist/chat.js.map +1 -0
  11. package/dist/{chunk-U2LNRVMI.js → chunk-3RT24MSH.js} +4 -3
  12. package/dist/chunk-3RT24MSH.js.map +1 -0
  13. package/dist/{chunk-6MZN3GOP.js → chunk-BCOKFWXC.js} +326 -891
  14. package/dist/chunk-BCOKFWXC.js.map +1 -0
  15. package/dist/{chunk-N53PNMPJ.js → chunk-DDUP7GAX.js} +14 -7
  16. package/dist/chunk-DDUP7GAX.js.map +1 -0
  17. package/dist/{chunk-LLNTUA5K.js → chunk-F2HG4TOQ.js} +44 -67
  18. package/dist/chunk-F2HG4TOQ.js.map +1 -0
  19. package/dist/chunk-HH3JBHRP.js +1211 -0
  20. package/dist/chunk-HH3JBHRP.js.map +1 -0
  21. package/dist/chunk-N4QO7RN5.js +98 -0
  22. package/dist/chunk-N4QO7RN5.js.map +1 -0
  23. package/dist/chunk-QEIBYOG2.js +188 -0
  24. package/dist/chunk-QEIBYOG2.js.map +1 -0
  25. package/dist/content.d.ts +178 -0
  26. package/dist/content.js +1064 -0
  27. package/dist/content.js.map +1 -0
  28. package/dist/index.d.ts +237 -12
  29. package/dist/index.js +5 -3
  30. package/dist/patterns.d.ts +176 -7
  31. package/dist/patterns.js +745 -69
  32. package/dist/patterns.js.map +1 -1
  33. package/icons/apps/aistudio.webp +0 -0
  34. package/icons/apps/application.png +0 -0
  35. package/icons/apps/baixiaoying.webp +0 -0
  36. package/icons/apps/coze.webp +0 -0
  37. package/icons/apps/dify.webp +0 -0
  38. package/icons/apps/doubao.webp +0 -0
  39. package/icons/apps/flowith.webp +0 -0
  40. package/icons/apps/gemini.webp +0 -0
  41. package/icons/apps/github-copilot.webp +0 -0
  42. package/icons/apps/google.webp +0 -0
  43. package/icons/apps/grok.webp +0 -0
  44. package/icons/apps/kimi.webp +0 -0
  45. package/icons/apps/longcat.webp +0 -0
  46. package/icons/apps/metaso.webp +0 -0
  47. package/icons/apps/monica.webp +0 -0
  48. package/icons/apps/n8n.webp +0 -0
  49. package/icons/apps/nm-search.webp +0 -0
  50. package/icons/apps/notebooklm.webp +0 -0
  51. package/icons/apps/perplexity.webp +0 -0
  52. package/icons/apps/poe.webp +0 -0
  53. package/icons/apps/qingyan.webp +0 -0
  54. package/icons/apps/stepfun.webp +0 -0
  55. package/icons/apps/tiangong.webp +0 -0
  56. package/icons/apps/xiaoyi.webp +0 -0
  57. package/icons/apps/yuanbao.webp +0 -0
  58. package/icons/apps/zai.webp +0 -0
  59. package/icons/models/ai21.webp +0 -0
  60. package/icons/models/aimass.webp +0 -0
  61. package/icons/models/anthropic.webp +0 -0
  62. package/icons/models/baichuan.webp +0 -0
  63. package/icons/models/byte_dance.webp +0 -0
  64. package/icons/models/chatglm.webp +0 -0
  65. package/icons/models/claude.webp +0 -0
  66. package/icons/models/codegeex.webp +0 -0
  67. package/icons/models/cogview3flash.webp +0 -0
  68. package/icons/models/cohere.webp +0 -0
  69. package/icons/models/copilot.webp +0 -0
  70. package/icons/models/dalle.webp +0 -0
  71. package/icons/models/dbrx.webp +0 -0
  72. package/icons/models/deepseek.webp +0 -0
  73. package/icons/models/doubao.webp +0 -0
  74. package/icons/models/flux.webp +0 -0
  75. package/icons/models/gemini.webp +0 -0
  76. package/icons/models/gemma.webp +0 -0
  77. package/icons/models/google.webp +0 -0
  78. package/icons/models/grok.webp +0 -0
  79. package/icons/models/hailuo.webp +0 -0
  80. package/icons/models/huggingface.webp +0 -0
  81. package/icons/models/hunyuan.webp +0 -0
  82. package/icons/models/ibm.webp +0 -0
  83. package/icons/models/ideogram.webp +0 -0
  84. package/icons/models/internlm.webp +0 -0
  85. package/icons/models/jina.webp +0 -0
  86. package/icons/models/llava.webp +0 -0
  87. package/icons/models/luma.webp +0 -0
  88. package/icons/models/magic.webp +0 -0
  89. package/icons/models/microsoft.webp +0 -0
  90. package/icons/models/midjourney.webp +0 -0
  91. package/icons/models/minimax.webp +0 -0
  92. package/icons/models/mistral.webp +0 -0
  93. package/icons/models/moonshot.webp +0 -0
  94. package/icons/models/nousresearch.webp +0 -0
  95. package/icons/models/nvidia.webp +0 -0
  96. package/icons/models/o3.webp +0 -0
  97. package/icons/models/openai.webp +0 -0
  98. package/icons/models/palm.webp +0 -0
  99. package/icons/models/perplexity.webp +0 -0
  100. package/icons/models/qwen.webp +0 -0
  101. package/icons/models/stability.webp +0 -0
  102. package/icons/models/step.webp +0 -0
  103. package/icons/models/suno.webp +0 -0
  104. package/icons/models/upstage.webp +0 -0
  105. package/icons/models/vidu.webp +0 -0
  106. package/icons/models/volcengine.webp +0 -0
  107. package/icons/models/voyageai.webp +0 -0
  108. package/icons/models/wenxin.webp +0 -0
  109. package/icons/models/xirang.png +0 -0
  110. package/icons/models/xirang_dark.png +0 -0
  111. package/icons/models/yi.webp +0 -0
  112. package/icons/models/zai.webp +0 -0
  113. package/icons/models/zero-one.webp +0 -0
  114. package/icons/models/zhipu.webp +0 -0
  115. package/icons/providers/302ai.webp +0 -0
  116. package/icons/providers/DMXAPI-to-img.webp +0 -0
  117. package/icons/providers/Tesseract.js.png +0 -0
  118. package/icons/providers/ace.webp +0 -0
  119. package/icons/providers/adobe.webp +0 -0
  120. package/icons/providers/adobefirefly.webp +0 -0
  121. package/icons/providers/agentvoice.webp +0 -0
  122. package/icons/providers/agui.webp +0 -0
  123. package/icons/providers/ai2.webp +0 -0
  124. package/icons/providers/ai21.webp +0 -0
  125. package/icons/providers/ai302.webp +0 -0
  126. package/icons/providers/ai360.webp +0 -0
  127. package/icons/providers/aiOnly.webp +0 -0
  128. package/icons/providers/aihubmix.webp +0 -0
  129. package/icons/providers/aimass.webp +0 -0
  130. package/icons/providers/aionlabs.webp +0 -0
  131. package/icons/providers/airjelly.webp +0 -0
  132. package/icons/providers/aistudio.webp +0 -0
  133. package/icons/providers/akashchat.webp +0 -0
  134. package/icons/providers/alephalpha.webp +0 -0
  135. package/icons/providers/alibaba.webp +0 -0
  136. package/icons/providers/alibabacloud.webp +0 -0
  137. package/icons/providers/amp.webp +0 -0
  138. package/icons/providers/antgroup.webp +0 -0
  139. package/icons/providers/anthropic.webp +0 -0
  140. package/icons/providers/antigravity.webp +0 -0
  141. package/icons/providers/anyscale.webp +0 -0
  142. package/icons/providers/apertis.webp +0 -0
  143. package/icons/providers/apple.webp +0 -0
  144. package/icons/providers/arcee.webp +0 -0
  145. package/icons/providers/askverdict.webp +0 -0
  146. package/icons/providers/assemblyai.webp +0 -0
  147. package/icons/providers/atlascloud.webp +0 -0
  148. package/icons/providers/automatic.webp +0 -0
  149. package/icons/providers/aws-bedrock.webp +0 -0
  150. package/icons/providers/aws.webp +0 -0
  151. package/icons/providers/aya.webp +0 -0
  152. package/icons/providers/azure.webp +0 -0
  153. package/icons/providers/azureai.webp +0 -0
  154. package/icons/providers/baai.webp +0 -0
  155. package/icons/providers/baichuan.webp +0 -0
  156. package/icons/providers/baidu-cloud.webp +0 -0
  157. package/icons/providers/baidu.webp +0 -0
  158. package/icons/providers/baiducloud.webp +0 -0
  159. package/icons/providers/bailian.webp +0 -0
  160. package/icons/providers/baseten.webp +0 -0
  161. package/icons/providers/bedrock.webp +0 -0
  162. package/icons/providers/bfl.webp +0 -0
  163. package/icons/providers/bigModel.webp +0 -0
  164. package/icons/providers/bilibili.webp +0 -0
  165. package/icons/providers/bilibiliindex.webp +0 -0
  166. package/icons/providers/bing.webp +0 -0
  167. package/icons/providers/briaai.webp +0 -0
  168. package/icons/providers/burncloud.webp +0 -0
  169. package/icons/providers/bytedance.webp +0 -0
  170. package/icons/providers/capcut.webp +0 -0
  171. package/icons/providers/centml.webp +0 -0
  172. package/icons/providers/cephalon.jpeg +0 -0
  173. package/icons/providers/cerebras.webp +0 -0
  174. package/icons/providers/chatglm.webp +0 -0
  175. package/icons/providers/cherryin.png +0 -0
  176. package/icons/providers/cherrystudio.webp +0 -0
  177. package/icons/providers/civitai.webp +0 -0
  178. package/icons/providers/claude.webp +0 -0
  179. package/icons/providers/claudecode.webp +0 -0
  180. package/icons/providers/cline.webp +0 -0
  181. package/icons/providers/clipdrop.webp +0 -0
  182. package/icons/providers/cloudflare.webp +0 -0
  183. package/icons/providers/codebuddy.webp +0 -0
  184. package/icons/providers/codeflicker.webp +0 -0
  185. package/icons/providers/codegeex.webp +0 -0
  186. package/icons/providers/codex.webp +0 -0
  187. package/icons/providers/cogvideo.webp +0 -0
  188. package/icons/providers/cogview.webp +0 -0
  189. package/icons/providers/cogview3flash.webp +0 -0
  190. package/icons/providers/cohere.webp +0 -0
  191. package/icons/providers/colab.webp +0 -0
  192. package/icons/providers/cometapi.webp +0 -0
  193. package/icons/providers/comfyui.webp +0 -0
  194. package/icons/providers/commanda.webp +0 -0
  195. package/icons/providers/copilot.webp +0 -0
  196. package/icons/providers/copilotkit.webp +0 -0
  197. package/icons/providers/coqui.webp +0 -0
  198. package/icons/providers/coze.webp +0 -0
  199. package/icons/providers/crewai.webp +0 -0
  200. package/icons/providers/crusoe.webp +0 -0
  201. package/icons/providers/cursor.webp +0 -0
  202. package/icons/providers/cybercut.webp +0 -0
  203. package/icons/providers/dalle.webp +0 -0
  204. package/icons/providers/dbrx.webp +0 -0
  205. package/icons/providers/deepai.webp +0 -0
  206. package/icons/providers/deepcogito.webp +0 -0
  207. package/icons/providers/deepinfra.webp +0 -0
  208. package/icons/providers/deepl.webp +0 -0
  209. package/icons/providers/deepmind.webp +0 -0
  210. package/icons/providers/deepseek.webp +0 -0
  211. package/icons/providers/devin.webp +0 -0
  212. package/icons/providers/dify.webp +0 -0
  213. package/icons/providers/dmxapi-logo-dark.webp +0 -0
  214. package/icons/providers/dmxapi-logo.webp +0 -0
  215. package/icons/providers/doc2x.webp +0 -0
  216. package/icons/providers/docsearch.webp +0 -0
  217. package/icons/providers/dolphin.webp +0 -0
  218. package/icons/providers/doubao.webp +0 -0
  219. package/icons/providers/dreammachine.webp +0 -0
  220. package/icons/providers/elevenlabs.webp +0 -0
  221. package/icons/providers/elevenx.webp +0 -0
  222. package/icons/providers/essentialai.webp +0 -0
  223. package/icons/providers/exa.webp +0 -0
  224. package/icons/providers/fal.webp +0 -0
  225. package/icons/providers/fastgpt.webp +0 -0
  226. package/icons/providers/featherless.webp +0 -0
  227. package/icons/providers/figma.webp +0 -0
  228. package/icons/providers/fireworks.webp +0 -0
  229. package/icons/providers/fishaudio.webp +0 -0
  230. package/icons/providers/flora.webp +0 -0
  231. package/icons/providers/flowith.webp +0 -0
  232. package/icons/providers/flux.webp +0 -0
  233. package/icons/providers/friendli.webp +0 -0
  234. package/icons/providers/gemini.webp +0 -0
  235. package/icons/providers/geminicli.webp +0 -0
  236. package/icons/providers/gemma.webp +0 -0
  237. package/icons/providers/gitee-ai.webp +0 -0
  238. package/icons/providers/giteeai.webp +0 -0
  239. package/icons/providers/github.webp +0 -0
  240. package/icons/providers/githubcopilot.webp +0 -0
  241. package/icons/providers/glama.webp +0 -0
  242. package/icons/providers/glif.webp +0 -0
  243. package/icons/providers/glmv.webp +0 -0
  244. package/icons/providers/google.webp +0 -0
  245. package/icons/providers/googlecloud.webp +0 -0
  246. package/icons/providers/goose.webp +0 -0
  247. package/icons/providers/gradio.webp +0 -0
  248. package/icons/providers/greptile.webp +0 -0
  249. package/icons/providers/grok.webp +0 -0
  250. package/icons/providers/groq.webp +0 -0
  251. package/icons/providers/hailuo.webp +0 -0
  252. package/icons/providers/haiper.webp +0 -0
  253. package/icons/providers/hedra.webp +0 -0
  254. package/icons/providers/hermesagent.webp +0 -0
  255. package/icons/providers/higress.webp +0 -0
  256. package/icons/providers/huawei.webp +0 -0
  257. package/icons/providers/huaweicloud.webp +0 -0
  258. package/icons/providers/huggingface.webp +0 -0
  259. package/icons/providers/hunyuan.webp +0 -0
  260. package/icons/providers/hyperbolic.webp +0 -0
  261. package/icons/providers/ibm.webp +0 -0
  262. package/icons/providers/ideogram.webp +0 -0
  263. package/icons/providers/iflytekcloud.webp +0 -0
  264. package/icons/providers/inception.webp +0 -0
  265. package/icons/providers/inference.webp +0 -0
  266. package/icons/providers/infermatic.webp +0 -0
  267. package/icons/providers/infini.webp +0 -0
  268. package/icons/providers/infinigence.webp +0 -0
  269. package/icons/providers/inflection.webp +0 -0
  270. package/icons/providers/internlm.webp +0 -0
  271. package/icons/providers/jimeng.webp +0 -0
  272. package/icons/providers/jina.webp +0 -0
  273. package/icons/providers/junie.webp +0 -0
  274. package/icons/providers/kilocode.webp +0 -0
  275. package/icons/providers/kimi.webp +0 -0
  276. package/icons/providers/kiro.webp +0 -0
  277. package/icons/providers/kling.webp +0 -0
  278. package/icons/providers/kluster.webp +0 -0
  279. package/icons/providers/kolors.webp +0 -0
  280. package/icons/providers/krea.webp +0 -0
  281. package/icons/providers/kwaikat.webp +0 -0
  282. package/icons/providers/kwaipilot.webp +0 -0
  283. package/icons/providers/lambda.webp +0 -0
  284. package/icons/providers/langchain.webp +0 -0
  285. package/icons/providers/langfuse.webp +0 -0
  286. package/icons/providers/langgraph.webp +0 -0
  287. package/icons/providers/langsmith.webp +0 -0
  288. package/icons/providers/leptonai.webp +0 -0
  289. package/icons/providers/lg.webp +0 -0
  290. package/icons/providers/lightricks.webp +0 -0
  291. package/icons/providers/liquid.webp +0 -0
  292. package/icons/providers/livekit.webp +0 -0
  293. package/icons/providers/llamaindex.webp +0 -0
  294. package/icons/providers/llava.webp +0 -0
  295. package/icons/providers/llmapi.webp +0 -0
  296. package/icons/providers/lmstudio.webp +0 -0
  297. package/icons/providers/lobehub.webp +0 -0
  298. package/icons/providers/longcat.webp +0 -0
  299. package/icons/providers/lovable.webp +0 -0
  300. package/icons/providers/lovart.webp +0 -0
  301. package/icons/providers/luma.webp +0 -0
  302. package/icons/providers/magic.webp +0 -0
  303. package/icons/providers/make.webp +0 -0
  304. package/icons/providers/manus.webp +0 -0
  305. package/icons/providers/mastra.webp +0 -0
  306. package/icons/providers/mcp.webp +0 -0
  307. package/icons/providers/mcpso.webp +0 -0
  308. package/icons/providers/menlo.webp +0 -0
  309. package/icons/providers/meshy.webp +0 -0
  310. package/icons/providers/meta.webp +0 -0
  311. package/icons/providers/metaai.webp +0 -0
  312. package/icons/providers/metagpt.webp +0 -0
  313. package/icons/providers/microsoft.webp +0 -0
  314. package/icons/providers/midjourney.webp +0 -0
  315. package/icons/providers/minimax.webp +0 -0
  316. package/icons/providers/mistral.webp +0 -0
  317. package/icons/providers/modelscope.webp +0 -0
  318. package/icons/providers/monica.webp +0 -0
  319. package/icons/providers/moonshot.webp +0 -0
  320. package/icons/providers/morph.webp +0 -0
  321. package/icons/providers/moxt.webp +0 -0
  322. package/icons/providers/myshell.webp +0 -0
  323. package/icons/providers/n8n.webp +0 -0
  324. package/icons/providers/nanobanana.webp +0 -0
  325. package/icons/providers/nebius.webp +0 -0
  326. package/icons/providers/newapi.webp +0 -0
  327. package/icons/providers/notebooklm.webp +0 -0
  328. package/icons/providers/notion.webp +0 -0
  329. package/icons/providers/nousresearch.webp +0 -0
  330. package/icons/providers/nova.webp +0 -0
  331. package/icons/providers/novelai.webp +0 -0
  332. package/icons/providers/novita.webp +0 -0
  333. package/icons/providers/nplcloud.webp +0 -0
  334. package/icons/providers/nvidia.webp +0 -0
  335. package/icons/providers/o3.webp +0 -0
  336. package/icons/providers/obsidian.webp +0 -0
  337. package/icons/providers/ollama.webp +0 -0
  338. package/icons/providers/openai.webp +0 -0
  339. package/icons/providers/openchat.webp +0 -0
  340. package/icons/providers/openclaw.webp +0 -0
  341. package/icons/providers/opencode.webp +0 -0
  342. package/icons/providers/openhands.webp +0 -0
  343. package/icons/providers/openhuman.webp +0 -0
  344. package/icons/providers/openrouter.webp +0 -0
  345. package/icons/providers/openwebui.webp +0 -0
  346. package/icons/providers/paddleocr.webp +0 -0
  347. package/icons/providers/palm.webp +0 -0
  348. package/icons/providers/parasail.webp +0 -0
  349. package/icons/providers/perplexity.webp +0 -0
  350. package/icons/providers/phidata.webp +0 -0
  351. package/icons/providers/phind.webp +0 -0
  352. package/icons/providers/pika.webp +0 -0
  353. package/icons/providers/pixverse.webp +0 -0
  354. package/icons/providers/player2.webp +0 -0
  355. package/icons/providers/poe.webp +0 -0
  356. package/icons/providers/pollinations.webp +0 -0
  357. package/icons/providers/ppio.webp +0 -0
  358. package/icons/providers/prunaai.webp +0 -0
  359. package/icons/providers/pydanticai.webp +0 -0
  360. package/icons/providers/qingyan.webp +0 -0
  361. package/icons/providers/qiniu.webp +0 -0
  362. package/icons/providers/qoder.webp +0 -0
  363. package/icons/providers/qwen.webp +0 -0
  364. package/icons/providers/railway.webp +0 -0
  365. package/icons/providers/recraft.webp +0 -0
  366. package/icons/providers/relace.webp +0 -0
  367. package/icons/providers/replicate.webp +0 -0
  368. package/icons/providers/replit.webp +0 -0
  369. package/icons/providers/reve.webp +0 -0
  370. package/icons/providers/roocode.webp +0 -0
  371. package/icons/providers/rsshub.webp +0 -0
  372. package/icons/providers/runway.webp +0 -0
  373. package/icons/providers/rwkv.webp +0 -0
  374. package/icons/providers/sambanova.webp +0 -0
  375. package/icons/providers/search1api.webp +0 -0
  376. package/icons/providers/searchapi.webp +0 -0
  377. package/icons/providers/sensenova.webp +0 -0
  378. package/icons/providers/silicon.webp +0 -0
  379. package/icons/providers/siliconcloud.webp +0 -0
  380. package/icons/providers/sillytavern.webp +0 -0
  381. package/icons/providers/skywork.webp +0 -0
  382. package/icons/providers/slock.webp +0 -0
  383. package/icons/providers/smithery.webp +0 -0
  384. package/icons/providers/snowflake.webp +0 -0
  385. package/icons/providers/sophnet.webp +0 -0
  386. package/icons/providers/sora.webp +0 -0
  387. package/icons/providers/spark.webp +0 -0
  388. package/icons/providers/speedai.webp +0 -0
  389. package/icons/providers/stability.webp +0 -0
  390. package/icons/providers/statecloud.webp +0 -0
  391. package/icons/providers/step.webp +0 -0
  392. package/icons/providers/stepfun.webp +0 -0
  393. package/icons/providers/straico.webp +0 -0
  394. package/icons/providers/streamlake.webp +0 -0
  395. package/icons/providers/submodel.webp +0 -0
  396. package/icons/providers/suno.webp +0 -0
  397. package/icons/providers/sync.webp +0 -0
  398. package/icons/providers/targon.webp +0 -0
  399. package/icons/providers/tavily.webp +0 -0
  400. package/icons/providers/tencent-cloud-ti.webp +0 -0
  401. package/icons/providers/tencent.webp +0 -0
  402. package/icons/providers/tencentcloud.webp +0 -0
  403. package/icons/providers/tiangong.webp +0 -0
  404. package/icons/providers/tii.webp +0 -0
  405. package/icons/providers/together.webp +0 -0
  406. package/icons/providers/tokenrouter.png +0 -0
  407. package/icons/providers/topazlabs.webp +0 -0
  408. package/icons/providers/trae.webp +0 -0
  409. package/icons/providers/tripo.webp +0 -0
  410. package/icons/providers/turix.webp +0 -0
  411. package/icons/providers/udio.webp +0 -0
  412. package/icons/providers/unstructured.webp +0 -0
  413. package/icons/providers/upstage.webp +0 -0
  414. package/icons/providers/v0.webp +0 -0
  415. package/icons/providers/vectorizerai.webp +0 -0
  416. package/icons/providers/venice.webp +0 -0
  417. package/icons/providers/vercel.webp +0 -0
  418. package/icons/providers/vertexai.webp +0 -0
  419. package/icons/providers/vidu.webp +0 -0
  420. package/icons/providers/viggle.webp +0 -0
  421. package/icons/providers/vllm.webp +0 -0
  422. package/icons/providers/volcengine.webp +0 -0
  423. package/icons/providers/voyage.webp +0 -0
  424. package/icons/providers/voyageai.webp +0 -0
  425. package/icons/providers/wenxin.webp +0 -0
  426. package/icons/providers/windsurf.webp +0 -0
  427. package/icons/providers/workersai.webp +0 -0
  428. package/icons/providers/worldrouter.webp +0 -0
  429. package/icons/providers/xai.webp +0 -0
  430. package/icons/providers/xiaomimimo.webp +0 -0
  431. package/icons/providers/xinference.webp +0 -0
  432. package/icons/providers/xirang.png +0 -0
  433. package/icons/providers/xpay.webp +0 -0
  434. package/icons/providers/xuanyuan.webp +0 -0
  435. package/icons/providers/yandex.webp +0 -0
  436. package/icons/providers/yi.webp +0 -0
  437. package/icons/providers/youmind.webp +0 -0
  438. package/icons/providers/yuanbao.webp +0 -0
  439. package/icons/providers/zai.webp +0 -0
  440. package/icons/providers/zapier.webp +0 -0
  441. package/icons/providers/zeabur.webp +0 -0
  442. package/icons/providers/zencoder.webp +0 -0
  443. package/icons/providers/zenmux.webp +0 -0
  444. package/icons/providers/zero-one.webp +0 -0
  445. package/icons/providers/zeroone.webp +0 -0
  446. package/icons/providers/zhipu.webp +0 -0
  447. package/package.json +105 -32
  448. package/styles/content.css +129 -0
  449. package/styles/yunui.css +185 -21
  450. package/dist/chunk-6MZN3GOP.js.map +0 -1
  451. package/dist/chunk-LLNTUA5K.js.map +0 -1
  452. package/dist/chunk-N53PNMPJ.js.map +0 -1
  453. package/dist/chunk-U2LNRVMI.js.map +0 -1
package/dist/ai.js CHANGED
@@ -1,11 +1,12 @@
1
1
  "use client";
2
- import { copyToClipboard } from './chunk-N53PNMPJ.js';
3
- export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-N53PNMPJ.js';
4
- import { cn, useAnchoredPosition, ThemeToggle } from './chunk-LLNTUA5K.js';
5
- import { useYunUI } from './chunk-U2LNRVMI.js';
6
- import { memo, useState, useRef, useMemo, useEffect } from 'react';
2
+ import { copyToClipboard } from './chunk-DDUP7GAX.js';
3
+ export { DiscordIcon, Footer, GithubIcon, InstagramIcon } from './chunk-DDUP7GAX.js';
4
+ import { TextShimmer, ThemeToggle } from './chunk-F2HG4TOQ.js';
5
+ import { cn, useAnchoredPosition } from './chunk-N4QO7RN5.js';
6
+ import { useYunUI } from './chunk-3RT24MSH.js';
7
+ import { memo, useState, useEffect, useRef, useMemo } from 'react';
7
8
  import { AnimatePresence, motion } from 'framer-motion';
8
- 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, ShieldAlert, Wrench, FileText, Terminal, Loader2, Shield, Shuffle, Volume2, Headphones, Palette, Hash } from 'lucide-react';
9
10
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
10
11
  import { cva } from 'class-variance-authority';
11
12
 
@@ -52,9 +53,270 @@ function ThinkingBlock({ content, isStreaming, defaultOpen = false, renderConten
52
53
  ) })
53
54
  ] });
54
55
  }
55
- 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
+ }) {
56
317
  const [copied, setCopied] = useState(false);
57
318
  const t = useYunUI().useT("common.badge");
319
+ const sm = size === "sm";
58
320
  const handleCopy = async (e) => {
59
321
  e.preventDefault();
60
322
  e.stopPropagation();
@@ -71,8 +333,8 @@ function IDBadge({ text, truncate = true }) {
71
333
  title: t("clickToCopy", { text }),
72
334
  "aria-label": t("clickToCopy", { text }),
73
335
  children: [
74
- /* @__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 }),
75
- /* @__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 }) })
76
338
  ]
77
339
  }
78
340
  );
@@ -154,6 +416,81 @@ function ModelCard({
154
416
  }
155
417
  );
156
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
+ }
157
494
  function ModelSelect({
158
495
  options,
159
496
  value,
@@ -163,7 +500,9 @@ function ModelSelect({
163
500
  pinned,
164
501
  onTogglePin,
165
502
  filters,
166
- renderFooter
503
+ renderFooter,
504
+ renderHeader,
505
+ filterResetKey
167
506
  }) {
168
507
  const L = {
169
508
  placeholder: "Select a model",
@@ -179,11 +518,16 @@ function ModelSelect({
179
518
  const [search, setSearch] = useState("");
180
519
  const [activeGroup, setActiveGroup] = useState(null);
181
520
  const [activeFilters, setActiveFilters] = useState([]);
521
+ useEffect(() => {
522
+ setSearch("");
523
+ setActiveFilters([]);
524
+ setActiveGroup(null);
525
+ }, [filterResetKey]);
182
526
  const rootRef = useRef(null);
183
527
  const inputRef = useRef(null);
184
528
  const listRef = useRef(null);
185
529
  const panelRef = useRef(null);
186
- const { shift, maxHeight } = useAnchoredPosition(isOpen, panelRef);
530
+ const { shift, maxHeight, placement } = useAnchoredPosition(isOpen, panelRef);
187
531
  const pinnedSet = useMemo(() => new Set(pinned ?? []), [pinned]);
188
532
  useEffect(() => {
189
533
  const onDown = (e) => {
@@ -202,7 +546,7 @@ function ModelSelect({
202
546
  inputRef.current?.focus();
203
547
  if (value && listRef.current) {
204
548
  const el = listRef.current.querySelector(`[data-model-id="${CSS.escape(value)}"]`);
205
- el?.scrollIntoView({ block: "center" });
549
+ el?.scrollIntoView({ block: "nearest" });
206
550
  }
207
551
  }, 50);
208
552
  return () => clearTimeout(t);
@@ -257,6 +601,7 @@ function ModelSelect({
257
601
  onChange(id);
258
602
  setIsOpen(false);
259
603
  };
604
+ const panelMaxHeight = maxHeight == null ? "min(32rem, calc(100dvh - 7rem))" : `min(${maxHeight}px, 32rem, calc(100dvh - 7rem))`;
260
605
  const flatOptions = useMemo(() => {
261
606
  const out = [...pinnedList];
262
607
  for (const opts of Object.values(grouped)) out.push(...opts);
@@ -321,9 +666,11 @@ function ModelSelect({
321
666
  initial: { opacity: 0, y: -8, scale: 0.96 },
322
667
  animate: { opacity: 1, y: 0, scale: 1 },
323
668
  transition: { duration: 0.16, ease: "easeOut" },
324
- style: { maxWidth: "calc(100vw - 1rem)", marginLeft: shift, maxHeight },
325
- 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",
669
+ "data-yunui": "model-select-panel",
670
+ style: { maxWidth: "calc(100vw - 1rem)", marginLeft: shift, maxHeight: panelMaxHeight },
671
+ 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`,
326
672
  children: [
673
+ renderHeader && /* @__PURE__ */ jsx("div", { className: "p-2.5 border-b border-border/50", children: renderHeader() }),
327
674
  /* @__PURE__ */ jsxs("div", { className: "p-2.5 border-b border-border/50", children: [
328
675
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
329
676
  /* @__PURE__ */ jsx(Search, { size: 15, className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none" }),
@@ -345,15 +692,15 @@ function ModelSelect({
345
692
  ),
346
693
  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 }) })
347
694
  ] }),
348
- filters && filters.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-2 px-1", children: [
695
+ 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: [
349
696
  filters.map((f) => {
350
697
  const on = activeFilters.includes(f.key);
351
- 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);
698
+ 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);
352
699
  }),
353
- 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 }) })
354
- ] })
700
+ 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 }) })
701
+ ] }) })
355
702
  ] }),
356
- 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: [
703
+ 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: [
357
704
  /* @__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: [
358
705
  L.all,
359
706
  " (",
@@ -364,7 +711,7 @@ function ModelSelect({
364
711
  groupIcon[g],
365
712
  groupLabel[g] ?? g
366
713
  ] }, g))
367
- ] }) }),
714
+ ] }) }) }),
368
715
  /* @__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: [
369
716
  pinnedList.length > 0 && /* @__PURE__ */ jsxs("div", { className: "px-1.5 py-1.5 border-b border-border/40", children: [
370
717
  /* @__PURE__ */ jsxs("div", { className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide px-2 mb-1 flex items-center gap-1", children: [
@@ -424,8 +771,9 @@ var ModelRow = memo(function ModelRow2({
424
771
  /* @__PURE__ */ jsx(
425
772
  "div",
426
773
  {
774
+ style: { left: "5px" },
427
775
  className: cn(
428
- "absolute left-0 top-1/2 w-1 h-6 rounded-full bg-primary transition-all duration-150 -translate-y-1/2",
776
+ "absolute top-1/2 w-1 h-6 rounded-full bg-primary transition-all duration-150 -translate-y-1/2",
429
777
  selected ? "opacity-100 translate-x-0" : "opacity-0 -translate-x-1.5 group-hover:opacity-50 group-hover:translate-x-0"
430
778
  )
431
779
  }
@@ -480,16 +828,19 @@ function ModelManagerCard({
480
828
  className
481
829
  ),
482
830
  children: [
483
- (selectSlot || actions) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 -mt-2 mb-3 min-h-7", children: [
831
+ selectSlot && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 -mt-2 mb-3 min-h-7", children: [
484
832
  /* @__PURE__ */ jsx("div", { className: "flex items-center", children: selectSlot }),
485
833
  actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 -mr-1.5 text-muted-foreground", children: actions })
486
834
  ] }),
487
835
  /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
488
836
  icon && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: icon }),
489
837
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
490
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2 gap-y-1 flex-wrap", children: [
491
- /* @__PURE__ */ jsx("span", { className: "font-semibold leading-tight min-w-0 break-words", children: name }),
492
- nameBadges
838
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
839
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2 gap-y-1 flex-wrap min-w-0", children: [
840
+ /* @__PURE__ */ jsx("span", { className: "font-semibold leading-tight min-w-0 break-words", children: name }),
841
+ nameBadges
842
+ ] }),
843
+ !selectSlot && actions && /* @__PURE__ */ jsx("div", { className: "shrink-0 -mr-1.5 -mt-1 flex items-center gap-0.5 text-muted-foreground", children: actions })
493
844
  ] }),
494
845
  ids && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1 mt-1.5", children: ids })
495
846
  ] })
@@ -1031,6 +1382,41 @@ var developerIconMap = {
1031
1382
  minicpm: "minicpm.webp",
1032
1383
  nousresearch: "nousresearch.webp"
1033
1384
  };
1385
+ var modelDeveloperPatterns = [
1386
+ [/claude|anthropic/, "claude"],
1387
+ [/gemini/, "gemini"],
1388
+ [/gemma/, "gemma"],
1389
+ [/palm|bison/, "palm"],
1390
+ [/gpt|openai|davinci|chatgpt|text-embedding|dall-?e|whisper|codex|o[134]-/, "openai"],
1391
+ [/glm|chatglm|zhipu|z\.?ai/, "zai"],
1392
+ [/minimax|hailuo|abab/, "minimax"],
1393
+ [/qwen|qwq|dashscope|alibaba|tongyi/, "qwen"],
1394
+ [/deepseek/, "deepseek"],
1395
+ [/llama|meta-/, "meta"],
1396
+ [/mistral|mixtral|codestral|pixtral|magistral|ministral/, "mistral"],
1397
+ [/grok|x-?ai/, "xai"],
1398
+ [/moonshot|kimi/, "moonshot"],
1399
+ [/doubao/, "doubao"],
1400
+ [/hunyuan/, "hunyuan"],
1401
+ [/ernie|wenxin|baidu/, "wenxin"],
1402
+ [/step-|stepfun/, "stepfun"],
1403
+ [/yi-|zero-one|01-ai/, "yi"],
1404
+ [/command|cohere/, "cohere"],
1405
+ [/phi-\d|microsoft/, "microsoft"],
1406
+ [/nemotron|nvidia/, "nvidia"],
1407
+ [/internlm|internvl/, "internlm"],
1408
+ [/flux/, "flux"]
1409
+ ];
1410
+ function getModelDeveloperId(...identifiers) {
1411
+ const haystack = identifiers.filter(Boolean).join(" ").toLowerCase();
1412
+ for (const [pattern, developer] of modelDeveloperPatterns) {
1413
+ if (pattern.test(haystack)) return developer;
1414
+ }
1415
+ const first = identifiers.find((value) => Boolean(value));
1416
+ if (!first) return "";
1417
+ const parts = first.split("/").filter(Boolean);
1418
+ return parts.at(-1) || first;
1419
+ }
1034
1420
  function getDeveloperIconPath(developer) {
1035
1421
  if (!developer) return null;
1036
1422
  const file = getDeveloperIconFile(developer);
@@ -1536,7 +1922,7 @@ function LanguageSwitcher({
1536
1922
  const containerRef = useRef(null);
1537
1923
  const triggerRef = useRef(null);
1538
1924
  const panelRef = useRef(null);
1539
- const { shift, maxHeight } = useAnchoredPosition(isOpen, panelRef);
1925
+ const { shift, maxHeight, placement } = useAnchoredPosition(isOpen, panelRef);
1540
1926
  useEffect(() => {
1541
1927
  const handleClickOutside = (e) => {
1542
1928
  if (containerRef.current && !containerRef.current.contains(e.target)) {
@@ -1563,53 +1949,57 @@ function LanguageSwitcher({
1563
1949
  onChange(newLocale);
1564
1950
  };
1565
1951
  const currentLabel = locales.find((l) => l.value === currentLocale)?.label ?? currentLocale;
1566
- return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: `relative ${className}`, children: [
1567
- variant === "pill" ? /* @__PURE__ */ jsxs(
1568
- "button",
1569
- {
1570
- ref: triggerRef,
1571
- onClick: () => setIsOpen(!isOpen),
1572
- 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",
1573
- disabled: pending,
1574
- "aria-label": label,
1575
- "aria-expanded": isOpen,
1576
- "aria-haspopup": "listbox",
1577
- children: [
1578
- /* @__PURE__ */ jsx(Globe, { size: 14, className: "shrink-0" }),
1579
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: currentLabel })
1580
- ]
1581
- }
1582
- ) : /* @__PURE__ */ jsx(
1583
- "button",
1584
- {
1585
- ref: triggerRef,
1586
- onClick: () => setIsOpen(!isOpen),
1587
- 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",
1588
- disabled: pending,
1589
- "aria-label": label,
1590
- "aria-expanded": isOpen,
1591
- "aria-haspopup": "listbox",
1592
- children: /* @__PURE__ */ jsx(Globe, { className: "h-[1.2rem] w-[1.2rem]" })
1593
- }
1594
- ),
1595
- isOpen && /* @__PURE__ */ jsx(
1596
- "div",
1597
- {
1598
- ref: panelRef,
1599
- style: { marginLeft: shift, maxHeight },
1600
- 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`,
1601
- children: /* @__PURE__ */ jsx("div", { className: "p-1 flex-1 min-h-0 overflow-y-auto", children: locales.map((lang) => /* @__PURE__ */ jsx(
1602
- "button",
1603
- {
1604
- onClick: () => handleLocaleChange(lang.value),
1605
- className: `dropdown-item w-full text-left ${currentLocale === lang.value ? "active" : ""}`,
1606
- children: /* @__PURE__ */ jsx("span", { className: "flex-1", children: lang.label })
1607
- },
1608
- lang.value
1609
- )) })
1610
- }
1611
- )
1612
- ] });
1952
+ return (
1953
+ // inline-flex so the root shrink-wraps the trigger; a block root filled the row and made the
1954
+ // right-0 dropdown anchor to the row's far edge instead of the trigger.
1955
+ /* @__PURE__ */ jsxs("div", { ref: containerRef, className: `relative inline-flex ${className}`, children: [
1956
+ variant === "pill" ? /* @__PURE__ */ jsxs(
1957
+ "button",
1958
+ {
1959
+ ref: triggerRef,
1960
+ onClick: () => setIsOpen(!isOpen),
1961
+ 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",
1962
+ disabled: pending,
1963
+ "aria-label": label,
1964
+ "aria-expanded": isOpen,
1965
+ "aria-haspopup": "listbox",
1966
+ children: [
1967
+ /* @__PURE__ */ jsx(Globe, { size: 14, className: "shrink-0" }),
1968
+ /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: currentLabel })
1969
+ ]
1970
+ }
1971
+ ) : /* @__PURE__ */ jsx(
1972
+ "button",
1973
+ {
1974
+ ref: triggerRef,
1975
+ onClick: () => setIsOpen(!isOpen),
1976
+ 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",
1977
+ disabled: pending,
1978
+ "aria-label": label,
1979
+ "aria-expanded": isOpen,
1980
+ "aria-haspopup": "listbox",
1981
+ children: /* @__PURE__ */ jsx(Globe, { className: "h-[1.2rem] w-[1.2rem]" })
1982
+ }
1983
+ ),
1984
+ isOpen && /* @__PURE__ */ jsx(
1985
+ "div",
1986
+ {
1987
+ ref: panelRef,
1988
+ style: { marginLeft: shift, maxHeight },
1989
+ 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`,
1990
+ children: /* @__PURE__ */ jsx("div", { className: "p-1 flex-1 min-h-0 overflow-y-auto", children: locales.map((lang) => /* @__PURE__ */ jsx(
1991
+ "button",
1992
+ {
1993
+ onClick: () => handleLocaleChange(lang.value),
1994
+ className: `dropdown-item w-full text-left ${currentLocale === lang.value ? "active" : ""}`,
1995
+ children: /* @__PURE__ */ jsx("span", { className: "flex-1", children: lang.label })
1996
+ },
1997
+ lang.value
1998
+ )) })
1999
+ }
2000
+ )
2001
+ ] })
2002
+ );
1613
2003
  }
1614
2004
  function Navbar({
1615
2005
  appName,
@@ -1674,7 +2064,7 @@ function Navbar({
1674
2064
  "nav",
1675
2065
  {
1676
2066
  style: { top: "max(1.5rem, env(safe-area-inset-top))" },
1677
- 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",
2067
+ 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",
1678
2068
  children: [
1679
2069
  /* @__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: [
1680
2070
  /* @__PURE__ */ jsx(Image, { src: logoSrc, alt: appName, width: 28, height: 28, className: "w-7 h-7 shrink-0" }),
@@ -1727,7 +2117,7 @@ function Navbar({
1727
2117
  ] }),
1728
2118
  variant === "public" && menuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
1729
2119
  /* @__PURE__ */ jsx("div", { className: "md:hidden fixed inset-0 -z-10", "aria-hidden": "true", onClick: () => setMenuOpen(false) }),
1730
- /* @__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: [
2120
+ /* @__PURE__ */ jsxs("div", { className: "md:hidden absolute top-full left-0 right-0 mt-3 p-2 bg-popover/95 backdrop-blur-2xl border border-border rounded-2xl shadow-lg shadow-black/5 flex flex-col gap-0.5", children: [
1731
2121
  links.map((link) => /* @__PURE__ */ jsx(
1732
2122
  Link,
1733
2123
  {
@@ -1765,6 +2155,6 @@ function Navbar({
1765
2155
  );
1766
2156
  }
1767
2157
 
1768
- 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 };
2158
+ export { 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 };
1769
2159
  //# sourceMappingURL=ai.js.map
1770
2160
  //# sourceMappingURL=ai.js.map