openclacky 1.5.27 → 1.5.28

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/.clacky/skills/gem-release/SKILL.md +7 -1
  3. data/CHANGELOG.md +27 -0
  4. data/lib/clacky/billing/platform_billing.rb +7 -0
  5. data/lib/clacky/default_extensions/knowledge/README.md +3 -3
  6. data/lib/clacky/default_extensions/knowledge/README.zh.md +3 -3
  7. data/lib/clacky/default_extensions/knowledge/ext.yml +2 -2
  8. data/lib/clacky/default_extensions/knowledge/lib/index.rb +3 -1
  9. data/lib/clacky/default_extensions/knowledge/lib/knowledge.rb +1 -1
  10. data/lib/clacky/default_extensions/knowledge/lib/t2s.rb +44 -0
  11. data/lib/clacky/default_extensions/knowledge/lib/t2s.txt +3221 -0
  12. data/lib/clacky/default_extensions/knowledge/panels/kb/view.js +25 -7
  13. data/lib/clacky/default_extensions/side-chat/README.md +1 -1
  14. data/lib/clacky/default_extensions/side-chat/README.zh.md +1 -1
  15. data/lib/clacky/default_extensions/side-chat/api/runtime.rb +7 -2
  16. data/lib/clacky/default_extensions/side-chat/panels/side-chat/view.js +58 -16
  17. data/lib/clacky/default_extensions/terminal/README.md +2 -0
  18. data/lib/clacky/default_extensions/terminal/README.zh.md +2 -0
  19. data/lib/clacky/default_extensions/terminal/panels/terminal/view.js +80 -10
  20. data/lib/clacky/default_parsers/deepseek_ocr.rb +275 -0
  21. data/lib/clacky/default_parsers/pdf_parser.rb +39 -10
  22. data/lib/clacky/default_skills/media-gen/SKILL.md +5 -2
  23. data/lib/clacky/media/openai_compat.rb +17 -1
  24. data/lib/clacky/message_format/open_ai.rb +2 -2
  25. data/lib/clacky/message_format/open_ai_responses.rb +8 -2
  26. data/lib/clacky/providers.rb +34 -18
  27. data/lib/clacky/reasoning_levels.rb +2 -2
  28. data/lib/clacky/server/http_server.rb +104 -14
  29. data/lib/clacky/server/session_registry.rb +1 -1
  30. data/lib/clacky/utils/model_pricing.rb +9 -0
  31. data/lib/clacky/version.rb +1 -1
  32. data/lib/clacky/web/components/code-editor.js +45 -0
  33. data/lib/clacky/web/components/custom-select.js +15 -2
  34. data/lib/clacky/web/components/model-picker.js +11 -0
  35. data/lib/clacky/web/components/quote-select.js +7 -2
  36. data/lib/clacky/web/core/ext.js +34 -1
  37. data/lib/clacky/web/features/workspace/view.js +4 -2
  38. data/lib/clacky/web/i18n.js +28 -18
  39. data/lib/clacky/web/index.html +0 -2
  40. data/lib/clacky/web/sessions.js +74 -0
  41. metadata +4 -2
  42. data/lib/clacky/web/vendor/katex/auto-render.min.js +0 -1
@@ -14,6 +14,7 @@ require "uri"
14
14
  require "securerandom"
15
15
  require "timeout"
16
16
  require "yaml"
17
+ require "zlib"
17
18
  require "date"
18
19
  require "open3"
19
20
  require_relative "session_registry"
@@ -197,6 +198,18 @@ module Clacky
197
198
 
198
199
  WEB_ROOT = File.expand_path("../web", __dir__)
199
200
 
201
+ # Assets WEBrick's FileHandler hands over as plain text. On a thin VPS
202
+ # egress link (~2.5 Mbps steady) the ~4 MB of CSS/JS behind the web UI is
203
+ # what stretches first paint to ten seconds; gzip cuts it to a quarter.
204
+ COMPRESSIBLE_TYPES = %w[
205
+ application/javascript application/json application/xml
206
+ image/svg+xml text/css text/html text/javascript text/plain text/xml
207
+ ].freeze
208
+ COMPRESS_MIN_BYTES = 1024
209
+ # Compressed bodies live for the process lifetime; the ceiling only
210
+ # guards against an installation with hundreds of extension panels.
211
+ COMPRESS_CACHE_LIMIT = 16 * 1024 * 1024
212
+
200
213
  # Session sources that always run as the general agent, whatever the
201
214
  # user's configured default is. They either install/wire something up,
202
215
  # run a mechanical helper command, or fire unattended — all of them need
@@ -315,6 +328,9 @@ module Clacky
315
328
  # Install jobs: job_id => { stage:, progress:, error:, done: }
316
329
  @install_jobs = {}
317
330
  @install_jobs_mutex = Mutex.new
331
+ @compressed_bodies = {}
332
+ @compressed_bodies_mutex = Mutex.new
333
+ @compressed_bodies_bytes = 0
318
334
  # Access key authentication:
319
335
  # - localhost (127.0.0.1 / ::1) is always trusted; auth is skipped entirely.
320
336
  # - Any other bind address requires CLACKY_ACCESS_KEY env var.
@@ -541,9 +557,11 @@ module Clacky
541
557
  .gsub("{{EXT_SCRIPTS}}", pure ? "" : self.send(:webui_ext_script_tags))
542
558
  res.status = 200
543
559
  res["Content-Type"] = "text/html; charset=utf-8"
