Skip to content

feat(enterprise): 展示视觉模型标识并精简 Token 用量 - #480

Closed
SuperstructureJH wants to merge 17 commits into
dataelement:V0.9.2from
SuperstructureJH:codex/enterprise-model-vision-v091
Closed

SuperstructureJH wants to merge 17 commits into
dataelement:V0.9.2from
SuperstructureJH:codex/enterprise-model-vision-v091

Conversation

@SuperstructureJH

Copy link
Copy Markdown
Contributor

企业后台已配置图片能力,但桌面端的可用模型列表缺少对应标识,Token 长数字也难以浏览。现在模型名称后根据 capabilities.vision 显示眼睛图标和“视觉”,右侧保留已用量 / 额度,中文统一按“万”缩写并省略末尾零;卡片的描边、圆角、字号和间距与默认模型设置页对齐。

视觉能力以毕昇下发配置为准,刷新后同步展示。保留零用量、极小非零用量、用量不可用及悬停百分比的语义,文案和单位跟随 DSH 产品语言。

依赖与合并顺序:先合并 #457,再合并本 PR。本分支包含 #457 的最新提交 a4cc4d25,因此当前整体 diff 包含企业登录前置实现;本次界面增量集中在提交 568225ff(组件、既有测试与联调说明共 3 个文件)。已与 V0.9.1@9b2d2cf1 合并验证,保留版本分支的文档预览与企业模型回退能力,Harness 为 0.1.5-rc.2

验证:

  • 全量测试:137 个文件 / 1,157 项通过。
  • 锁定依赖安装、Harness 补丁应用、类型检查、生产构建及 diff 检查通过。
  • 实际 React 组件的演示数据验证:浅色、深色窄宽度、能力刷新、用量边界与中英文切换通过。
  • 真实企业登录与真实模型图片问答:NOT_RUN

fairy and others added 17 commits September 17, 2026 16:07
…tokens into Harness

Keep market 1.45.1, migration protocol 6, and safe-mode inspect-only; chat goes through a main-process SSE proxy.

Co-authored-by: Cursor <cursoragent@cursor.com>
Windows checkout turns the YAML into CRLF, so the inject assertion must not depend on LF-only line endings.

Co-authored-by: Cursor <cursoragent@cursor.com>
commitSession publishes connected before models sync, so assertions must wait for modelsAvailable. Also match the desktop patch without depending on LF-only regex groups.

Co-authored-by: Cursor <cursoragent@cursor.com>
modelsAvailable flips true before GET /usage finishes, so the PKCE test must wait for bisheng:42 used tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
* 修复上传与回答中的文档预览:走附件真实路径,失败则本机打开

官方已支持输入框拖文件、回形针和默认工作区,不再重复实现。预览统一通过 fileHostPath 打开右侧面板,插件关闭或渲染失败时回退系统应用。

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(preview): match Windows attachment names without case and keep images if aliasing fails

Explorer treats names as case-insensitive, and a failed hard-link should not block opening the original image path.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add shared OpenAI and ByteDance image generation plugin

* fix: align image settings and support Electron image writer

* fix: use Seedream single-image contract and retain provider diagnostics

* feat(image-generation): streamline calls and preview generated images

* fix(image-generation): use shared dropdown menus

* fix(image-generation): complete Seedream model presets

* fix(image): resolve Harness session IDs for conversation previews

* test(image): align migration with current session format

* test(image): scope credential mode assertion to POSIX

* fix(release): type rollout configuration tests

* docs: refresh main migration evidence

* fix(runtime): await failed Harness shutdown

* ci: retry Windows verification

* 加固生图插件:未配置时禁止引导调用,并隔离 sharp 启动风险

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(image-generation): fail closed on unread settings and buffer Host GET routes

Credential read failures must not look like an empty revision-0 store, and exact GET routes need a buffered body so Host preview and settings reach the plugin.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Jianghan <58623049+SuperstructureJH@users.noreply.github.com>
Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…#426)

* feat(mobile): require a desktop PIN for internet pairing

