feat: 从iframe对接模型配置
This commit is contained in:
1 parent
c05513ae1e
commit
f496546cc0
5 files changed
+76
-33
No files matched your search
@@ -79,3 +79,24 @@ test("keeps screenshot-only iframe submissions in the conversation flow", () =>
|
||||
assert.equal(result.files[0]?.filename, "shot.jpg");
|
||||
assert.equal(result.files[0]?.mediaType, "image/jpeg");
|
||||
});
|
||||
|
||||
test("maps iframe model selection into stream context model_name", () => {
|
||||
const result = parseBrainyChatSubmitMessage({
|
||||
source: "brainy-extension",
|
||||
type: "brainy:chat-submit",
|
||||
requestId: "iframe-456",
|
||||
payload: {
|
||||
text: "帮我总结这个页面",
|
||||
model: {
|
||||
label: "Qwen3-32B: 效果与速度均衡(推荐)",
|
||||
value: "OpenAI3",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(result.submitText, "帮我总结这个页面");
|
||||
assert.deepEqual(result.iframeContext, {
|
||||
brainy_request_id: "iframe-456",
|
||||
model_name: "OpenAI3",
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user