544
- res["Cache-Control"] = "no-store"
545
- res["Pragma"] = "no-cache"
560
+ # no-cache still revalidates, so a gem update is picked up at once,
561
+ # but the browser no longer throws away the body on every reload.
562
+ res["Cache-Control"] = "no-cache"
546
563
  res.body = html
564
+ self.send(:compress_response, req, res)
547
565
  elsif req.path.start_with?("/agent_ui/")
548
566
  self.send(:serve_agent_ui, req, res)
549
567
  elsif req.path.start_with?("/agent_avatar/")
@@ -558,8 +576,11 @@ module Clacky
558
576
  self.send(:serve_preview, req, res)
559
577
  else
560
578
  file_handler.service(req, res)
561
- res["Cache-Control"] = "no-store"
562
- res["Pragma"] = "no-cache"
579
+ # WEBrick already sends ETag/Last-Modified; no-store was discarding
580
+ # them, forcing a full re-download of every asset on each reload.
581
+ res["Cache-Control"] = "no-cache"
582
+ res["Pragma"] = nil
583
+ self.send(:compress_response, req, res)
563
584
  end
564
585
  end
565
586
 
@@ -659,7 +680,7 @@ module Clacky
659
680
  elsif path == "/api/media/image"
660
681
  # Image generation routes through OpenRouter (chat completions
661
682
  # with modalities:["image"]); end-to-end latency is commonly
662
- # 20-60s and can exceed 2 minutes for or-gpt-image-2 under load.
683
+ # 20-60s and can exceed 2 minutes for or-gpt-image-2-6 under load.
663
684
  300
664
685
  elsif path == "/api/media/video/status"
665
686
  # Single upstream task lookup; returns in well under a second.
@@ -1432,8 +1453,8 @@ module Clacky
1432
1453
  # Visibility is entirely driven by `agent.panels: [id]` references in
1433
1454
  # profile.yml / ext.yml agents (see `panel_agents_map`). A panel that no
1434
1455
  # agent references stays hidden — panels never mount themselves.
1435
- # Served from /ext_ui/<ext_id>/<rel> with no-store so edits go live on
1436
- # page refresh. Never raises.
1456
+ # Served from /ext_ui/<ext_id>/<rel> with no-cache (revalidate on every
1457
+ # load) so edits go live on page refresh. Never raises.
1437
1458
  private def container_ext_script_tags
1438
1459
  result = Clacky::ExtensionLoader.load_all
1439
1460
  result.panels.map do |unit|
@@ -1692,9 +1713,10 @@ module Clacky
1692
1713
 
1693
1714
  res.status = 200
1694
1715
  res["Content-Type"] = ctype
1695
- res["Cache-Control"] = "no-store"
1696
- res["Pragma"] = "no-cache"
1716
+ res["Cache-Control"] = "no-cache"
1717
+ res["Pragma"] = nil
1697
1718
  res.body = ctype.start_with?("image/") ? File.binread(abs) : File.read(abs)
1719
+ compress_response(req, res)
1698
1720
  end
1699
1721
 
1700
1722
  # Serve agents/<name>/webui/<file> from built-in or user agent dir.
@@ -1705,7 +1727,7 @@ module Clacky
1705
1727
  dir = agent_profile_dirs[name]
1706
1728
  return (res.status = 404; res.body = "not found") unless dir && !rel.empty?
1707
1729
 
1708
- serve_static_under(File.join(dir, "webui"), rel, res)
1730
+ serve_static_under(req, File.join(dir, "webui"), rel, res)
1709
1731
  end
1710
1732
 
1711
1733
  # GET /agent_avatar/<id> — serve an agent's avatar image (extension
@@ -1744,9 +1766,75 @@ module Clacky
1744
1766
  File.file?(user_png) ? user_png : nil
1745
1767
  end
1746
1768
 
1769
+ # Compresses a text response body once per (path, content) pair and
1770
+ # replays it from memory. WEBrick's FileHandler never negotiates
1771
+ # Content-Encoding, so without this every CSS/JS byte crosses the wire
1772
+ # as-is.
1773
+ private def compress_response(req, res)
1774
+ return unless res.status == 200
1775
+ return unless req.request_method == "GET"
1776
+ return if res["Content-Encoding"]
1777
+ return unless accepts_gzip?(req["Accept-Encoding"])
1778
+
1779
+ body = res.body
1780
+ unless body.is_a?(String)
1781
+ # FileHandler streams files as an open IO; gzip needs the bytes, so
1782
+ # read it, close it, and hand the response a string instead.
1783
+ return unless body.respond_to?(:read)
1784
+
1785
+ io = body
1786
+ body = io.read
1787
+ io.close if io.respond_to?(:close)
1788
+ res.body = body
1789
+ end
1790
+
1791
+ type = res["Content-Type"].to_s.split(";").first.to_s.strip.downcase
1792
+ return unless COMPRESSIBLE_TYPES.include?(type)
1793
+ return if body.bytesize < COMPRESS_MIN_BYTES
1794
+
1795
+ compressed = compress_cached(req.path, body)
1796
+ return if compressed.bytesize >= body.bytesize
1797
+
1798
+ res.body = compressed
1799
+ res["Content-Encoding"] = "gzip"
1800
+ res["Content-Length"] = compressed.bytesize.to_s
1801
+ res["Vary"] = "Accept-Encoding"
1802
+ end
1803
+
1804
+ private def accepts_gzip?(header)
1805
+ return false if header.nil? || header.empty?
1806
+
1807
+ header.split(",").any? do |part|
1808
+ coding, *params = part.split(";").map(&:strip)
1809
+ next false unless coding.to_s.casecmp("gzip").zero?
1810
+
1811
+ quality = params.find { |p| p.downcase.start_with?("q=") }
1812
+ quality.nil? || quality.split("=", 2).last.to_f.positive?
1813
+ end
1814
+ end
1815
+
1816
+ private def compress_cached(path, body)
1817
+ key = "#{path}\0#{body.bytesize}\0#{body.hash}"
1818
+ @compressed_bodies_mutex.synchronize do
1819
+ hit = @compressed_bodies[key]
1820
+ return hit if hit
1821
+ end
1822
+
1823
+ compressed = Zlib.gzip(body)
1824
+ @compressed_bodies_mutex.synchronize do
1825
+ if @compressed_bodies_bytes + compressed.bytesize > COMPRESS_CACHE_LIMIT
1826
+ @compressed_bodies.clear
1827
+ @compressed_bodies_bytes = 0
1828
+ end
1829
+ @compressed_bodies[key] = compressed
1830
+ @compressed_bodies_bytes += compressed.bytesize
1831
+ end
1832
+ compressed
1833
+ end
1834
+
1747
1835
  # Read-only static serve of `rel` under `root`, JS/CSS/HTML only, with
