Sfoglia il codice sorgente

Include step-start and step-finish for cost tracking (#2810)

Arjun Singh 1 anno fa
parent
commit
8a28d34fe9
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      packages/opencode/src/cli/cmd/run.ts

+ 8 - 0
packages/opencode/src/cli/cmd/run.ts

@@ -186,6 +186,14 @@ export const RunCommand = cmd({
           }
         }
 
+        if (part.type === "step-start") {
+          if (outputJsonEvent("step_start", { part })) return
+        }
+
+        if (part.type === "step-finish") {
+          if (outputJsonEvent("step_finish", { part })) return
+        }
+
         if (part.type === "text") {
           text = part.text