The open source coding agent.
TypeScript
chore: generate
GitHub Action217e4850db50
diff --git a/packages/function/src/api.ts b/packages/function/src/api.tsindex d08e9e49ac2..54b93ad715a 100644--- a/packages/function/src/api.ts+++ b/packages/function/src/api.ts@@ -216,26 +216,28 @@ export default new Hono<{ Bindings: Env }>()}).post("/feishu", async (c) => {const body = (await c.req.json()) as {- challenge?: string- event?: {- message?: {- message_id?: string- root_id?: string- parent_id?: string- chat_id?: string- content?: string+ challenge?: string+ event?: {+ message?: {+ message_id?: string+ root_id?: string+ parent_id?: string+ chat_id?: string+ content?: string+ }+ }}- }-}console.log(JSON.stringify(body, null, 2))const challenge = body.challengeif (challenge) return c.json({ challenge })const content = body.event?.message?.contentconst parsed =- typeof content === "string" && content.trim().startsWith("{") ? (JSON.parse(content) as {- text?: string-}) : undefined+ typeof content === "string" && content.trim().startsWith("{")+ ? (JSON.parse(content) as {+ text?: string+ })+ : undefinedconst text = typeof parsed?.text === "string" ? parsed.text : typeof content === "string" ? content : ""let message = text.trim().replace(/^@_user_\d+\s*/, "")