1748
1836
  # strict path containment so a crafted rel cannot escape `root`.
1749
- private def serve_static_under(root, rel, res)
1837
+ private def serve_static_under(req, root, rel, res)
1750
1838
  root = File.expand_path(root)
1751
1839
  abs = File.expand_path(File.join(root, rel))
1752
1840
  unless abs.start_with?(root + File::SEPARATOR) && File.file?(abs)
@@ -1765,9 +1853,10 @@ module Clacky
1765
1853
 
1766
1854
  res.status = 200
1767
1855
  res["Content-Type"] = ctype
1768
- res["Cache-Control"] = "no-store"
1769
- res["Pragma"] = "no-cache"
1856
+ res["Cache-Control"] = "no-cache"
1857
+ res["Pragma"] = nil
1770
1858
  res.body = File.read(abs)
1859
+ compress_response(req, res)
1771
1860
  end
1772
1861
  def api_browser_status(res)
1773
1862
  json_response(res, 200, @browser_manager.status)
@@ -1917,7 +2006,8 @@ module Clacky
1917
2006
  aspect_ratio: aspect_ratio,
1918
2007
  output_dir: output_dir,
1919
2008
  image: body["image"],
1920
- images: body["images"]
2009
+ images: body["images"],
2010
+ resolution: body["resolution"]
1921
2011
  )
1922
2012
  if result["success"]
1923
2013
  log_media_usage(result, prompt: prompt, session_id: session_id)
@@ -50,7 +50,7 @@ module Clacky
50
50
  error_code: nil,
51
51
  top_up_url: nil,
52
52
  raw_message: nil,
53
- updated_at: nil,
53
+ updated_at: Time.now,
54
54
  agent: nil,
55
55
  ui: nil,
56
56
  thread: nil,
@@ -1157,6 +1157,13 @@ module Clacky
1157
1157
  cache: { write: 0.37, read: 0.075 }
1158
1158
  },
1159
1159
 