Wi-Fi can connect on scan, but a public tunnel URL can leak, so the phone must enter a 6-digit password shown only on the computer.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(mobile): 桌面 PIN 仅对本机 socket 可见

隧道入口也落在 127.0.0.1,只认转发地址会把 PIN 漏到公网;Windows 覆盖长效 PIN 前先删旧文件。

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(mobile): dock the Pinggy expiry hint below the input

The overlay covered the composer. Keep the field in place when the hint is hidden.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: add agents-standards-review.zh.md to .gitignore

* fix(mobile): center the Pinggy expiry hint

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(mobile): bind desktop PIN routes to a session cookie

Tunnel requests can share loopback sockets and spoof Host, so PIN
visibility now requires a one-time bootstrap token exchanged for an
HttpOnly desktop cookie. Same-IP cookie promotion is LAN-only.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: fairy <3054158379@qq.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
覆盖安装、强杀和首启未就绪会留下同版本 session marker,反复弹出故障报告;不再采集此类报告,已入队的也静默丢弃。

Co-authored-by: fairy <3054158379@qq.com>
Selection borders and focus outlines overflowed the grid. Keep the 2px border inside each cell, drop the default gray inset, and disable native image dragging so Electron does not pull a ghost thumbnail.

Co-authored-by: fairy <3054158379@qq.com>
…#453)

* fix(ppt): keep template previews inside gallery cells

Selection borders and focus outlines overflowed the grid. Keep the 2px border inside each cell, drop the default gray inset, and disable native image dragging so Electron does not pull a ghost thumbnail.


* fix(ppt): validate literal newline escapes before export

Block leftover \n/\r in text and table cells so slides no longer show escape residue, while real YAML line breaks still export.


---------

Co-authored-by: fairy <3054158379@qq.com>
存储测试在异步 flush 后立刻删除目录,GitHub Windows runner 上文件句柄尚未释放会导致 rmdir 失败。对锁定错误做短重试,避免测试本身已通过却被清理拖垮。

Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(ppt): 在 V0.9.1 上加入个人模板上传与复用

基于最新 V0.9.1 重做个人模板能力,保留画廊预览与换行导出修复,并限制上传体积、按页返回审查预览。


* fix(ppt): accept OOXML that undeclares unused namespace prefixes

WPS and PowerPoint emit xmlns:foo="", which JSDOM's well-formed outerHTML rejects during personal-template conversion.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ppt): ship Green Pulse as a bundled editable image template

Give the catalog a reviewed 22-page PPTD project with hashed copy, image-slot contracts, and chart export fixes so image-assisted decks do not depend on personal uploads.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ppt): load personal-template limits from the packed runtime in tests

Avoid Vite parsing the CLI bundle via a source import, which fails Windows CI with a SyntaxError before any test runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* 修复 Windows CI 清理 startup-failure 临时目录时的 EBUSY 误报

Harness 子进程刚退出后立刻 rmdir,GitHub Windows runner 上句柄未释放会拖垮已通过的测试。对锁定错误做短重试。



---------

Co-authored-by: fairy <3054158379@qq.com>
Keep phase as refreshing after commitSession so settings keep polling until syncCatalog finishes usage, avoiding the empty first-load model usage state.

Co-authored-by: Cursor <cursoragent@cursor.com>
…r on settings reads

Existing sessions missed the enterprise catalog after login because revision waited on usage and the idle adapter poll was too slow.

Co-authored-by: Cursor <cursoragent@cursor.com>
…t errors

The enterprise settings page ignored Settings -> General language changes, and desktop-owned chat failures stayed English. Register the settings copy with the locale service and localize known adapter fallbacks without rewriting platform messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Fairy-happy

Copy link
Copy Markdown
Collaborator

V0.9.2 已合入 #457(squash),本分支仍带着 0.9.1 历史和企业登录原提交,因此对当前基线冲突,不能原样合并。

已在 V0.9.2 上只 cherry-pick 本 PR 的界面提交 568225ff,新开:#484

请走 #484。本 PR 可在 #484 合入后关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants