feat: configurable shell selection + desktop settings UI (#20602)
This commit is contained in:
@@ -105,6 +105,7 @@ import type {
|
||||
PtyListResponses,
|
||||
PtyRemoveErrors,
|
||||
PtyRemoveResponses,
|
||||
PtyShellsResponses,
|
||||
PtyUpdateErrors,
|
||||
PtyUpdateResponses,
|
||||
QuestionAnswer,
|
||||
@@ -1080,6 +1081,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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1032,6 +1032,62 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/pty/shells": {
|
||||
"get": {
|
||||
"operationId": "pty.shells",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "directory",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "workspace",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"summary": "List available shells",
|
||||
"description": "Get a list of available shells on the system.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of shells",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"acceptable": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["path", "name", "acceptable"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "js",
|
||||
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/pty": {
|
||||
"get": {
|
||||
"operationId": "pty.list",
|
||||
@@ -11454,6 +11510,10 @@
|
||||
"description": "JSON schema reference for configuration validation",
|
||||
"type": "string"
|
||||
},
|
||||
"shell": {
|
||||
"description": "Default shell to use for terminal and bash tool",
|
||||
"type": "string"
|
||||
},
|
||||
"logLevel": {
|
||||
"$ref": "#/components/schemas/LogLevel"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user