Merge origin/master (v0.5.81) into gitea/new_feature
Resolve conflicts: - streamingHandler.js: merge buildStreamErrorBytes onAbortTerminal + local shouldPersistRequestDetail & streamStatusForContent - capabilities.js: preserve server-injected user-asserted caps and models.dev catalog lookup; wire CommandCode /alpha/generate caps inside resolve() - commandcode.js (services/usage): adopt upstream whoami + billing credits/subscriptions with 5h/weekly rate windows and plan caps - openai-to-commandcode.js: merge toNativeImageBlock (data-URI & http(s) support) and assistant reasoning_content preservation - commandcode-to-openai.js: adopt upstream mid-stream error throw for clean retry and abortion - tests: sync commandcode test suite and exclude .next from vitest config
This commit is contained in:
@@ -114,9 +114,7 @@ describe("OpenAI → CommandCode", () => {
|
||||
).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
// openai-to-commandcode.js — image blocks now map to {type:"image", image:"data:..."}
|
||||
// FIXED: was "[image omitted]", now preserved as data URI
|
||||
it("image content is preserved", () => {
|
||||
it("image content is preserved as native CommandCode image blocks", () => {
|
||||
const out = O2CC({
|
||||
messages: [
|
||||
{
|
||||
@@ -131,6 +129,15 @@ describe("OpenAI → CommandCode", () => {
|
||||
},
|
||||
],
|
||||
});
|
||||
expect(JSON.stringify(out), "image omitted").toContain("BBBB");
|
||||
expect(JSON.stringify(out)).toContain("BBBB");
|
||||
expect(JSON.stringify(out)).not.toContain("[image omitted]");
|
||||
expect(out.params.messages[0].content).toMatchObject([
|
||||
{ type: "text", text: "look" },
|
||||
{
|
||||
type: "image",
|
||||
image: "data:image/png;base64,BBBB",
|
||||
mimeType: "image/png",
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user