refactor: remove todo tool (#35989)
This commit is contained in:
parent
d4155f2906
commit
7feefb697f
250 changed files with 237 additions and 4755 deletions
|
|
@ -62,9 +62,6 @@ import type {
|
|||
SessionChildrenData,
|
||||
SessionChildrenResponses,
|
||||
SessionChildrenErrors,
|
||||
SessionTodoData,
|
||||
SessionTodoResponses,
|
||||
SessionTodoErrors,
|
||||
SessionInitData,
|
||||
SessionInitResponses,
|
||||
SessionInitErrors,
|
||||
|
|
@ -507,16 +504,6 @@ class Session extends _HeyApiClient {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the todo list for a session
|
||||
*/
|
||||
public todo<ThrowOnError extends boolean = false>(options: Options<SessionTodoData, ThrowOnError>) {
|
||||
return (options.client ?? this._client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({
|
||||
url: "/session/{id}/todo",
|
||||
...options,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Analyze the app and create an AGENTS.md file
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -493,33 +493,6 @@ export type EventFileEdited = {
|
|||
}
|
||||
}
|
||||
|
||||
export type Todo = {
|
||||
/**
|
||||
* Brief description of the task
|
||||
*/
|
||||
content: string
|
||||
/**
|
||||
* Current status of the task: pending, in_progress, completed, cancelled
|
||||
*/
|
||||
status: string
|
||||
/**
|
||||
* Priority level of the task: high, medium, low
|
||||
*/
|
||||
priority: string
|
||||
/**
|
||||
* Unique identifier for the todo item
|
||||
*/
|
||||
id: string
|
||||
}
|
||||
|
||||
export type EventTodoUpdated = {
|
||||
type: "todo.updated"
|
||||
properties: {
|
||||
sessionID: string
|
||||
todos: Array<Todo>
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCommandExecuted = {
|
||||
type: "command.executed"
|
||||
properties: {
|
||||
|
|
@ -717,7 +690,6 @@ export type Event =
|
|||
| EventSessionIdle
|
||||
| EventSessionCompacted
|
||||
| EventFileEdited
|
||||
| EventTodoUpdated
|
||||
| EventCommandExecuted
|
||||
| EventSessionCreated
|
||||
| EventSessionUpdated
|
||||
|
|
@ -2272,42 +2244,6 @@ export type SessionChildrenResponses = {
|
|||
|
||||
export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses]
|
||||
|
||||
export type SessionTodoData = {
|
||||
body?: never
|
||||
path: {
|
||||
/**
|
||||
* Session ID
|
||||
*/
|
||||
id: string
|
||||
}
|
||||
query?: {
|
||||
directory?: string
|
||||
}
|
||||
url: "/session/{id}/todo"
|
||||
}
|
||||
|
||||
export type SessionTodoErrors = {
|
||||
/**
|
||||
* Bad request
|
||||
*/
|
||||
400: BadRequestError
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: NotFoundError
|
||||
}
|
||||
|
||||
export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors]
|
||||
|
||||
export type SessionTodoResponses = {
|
||||
/**
|
||||
* Todo list
|
||||
*/
|
||||
200: Array<Todo>
|
||||
}
|
||||
|
||||
export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses]
|
||||
|
||||
export type SessionInitData = {
|
||||
body?: {
|
||||
modelID: string
|
||||
|
|
|
|||
|
|
@ -219,8 +219,6 @@ import type {
|
|||
SessionStatusResponses,
|
||||
SessionSummarizeErrors,
|
||||
SessionSummarizeResponses,
|
||||
SessionTodoErrors,
|
||||
SessionTodoResponses,
|
||||
SessionUnrevertErrors,
|
||||
SessionUnrevertResponses,
|
||||
SessionUnshareErrors,
|
||||
|
|
@ -3711,38 +3709,6 @@ export class Session2 extends HeyApiClient {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session todos
|
||||
*
|
||||
* Retrieve the todo list associated with a specific session, showing tasks and action items.
|
||||
*/
|
||||
public todo<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
sessionID: string
|
||||
directory?: string
|
||||
workspace?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "sessionID" },
|
||||
{ in: "query", key: "directory" },
|
||||
{ in: "query", key: "workspace" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({
|
||||
url: "/session/{sessionID}/todo",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message diff
|
||||
*
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ export type Event =
|
|||
| EventFormCreated
|
||||
| EventFormReplied
|
||||
| EventFormCancelled
|
||||
| EventTodoUpdated
|
||||
| EventLspUpdated
|
||||
| EventPermissionAsked
|
||||
| EventPermissionReplied
|
||||
|
|
@ -628,21 +627,6 @@ export type Pty = {
|
|||
exitCode?: number
|
||||
}
|
||||
|
||||
export type Todo = {
|
||||
/**
|
||||
* Brief description of the task
|
||||
*/
|
||||
content: string
|
||||
/**
|
||||
* Current status of the task: pending, in_progress, completed, cancelled
|
||||
*/
|
||||
status: string
|
||||
/**
|
||||
* Priority level of the task: high, medium, low
|
||||
*/
|
||||
priority: string
|
||||
}
|
||||
|
||||
export type SessionStatus =
|
||||
| {
|
||||
type: "idle"
|
||||
|
|
@ -1444,14 +1428,6 @@ export type GlobalEvent = {
|
|||
sessionID: string
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "todo.updated"
|
||||
properties: {
|
||||
sessionID: string
|
||||
todos: Array<Todo>
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "lsp.updated"
|
||||
|
|
@ -1782,7 +1758,6 @@ export type PermissionConfig =
|
|||
bash?: PermissionRuleConfig
|
||||
task?: PermissionRuleConfig
|
||||
external_directory?: PermissionRuleConfig
|
||||
todowrite?: PermissionActionConfig
|
||||
question?: PermissionActionConfig
|
||||
webfetch?: PermissionActionConfig
|
||||
websearch?: PermissionActionConfig
|
||||
|
|
@ -3109,7 +3084,6 @@ export type V2Event =
|
|||
| FormCreated
|
||||
| FormReplied
|
||||
| FormCancelled
|
||||
| TodoUpdated
|
||||
| LspUpdated
|
||||
| PermissionAsked
|
||||
| PermissionReplied
|
||||
|
|
@ -6620,20 +6594,6 @@ export type FormCancelled = {
|
|||
}
|
||||
}
|
||||
|
||||
export type TodoUpdated = {
|
||||
id: string
|
||||
created: number
|
||||
metadata?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
type: "todo.updated"
|
||||
location?: LocationRef
|
||||
data: {
|
||||
sessionID: string
|
||||
todos: Array<Todo>
|
||||
}
|
||||
}
|
||||
|
||||
export type LspUpdated = {
|
||||
id: string
|
||||
created: number
|
||||
|
|
@ -7894,15 +7854,6 @@ export type EventFormCancelled = {
|
|||
}
|
||||
}
|
||||
|
||||
export type EventTodoUpdated = {
|
||||
id: string
|
||||
type: "todo.updated"
|
||||
properties: {
|
||||
sessionID: string
|
||||
todos: Array<Todo>
|
||||
}
|
||||
}
|
||||
|
||||
export type EventLspUpdated = {
|
||||
id: string
|
||||
type: "lsp.updated"
|
||||
|
|
@ -8730,7 +8681,6 @@ export type V2EventV2 =
|
|||
| FormCreatedV2
|
||||
| FormRepliedV2
|
||||
| FormCancelledV2
|
||||
| TodoUpdatedV2
|
||||
| SessionStatusV22
|
||||
| SessionIdleV2
|
||||
| TuiPromptAppendV2
|
||||
|
|
@ -10741,20 +10691,6 @@ export type FormCancelledV2 = {
|
|||
}
|
||||
}
|
||||
|
||||
export type TodoUpdatedV2 = {
|
||||
id: string
|
||||
created: number
|
||||
metadata?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
type: "todo.updated"
|
||||
location?: LocationRefV2
|
||||
data: {
|
||||
sessionID: string
|
||||
todos: Array<Todo>
|
||||
}
|
||||
}
|
||||
|
||||
export type SessionIdleV2 = {
|
||||
id: string
|
||||
created: number
|
||||
|
|
@ -13648,40 +13584,6 @@ export type SessionChildrenResponses = {
|
|||
|
||||
export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses]
|
||||
|
||||
export type SessionTodoData = {
|
||||
body?: never
|
||||
path: {
|
||||
sessionID: string
|
||||
}
|
||||
query?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
url: "/session/{sessionID}/todo"
|
||||
}
|
||||
|
||||
export type SessionTodoErrors = {
|
||||
/**
|
||||
* BadRequest | InvalidRequestError
|
||||
*/
|
||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||
/**
|
||||
* NotFoundError
|
||||
*/
|
||||
404: NotFoundError
|
||||
}
|
||||
|
||||
export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors]
|
||||
|
||||
export type SessionTodoResponses = {
|
||||
/**
|
||||
* Todo list
|
||||
*/
|
||||
200: Array<Todo>
|
||||
}
|
||||
|
||||
export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses]
|
||||
|
||||
export type SessionDiffData = {
|
||||
body?: never
|
||||
path: {
|
||||
|
|
|
|||
|
|
@ -5925,90 +5925,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/session/{sessionID}/todo": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
"operationId": "session.todo",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessionID",
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "directory",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"name": "workspace",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Todo list",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Todo"
|
||||
},
|
||||
"description": "Todo list"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "BadRequest | InvalidRequestError",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/InvalidRequestError"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "NotFoundError",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NotFoundError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
|
||||
"summary": "Get session todos",
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "js",
|
||||
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/session/{sessionID}/diff": {
|
||||
"get": {
|
||||
"tags": ["session"],
|
||||
|
|
@ -15445,9 +15361,6 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/EventQuestionV2Rejected"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/EventTodoUpdated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/EventLspUpdated"
|
||||
},
|
||||
|
|
@ -17244,25 +17157,6 @@
|
|||
"required": ["id", "title", "command", "args", "cwd", "status", "pid"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Todo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "Brief description of the task"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "Current status of the task: pending, in_progress, completed, cancelled"
|
||||
},
|
||||
"priority": {
|
||||
"type": "string",
|
||||
"description": "Priority level of the task: high, medium, low"
|
||||
}
|
||||
},
|
||||
"required": ["content", "status", "priority"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SessionStatus": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
|
@ -19611,38 +19505,6 @@
|
|||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["todo.updated"]
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"todos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Todo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["sessionID", "todos"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -20612,9 +20474,6 @@
|
|||
"external_directory": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"todowrite": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"question": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
|
|
@ -24164,9 +24023,6 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/QuestionV2Rejected"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/TodoUpdated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/LspUpdated"
|
||||
},
|
||||
|
|
@ -32461,60 +32317,6 @@
|
|||
"required": ["id", "type", "data"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TodoUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["todo.updated"]
|
||||
},
|
||||
"durable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"aggregateID": {
|
||||
"type": "string"
|
||||
},
|
||||
"seq": {
|
||||
"type": "integer"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["aggregateID", "seq", "version"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"location": {
|
||||
"$ref": "#/components/schemas/LocationRef"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"todos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Todo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["sessionID", "todos"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "data"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"LspUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -35990,38 +35792,6 @@
|
|||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"EventTodoUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["todo.updated"]
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sessionID": {
|
||||
"type": "string",
|
||||
"pattern": "^ses"
|
||||
},
|
||||
"todos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Todo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["sessionID", "todos"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"EventLspUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue