feat: 更新 VSCode 配置,添加 langgraph 支持;升级依赖项并优化命令处理逻辑
This commit is contained in:
parent
28f770a710
commit
a31f0fd249
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -19,6 +19,7 @@
|
||||
"instuct",
|
||||
"langchain",
|
||||
"langfuse",
|
||||
"langgraph",
|
||||
"metas",
|
||||
"MIAI",
|
||||
"michat",
|
||||
|
@ -22,15 +22,15 @@
|
||||
"@eslint/js": "^9.17.0",
|
||||
"@types/node-schedule": "^2.1.7",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"bun-types": "^1.1.40",
|
||||
"bun-types": "^1.1.43",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"eslint-plugin-unused-imports": "^4.1.4",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.2.11",
|
||||
"lint-staged": "^15.3.0",
|
||||
"oxlint": "^0.13.2",
|
||||
"prettier": "^3.4.2",
|
||||
"typescript-eslint": "^8.18.1"
|
||||
"typescript-eslint": "^8.19.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.5.4"
|
||||
@ -41,7 +41,8 @@
|
||||
"@egg/logger": "^1.6.0",
|
||||
"@egg/net-tool": "^1.21.0",
|
||||
"@egg/path-tool": "^1.4.1",
|
||||
"@langchain/core": "^0.3.26",
|
||||
"@langchain/core": "^0.3.27",
|
||||
"@langchain/langgraph": "^0.2.39",
|
||||
"@langchain/openai": "^0.3.16",
|
||||
"joi": "^17.13.3",
|
||||
"langfuse-langchain": "^3.32.0",
|
||||
|
@ -131,16 +131,6 @@ const manageCMDMsg = async (ctx: Context) => {
|
||||
return
|
||||
}
|
||||
|
||||
// 开启CICD成功提醒
|
||||
if (msgText.startsWith("/ci")) {
|
||||
logger.info(`bot command is /ci, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.openCICDNotify(
|
||||
ctx,
|
||||
Number(msgText.replace("/ci ", ""))
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
// 关闭CICD成功提醒
|
||||
if (msgText.startsWith("/ci off")) {
|
||||
logger.info(`bot command is /notify ci off, chatId: ${chatId}`)
|
||||
@ -151,12 +141,12 @@ const manageCMDMsg = async (ctx: Context) => {
|
||||
return
|
||||
}
|
||||
|
||||
// 开启MR自动总结
|
||||
if (msgText.startsWith("/mr")) {
|
||||
logger.info(`bot command is /mr, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.openMRSummary(
|
||||
// 开启CICD成功提醒
|
||||
if (msgText.startsWith("/ci")) {
|
||||
logger.info(`bot command is /ci, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.openCICDNotify(
|
||||
ctx,
|
||||
Number(msgText.replace("/mr ", ""))
|
||||
Number(msgText.replace("/ci ", ""))
|
||||
)
|
||||
return
|
||||
}
|
||||
@ -171,6 +161,16 @@ const manageCMDMsg = async (ctx: Context) => {
|
||||
return
|
||||
}
|
||||
|
||||
// 开启MR自动总结
|
||||
if (msgText.startsWith("/mr")) {
|
||||
logger.info(`bot command is /mr, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.openMRSummary(
|
||||
ctx,
|
||||
Number(msgText.replace("/mr ", ""))
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
// 私聊场景下或者/help命令
|
||||
if (msgText === "/help" || isP2P) {
|
||||
logger.info(`bot command is /help, chatId: ${chatId}`)
|
||||
|
@ -1,4 +1,4 @@
|
||||
POST http://localhost:3000/bot?app=egg HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{"schema":"2.0","header":{"event_id":"c94518fbcb9d66cc93b4144cc69e4f0c","token":"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj","create_time":"1732612280153","event_type":"im.message.receive_v1","tenant_key":"2ee61fe50f4f1657","app_id":"cli_a1eff35b43b89063"},"event":{"message":{"chat_id":"oc_8c789ce8f4ecc6695bb63ca6ec4c61ea","chat_type":"group","content":"{\"text\":\"@_user_1 开启日报、周报\"}","create_time":"1732612279943","mentions":[{"id":{"open_id":"ou_032f507d08f9a7f28b042fcd086daef5","union_id":"on_7111660fddd8302ce47bf1999147c011","user_id":""},"key":"@_user_1","name":"小煎蛋","tenant_key":"2ee61fe50f4f1657"}],"message_id":"om_4ab57cb6e889eeb81ca061b137238189","message_type":"text","update_time":"1732612279943"},"sender":{"sender_id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"sender_type":"user","tenant_key":"2ee61fe50f4f1657"}}}
|
||||
{"schema":"2.0","header":{"event_id":"c772832743bb9014856d85ab4770ec08","token":"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj","create_time":"1736651575029","event_type":"im.message.receive_v1","tenant_key":"2ee61fe50f4f1657","app_id":"cli_a1eff35b43b89063"},"event":{"message":{"chat_id":"oc_8c789ce8f4ecc6695bb63ca6ec4c61ea","chat_type":"group","content":"{\"text\":\"@_user_1 开启日报\"}","create_time":"1736651574874","mentions":[{"id":{"open_id":"ou_032f507d08f9a7f28b042fcd086daef5","union_id":"on_7111660fddd8302ce47bf1999147c011","user_id":""},"key":"@_user_1","name":"小煎蛋","tenant_key":"2ee61fe50f4f1657"}],"message_id":"om_fab31c5466fe98a8883e6be7ac8c26a8","message_type":"text","update_time":"1736651574874"},"sender":{"sender_id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"sender_type":"user","tenant_key":"2ee61fe50f4f1657"}}}
|
@ -1,21 +0,0 @@
|
||||
[
|
||||
{
|
||||
"_id": "a5cb7b58-0c22-41fb-bc00-af460ef90c1b",
|
||||
"colId": "history",
|
||||
"containerId": "",
|
||||
"name": "https://self.imoaix.cn/bot",
|
||||
"url": "https://self.imoaix.cn/bot",
|
||||
"method": "POST",
|
||||
"sortNum": 0,
|
||||
"created": "2023-08-15T07:47:05.439Z",
|
||||
"modified": "2023-08-15T07:47:34.510Z",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "json",
|
||||
"raw": "{\r\n \"challenge\": \"c14206ad-5b5f-4a77-82b6-b39b7365392b\",\r\n \"token\": \"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj\",\r\n \"type\": \"url_verification\"\r\n}",
|
||||
"form": []
|
||||
},
|
||||
"tests": []
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user