1160
+ # GLM-5.4 is listed on Z.ai's pricing page at the same flat rate as 5.3.
1161
+ "glm-5.4" => {
1162
+ input: { default: 1.40, over_200k: 1.40 },
1163
+ output: { default: 4.40, over_200k: 4.40 },
1164
+ cache: { write: 1.40, read: 0.26 }
1165
+ },
1166
+
1160
1167
  "glm-5.3" => {
1161
1168
  input: { default: 1.40, over_200k: 1.40 },
1162
1169
  output: { default: 4.40, over_200k: 4.40 },
@@ -1646,6 +1653,8 @@ module Clacky
1646
1653
  "glm-5.3-flashx"
1647
1654
  when /^glm-5\.3-flash$/i
1648
1655
  "glm-5.3-flash"
1656
+ when /^glm-5\.4$/i
1657
+ "glm-5.4"
1649
1658
  when /^glm-5\.3$/i
1650
1659
  "glm-5.3"
1651
1660
  when /^glm-5\.2$/i
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clacky
4
- VERSION = "1.5.27"
4
+ VERSION = "1.5.28"
5
5
  end
@@ -14,6 +14,29 @@
14
14
  ;(function(window) {
15
15
  "use strict";
16
16
 
17
+ // CodeMirror bundles every language pack (~1 MB raw, 340 KB gzipped) and is
18
+ // only needed once a file is opened. Loading it with the page put it first in
19
+ // the script queue, so the sixty scripts behind it waited on it before they
20
+ // could even start. Fetch it on demand instead.
21
+ let cmPromise = null;
22
+
23
+ function ensureLoaded() {
24
+ if (window.CM) return Promise.resolve(window.CM);
25
+ if (cmPromise) return cmPromise;
26
+
27
+ cmPromise = new Promise((resolve, reject) => {
28
+ const script = document.createElement("script");
29
+ script.src = "/vendor/codemirror/codemirror.min.js";
30
+ script.onload = () => resolve(window.CM);
31
+ script.onerror = () => {
32
+ cmPromise = null;
33
+ reject(new Error("failed to load /vendor/codemirror/codemirror.min.js"));
34
+ };
35
+ document.head.appendChild(script);
36
+ });
37
+ return cmPromise;
38
+ }
39
+
17
40
  const LANG_MAP = {
18
41
  markdown: () => CM.markdown({ base: CM.markdownLanguage }),
19
42
  md: () => CM.markdown({ base: CM.markdownLanguage }),
@@ -346,6 +369,9 @@
346
369
  // without any modal chrome. Used by the workspace file viewer.
347
370
  // Returns { view, getContent, setContent, destroy }.
348
371
  function createInline(container, opts = {}) {
372
+ if (!window.CM) {
373
+ throw new Error("CodeMirror is not loaded; await CodeEditor.ensureLoaded() first");
374
+ }
349
375
  let suppressingChange = false;
350
376
  const getContent = () => view.state.doc.toString();
351
377
  const setContent = (text) => {
@@ -385,6 +411,10 @@
385
411
  }
386
412
 
387
413
  function open(opts) {
414
+ _open(opts).catch((e) => console.error("[CodeEditor] open failed", e));
415
+ }
416
+
417
+ async function _open(opts) {
388
418
  const {
389
419
  content = "",
390
420
  title = "Editor",
@@ -478,6 +508,20 @@
478
508
  editorOpts._getContent = getContent;
479
509
  editorOpts.onSave = onSave ? () => doSave() : null;
480
510
 
511
+ // The modal shell is already on screen, so the wait for the bundle reads as
512
+ // a still-opening dialog rather than a dead click.
513
+ try {
514
+ await ensureLoaded();
515
+ } catch (e) {
516
+ console.error("[CodeEditor] failed to load CodeMirror", e);
517
+ status.textContent = I18n.t("editor.loadFailed");
518
+ if (saveBtn) saveBtn.disabled = true;
519
+ return { close };
520
+ }
521
+
522
+ // The user may have closed the modal while the bundle was still in flight.
523
+ if (!overlay.isConnected) return { close };
524
+
481
525
  const view = new CM.EditorView({
482
526
  state: CM.EditorState.create({
483
527
  doc: content,
@@ -516,6 +560,7 @@
516
560
  window.CodeEditor = {
517
561
  open,
518
562
  createInline,
563
+ ensureLoaded,
519
564
  fileKind: _fileKind,
520
565
  looksBinary: _looksBinary,
521
566
  detectLanguage: _detectLanguage,
@@ -10,16 +10,29 @@ window.CustomSelect = (function () {
10
10
  const instances = [];
11
11
  let globalBound = false;
12
12
 
13
+ function closeAll() {
14
+ instances.forEach(function (inst) { inst.close(); });
15
+ }
16
+
13
17
  function bindGlobalClose() {
14
18
  if (globalBound) return;
15
19
  globalBound = true;
16
20
  document.addEventListener("click", () => {
17
21
  for (let i = instances.length - 1; i >= 0; i--) {
18
22
  const inst = instances[i];
19
- if (!inst._trigger.isConnected) { instances.splice(i, 1); continue; }
23
+ // Close before dropping the instance: a portalled panel is a child of
24
+ // <body>, so a dropdown opened inside a modal outlives the modal that
25
+ // was just removed. Skipping close() here leaves it floating over the
26
+ // page with no way to dismiss it.
20
27
  inst.close();
28
+ if (!inst._trigger.isConnected) instances.splice(i, 1);
21
29
  }
22
30
  });
31
+ // A modal dismissed with Escape never fires a bubbling click, so the
32
+ // dropdown has to be closed from the keyboard path as well.
33
+ document.addEventListener("keydown", (e) => {
34
+ if (e.key === "Escape") closeAll();
35
+ });
23
36
  }
24
37
 
25
38
  function positionFixed(dropdown, anchor) {
@@ -161,5 +174,5 @@ window.CustomSelect = (function () {
161
174
  return instance;
162
175
  }
163
176
 
164
- return { init: init };
177
+ return { init: init, closeAll: closeAll };
165
178
  })();
@@ -53,12 +53,23 @@ const ModelPicker = (() => {
53
53
  svg: '<path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/>' },
54
54
  { name: "MiniMax", re: /minimax/i, label: "M", color: "#fff",
55
55
  brandSvg: '<defs><linearGradient id="lobe-icons-minimax-_R_0_" x1="0%" x2="100.182%" y1="50.057%" y2="50.057%"><stop offset="0%" stop-color="#E2167E"/><stop offset="100%" stop-color="#FE603C"/></linearGradient></defs><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z" fill="url(#lobe-icons-minimax-_R_0_)" fill-rule="nonzero"/>' },
56
+ { name: "Alibaba", re: /(?:^|[^a-z])wan[\s-]?\d|^wan\b|alibaba/i, label: "W", color: "#FF6A00",
57
+ svg: '<path d="M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z"/>'
58
+ + '<path d="M16.051 11.213H8.025v1.835h8.026v-1.835z"/>' },
56
59
  { name: "Qwen", re: /qwen|tongyi/i, label: "Q", color: "#fff",
57
60
  brandSvg: '<path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"/><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"/><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"/></linearGradient></defs>' },
58
61
  { name: "Kimi", re: /kimi|moonshot/i, label: "K", color: "#111827",
59
62
  brandSvg: '<path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z" fill="#1783FF"/><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z" fill="#fff"/>' },
60
63
  { name: "Grok", re: /grok|xai/i, label: "X", color: "#111827",
61
64
  svg: '<path d="M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"/>' },
65
+ // ByteDance's Seed family (Seedream stills, Seedance video) ships under
66
+ // the gateway's `or-` prefix, which would otherwise resolve to the
67
+ // OpenRouter mark, so this rule has to sit before the `^or-` one.
68
+ { name: "ByteDance", re: /seedream|seedance/i, label: "B", color: "#fff",
69
+ brandSvg: '<path d="M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z" fill="#00C8D2"/>'
70
+ + '<path d="M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z" fill="#3C8CFF"/>'
71
+ + '<path d="M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z" fill="#78E6DC"/>'
72
+ + '<path d="M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z" fill="#325AB4"/>' },
62
73
  { name: "Doubao", re: /doubao/i, label: "D", color: "#fff",
63
74
  brandSvg: '<path d="M5.31 15.756c.172-3.75 1.883-5.999 2.549-6.739-3.26 2.058-5.425 5.658-6.358 8.308v1.12C1.501 21.513 4.226 24 7.59 24a6.59 6.59 0 002.2-.375c.353-.12.7-.248 1.039-.378.913-.899 1.65-1.91 2.243-2.992-4.877 2.431-7.974.072-7.763-4.5l.002.001z" fill="#1E37FC"/><path d="M22.57 10.283c-1.212-.901-4.109-2.404-7.397-2.8.295 3.792.093 8.766-2.1 12.773a12.782 12.782 0 01-2.244 2.992c3.764-1.448 6.746-3.457 8.596-5.219 2.82-2.683 3.353-5.178 3.361-6.66a2.737 2.737 0 00-.216-1.084v-.002z" fill="#37E1BE"/><path d="M14.303 1.867C12.955.7 11.248 0 9.39 0 7.532 0 5.883.677 4.545 1.807 2.791 3.29 1.627 5.557 1.5 8.125v9.201c.932-2.65 3.097-6.25 6.357-8.307.5-.318 1.025-.595 1.569-.829 1.883-.801 3.878-.932 5.746-.706-.222-2.83-.718-5.002-.87-5.617h.001z" fill="#A569FF"/><path d="M17.305 4.961a199.47 199.47 0 01-1.08-1.094c-.202-.213-.398-.419-.586-.622l-1.333-1.378c.151.615.648 2.786.869 5.617 3.288.395 6.185 1.898 7.396 2.8-1.306-1.275-3.475-3.487-5.266-5.323z" fill="#1E37FC"/>' },
64
75
  { name: "Ark", re: /ark|volces/i, label: "V", color: "#fff",
@@ -385,8 +385,13 @@ const QuoteSelect = (() => {
385
385
 
386
386
  // ── Selection validation ─────────────────────────────────────────────────
387
387
  // Runs 60ms after mouseup/touchend so the browser has finished updating the
388
- // selection (dbl-click word selection, drag end, etc.).
389
- function _onMouseUp() {
388
+ // selection (dbl-click word selection, drag end, etc.). Only a primary-button
389
+ // gesture that ends inside a message pane can have made a quote: any other
390
+ // click hid the bar on mousedown and must not bring it back, or a right click
391
+ // in the side panel blinks it out and in again (C-5904).
392
+ function _onMouseUp(e) {
393
+ if (e.button > 0) return;
394
+ if (!(e.target instanceof Element) || !_paneOf(e.target)) return;
390
395
  if (_pending) clearTimeout(_pending);
391
396
  _pending = setTimeout(_validate, 60);
392
397
  }
@@ -288,7 +288,9 @@ Clacky.ext = (() => {
288
288
  // For non-per-session slots or specs without `create`, the mount is a
289
289
  // pure global renderer — one call per (re)render.
290
290
  //
291
- // opts.tab — { id, label, badge? } required for tabbed slots.
291
+ // opts.tab — { id, label, badge?, menu? } required for tabbed slots.
292
+ // menu(runtime) may return extra rows for the tab's context menu, each
293
+ // { id, label, icon?, run() }, rendered above the strip's own entries.
292
294
  // opts.order — vertical sort weight (lower first). Default 100.
293
295
  // opts.workspace — id of a registerWorkspace() workspace this mount opens;
294
296
  // the host stamps it on the mount so the Router highlights this item
@@ -366,6 +368,15 @@ Clacky.ext = (() => {
366
368
  return runtime;
367
369
  }
368
370
 
371
+ // Look up a runtime without allocating one: a tab's context menu asks the
372
+ // panel what it can offer before its body has ever been rendered.
373
+ function _peekRuntime(sessionId, key) {
374
+ if (!sessionId) return null;
375
+ const bySession = _sessionRuntimes.get(sessionId);
376
+ if (!bySession) return null;
377
+ return bySession.get(key) || null;
378
+ }
379
+
369
380
  // Run any view-level teardown collected on the previous render pass for the
370
381
  // current session, so old event listeners / RAF loops don't leak when a tab
371
382
  // is re-rendered or the session switches away.
@@ -1051,7 +1062,14 @@ Clacky.ext = (() => {
1051
1062
  function tabMenu(e, id) {
1052
1063
  const peers = allTabsFor(id);
1053
1064
  const index = peers.indexOf(id);
1065
+ const entry = byId.get(id);
1066
+ // A panel may act on its own state from the strip (the terminal starts a
1067
+ // fresh shell); the strip itself only knows how to close things.
1068
+ const items = (entry && typeof entry.tab.menu === "function")
1069
+ ? (entry.tab.menu(_peekRuntime(renderCtx.sessionId, _mountKey(slot, entry))) || [])
1070
+ : [];
1054
1071
  _showAsideTabMenu(e, {
1072
+ items,
1055
1073
  // "Close to the Right" has nothing to act on for the rightmost tab;
1056
1074
  // the entry stays in place so the menu does not shift, but is inert.
1057
1075
  hasTabsToTheRight: index >= 0 && index < peers.length - 1,
@@ -1234,9 +1252,18 @@ Clacky.ext = (() => {
1234
1252
  function _showAsideTabMenu(event, handlers) {
1235
1253
  _closeAsideTabMenu();
1236
1254
  const icon = ASIDE_TAB_MENU_ICONS;
1255
+ const items = Array.isArray(handlers.items) ? handlers.items : [];
1256
+ // Entries the panel brought sit above a hairline: they act on that panel,
1257
+ // everything below acts on the strip.
1258
+ const panelItems = items.map((item) => `
1259
+ <div class="session-actions-menu-item" data-action="${item.id}">
1260
+ <span class="session-actions-menu-icon">${item.icon || ""}</span>
1261
+ <span class="session-actions-menu-label">${item.label}</span>
1262
+ </div>`).join("") + (items.length ? `<div class="session-actions-menu-divider"></div>` : "");
1237
1263
  const menu = document.createElement("div");
1238
1264
  menu.className = "session-context-menu aside-tab-menu";
1239
1265
  menu.innerHTML = `
1266
+ ${panelItems}
1240
1267
  <div class="session-actions-menu-item" data-action="close">
1241
1268
  <span class="session-actions-menu-icon">${icon.close}</span>
1242
1269
  <span class="session-actions-menu-label">${_asideText("aside.close", "Close")}</span>
@@ -1274,6 +1301,12 @@ Clacky.ext = (() => {
1274
1301
  return;
1275
1302
  }
1276
1303
  const action = item.dataset.action;
1304
+ const own = items.find((entry) => String(entry.id) === action);
1305
+ if (own) {
1306
+ _closeAsideTabMenu(menu);
1307
+ if (typeof own.run === "function") own.run();
1308
+ return;
1309
+ }
1277
1310
  if (action === "close") handlers.onClose(menu);
1278
1311
  else if (action === "closeOthers") handlers.onCloseOthers(menu);
1279
1312
  else if (action === "closeRight") handlers.onCloseToRight(menu);
@@ -1407,7 +1407,7 @@ const WorkspaceView = (() => {
1407
1407
  updateActions();
1408
1408
  }
1409
1409
 
1410
- function buildTextTab(entry, text) {
1410
+ async function buildTextTab(entry, text) {
1411
1411
  const pane = el("div", "wv-pane wv-pane--text");
1412
1412
  pane.dataset.mode = "edit";
1413
1413
 
@@ -1438,6 +1438,8 @@ const WorkspaceView = (() => {
1438
1438
  tab.previewEl = preview;
1439
1439
  }
1440
1440
 
1441
+ await CodeEditor.ensureLoaded();
1442
+
1441
1443
  tab.editor = CodeEditor.createInline(code, {
1442
1444
  content: text,
1443
1445
  language: lang,
@@ -1676,7 +1678,7 @@ const WorkspaceView = (() => {
1676
1678
  tab = CodeEditor.looksBinary(text) ? await buildFallbackTab(entry) : buildTableTab(entry, text);
1677
1679
  } else {
1678
1680
  const text = await Workspace.fetchFileText(entry);
1679
- tab = CodeEditor.looksBinary(text) ? await buildFallbackTab(entry) : buildTextTab(entry, text);
1681
+ tab = CodeEditor.looksBinary(text) ? await buildFallbackTab(entry) : await buildTextTab(entry, text);
1680
1682
  }
1681
1683
  } catch (err) {
1682
1684
  console.error("preview failed:", err);
@@ -292,7 +292,7 @@ const I18n = (() => {
292
292
  "sidechat.opening": "Opening\u2026",
293
293
  "sidechat.openFailed": "Could not open the side chat: {{error}}",
294
294
  "sidechat.failed": "Side chat failed: {{error}}",
295
- "sidechat.gone": "This side chat expired \u2014 send again to start a new one.",
295
+ "sidechat.reset": "Earlier messages were reset.",
296
296
  "workspace.revealInFinder": "Reveal in Finder",
297
297
  "workspace.revealFailed": "Failed to reveal file",
298
298
  "workspace.closeTab": "Close",
@@ -311,6 +311,7 @@ const I18n = (() => {
311
311
  "workspace.dirtyCloseBatchConfirm": "{{count}} files have unsaved changes. Close them anyway?",
312
312
  "changes.tab": "Git",
313
313
  "terminal.tab": "Terminal",
314
+ "terminal.restart": "Restart terminal",
314
315
  "terminal.retry": "Retry",
315
316
  "terminal.openFailed": "Could not start the terminal",
316
317
  "terminal.loadFailed": "Failed to load the terminal component",
@@ -500,6 +501,7 @@ const I18n = (() => {
500
501
  // ── Markdown editor panes ──
501
502
  "editor.edit": "Edit",
502
503
  "editor.preview": "Preview",
504
+ "editor.loadFailed": "Failed to load the editor",
503
505
 
504
506
  // ── Auth ──
505
507
  "auth.accessKeyRequired": "Access key required:",
@@ -1149,12 +1151,15 @@ const I18n = (() => {
1149
1151
  "settings.media.vision.primary": "Your default model supports vision — enabled automatically.",
1150
1152
  "settings.media.modelHint.or-gemini-nano-banana-2-1": "Recommended · best value for everyday images",
1151
1153
  "settings.media.modelHint.or-gemini-3-pro-image": "Highest quality · complex layouts & text, ~4× cost",
1152
- "settings.media.modelHint.or-gemini-3-1-flash-image": "Previous gen · same as 2.1 but ~2× the cost",
1153
1154
  "settings.media.modelHint.or-gemini-3-1-flash-lite-image": "Fastest · bulk generation & quick drafts",
1154
- "settings.media.modelHint.or-gpt-image-2-5": "OpenAI · precise edits & premium detail",
1155
- "settings.media.modelHint.or-gpt-image-2-5-flare": "OpenAI · faster, great for drafts",
1156
- "settings.media.modelHint.or-gpt-image-2": "OpenAI previous gen · similar results to 2.5 Flare",
1155
+ "settings.media.modelHint.or-gpt-image-2-6": "OpenAI newest · best detail & text fidelity",
1156
+ "settings.media.modelHint.or-gpt-image-2-6-flare": "OpenAI newest · fastest GPT Image, best for drafts",
1157
+ "settings.media.modelHint.or-seedream-5-5": "ByteDance · per-image, strong CJK text & transparent PNG",
1158
+ "settings.media.modelHint.or-seedream-5-0-flash": "ByteDance · fastest Seedream, lowest per-image price",
1157
1159
  "settings.media.modelHint.or-gemini-omni-flash": "Recommended · newest, up to 15s, ~$0.6 per 8s",
1160
+ "settings.media.modelHint.or-seedance-2-5": "ByteDance · cinematic motion, ~$1.9 per 8s",
1161
+ "settings.media.modelHint.or-seedance-2-5-flash": "ByteDance · fastest Seedance, ~$1.3 per 8s",
1162
+ "settings.media.modelHint.or-wan-3-0": "Alibaba · cheapest per second, up to 30s, ~$0.8 per 8s",
1158
1163
  "settings.media.modelHint.or-veo-3-1": "Highest quality cinematic look, ~$3.4 per 8s",
1159
1164
  "settings.media.modelHint.or-veo-3-1-fast": "Faster Veo, ~1/4 the price of Veo 3.1",
1160
1165
  "settings.media.modelHint.or-veo-3-1-lite": "Cheapest · bulk drafts, ~$0.4 per 8s",
@@ -1571,10 +1576,10 @@ const I18n = (() => {
1571
1576
  "sib.auto.tag": "Economy",
1572
1577
  "sib.auto.tipTitle": "Auto · economy-first routing",
1573
1578
  "sib.auto.tip": "Starts with the cheapest model and upgrades only when necessary. Picks the most popular, capable and affordable models in real time. The price ratio floats accordingly.",
1574
- "sib.price.tip": "Connected straight to the vendor's own endpoint, billed at list price. Cost vs Claude Sonnet 5 (≈ ${{in}} in / ${{out}} out per 1M tokens).",
1575
- "sib.price.tip.abs": "Connected straight to the vendor's own endpoint. Cost vs Claude Sonnet 5 (≈ ${{in}} in / ${{out}} out per 1M tokens).",
1576
- "sib.price.tip.discounted": "Not connected to the vendor's own endpoint — served through a third-party channel, billed at list price, and the {{percent}}% off is a limited-time promotion. Cost vs Claude Sonnet 5 is ≈ ${{in}} in / ${{out}} out per 1M tokens.",
1577
- "sib.price.tip.promo": "Connected straight to the vendor's own endpoint, billed at list price; the {{percent}}% off is a limited-time promotion. Cost vs Claude Sonnet 5 is ≈ ${{in}} in / ${{out}} out per 1M tokens.",
1579
+ "sib.price.tip": "Connected straight to the vendor's own endpoint, billed at list price. Cost vs Claude Sonnet 5's list price (≈ ${{in}} in / ${{out}} out per 1M tokens).",
1580
+ "sib.price.tip.abs": "Connected straight to the vendor's own endpoint. Cost vs Claude Sonnet 5's list price (≈ ${{in}} in / ${{out}} out per 1M tokens).",
1581
+ "sib.price.tip.discounted": "Not connected to the vendor's own endpoint — served through a third-party channel, billed at list price, and the {{percent}}% off is a limited-time promotion. Cost vs Claude Sonnet 5's list price (≈ ${{in}} in / ${{out}} out per 1M tokens).",
1582
+ "sib.price.tip.promo": "Connected straight to the vendor's own endpoint, billed at list price; the {{percent}}% off is a limited-time promotion. Cost vs Claude Sonnet 5's list price (≈ ${{in}} in / ${{out}} out per 1M tokens).",
1578
1583
  "sib.discount.tag": "{{percent}}% off",
1579
1584
  "sib.bench.running": "Testing…",
1580
1585
  "sib.bench.done": "done in {{t}}s",
@@ -1947,7 +1952,7 @@ const I18n = (() => {
1947
1952
  "sidechat.opening": "正在接入\u2026",
1948
1953
  "sidechat.openFailed": "无法开启侧边聊天:{{error}}",
1949
1954
  "sidechat.failed": "侧边聊天出错:{{error}}",
1950
- "sidechat.gone": "这次侧边聊天已失效,再发一次即可重新开始。",
1955
+ "sidechat.reset": "之前的侧聊已重置,下面是新对话。",
1951
1956
  "workspace.revealInFinder": "打开所在文件夹",
1952
1957
  "workspace.revealFailed": "无法打开文件位置",
1953
1958
  "workspace.closeTab": "关闭",
@@ -1966,6 +1971,7 @@ const I18n = (() => {
1966
1971
  "workspace.dirtyCloseBatchConfirm": "有 {{count}} 个文件未保存,确定关闭?",
1967
1972
  "changes.tab": "Git 管理",
1968
1973
  "terminal.tab": "终端",
1974
+ "terminal.restart": "重启终端",
1969
1975
  "terminal.retry": "重试",
1970
1976
  "terminal.openFailed": "无法启动终端",
1971
1977
  "terminal.loadFailed": "终端组件加载失败",
@@ -2151,6 +2157,7 @@ const I18n = (() => {
2151
2157
  "modal.saving": "保存中…",
2152
2158
  "editor.edit": "编辑",
2153
2159
  "editor.preview": "预览",
2160
+ "editor.loadFailed": "编辑器加载失败",
2154
2161
 
2155
2162
  // ── Auth ──
2156
2163
  "auth.accessKeyRequired": "请输入访问密钥:",
@@ -2801,12 +2808,15 @@ const I18n = (() => {
2801
2808
  "settings.media.vision.primary": "主模型已支持视觉,已自动启用",
2802
2809
  "settings.media.modelHint.or-gemini-nano-banana-2-1": "推荐 · 日常出图性价比最高",
2803
2810
  "settings.media.modelHint.or-gemini-3-pro-image": "画质最好 · 复杂排版/文字,价格约 4 倍",
2804
- "settings.media.modelHint.or-gemini-3-1-flash-image": "上一代 · 效果接近 2.1,价格约 2 倍",
2805
2811
  "settings.media.modelHint.or-gemini-3-1-flash-lite-image": "速度最快 · 批量出图、快速草图",
2806
- "settings.media.modelHint.or-gpt-image-2-5": "OpenAI · 精细修图、高质感",
2807
- "settings.media.modelHint.or-gpt-image-2-5-flare": "OpenAI · 出图更快,适合打草稿",
2808
- "settings.media.modelHint.or-gpt-image-2": "OpenAI 上一代 · 效果接近 2.5 Flare",
2812
+ "settings.media.modelHint.or-gpt-image-2-6": "OpenAI 最新一代 · 细节与文字还原最好",
2813
+ "settings.media.modelHint.or-gpt-image-2-6-flare": "OpenAI 最新一代最快 · 适合打草稿",
2814
+ "settings.media.modelHint.or-seedream-5-5": "字节 · 按张计费,中文小字与透明背景更稳",
2815
+ "settings.media.modelHint.or-seedream-5-0-flash": "字节 · 最快且最便宜的 Seedream",
2809
2816
  "settings.media.modelHint.or-gemini-omni-flash": "推荐 · 最新一代,最长 15 秒,8 秒约 $0.6",
2817
+ "settings.media.modelHint.or-seedance-2-5": "字节 · 电影级运镜,8 秒约 $1.9",
2818
+ "settings.media.modelHint.or-seedance-2-5-flash": "字节 · 最快的 Seedance,8 秒约 $1.3",
2819
+ "settings.media.modelHint.or-wan-3-0": "阿里 · 每秒最便宜,最长 30 秒,8 秒约 $0.8",
2810
2820
  "settings.media.modelHint.or-veo-3-1": "电影感画质最好,8 秒约 $3.4",
2811
2821
  "settings.media.modelHint.or-veo-3-1-fast": "更快的 Veo,价格约为 3.1 的 1/4",
2812
2822
  "settings.media.modelHint.or-veo-3-1-lite": "最便宜 · 批量打样,8 秒约 $0.4",
@@ -3230,10 +3240,10 @@ const I18n = (() => {
3230
3240
  "sib.auto.tag": "经济优先",
3231
3241
  "sib.auto.tipTitle": "Auto · 经济优先",
3232
3242
  "sib.auto.tip": "从最便宜的开始,只在必要时升级模型。实时选用当下最流行、好用、便宜的模型。倍率随之浮动。",
3233
- "sib.price.tip": "官方直连,按官方标准价计费。相对 Claude Sonnet 5 的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3234
- "sib.price.tip.abs": "官方直连。相对 Claude Sonnet 5 的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3235
- "sib.price.tip.discounted": "非官方直连,由第三方渠道提供服务,按官方标准价计费,{{zhe}} 折为限时优惠。相对 Claude Sonnet 5 的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3236
- "sib.price.tip.promo": "官方直连,按官方标准价计费,{{zhe}} 折为限时优惠。相对 Claude Sonnet 5 的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3243
+ "sib.price.tip": "官方直连,按官方标准价计费。相对 Claude Sonnet 5 官方标价的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3244
+ "sib.price.tip.abs": "官方直连。相对 Claude Sonnet 5 官方标价的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3245
+ "sib.price.tip.discounted": "非官方直连,由第三方渠道提供服务,按官方标准价计费,{{zhe}} 折为限时优惠。相对 Claude Sonnet 5 官方标价的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3246
+ "sib.price.tip.promo": "官方直连,按官方标准价计费,{{zhe}} 折为限时优惠。相对 Claude Sonnet 5 官方标价的成本(约 ${{in}} 输入 / ${{out}} 输出 / 百万 token)。",
3237
3247
  "sib.discount.tag": "{{zhe}}折",
3238
3248
  "sib.bench.running": "测速中…",
3239
3249
  "sib.bench.done": "用时 {{t}} 秒",