@opencode/util 0.0.0-dev-1286 → 0.0.0-dev-1289

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,9 +34,4 @@ export declare function duration(messages: readonly Message[], message: Message,
34
34
  * from request dispatch instead, which is what this measured for them before the field existed.
35
35
  */
36
36
  export declare function tokensPerSecond(messages: readonly Message[], message: Message, options?: Options): number | undefined;
37
- /**
38
- * Milliseconds from the dispatch of the turn's first token-producing step to its first streamed token, or undefined
39
- * until a step records one.
40
- */
41
- export declare function timeToFirstToken(messages: readonly Message[], message: Message, options?: Options): number | undefined;
42
37
  export declare function legacy(messages: readonly Message[]): boolean;
@@ -28,16 +28,6 @@ export function tokensPerSecond(messages, message, options = {}) {
28
28
  // Aggregate before dividing so each step is weighted by its provider-active duration.
29
29
  return output / (total / 1_000);
30
30
  }
31
- /**
32
- * Milliseconds from the dispatch of the turn's first token-producing step to its first streamed token, or undefined
33
- * until a step records one.
34
- */
35
- export function timeToFirstToken(messages, message, options = {}) {
36
- const step = turnSteps(messages, message, options).find((item) => item.time.firstToken !== undefined);
37
- if (step?.time.firstToken === undefined)
38
- return;
39
- return Math.max(0, step.time.firstToken - step.time.created);
40
- }
41
31
  export function legacy(messages) {
42
32
  return !messages.some((message) => message.type === "idle");
43
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/util",
4
- "version": "0.0.0-dev-1286",
4
+ "version": "0.0.0-dev-1289",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {