@opencode-ai/sdk 1.1.56 → 1.1.58
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.
- package/dist/client.js +1 -1
- package/dist/v2/gen/types.gen.d.ts +6 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -17,7 +17,7 @@ export function createOpencodeClient(config) {
|
|
|
17
17
|
if (config?.directory) {
|
|
18
18
|
config.headers = {
|
|
19
19
|
...config.headers,
|
|
20
|
-
"x-opencode-directory": config.directory,
|
|
20
|
+
"x-opencode-directory": encodeURIComponent(config.directory),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
const client = createClient(config);
|
|
@@ -176,6 +176,7 @@ export type AssistantMessage = {
|
|
|
176
176
|
summary?: boolean;
|
|
177
177
|
cost: number;
|
|
178
178
|
tokens: {
|
|
179
|
+
total?: number;
|
|
179
180
|
input: number;
|
|
180
181
|
output: number;
|
|
181
182
|
reasoning: number;
|
|
@@ -370,6 +371,7 @@ export type StepFinishPart = {
|
|
|
370
371
|
snapshot?: string;
|
|
371
372
|
cost: number;
|
|
372
373
|
tokens: {
|
|
374
|
+
total?: number;
|
|
373
375
|
input: number;
|
|
374
376
|
output: number;
|
|
375
377
|
reasoning: number;
|
|
@@ -1596,6 +1598,10 @@ export type Config = {
|
|
|
1596
1598
|
* Enable pruning of old tool outputs (default: true)
|
|
1597
1599
|
*/
|
|
1598
1600
|
prune?: boolean;
|
|
1601
|
+
/**
|
|
1602
|
+
* Token buffer for compaction. Leaves enough window to avoid overflow during compaction.
|
|
1603
|
+
*/
|
|
1604
|
+
reserved?: number;
|
|
1599
1605
|
};
|
|
1600
1606
|
experimental?: {
|
|
1601
1607
|
disable_paste_summary?: boolean;
|