|
4956 | 4956 | }, |
4957 | 4957 | { |
4958 | 4958 | "$ref": "#/components/schemas/Event.tui.toast.show" |
| 4959 | + }, |
| 4960 | + { |
| 4961 | + "$ref": "#/components/schemas/Event.tui.session.select" |
4959 | 4962 | } |
4960 | 4963 | ] |
4961 | 4964 | } |
|
4970 | 4973 | ] |
4971 | 4974 | } |
4972 | 4975 | }, |
| 4976 | + "/tui/select-session": { |
| 4977 | + "post": { |
| 4978 | + "operationId": "tui.selectSession", |
| 4979 | + "parameters": [ |
| 4980 | + { |
| 4981 | + "in": "query", |
| 4982 | + "name": "directory", |
| 4983 | + "schema": { |
| 4984 | + "type": "string" |
| 4985 | + } |
| 4986 | + } |
| 4987 | + ], |
| 4988 | + "summary": "Select session", |
| 4989 | + "description": "Navigate the TUI to display the specified session.", |
| 4990 | + "responses": { |
| 4991 | + "200": { |
| 4992 | + "description": "Session selected successfully", |
| 4993 | + "content": { |
| 4994 | + "application/json": { |
| 4995 | + "schema": { |
| 4996 | + "type": "boolean" |
| 4997 | + } |
| 4998 | + } |
| 4999 | + } |
| 5000 | + }, |
| 5001 | + "400": { |
| 5002 | + "description": "Bad request", |
| 5003 | + "content": { |
| 5004 | + "application/json": { |
| 5005 | + "schema": { |
| 5006 | + "$ref": "#/components/schemas/BadRequestError" |
| 5007 | + } |
| 5008 | + } |
| 5009 | + } |
| 5010 | + }, |
| 5011 | + "404": { |
| 5012 | + "description": "Not found", |
| 5013 | + "content": { |
| 5014 | + "application/json": { |
| 5015 | + "schema": { |
| 5016 | + "$ref": "#/components/schemas/NotFoundError" |
| 5017 | + } |
| 5018 | + } |
| 5019 | + } |
| 5020 | + } |
| 5021 | + }, |
| 5022 | + "requestBody": { |
| 5023 | + "content": { |
| 5024 | + "application/json": { |
| 5025 | + "schema": { |
| 5026 | + "type": "object", |
| 5027 | + "properties": { |
| 5028 | + "sessionID": { |
| 5029 | + "description": "Session ID to navigate to", |
| 5030 | + "type": "string", |
| 5031 | + "pattern": "^ses" |
| 5032 | + } |
| 5033 | + }, |
| 5034 | + "required": ["sessionID"] |
| 5035 | + } |
| 5036 | + } |
| 5037 | + } |
| 5038 | + }, |
| 5039 | + "x-codeSamples": [ |
| 5040 | + { |
| 5041 | + "lang": "js", |
| 5042 | + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})" |
| 5043 | + } |
| 5044 | + ] |
| 5045 | + } |
| 5046 | + }, |
4973 | 5047 | "/tui/control/next": { |
4974 | 5048 | "get": { |
4975 | 5049 | "operationId": "tui.control.next", |
|
6794 | 6868 | }, |
6795 | 6869 | "required": ["type", "properties"] |
6796 | 6870 | }, |
| 6871 | + "Event.tui.session.select": { |
| 6872 | + "type": "object", |
| 6873 | + "properties": { |
| 6874 | + "type": { |
| 6875 | + "type": "string", |
| 6876 | + "const": "tui.session.select" |
| 6877 | + }, |
| 6878 | + "properties": { |
| 6879 | + "type": "object", |
| 6880 | + "properties": { |
| 6881 | + "sessionID": { |
| 6882 | + "description": "Session ID to navigate to", |
| 6883 | + "type": "string", |
| 6884 | + "pattern": "^ses" |
| 6885 | + } |
| 6886 | + }, |
| 6887 | + "required": ["sessionID"] |
| 6888 | + } |
| 6889 | + }, |
| 6890 | + "required": ["type", "properties"] |
| 6891 | + }, |
6797 | 6892 | "Event.mcp.tools.changed": { |
6798 | 6893 | "type": "object", |
6799 | 6894 | "properties": { |
|
7338 | 7433 | { |
7339 | 7434 | "$ref": "#/components/schemas/Event.tui.toast.show" |
7340 | 7435 | }, |
| 7436 | + { |
| 7437 | + "$ref": "#/components/schemas/Event.tui.session.select" |
| 7438 | + }, |
7341 | 7439 | { |
7342 | 7440 | "$ref": "#/components/schemas/Event.mcp.tools.changed" |
7343 | 7441 | }, |
|
0 commit comments