Quellcode durchsuchen

chore: generate

opencode-agent[bot] vor 2 Monaten
Ursprung
Commit
728eae9c25

+ 3 - 4
packages/llm/src/protocols/openai-responses.ts

@@ -361,7 +361,8 @@ const lowerMessages = Effect.fn("OpenAIResponses.lowerMessages")(function* (requ
           const existing = reasoningItems[reasoning.id]
           if (existing) {
             existing.summary.push(...reasoning.summary)
-            if (typeof reasoning.encrypted_content === "string") existing.encrypted_content = reasoning.encrypted_content
+            if (typeof reasoning.encrypted_content === "string")
+              existing.encrypted_content = reasoning.encrypted_content
             continue
           }
           reasoningItems[reasoning.id] = reasoning
@@ -568,9 +569,7 @@ const onReasoningDelta = (state: ParserState, event: OpenAIResponsesEvent): Step
   const events: LLMEvent[] = []
   const itemID = event.item_id ?? "reasoning-0"
   const id =
-    event.summary_index !== undefined || state.reasoningItems[itemID]
-      ? `${itemID}:${event.summary_index ?? 0}`
-      : itemID
+    event.summary_index !== undefined || state.reasoningItems[itemID] ? `${itemID}:${event.summary_index ?? 0}` : itemID
   return [
     {
       ...state,

+ 1 - 7
packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning.json

@@ -7,13 +7,7 @@
     "route": "openai-responses",
     "transport": "http",
     "model": "gpt-5.5",
-    "tags": [
-      "prefix:openai-responses",
-      "provider:openai",
-      "flagship",
-      "reasoning",
-      "golden"
-    ]
+    "tags": ["prefix:openai-responses", "provider:openai", "flagship", "reasoning", "golden"]
   },
   "interactions": [
     {

+ 11 - 2
packages/llm/test/tool-runtime.test.ts

@@ -319,7 +319,10 @@ describe("LLMClient tools", () => {
           return input.respond(
             bodies.length === 1
               ? sseEvents(
-                  { type: "response.output_item.added", item: { type: "reasoning", id: "rs_1", encrypted_content: null } },
+                  {
+                    type: "response.output_item.added",
+                    item: { type: "reasoning", id: "rs_1", encrypted_content: null },
+                  },
                   { type: "response.reasoning_summary_part.added", item_id: "rs_1", summary_index: 0 },
                   { type: "response.reasoning_summary_part.done", item_id: "rs_1", summary_index: 0 },
                   {
@@ -328,7 +331,13 @@ describe("LLMClient tools", () => {
                   },
                   {
                     type: "response.output_item.added",
-                    item: { type: "function_call", id: "item_1", call_id: "call_1", name: "get_weather", arguments: "" },
+                    item: {
+                      type: "function_call",
+                      id: "item_1",
+                      call_id: "call_1",
+                      name: "get_weather",
+                      arguments: "",
+                    },
                   },
                   { type: "response.function_call_arguments.delta", item_id: "item_1", delta: '{"city":"Paris"}' },
                   {

+ 1 - 6
packages/opencode/test/fixtures/recordings/session/native-openai-oauth-tool-loop.json

@@ -6,12 +6,7 @@
     "provider": "openai",
     "protocol": "openai-responses",
     "route": "openai-responses",
-    "tags": [
-      "opencode",
-      "native",
-      "oauth",
-      "tool-loop"
-    ]
+    "tags": ["opencode", "native", "oauth", "tool-loop"]
   },
   "interactions": [
     {

+ 1 - 6
packages/opencode/test/fixtures/recordings/session/native-zen-tool-loop.json

@@ -6,12 +6,7 @@
     "provider": "opencode",
     "protocol": "openai-responses",
     "route": "openai-responses",
-    "tags": [
-      "opencode",
-      "zen",
-      "native",
-      "tool-loop"
-    ]
+    "tags": ["opencode", "zen", "native", "tool-loop"]
   },
   "interactions": [
     {