chore: format code

This commit is contained in:
GitHub Action
2025-11-08 01:59:02 +00:00
parent 16357e8041
commit 34ff87d504
182 changed files with 940 additions and 3646 deletions

View File

@@ -75,14 +75,7 @@ export namespace Permission {
async (state) => {
for (const pending of Object.values(state.pending)) {
for (const item of Object.values(pending)) {
item.reject(
new RejectedError(
item.info.sessionID,
item.info.id,
item.info.callID,
item.info.metadata,
),
)
item.reject(new RejectedError(item.info.sessionID, item.info.id, item.info.callID, item.info.metadata))
}
}
},
@@ -150,11 +143,7 @@ export namespace Permission {
export const Response = z.enum(["once", "always", "reject"])
export type Response = z.infer<typeof Response>
export function respond(input: {
sessionID: Info["sessionID"]
permissionID: Info["id"]
response: Response
}) {
export function respond(input: { sessionID: Info["sessionID"]; permissionID: Info["id"]; response: Response }) {
log.info("response", input)
const { pending, approved } = state()
const match = pending[input.sessionID]?.[input.permissionID]
@@ -166,14 +155,7 @@ export namespace Permission {
response: input.response,
})
if (input.response === "reject") {
match.reject(
new RejectedError(
input.sessionID,
input.permissionID,
match.info.callID,
match.info.metadata,
),
)
match.reject(new RejectedError(input.sessionID, input.permissionID, match.info.callID, match.info.metadata))
return
}
match.resolve()
@@ -205,9 +187,7 @@ export namespace Permission {
public readonly toolCallID?: string,
public readonly metadata?: Record<string, any>,
) {
super(
`The user rejected permission to use this specific tool call. You may try again with different parameters.`,
)
super(`The user rejected permission to use this specific tool call. You may try again with different parameters.`)
}
}
}