{"id":2049,"date":"2026-08-26T00:49:07","date_gmt":"2026-08-25T16:49:07","guid":{"rendered":"https:\/\/wanluu.com\/?p=2049"},"modified":"2026-08-26T01:04:07","modified_gmt":"2026-08-25T17:04:07","slug":"cursor-agent-%e6%a8%a1%e5%bc%8f%e5%ae%9e%e6%88%98%ef%bc%9a%e8%ae%a9-ai-%e4%bb%8e%e4%bb%a3%e7%a0%81%e8%a1%a5%e5%85%a8%e5%88%b0%e8%87%aa%e4%b8%bb%e5%ae%8c%e6%88%90%e5%bc%80%e5%8f%91%e4%bb%bb%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/wanluu.com\/index.php\/2026\/08\/26\/cursor-agent-%e6%a8%a1%e5%bc%8f%e5%ae%9e%e6%88%98%ef%bc%9a%e8%ae%a9-ai-%e4%bb%8e%e4%bb%a3%e7%a0%81%e8%a1%a5%e5%85%a8%e5%88%b0%e8%87%aa%e4%b8%bb%e5%ae%8c%e6%88%90%e5%bc%80%e5%8f%91%e4%bb%bb%e5%8a%a1\/","title":{"rendered":"Cursor Agent \u6a21\u5f0f\u5b9e\u6218\uff1a\u8ba9 AI \u4ece\u4ee3\u7801\u8865\u5168\u5230\u81ea\u4e3b\u5b8c\u6210\u5f00\u53d1\u4efb\u52a1"},"content":{"rendered":"<div class=\"wanlu-ai-article wanlu-ai-blog-style wanlu-ai-tutorial\">\n<div class=\"wanlu-ai-summary wanlu-ai-summary-blog\"><span>\u672c\u6587\u8981\u70b9<\/span><\/p>\n<p>Cursor \u57fa\u4e8e VS Code \u7684 AI \u7f16\u7a0b\u7f16\u8f91\u5668\uff0c\u5176 Agent \u6a21\u5f0f\u8ba9 AI \u80fd\u591f\u81ea\u4e3b\u5b8c\u6210\u591a\u6587\u4ef6\u7f16\u8f91\u3001\u8c03\u8bd5\u548c\u91cd\u6784\u3002\u672c\u6587\u4ece\u5b9e\u9645\u9700\u6c42\u51fa\u53d1\uff0c\u8be6\u89e3\u5b98\u65b9\u5165\u53e3\u3001\u4e0a\u624b\u6b65\u9aa4\u3001\u6838\u5fc3\u80fd\u529b\u3001\u9002\u7528\u573a\u666f\u4e0e\u5ba2\u89c2\u9650\u5236\uff0c\u9644\u66ff\u4ee3\u65b9\u6848\u5bf9\u6bd4\u3002<\/p>\n<\/div>\n<nav class=\"wanlu-ai-guide\" aria-label=\"\u5b9e\u7528\u6587\u7ae0\u9605\u8bfb\u8def\u5f84\"><strong>\u8ddf\u7740\u5b8c\u6210<\/strong><span>\u5148\u770b\u7ed3\u8bba<\/span><span>\u51c6\u5907\u4e0e\u64cd\u4f5c<\/span><span>\u68c0\u67e5\u7ed3\u679c<\/span><span>\u907f\u5751\u4e0e\u603b\u7ed3<\/span><\/nav>\n<figure class=\"wanlu-ai-figure wanlu-ai-figure-1\"><span class=\"wanlu-ai-tape\" aria-hidden=\"true\"><\/span><img decoding=\"async\" src=\"https:\/\/wanluu.com\/wp-content\/uploads\/2026\/08\/pexels-photo-8566526-1024x768.jpeg\" alt=\"Cursor AI agent making multiple file edits in dark theme editor\" loading=\"eager\"><figcaption>\u914d\u56fe\uff1a<a href=\"https:\/\/www.pexels.com\/photo\/low-angle-shot-of-robot-8566526\/\" target=\"_blank\" rel=\"noopener nofollow external\">Kindel Media \u00b7 PEXELS LICENSE<\/a><\/figcaption><\/figure>\n<h2>\u770b\u5b8c\u4f60\u80fd\u638c\u63e1\u4ec0\u4e48<\/h2>\n<p>\u901a\u8fc7\u672c\u6559\u7a0b\uff0c\u4f60\u5c06\u5b66\u4f1a\uff1a\u5982\u4f55\u4e0b\u8f7d\u5e76\u5b89\u88c5 Cursor \u7f16\u8f91\u5668\uff1b\u5982\u4f55\u5b8c\u6210\u521d\u59cb\u914d\u7f6e\u5e76\u9009\u62e9 AI \u6a21\u578b\uff1b\u5982\u4f55\u4f7f\u7528 Agent \u6a21\u5f0f\u8ba9 AI \u81ea\u4e3b\u5b8c\u6210\u8de8\u6587\u4ef6\u5f00\u53d1\u4efb\u52a1\uff1b\u5982\u4f55\u9a8c\u8bc1\u751f\u6210\u7ed3\u679c\u5e76\u5904\u7406\u5e38\u89c1\u95ee\u9898\uff1b\u4e86\u89e3 Cursor \u7684\u9002\u7528\u573a\u666f\u3001\u5ba2\u89c2\u9650\u5236\u53ca\u66ff\u4ee3\u65b9\u6848\u3002<\/p>\n<h2>\u9002\u5408\u4eba\u7fa4<\/h2>\n<p>\u5df2\u7ecf\u4f7f\u7528 VS Code \u6216\u7c7b\u4f3c\u7f16\u8f91\u5668\u7684\u5f00\u53d1\u8005\uff0c\u5e0c\u671b\u5728\u91cd\u590d\u6027\u7f16\u7801\u4efb\u52a1\uff08\u5982\u6279\u91cf\u91cd\u6784\u3001\u6d4b\u8bd5\u8865\u5168\u3001\u63a5\u53e3\u8c03\u6574\uff09\u4e2d\u51cf\u5c11\u624b\u52a8\u64cd\u4f5c\u3002\u4e0d\u9700\u8981\u7cbe\u901a AI\uff0c\u4f46\u9700\u8981\u57fa\u672c\u7f16\u7a0b\u57fa\u7840\u548c\u9879\u76ee\u7ed3\u6784\u7406\u89e3\u3002<\/p>\n<h2>\u8def\u7ebf\u603b\u89c8<\/h2>\n<ol>\n<li>\u4e0b\u8f7d\u5e76\u5b89\u88c5 Cursor \u5ba2\u6237\u7aef<\/li>\n<li>\u6ce8\u518c\u8d26\u53f7\u5e76\u9009\u62e9 AI \u6a21\u578b<\/li>\n<li>\u6253\u5f00\u9879\u76ee\u5e76\u719f\u6089\u754c\u9762<\/li>\n<li>\u4f7f\u7528 Agent \u6a21\u5f0f\u5b8c\u6210\u4e00\u4e2a\u771f\u5b9e\u4efb\u52a1\uff08\u4e3a Python \u5de5\u5177\u51fd\u6570\u7f16\u5199\u5355\u5143\u6d4b\u8bd5\uff09<\/li>\n<li>\u9a8c\u8bc1\u7ed3\u679c<\/li>\n<li>\u5e38\u89c1\u6392\u9519\u4e0e\u5b89\u5168\u63d0\u9192<\/li>\n<li>\u68c0\u67e5\u6e05\u5355\u4e0e\u4e0b\u4e00\u6b65\u884c\u52a8<\/li>\n<\/ol>\n<h2>\u5b8c\u6574\u5b9e\u6218\u6848\u4f8b\uff1a\u4e3a Python \u9879\u76ee\u6dfb\u52a0\u5355\u5143\u6d4b\u8bd5<\/h2>\n<p>\u672c\u6848\u4f8b\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a Python \u9879\u76ee\uff0c\u5176\u4e2d <code>src\/utils\/<\/code> \u76ee\u5f55\u4e0b\u5305\u542b\u591a\u4e2a\u5de5\u5177\u51fd\u6570\u3002\u4f60\u5c06\u4f7f\u7528 Cursor Agent \u6a21\u5f0f\u81ea\u52a8\u751f\u6210 pytest \u5355\u5143\u6d4b\u8bd5\u3002\u4ee5\u4e0b\u6bcf\u4e00\u6b65\u90fd\u5305\u542b\u64cd\u4f5c\u4f4d\u7f6e\u3001\u5177\u4f53\u52a8\u4f5c\u3001\u793a\u4f8b\u8f93\u5165\u3001\u9884\u671f\u7ed3\u679c\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<h3>\u6b65\u9aa41\uff1a\u4e0b\u8f7d\u5e76\u5b89\u88c5 Cursor<\/h3>\n<p><strong>\u64cd\u4f5c\u4f4d\u7f6e\uff1a<\/strong> \u6d4f\u89c8\u5668\u8bbf\u95ee Cursor \u5b98\u7f51\uff08\u4ee5\u5b98\u7f51\u5f53\u524d\u4e0b\u8f7d\u9875\u4e3a\u51c6\uff09\u3002<\/p>\n<aside class=\"wanlu-tool-links wanlu-context-tool-link\">\n<div class=\"wanlu-tool-title\"><span>\u4e0b\u8f7d\u4e0e\u8bbf\u95ee<\/span><strong>Cursor<\/strong><\/div>\n<div class=\"wanlu-tool-actions\"><a class=\"wanlu-tool-official\" href=\"https:\/\/cursor.com\" target=\"_blank\" rel=\"noopener nofollow external\"><span>\u5b98\u65b9\u5730\u5740<\/span><strong>\u8bbf\u95ee\u5b98\u7f51 \u2192<\/strong><small>cursor.com \u00b7 \u53ef\u8bbf\u95ee<\/small><\/a><a class=\"wanlu-tool-download\" href=\"https:\/\/cursor.com\/download\" target=\"_blank\" rel=\"noopener nofollow external\"><span>\u5b98\u65b9\u4e0b\u8f7d<\/span><strong>\u83b7\u53d6\u5b89\u88c5\u5305 \u2192<\/strong><small>cursor.com \u00b7 \u53ef\u8bbf\u95ee<\/small><\/a><\/div>\n<p class=\"wanlu-tool-warning\">\u94fe\u63a5\u5df2\u6838\u9a8c\uff1b\u4f18\u5148\u4f7f\u7528\u5b98\u65b9\u5730\u5740\uff0c\u5907\u7528\u5730\u5740\u4ec5\u5728\u5b98\u65b9\u7ebf\u8def\u8bbf\u95ee\u56f0\u96be\u65f6\u4f7f\u7528\u3002<\/p>\n<\/aside>\n<p><strong>\u5177\u4f53\u52a8\u4f5c\uff1a<\/strong> \u5728\u4e0b\u8f7d\u9875\u9762\u9009\u62e9\u5bf9\u5e94\u64cd\u4f5c\u7cfb\u7edf\uff08Windows \/ macOS \/ Linux\uff09\u7684\u5b89\u88c5\u5305\uff0c\u4e0b\u8f7d\u540e\u53cc\u51fb\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002Windows \u7528\u6237\u5982\u679c\u9047\u5230\u53f3\u952e\u83dc\u5355\u95ee\u9898\uff0c\u53ef\u5728\u6587\u4ef6\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u53f3\u952e\u70b9\u51fb\u5b89\u88c5\u5305\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\u3002<\/p>\n<p><strong>\u9884\u671f\u7ed3\u679c\uff1a<\/strong> \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u684c\u9762\u51fa\u73b0 Cursor \u56fe\u6807\uff0c\u53cc\u51fb\u6253\u5f00\u540e\u8fdb\u5165\u6b22\u8fce\u754c\u9762\u3002<\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong> \u5b89\u88c5\u5305\u6587\u4ef6\u540d\u53ef\u80fd\u968f\u7248\u672c\u53d8\u5316\uff0c\u8bf7\u4ee5\u5b98\u7f51\u5f53\u524d\u4e0b\u8f7d\u9875\u4e3a\u51c6\u3002\u5982\u679c\u4f7f\u7528 Windows 11\uff0c\u53f3\u952e\u83dc\u5355\u53ef\u80fd\u6ca1\u6709\u201c\u663e\u793a\u66f4\u591a\u9009\u9879\u201d\uff0c\u53ef\u5148\u70b9\u51fb\u201c\u663e\u793a\u66f4\u591a\u9009\u9879\u201d\u518d\u64cd\u4f5c\u3002<\/p>\n<figure class=\"wanlu-ai-figure wanlu-ai-figure-2\"><span class=\"wanlu-ai-tape\" aria-hidden=\"true\"><\/span><img decoding=\"async\" src=\"https:\/\/wanluu.com\/wp-content\/uploads\/2026\/08\/pexels-photo-8294654-1024x684.jpeg\" alt=\"Cursor chat panel showing AI response to code question\" loading=\"lazy\"><figcaption>\u914d\u56fe\uff1a<a href=\"https:\/\/www.pexels.com\/photo\/white-toy-robot-of-pink-and-purple-background-8294654\/\" target=\"_blank\" rel=\"noopener nofollow external\">Pavel Danilyuk \u00b7 PEXELS LICENSE<\/a><\/figcaption><\/figure>\n<h3>\u6b65\u9aa42\uff1a\u6ce8\u518c\u8d26\u53f7\u5e76\u9009\u62e9 AI \u6a21\u578b<\/h3>\n<p><strong>\u64cd\u4f5c\u4f4d\u7f6e\uff1a<\/strong> Cursor \u6b22\u8fce\u754c\u9762 \u2192 \u70b9\u51fb\u201cSign up\u201d\u6309\u94ae\u3002<\/p>\n<p><strong>\u5177\u4f53\u52a8\u4f5c\uff1a<\/strong> \u4f7f\u7528\u90ae\u7bb1\u6216 GitHub \u8d26\u53f7\u6ce8\u518c\u3002\u767b\u5f55\u540e\uff0c\u8fdb\u5165\u8bbe\u7f6e\u9762\u677f\uff08\u5de6\u4e0b\u89d2\u9f7f\u8f6e\u56fe\u6807 \u2192 Settings \u2192 AI\uff09\u3002\u5728\u201cModel\u201d\u4e0b\u62c9\u83dc\u5355\u4e2d\u9009\u62e9\u4e00\u4e2a\u6a21\u578b\uff0c\u4f8b\u5982 Claude 3.5 Sonnet \u6216 GPT-4o\u3002<\/p>\n<p><strong>\u793a\u4f8b\u8f93\u5165\uff1a<\/strong> \u9009\u62e9 Claude 3.5 Sonnet\uff08\u5bf9\u4e8e\u4e2d\u6587\u6ce8\u91ca\u548c\u81ea\u7136\u8bed\u8a00\u7406\u89e3\u66f4\u7a33\u5b9a\uff09\u3002<\/p>\n<p><strong>\u9884\u671f\u7ed3\u679c\uff1a<\/strong> \u9875\u9762\u63d0\u793a\u201cModel selected successfully\u201d\uff0c\u4fa7\u8fb9\u680f\u51fa\u73b0 AI \u804a\u5929\u9762\u677f\u3002<\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong> \u514d\u8d39\u989d\u5ea6\u6709\u9650\uff0c\u5177\u4f53\u989d\u5ea6\u4ee5\u5b98\u7f51\u5b9e\u65f6\u4fe1\u606f\u4e3a\u51c6\u3002\u5982\u679c\u6a21\u578b\u9009\u9879\u663e\u793a\u4e0d\u5168\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc\u6216\u66f4\u65b0\u7248\u672c\u3002<\/p>\n<h3>\u6b65\u9aa43\uff1a\u6253\u5f00\u9879\u76ee\u5e76\u719f\u6089\u754c\u9762<\/h3>\n<p><strong>\u64cd\u4f5c\u4f4d\u7f6e\uff1a<\/strong> Cursor \u4e3b\u754c\u9762 \u2192 \u83dc\u5355\u680f File \u2192 Open Folder\u3002<\/p>\n<p><strong>\u5177\u4f53\u52a8\u4f5c\uff1a<\/strong> \u9009\u62e9\u4f60\u7684 Python \u9879\u76ee\u6839\u76ee\u5f55\uff0c\u70b9\u51fb\u201c\u9009\u62e9\u6587\u4ef6\u5939\u201d\u3002\u754c\u9762\u5e03\u5c40\u4e0e VS Code \u4e00\u81f4\uff1a\u5de6\u4fa7\u6587\u4ef6\u6811\uff0c\u4e2d\u95f4\u7f16\u8f91\u5668\uff0c\u5e95\u90e8\u7ec8\u7aef\uff0c\u53f3\u4fa7 AI \u4fa7\u8fb9\u680f\uff08\u9ed8\u8ba4\u9690\u85cf\uff0c\u53ef\u70b9\u51fb\u9876\u90e8\u53f3\u4fa7\u7684\u201cAI\u201d\u56fe\u6807\u6216\u6309\u5feb\u6377\u952e Ctrl+Shift+I \u6253\u5f00\uff09\u3002<\/p>\n<p><strong>\u9884\u671f\u7ed3\u679c\uff1a<\/strong> \u9879\u76ee\u6587\u4ef6\u5168\u90e8\u52a0\u8f7d\uff0c\u5de6\u4fa7\u6811\u72b6\u7ed3\u6784\u663e\u793a <code>src\/utils\/<\/code> \u7b49\u76ee\u5f55\u3002<\/p>\n<figure class=\"wanlu-ai-figure wanlu-ai-figure-3\"><span class=\"wanlu-ai-tape\" aria-hidden=\"true\"><\/span><img decoding=\"async\" src=\"https:\/\/wanluu.com\/wp-content\/uploads\/2026\/08\/pexels-photo-6913311-1024x682.jpeg\" alt=\"Cursor agent task progress with file tree and diff view\" loading=\"lazy\"><figcaption>\u914d\u56fe\uff1a<a href=\"https:\/\/www.pexels.com\/photo\/technologies-on-a-tablet-computer-screen-6913311\/\" target=\"_blank\" rel=\"noopener nofollow external\">Tima Miroshnichenko \u00b7 PEXELS LICENSE<\/a><\/figcaption><\/figure>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong> \u5982\u679c AI \u4fa7\u8fb9\u680f\u672a\u51fa\u73b0\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u5df2\u767b\u5f55\u8d26\u53f7\u3002\u5982\u679c\u4f7f\u7528 Windows 11\uff0c\u53ef\u80fd\u9700\u8981\u53f3\u952e\u70b9\u51fb\u4efb\u52a1\u680f\u56fe\u6807\u9009\u62e9\u201c\u663e\u793a\u66f4\u591a\u9009\u9879\u201d\u624d\u80fd\u627e\u5230\u201c\u6253\u5f00\u6587\u4ef6\u5939\u201d\u3002<\/p>\n<h3>\u6b65\u9aa44\uff1a\u4f7f\u7528 Agent \u6a21\u5f0f\u751f\u6210\u5355\u5143\u6d4b\u8bd5<\/h3>\n<p><strong>\u64cd\u4f5c\u4f4d\u7f6e\uff1a<\/strong> \u6253\u5f00 AI \u4fa7\u8fb9\u680f\uff08\u5982\u679c\u672a\u663e\u793a\uff0c\u6309 Ctrl+Shift+I\uff09\u3002\u5728\u4fa7\u8fb9\u680f\u9876\u90e8\u627e\u5230\u201cAgent\u201d\u6a21\u5f0f\u5207\u6362\u6309\u94ae\uff08\u901a\u5e38\u663e\u793a\u4e3a\u201cChat\u201d\u548c\u201cAgent\u201d\u4e24\u4e2a\u6807\u7b7e\uff0c\u70b9\u51fb\u201cAgent\u201d\uff09\u3002<\/p>\n<p><strong>\u5177\u4f53\u52a8\u4f5c\uff1a<\/strong> \u5728\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u4efb\u52a1\u63cf\u8ff0\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>\u4e3a src\/utils\/ \u4e0b\u7684\u6240\u6709\u5de5\u5177\u51fd\u6570\u751f\u6210 pytest \u5355\u5143\u6d4b\u8bd5\uff0c\u8986\u76d6\u6b63\u5e38\u8def\u5f84\u548c\u5f02\u5e38\u8def\u5f84\u3002\u4f7f\u7528 pytest \u6846\u67b6\uff0c\u4e0d\u4fee\u6539\u73b0\u6709\u4e1a\u52a1\u4ee3\u7801\uff0c\u4ec5\u65b0\u589e\u6d4b\u8bd5\u6587\u4ef6\u3002\u5b8c\u6210\u540e\u5217\u51fa\u6240\u6709\u65b0\u589e\u6587\u4ef6\u3002<\/code><\/pre>\n<p>\u7136\u540e\u70b9\u51fb\u53d1\u9001\u6309\u94ae\uff08\u6216\u6309 Enter\uff09\u3002<\/p>\n<p><strong>\u9884\u671f\u7ed3\u679c\uff1a<\/strong> AI \u5f00\u59cb\u81ea\u52a8\u8bfb\u53d6 <code>src\/utils\/<\/code> \u4e0b\u7684\u6587\u4ef6\uff0c\u5206\u6790\u51fd\u6570\u7b7e\u540d\u548c\u4f9d\u8d56\uff0c\u7136\u540e\u9010\u6b65\u521b\u5efa\u6d4b\u8bd5\u6587\u4ef6\u3002\u4fa7\u8fb9\u680f\u4f1a\u663e\u793a\u8fdb\u5ea6\uff0c\u5982\u201cReading file: src\/utils\/date_parser.py\u201d\u3001\u201cCreating file: tests\/test_date_parser.py\u201d\u7b49\u3002\u5b8c\u6210\u540e\uff0c\u7f16\u8f91\u5668\u533a\u57df\u4f1a\u663e\u793a\u6240\u6709\u4fee\u6539\u7684 diff\uff08\u7eff\u8272\u65b0\u589e\u3001\u7ea2\u8272\u5220\u9664\uff09\u3002<\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong> \u4efb\u52a1\u63cf\u8ff0\u8d8a\u5177\u4f53\uff0c\u7ed3\u679c\u8d8a\u597d\u3002\u5982\u679c Agent \u5361\u4f4f\u6216\u957f\u65f6\u95f4\u65e0\u54cd\u5e94\uff0c\u53ef\u70b9\u51fb\u201cStop\u201d\u6309\u94ae\u4e2d\u6b62\uff0c\u7136\u540e\u7b80\u5316\u4efb\u52a1\u6216\u5206\u6b65\u6267\u884c\u3002<\/p>\n<h3>\u6b65\u9aa45\uff1a\u9a8c\u8bc1\u6d4b\u8bd5\u7ed3\u679c<\/h3>\n<p><strong>\u64cd\u4f5c\u4f4d\u7f6e\uff1a<\/strong> \u5e95\u90e8\u7ec8\u7aef\uff08\u6309 Ctrl+` \u6253\u5f00\uff09\u3002<\/p>\n<figure class=\"wanlu-ai-figure wanlu-ai-figure-4\"><span class=\"wanlu-ai-tape\" aria-hidden=\"true\"><\/span><img decoding=\"async\" src=\"https:\/\/wanluu.com\/wp-content\/uploads\/2026\/08\/pexels-photo-4604607-1024x682.jpeg\" alt=\"Cursor settings panel for selecting AI model provider\" loading=\"lazy\"><figcaption>\u914d\u56fe\uff1a<a href=\"https:\/\/www.pexels.com\/photo\/close-up-shot-of-a-typewriter-4604607\/\" target=\"_blank\" rel=\"noopener nofollow external\">Markus Winkler \u00b7 PEXELS LICENSE<\/a><\/figcaption><\/figure>\n<p><strong>\u5177\u4f53\u52a8\u4f5c\uff1a<\/strong> \u5728\u7ec8\u7aef\u4e2d\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n<pre><code>pytest tests\/ -v<\/code><\/pre>\n<p><strong>\u9884\u671f\u7ed3\u679c\uff1a<\/strong> \u7ec8\u7aef\u663e\u793a\u6d4b\u8bd5\u8fd0\u884c\u7ed3\u679c\uff0c\u4f8b\u5982\u201c4 passed in 0.12s\u201d\u3002\u5982\u679c\u67d0\u4e9b\u6d4b\u8bd5\u5931\u8d25\uff0c\u4f1a\u663e\u793a\u9519\u8bef\u8be6\u60c5\u3002<\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong> \u9700\u8981\u5148\u786e\u4fdd\u9879\u76ee\u5df2\u5b89\u88c5 pytest\uff08\u5982\u679c\u672a\u5b89\u88c5\uff0c\u7ec8\u7aef\u4e2d\u8fd0\u884c <code>pip install pytest<\/code>\uff09\u3002\u5982\u679c Agent \u751f\u6210\u7684\u6d4b\u8bd5\u6709\u8bed\u6cd5\u9519\u8bef\uff0c\u8bf7\u624b\u52a8\u68c0\u67e5\u5e76\u4fee\u6b63\u3002<\/p>\n<h2>\u5e38\u89c1\u5751\u4e0e\u907f\u5751\u6307\u5357<\/h2>\n<h3>\u57511\uff1a\u4efb\u52a1\u63cf\u8ff0\u592a\u6a21\u7cca<\/h3>\n<p>\u907f\u5751\uff1a\u5199\u201c\u5199\u6d4b\u8bd5\u201d\u4f1a\u5bfc\u81f4 Agent \u7406\u89e3\u504f\u5dee\u3002\u5e94\u660e\u786e\u6587\u4ef6\u540d\u3001\u51fd\u6570\u540d\u3001\u6d4b\u8bd5\u6846\u67b6\u548c\u9884\u671f\u8986\u76d6\u8303\u56f4\u3002<\/p>\n<h3>\u57512\uff1a\u4e0a\u4e0b\u6587\u7a97\u53e3\u4e0d\u8db3<\/h3>\n<p>\u907f\u5751\uff1a\u5982\u679c\u9879\u76ee\u975e\u5e38\u5927\uff0cAgent \u53ef\u80fd\u65e0\u6cd5\u8bfb\u53d6\u6240\u6709\u6587\u4ef6\u3002\u53ef\u5148\u624b\u52a8\u5173\u95ed\u4e0d\u76f8\u5173\u7684\u6587\u4ef6\uff0c\u6216\u53ea\u6307\u5b9a\u76ee\u6807\u76ee\u5f55\u3002<\/p>\n<h3>\u57513\uff1a\u6a21\u578b\u9009\u62e9\u9519\u8bef<\/h3>\n<p>\u907f\u5751\uff1a\u4e0d\u540c\u6a21\u578b\u8868\u73b0\u5dee\u5f02\u5927\u3002\u5efa\u8bae\u5148\u7528\u5c0f\u4efb\u52a1\u6d4b\u8bd5\uff0c\u627e\u5230\u6700\u9002\u5408\u4f60\u9879\u76ee\u8bed\u8a00\u548c\u98ce\u683c\u7684\u6a21\u578b\u3002<\/p>\n<h2>\u5b89\u5168\u63d0\u9192<\/h2>\n<p>Agent \u6a21\u5f0f\u5177\u6709\u5bf9\u9879\u76ee\u6587\u4ef6\u7684\u8bfb\u5199\u6743\u9650\uff0c\u8bf7\u52ff\u5728\u5305\u542b\u654f\u611f\u4fe1\u606f\uff08\u5982 API \u5bc6\u94a5\u3001\u5bc6\u7801\u3001\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\uff09\u7684\u9879\u76ee\u4e2d\u76f4\u63a5\u4f7f\u7528\uff0c\u6216\u5148\u79fb\u9664\u654f\u611f\u6587\u4ef6\u3002\u907f\u514d\u5728\u516c\u5171\u7f51\u7edc\u4e0b\u4f7f\u7528\uff0c\u9632\u6b62 token \u6cc4\u9732\u3002\u4f7f\u7528\u524d\u5907\u4efd\u9879\u76ee\u3002<\/p>\n<h2>\u68c0\u67e5\u6e05\u5355<\/h2>\n<ul>\n<li>\u5df2\u5b8c\u6210 Cursor \u5b89\u88c5\u548c\u8d26\u53f7\u6ce8\u518c<\/li>\n<li>\u5df2\u9009\u62e9\u5408\u9002\u6a21\u578b\uff08\u5982 Claude 3.5\uff09<\/li>\n<li>\u5df2\u6253\u5f00\u9879\u76ee\u5e76\u786e\u8ba4\u6587\u4ef6\u6811<\/li>\n<li>\u5df2\u8fdb\u5165 Agent \u6a21\u5f0f\u5e76\u8f93\u5165\u5177\u4f53\u4efb\u52a1<\/li>\n<li>\u5df2\u9a8c\u8bc1\u751f\u6210\u7ed3\u679c\uff08\u8fd0\u884c pytest\uff09<\/li>\n<li>\u5df2\u68c0\u67e5 AI \u672a\u4fee\u6539\u4e1a\u52a1\u4ee3\u7801<\/li>\n<li>\u5df2\u5907\u4efd\u9879\u76ee\uff08\u5982\u6709\u5fc5\u8981\uff09<\/li>\n<\/ul>\n<figure class=\"wanlu-ai-figure wanlu-ai-figure-5\"><span class=\"wanlu-ai-tape\" aria-hidden=\"true\"><\/span><img decoding=\"async\" src=\"https:\/\/wanluu.com\/wp-content\/uploads\/2026\/08\/pexels-photo-3520679-1024x681.jpeg\" alt=\"Cursor keyboard shortcut triggering autocomplete suggestion\" loading=\"lazy\"><figcaption>\u914d\u56fe\uff1a<a href=\"https:\/\/www.pexels.com\/photo\/pcb-board-with-chip-3520679\/\" target=\"_blank\" rel=\"noopener nofollow external\">Miguel \u00c1. Padri\u00f1\u00e1n \u00b7 PEXELS LICENSE<\/a><\/figcaption><\/figure>\n<h2>\u6392\u9519\u6848\u4f8b<\/h2>\n<h3>\u6848\u4f8b1\uff1aAgent \u5361\u4f4f\u4e0d\u54cd\u5e94<\/h3>\n<p><strong>\u73b0\u8c61\uff1a<\/strong> \u70b9\u51fb\u53d1\u9001\u540e\uff0c\u4fa7\u8fb9\u680f\u663e\u793a\u201cThinking\u2026\u201d\u4f46\u957f\u65f6\u95f4\u65e0\u8fdb\u5c55\u3002<\/p>\n<p><strong>\u539f\u56e0\uff1a<\/strong> \u53ef\u80fd\u662f\u7f51\u7edc\u95ee\u9898\u6216\u6a21\u578b\u8d1f\u8f7d\u8fc7\u9ad8\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong> \u70b9\u51fb\u201cStop\u201d\u505c\u6b62\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\uff0c\u7a0d\u540e\u91cd\u8bd5\u3002\u5982\u679c\u9891\u7e41\u51fa\u73b0\uff0c\u5c1d\u8bd5\u5207\u6362\u6a21\u578b\u3002<\/p>\n<h3>\u6848\u4f8b2\uff1a\u751f\u6210\u7684\u6d4b\u8bd5\u4ee3\u7801\u6709\u8bed\u6cd5\u9519\u8bef<\/h3>\n<p><strong>\u73b0\u8c61\uff1a<\/strong> \u8fd0\u884c pytest \u540e\u51fa\u73b0 SyntaxError\u3002<\/p>\n<p><strong>\u539f\u56e0\uff1a<\/strong> AI \u53ef\u80fd\u8bef\u7528\u4e86\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u672a\u5bfc\u5165\u6a21\u5757\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong> \u624b\u52a8\u67e5\u770b diff\uff0c\u4fee\u6b63\u9519\u8bef\u3002\u4e5f\u53ef\u4ee5\u5c06\u9519\u8bef\u4fe1\u606f\u53cd\u9988\u7ed9 AI \u804a\u5929\u9762\u677f\uff0c\u8981\u6c42\u4fee\u590d\u3002<\/p>\n<h3>\u6848\u4f8b3\uff1aAgent \u4fee\u6539\u4e86\u4e0d\u5e94\u4fee\u6539\u7684\u6587\u4ef6<\/h3>\n<p><strong>\u73b0\u8c61\uff1a<\/strong> \u751f\u6210\u540e\u53d1\u73b0\u6709\u4e1a\u52a1\u4ee3\u7801\u88ab\u4fee\u6539\u3002<\/p>\n<figure class=\"wanlu-ai-figure wanlu-ai-figure-6\"><span class=\"wanlu-ai-tape\" aria-hidden=\"true\"><\/span><img decoding=\"async\" src=\"https:\/\/wanluu.com\/wp-content\/uploads\/2026\/08\/pexels-photo-39058040-1024x769.jpeg\" alt=\"Cursor side-by-side comparison with VS Code interface\" loading=\"lazy\"><figcaption>\u914d\u56fe\uff1a<a href=\"https:\/\/www.pexels.com\/photo\/industrial-equipment-inspection-by-entrepreneur-39058040\/\" target=\"_blank\" rel=\"noopener nofollow external\">James Sackl \u00b7 PEXELS LICENSE<\/a><\/figcaption><\/figure>\n<p><strong>\u539f\u56e0\uff1a<\/strong> \u4efb\u52a1\u63cf\u8ff0\u4e0d\u591f\u660e\u786e\uff0c\u6216 AI \u8bef\u89e3\u4e86\u9700\u6c42\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong> \u4f7f\u7528\u7248\u672c\u63a7\u5236\uff08\u5982 Git\uff09\u56de\u6eda\uff0c\u91cd\u65b0\u7f16\u5199\u66f4\u7cbe\u786e\u7684\u4efb\u52a1\u63cf\u8ff0\uff0c\u52a0\u4e0a\u201c\u4e0d\u4fee\u6539\u73b0\u6709\u4e1a\u52a1\u4ee3\u7801\u201d\u3002<\/p>\n<h2>\u5206\u5c42\u4e0b\u4e00\u6b65\u884c\u52a8<\/h2>\n<p><strong>\u65b0\u624b\uff1a<\/strong> \u5148\u719f\u6089 Cursor \u7684 Chat \u6a21\u5f0f\uff0c\u4f7f\u7528\u5355\u6587\u4ef6\u95ee\u7b54\u638c\u63e1\u57fa\u7840\u3002\u518d\u5c1d\u8bd5\u672c\u6559\u7a0b\u7684 Agent \u4efb\u52a1\u3002<\/p>\n<p><strong>\u4e2d\u7ea7\uff1a<\/strong> \u5c1d\u8bd5\u7528 Agent \u5b8c\u6210\u6279\u91cf\u91cd\u6784\uff08\u5982\u91cd\u547d\u540d\u51fd\u6570\u3001\u63d0\u53d6\u516c\u5171\u6a21\u5757\uff09\uff0c\u5e76\u5bf9\u6bd4\u624b\u52a8\u6548\u7387\u3002<\/p>\n<p><strong>\u9ad8\u7ea7\uff1a<\/strong> \u63a2\u7d22 Agent \u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\uff08\u5982\u9879\u76ee\u7ea7 .cursorrules \u6587\u4ef6\uff09\uff0c\u8c03\u6574\u751f\u6210\u98ce\u683c\u3002\u7ed3\u5408 CI\/CD \u6d41\u6c34\u7ebf\u81ea\u52a8\u9a8c\u8bc1\u751f\u6210\u7ed3\u679c\u3002<\/p>\n<h2>\u5ba2\u89c2\u9650\u5236\u4e0e\u66ff\u4ee3\u65b9\u6848<\/h2>\n<p>Cursor Agent \u6a21\u5f0f\u7684\u4e0a\u4e0b\u6587\u7a97\u53e3\u9650\u5236\u4e86\u5bf9\u8d85\u5927\u9879\u76ee\u7684\u652f\u6301\uff1b\u6a21\u578b\u80fd\u529b\u5dee\u5f02\u5bfc\u81f4\u8d28\u91cf\u4e0d\u7a33\u5b9a\uff1b\u9ad8\u9891\u4f7f\u7528\u4f1a\u4ea7\u751f token \u6210\u672c\u3002\u66ff\u4ee3\u65b9\u6848\u5305\u62ec GitHub Copilot Chat\uff08\u539f\u751f VS Code \u96c6\u6210\uff09\u3001OpenAI Codex API\uff08\u81ea\u5b9a\u4e49\u5de5\u4f5c\u6d41\uff09\u3001\u4ee5\u53ca\u57fa\u4e8e\u5f00\u6e90\u6a21\u578b\uff08\u5982 DeepSeek-Coder\uff09\u7684\u672c\u5730\u90e8\u7f72\u3002\u9009\u62e9\u65f6\u9700\u6743\u8861\u6210\u672c\u3001\u96c6\u6210\u5ea6\u548c\u56e2\u961f\u6280\u672f\u6808\u3002<\/p>\n<div class=\"wanlu-ai-ending wanlu-ai-ending-blog\"><span>WANLU PRACTICAL GUIDE<\/span><\/p>\n<p>\u4ee5\u5b9e\u9645\u7ed3\u679c\u4e3a\u51c6\uff0c\u64cd\u4f5c\u524d\u8bf7\u6838\u5bf9\u5b98\u7f51\u7248\u672c\u3001\u6388\u6743\u548c\u5b89\u5168\u63d0\u793a\u3002<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Cursor \u57fa\u4e8e VS Code \u7684 AI \u7f16\u7a0b\u7f16\u8f91\u5668\uff0c\u5176 Agent \u6a21\u5f0f\u8ba9 AI \u80fd\u591f\u81ea\u4e3b\u5b8c\u6210\u591a\u6587\u4ef6\u7f16\u8f91\u3001\u8c03\u8bd5\u548c\u91cd\u6784\u3002\u672c\u6587\u4ece\u5b9e\u9645\u9700\u6c42\u51fa\u53d1\uff0c\u8be6\u89e3\u5b98\u65b9\u5165\u53e3\u3001\u4e0a\u624b\u6b65\u9aa4\u3001\u6838\u5fc3\u80fd\u529b\u3001\u9002\u7528\u573a\u666f\u4e0e\u5ba2\u89c2\u9650\u5236\uff0c\u9644\u66ff\u4ee3\u65b9\u6848\u5bf9\u6bd4\u3002<\/p>\n","protected":false},"author":0,"featured_media":2050,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-2049","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/posts\/2049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/comments?post=2049"}],"version-history":[{"count":2,"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/posts\/2049\/revisions"}],"predecessor-version":[{"id":2065,"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/posts\/2049\/revisions\/2065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/media\/2050"}],"wp:attachment":[{"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/media?parent=2049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/categories?post=2049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wanluu.com\/index.php\/wp-json\/wp\/v2\/tags?post=2049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}