feat: ask_user web 问题卡片 + 思考档位按模型族全量映射 + 流式竖线修正#147
Merged
Conversation
.c-bubble.agent.streaming::before 原从 top:10px 起画,悬在 20px 圆角弧之外"出框"。改为 top: var(--st-bubble-radius) / bottom: calc(var(--st-bubble-tail) + 4px),光线只画在左缘直线段。 设计系统(claude.ai/design dfc6ebc1)15 张卡片已同步同款修正, 并删除旧代 Spatial Glass 遗留 styles.css(icons.html 已自足化)。 Claude-Session: https://claude.ai/code/session_018wZDwYMJVBeiVnpax3mP9J
ask_user 工具的 question/options 只存在于 tool-call args 里: Telegram 渲染成 inline 键盘、QQ 系渲染成列表,web 端此前完全 没有对应渲染 —— 用户只看到重复问题的纯文本,选项整个丢失。 新增 QuestionCard:选项渲染为 agent 气泡下方的 ghost pill, 单选点击即作为下一条用户消息发送、多选勾选后提交(顿号连接)、 历史轮次静默(opacity 50% 不可点);流式中 args 未完整时不渲染。 ask_user 调用不再计入通用工具卡与折叠计数;气泡正文已含问题 文本时卡片不重复显示。解析与后端 parse_ask_user_args 同规 (8 选项上限/换行清洗/长度截断)。设计系统已新增对应组件卡 components/question-card.html。 Claude-Session: https://claude.ai/code/session_018wZDwYMJVBeiVnpax3mP9J
思考控件此前硬编码 低/中/高(+codex 极)四档,与各家真实档位 脱节。现改为三层架构: - 后端单一注册表 corlinman_providers/reasoning_tiers.py:规范 词汇 none<minimal<low<on≈medium<high<xhigh<max,按解析后的 真实模型 id 判族(容忍中继后缀/vendor 前缀):gpt-5.6 六档、 5.2/5.4/5.5 五档、5.1 四档(none 替 minimal)、初代 gpt-5 四档 (minimal)、o 系三档;claude 4.6+ 四/五档(fable/opus-4.7+/ sonnet-5 含 xhigh)、4.5 及以下无档;gemini 3 系 thinking_level 字串档、2.5 系预算数值档;grok-3-mini 两档、grok-4/4.1 无档; deepseek v4 none/high/max;qwen 混合思考 预算档;glm-5 三档、 glm-4.x 开关;kimi k2.5/2.6 开关、k2.7/k3 焊死。 - /admin/models 每个别名下发 reasoning_tiers/reasoning_default (解析别名→真实模型,cornna→gpt-5.6-sol 也能出六档);前端 composer 按真实档位渲染(开关族显示 关/开,无档模型隐藏控件, 未知族回退旧启发式),存储偏好就近钳制显示与发送。 - provider 层按族翻译+钳制:OpenAI/Grok 透传(超档就近降), DeepSeek/GLM/Kimi 经 extra_body thinking.type(+effort), Qwen enable_thinking+thinking_budget,Anthropic 4.6+ 组 thinking:adaptive + output_config.effort,Gemini 3 系 thinking_level / 2.5 系 thinking_budget;已知无档族丢参防 400, 未知模型原样透传。网关白名单扩到规范全集(仍软丢弃垃圾值)。 Anthropic/Google provider 此前完全没有 thinking 入参(schema 未声明,reasoning loop 闸门直接丢弃),本次一并打通。 Claude-Session: https://claude.ai/code/session_018wZDwYMJVBeiVnpax3mP9J
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
8 角度自审(6 并行 finder)后的修复: - codex_provider 调 clamp_reasoning_tier 未 import(NameError)+ schema enum 扩到规范全集(否则闸门在 provider 前就把 max 丢了,永远 到不了 max→xhigh 的钳制,静默回落 medium)。 - reasoning_tiers claude- 兜底从"前向兼容给满五档"改为"无档": claude-opus-4/-4-1/claude-sonnet-4 等 budget_tokens era 老 id 原会 误收 adaptive+output_config.effort 而 400;未知 claude 现在安全 降级为不出选择器。qwen-max 补进混合思考行。 - 网关鉴权中间件放行 OPTIONS 预检(预检按规范不带凭据,原先 401 掐死一切跨域浏览器客户端,CORS 中间件轮不到应答)。 - ask_user 流式期间(args 未完整)保留在工具 trace 里可见,解析 成功才转问题卡;multiple 严格 === true(字符串 "false" 不再误开 多选);多选答案按标签是否含 CJK 选择 、/", " 连接。 - message-bubble 两个 memo 依赖从 message 收窄到 message.toolCalls (流式每 delta 换 message 身份,原 memo 形同虚设);openai provider deepseek/glm 同构分支合并;chat-area 高亮回退去重; 清理端到端未消费的 reasoningDefault UI 通路。 Claude-Session: https://claude.ai/code/session_018wZDwYMJVBeiVnpax3mP9J
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
三件套(同一轮聊天体验修缮):
styles.css(icons.html 自足化、thumbnail 换 Eclipse 版)。测试:providers 604 + gateway 1453 + UI 1218 全绿;pnpm build 通过。
https://claude.ai/code/session_018wZDwYMJVBeiVnpax3mP9J