diff options
| author | David Hill <[email protected]> | 2025-11-04 21:36:46 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2025-11-04 21:36:46 +0000 |
| commit | 7088bfabd773e2f076aab1c9d2468c04feff0570 (patch) | |
| tree | 67edc3c55bbf4110c8f6c2c12be2f9a0a4ba463a /packages/sdk | |
| parent | dbdbfb85431eb12b3159992b301fdba54b026ab8 (diff) | |
| parent | fe94bb8e50ed9625e553cc7bd79d3a02889c2979 (diff) | |
| download | opencode-7088bfabd773e2f076aab1c9d2468c04feff0570.tar.gz opencode-7088bfabd773e2f076aab1c9d2468c04feff0570.zip | |
Merge branch 'dev' of https://github.com/sst/opencode into dev
Diffstat (limited to 'packages/sdk')
| -rw-r--r-- | packages/sdk/js/package.json | 2 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/sdk.gen.ts | 9 | ||||
| -rw-r--r-- | packages/sdk/js/src/gen/types.gen.ts | 29 |
3 files changed, 34 insertions, 6 deletions
diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 24023d1b7..d4de9ca17 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/sdk", - "version": "1.0.20", + "version": "1.0.23", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/sdk/js/src/gen/sdk.gen.ts b/packages/sdk/js/src/gen/sdk.gen.ts index b76b6996f..1a54da8fa 100644 --- a/packages/sdk/js/src/gen/sdk.gen.ts +++ b/packages/sdk/js/src/gen/sdk.gen.ts @@ -55,6 +55,7 @@ import type { SessionShareErrors, SessionDiffData, SessionDiffResponses, + SessionDiffErrors, SessionSummarizeData, SessionSummarizeResponses, SessionSummarizeErrors, @@ -475,12 +476,16 @@ class Session extends _HeyApiClient { } /** - * Get the diff that resulted from this user message + * Get the diff for this session */ public diff<ThrowOnError extends boolean = false>( options: Options<SessionDiffData, ThrowOnError>, ) { - return (options.client ?? this._client).get<SessionDiffResponses, unknown, ThrowOnError>({ + return (options.client ?? this._client).get< + SessionDiffResponses, + SessionDiffErrors, + ThrowOnError + >({ url: "/session/{id}/diff", ...options, }) diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 97dc559db..0c0135b4f 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -163,7 +163,7 @@ export type KeybindsConfig = { */ history_previous?: string /** - * Previous history item + * Next history item */ history_next?: string /** @@ -406,6 +406,10 @@ export type Config = { apiKey?: string baseURL?: string /** + * GitHub Enterprise URL for copilot authentication + */ + enterpriseUrl?: string + /** * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout. */ timeout?: number | false @@ -527,7 +531,9 @@ export type Session = { directory: string parentID?: string summary?: { - diffs: Array<FileDiff> + additions: number + deletions: number + diffs?: Array<FileDiff> } share?: { url: string @@ -1133,6 +1139,7 @@ export type OAuth = { refresh: string access: string expires: number + enterpriseUrl?: string } export type ApiAuth = { @@ -1882,6 +1889,9 @@ export type SessionShareResponse = SessionShareResponses[keyof SessionShareRespo export type SessionDiffData = { body?: never path: { + /** + * Session ID + */ id: string } query?: { @@ -1891,9 +1901,22 @@ export type SessionDiffData = { url: "/session/{id}/diff" } +export type SessionDiffErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} + +export type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors] + export type SessionDiffResponses = { /** - * Successfully retrieved diff + * List of diffs */ 200: Array<FileDiff> } |
