feat(runtime):增加多模态机制#322
Conversation
…sion flow Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(provider): validate parts and simplify message conversion
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(runtime): align todo integration test with parts input
…/todo integration Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
merge: resolve conflicts for PR 1024XEngineer#315
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
/simplify |
|
已完成你在 处理结果
验证
提交与推送
未完成项
|
…emantics Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
|
@xgopilot 评估一下是否需要增加internal/partsrender,说明具体原因、优劣之处 |
fix(provider): tighten multimodal part validation and empty message semantics
@xgopilot 那么请你具体说明为什么不是放在utils层,以及通用工具函数和多层共享函数之间的具体差别在哪 |
@xgopilot 据此,请你分析当前整个项目中有什么适合抽到utils层的工具函数 |
|
/review |
|
/simplify |
CompletedImplemented worthwhile fixes for unresolved review comments in this PR branch and pushed the result. What I changed
Validation
Code simplifier agent
Git
Not done
|
… gating Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(multimodal): redact transcript image identifiers and tighten memo gating
|
/review |
|
/simplify |
完成情况已按你这条 已修复
测试补充
验证已通过:
code-simplifier 子代理已按要求尝试两次调用,但两次都因上游 提交与推送
未执行
|
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
fix(multimodal): preserve blocked input and validate blank image url
|
/review |
| } | ||
|
|
||
| content := strings.TrimSpace(message.Content) | ||
| content := strings.TrimSpace(renderCompactPromptParts(message.Parts)) |
There was a problem hiding this comment.
renderCompactPromptParts(message.Parts) currently keeps raw remote URL and session-asset identifier text (via partsrender compact mode). This compact prompt is sent to the model, so signed URL query tokens / internal asset IDs can be re-exposed in later compaction calls. Consider using a redacted projection here (for example transcript/display-safe placeholders) instead of raw identifiers.
| return errors.New("remote image part must contain url") | ||
| } | ||
| case ImageSourceSessionAsset: | ||
| if image.Asset == nil || image.Asset.ID == "" { |
There was a problem hiding this comment.
session_asset validation checks image.Asset.ID == "" but does not trim whitespace. IDs like " " will pass validation. Please align with remote URL validation by using strings.TrimSpace(image.Asset.ID) == "" to avoid accepting invalid payloads.
|
/code 修复编译错误,提高测试覆盖率 |
完成情况已按你的要求完成“修复编译错误 + 提高测试覆盖率”,并推送到当前工作分支。 本次改动
验证结果
提交与推送
未完成项
|
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com>
test: fix compile errors and improve multimodal test coverage
背景
本 PR 的核心目标是收敛多模态消息在各层的渲染与传递语义,减少重复实现,并清理历史兼容路径导致的语义漂移。
实际改动范围(按模块)
internal/partsrenderinternal/context*、internal/memo、internal/tools、internal/tui/core/appinternal/provider/types新增/扩展内容 part 的结构与转换能力internal/provider/openaicompat/chatcompletions调整请求构造与测试预期internal/runtime、internal/session若干路径改为按结构化 parts 流转internal/app、internal/config关键行为变更
Parts -> 文本的主要规则集中到共享实现,按场景提供明确入口,减少跨模块重复逻辑。测试与回归
说明
本次变更不追求引入新的跨层能力,重点是把既有多模态主链路收敛为单一语义来源,并清理过渡期兼容行为。