mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 14:22:27 +00:00
bump copilot plugin, give better error message for copilot (#4678)
This commit is contained in:
@@ -8,6 +8,7 @@ import { LSP } from "../lsp"
|
||||
import { Snapshot } from "@/snapshot"
|
||||
import { fn } from "@/util/fn"
|
||||
import { Storage } from "@/storage/storage"
|
||||
import { ProviderTransform } from "@/provider/transform"
|
||||
|
||||
export namespace MessageV2 {
|
||||
export const OutputLengthError = NamedError.create("MessageOutputLengthError", z.object({}))
|
||||
@@ -737,9 +738,10 @@ export namespace MessageV2 {
|
||||
{ cause: e },
|
||||
).toObject()
|
||||
case APICallError.isInstance(e):
|
||||
const message = ProviderTransform.error(ctx.providerID, e.message)
|
||||
return new MessageV2.APIError(
|
||||
{
|
||||
message: e.message,
|
||||
message,
|
||||
statusCode: e.statusCode,
|
||||
isRetryable: e.isRetryable,
|
||||
responseHeaders: e.responseHeaders,
|
||||
|
||||
Reference in New Issue
Block a user