diff options
| author | Luke Parker <[email protected]> | 2026-04-27 10:54:55 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-27 00:54:55 +0000 |
| commit | 141f33d24bdc059aa26bd1e32c9416ac3aed36e1 (patch) | |
| tree | ffd2f8b70439cdc134cb3b7e70c7fbf7130f1b81 /packages/sdk/js/src | |
| parent | c4d8a8183e6c2d15831767f1b898a8d0ed0297b9 (diff) | |
| download | opencode-141f33d24bdc059aa26bd1e32c9416ac3aed36e1.tar.gz opencode-141f33d24bdc059aa26bd1e32c9416ac3aed36e1.zip | |
feat: configurable shell selection + desktop settings UI (#20602)
Diffstat (limited to 'packages/sdk/js/src')
| -rw-r--r-- | packages/sdk/js/src/v2/gen/sdk.gen.ts | 31 | ||||
| -rw-r--r-- | packages/sdk/js/src/v2/gen/types.gen.ts | 27 |
2 files changed, 58 insertions, 0 deletions
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index 6248eb8e4..e21d1f496 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -105,6 +105,7 @@ import type { PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, + PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, @@ -1081,6 +1082,36 @@ export class Project extends HeyApiClient { export class Pty extends HeyApiClient { /** + * List available shells + * + * Get a list of available shells on the system. + */ + public shells<ThrowOnError extends boolean = false>( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options<never, ThrowOnError>, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get<PtyShellsResponses, unknown, ThrowOnError>({ + url: "/pty/shells", + ...options, + ...params, + }) + } + + /** * List PTY sessions * * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode. diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 40e661b46..a723b3083 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1470,6 +1470,10 @@ export type Config = { * JSON schema reference for configuration validation */ $schema?: string + /** + * Default shell to use for terminal and bash tool + */ + shell?: string logLevel?: LogLevel server?: ServerConfig /** @@ -2694,6 +2698,29 @@ export type ProjectUpdateResponses = { export type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses] +export type PtyShellsData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/pty/shells" +} + +export type PtyShellsResponses = { + /** + * List of shells + */ + 200: Array<{ + path: string + name: string + acceptable: boolean + }> +} + +export type PtyShellsResponse = PtyShellsResponses[keyof PtyShellsResponses] + export type PtyListData = { body?: never path?: never |
