diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6858a77 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,52 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "bun", + "request": "launch", + "name": "Debug Bun", + + // The path to a JavaScript or TypeScript file to run. + "program": "${file}", + + // The arguments to pass to the program, if any. + "args": [], + + // The working directory of the program. + "cwd": "${workspaceFolder}", + + // The environment variables to pass to the program. + "env": {}, + + // If the environment variables should not be inherited from the parent process. + "strictEnv": false, + + // If the program should be run in watch mode. + // This is equivalent to passing `--watch` to the `bun` executable. + // You can also set this to "hot" to enable hot reloading using `--hot`. + "watchMode": false, + + // If the debugger should stop on the first line of the program. + "stopOnEntry": false, + + // If the debugger should be disabled. (for example, breakpoints will not be hit) + "noDebug": false, + + // The path to the `bun` executable, defaults to your `PATH` environment variable. + "runtime": "bun", + + // The arguments to pass to the `bun` executable, if any. + // Unlike `args`, these are passed to the executable itself, not the program. + "runtimeArgs": [] + }, + { + "type": "bun", + "request": "attach", + "name": "Attach to Bun", + + // The URL of the WebSocket inspector to attach to. + // This value can be retrieved by using `bun --inspect`. + "url": "ws://localhost:6499/" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index aa04229..d6a44d3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -38,5 +38,16 @@ "Xname", "Yoav", "zhaoyingbo" - ] + ], + // The path to the `bun` executable. + "bun.runtime": "/home/node/.bun/bin/bun", + + // If support for Bun should be added to the default "JavaScript Debug Terminal". + "bun.debugTerminal.enabled": true, + + // If the debugger should stop on the first line of the program. + "bun.debugTerminal.stopOnEntry": false, + + // Glob pattern to find test files. Defaults to the value shown below. + "bun.test.filePattern": "**/*{.test.,.spec.,_test_,_spec_}{js,ts,tsx,jsx,mts,cts}" } diff --git a/test/groupAgent/summary.http b/test/groupAgent/summary.http index 5f03eae..688831a 100644 --- a/test/groupAgent/summary.http +++ b/test/groupAgent/summary.http @@ -1,4 +1,4 @@ POST http://localhost:3000/bot?app=egg HTTP/1.1 content-type: application/json -{"schema":"2.0","header":{"event_id":"ad5a706e2175e4bc539da53fd54b6fa0","token":"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj","create_time":"1732619538646","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":"1732619538450","mentions":[{"id":{"open_id":"ou_032f507d08f9a7f28b042fcd086daef5","union_id":"on_7111660fddd8302ce47bf1999147c011","user_id":""},"key":"@_user_1","name":"小煎蛋","tenant_key":"2ee61fe50f4f1657"}],"message_id":"om_988659d8dcb79a54a02016ea1884e3df","message_type":"text","update_time":"1732619538450"},"sender":{"sender_id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"sender_type":"user","tenant_key":"2ee61fe50f4f1657"}}} \ No newline at end of file +{"schema":"2.0","header":{"event_id":"3c39e307305499eff11d17af4f8eabb0","token":"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj","create_time":"1735730475180","event_type":"im.message.receive_v1","tenant_key":"2ee61fe50f4f1657","app_id":"cli_a1eff35b43b89063"},"event":{"message":{"chat_id":"oc_89abf404159606cdde0e177b9ee6a4a2","chat_type":"group","content":"{\"text\":\"@_user_1 总结过去五天的消息\"}","create_time":"1735730475040","mentions":[{"id":{"open_id":"ou_032f507d08f9a7f28b042fcd086daef5","union_id":"on_7111660fddd8302ce47bf1999147c011","user_id":""},"key":"@_user_1","name":"小煎蛋","tenant_key":"2ee61fe50f4f1657"}],"message_id":"om_6ad8b3c9c4419fc047c1d99593e3bc1f","message_type":"text","update_time":"1735730475040"},"sender":{"sender_id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"sender_type":"user","tenant_key":"2ee61fe50f4f1657"}}} \ No newline at end of file