{"id":93711,"date":"2026-08-13T06:49:00","date_gmt":"2026-08-12T22:49:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/93711.html"},"modified":"2026-08-13T06:49:00","modified_gmt":"2026-08-12T22:49:00","slug":"173%e3%80%81%e3%80%90agent%e3%80%91%e3%80%90opencode%e3%80%91tuithreadcmd%ef%bc%88cmd%e5%b7%a5%e5%8e%82%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/93711.html","title":{"rendered":"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09"},"content":{"rendered":"<p>\u3010\u58f0\u660e\u3011\u672c\u535a\u5ba2\u6240\u6709\u5185\u5bb9\u5747\u4e3a\u4e2a\u4eba\u4e1a\u4f59\u65f6\u95f4\u521b\u4f5c&#xff0c;\u6240\u8ff0\u6280\u672f\u6848\u4f8b\u5747\u6765\u81ea\u516c\u5f00\u5f00\u6e90\u9879\u76ee&#xff08;\u5982Github&#xff0c;Apache\u57fa\u91d1\u4f1a&#xff09;&#xff0c;\u4e0d\u6d89\u53ca\u4efb\u4f55\u4f01\u4e1a\u673a\u5bc6\u6216\u672a\u516c\u5f00\u6280\u672f&#xff0c;\u5982\u6709\u4fb5\u6743\u8bf7\u8054\u7cfb\u5220\u9664<\/p>\n<h2>\u6807\u9898<\/h2>\n<p>173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;cmd\u5de5\u5382&#xff09;<\/p>\n<h2>\u80cc\u666f<\/h2>\n<p>\u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;\u9009\u9879\u6ce8\u5165\u5668&#xff09; \u5206\u6790\u4e86 opencode \u5b9a\u4e49\u7684\u9009\u9879&#xff0c;\u91cc\u9762\u63d0\u5230\u4e86 withNetworkOptions(yargs) \u662f\u4e00\u4e2a\u9009\u9879\u6ce8\u5165\u5668&#xff0c;\u628a\u7f51\u7edc\u76f8\u5173\u7684\u901a\u7528\u9009\u9879&#xff08;\u5982 proxy\u3001timeout\u3001api-key \u7b49&#xff09;\u62bd\u51fa\u6765\u590d\u7528&#xff0c;\u907f\u514d\u6bcf\u4e2a\u547d\u4ee4\u91cd\u590d\u5b9a\u4e49&#xff0c;\u5e76\u63d0\u5230\u8fd9\u4e9b\u9009\u9879\u662f\u771f\u5b9e\u5b58\u5728\u7684&#xff0c;\u67e5\u770b\u5b8c\u6574\u9009\u9879\u5217\u8868\u53ef\u4ee5\u901a\u8fc7 opencode &#8211;help&#xff0c;\u4e0b\u9762\u7ee7\u7eed\u5206\u6790<\/p>\n<h2>OpenCode<\/h2>\n<p>\u4e4b\u524d blog \u63d0\u5230\u4e86<\/p>\n<p>cmd() \u662f\u5c01\u88c5\u51fd\u6570 \u2014 \u8fd9\u4e0d\u662f yargs \u539f\u751f API&#xff0c;\u800c\u662f\u9879\u76ee\u81ea\u5df1\u5bf9 yargs.command() \u7684\u4e8c\u6b21\u5c01\u88c5&#xff0c;\u7528\u4e8e\u7edf\u4e00\u6ce8\u518c handler\u3001\u6dfb\u52a0\u5168\u5c40\u4e2d\u95f4\u4ef6\u3001\u6216\u9002\u914d\u9879\u76ee\u7684\u547d\u4ee4\u67b6\u6784\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260812224859-6a7cf85ba932c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u67e5\u770b cmd \u5c01\u88c5\u51fd\u6570\u7684\u5b9a\u4e49\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260812224859-6a7cf85bc1710.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8fd9\u91cc\u7684 cmd \u51fd\u6570\u6ca1\u6709\u4efb\u4f55\u8fd0\u884c\u65f6\u903b\u8f91&#xff0c;\u53ea\u662f\u4e00\u4e2a TypeScript \u7c7b\u578b\u8f85\u52a9\u51fd\u6570\u3002<\/p>\n<hr \/>\n<p>&#x1f50d; \u5b83\u5230\u5e95\u5e72\u4e86\u4ec0\u4e48&#xff1f;<\/p>\n<p><span class=\"token keyword\">export<\/span> <span class=\"token keyword\">function<\/span> cmd<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">T<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant\">U<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token punctuation\">(<\/span>input<span class=\"token operator\">:<\/span> CommandModule<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">T<\/span><span class=\"token punctuation\">,<\/span> WithDoubleDash<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">U<\/span><span class=\"token operator\">&gt;&gt;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">return<\/span> input  <span class=\"token comment\">\/\/ \u2190 \u539f\u6837\u8fd4\u56de&#xff0c;\u96f6\u8fd0\u884c\u65f6\u5f00\u9500<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5b83\u7684\u552f\u4e00\u4f5c\u7528\u662f&#xff1a;\u7ed9\u4f20\u5165\u7684\u5bf9\u8c61\u52a0\u4e0a\u7c7b\u578b\u68c0\u67e5 &#043; \u81ea\u52a8\u8865\u5168\u3002<\/p>\n<hr \/>\n<p>&#x1f4a1; \u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u7528 CommandModule&#xff1f;<\/p>\n<p>\u5173\u952e\u5728\u4e8e WithDoubleDash&lt;U&gt; \u8fd9\u4e2a\u7c7b\u578b\u53d8\u6362&#xff1a;<\/p>\n<p>type WithDoubleDash<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">T<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token constant\">T<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string\">&#034;&#8211;&#034;<\/span><span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> string<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">}<\/span><\/p>\n<p>yargs \u539f\u751f\u652f\u6301 &#8212; \u5206\u9694\u7b26\u8bed\u6cd5&#xff1a;<\/p>\n<p>opencode <span class=\"token punctuation\">.<\/span><span class=\"token operator\">\/<\/span>project <span class=\"token operator\">&#8212;<\/span> <span class=\"token operator\">&#8212;<\/span>extra<span class=\"token operator\">&#8211;<\/span>flag value<\/p>\n<p>&#8212; \u540e\u9762\u7684\u5185\u5bb9\u4f1a\u88ab yargs \u6536\u96c6\u5230 argv[&#034;&#8211;&#034;] \u6570\u7ec4\u4e2d&#xff0c;\u4f46 yargs \u7684 CommandModule \u7c7b\u578b\u5b9a\u4e49\u91cc\u5e76\u6ca1\u6709\u5305\u542b\u8fd9\u4e2a\u5b57\u6bb5\u3002\u5982\u679c\u4e0d\u7528 WithDoubleDash \u5305\u88c5&#xff0c;\u5728 handler \u91cc\u8bbf\u95ee argv[&#034;&#8211;&#034;] \u65f6 TypeScript \u4f1a\u62a5\u9519\u3002<\/p>\n<hr \/>\n<p>&#x1f4ca; \u5bf9\u6bd4\u6548\u679c<\/p>\n<table>\n<tr>\u5199\u6cd5\u7c7b\u578b\u5b89\u5168\u81ea\u52a8\u8865\u5168&#8211; \u652f\u6301<\/tr>\n<tbody>\n<tr>\n<td align=\"left\">\u76f4\u63a5\u5199\u5bf9\u8c61\u5b57\u9762\u91cf<\/td>\n<td align=\"left\">\u274c \u65e0\u68c0\u67e5<\/td>\n<td align=\"left\">\u274c \u65e0\u63d0\u793a<\/td>\n<td align=\"left\">\u274c \u7c7b\u578b\u7f3a\u5931<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">satisfies CommandModule<\/td>\n<td align=\"left\">\u2705 \u6709\u68c0\u67e5<\/td>\n<td align=\"left\">\u274c \u65e0\u63d0\u793a<\/td>\n<td align=\"left\">\u274c \u7c7b\u578b\u7f3a\u5931<\/td>\n<\/tr>\n<tr>\n<td align=\"left\">cmd({ &#8230; })<\/td>\n<td align=\"left\">\u2705 \u6709\u68c0\u67e5<\/td>\n<td align=\"left\">\u2705 \u5b8c\u6574\u63d0\u793a<\/td>\n<td align=\"left\">\u2705 \u81ea\u52a8\u5305\u542b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e25\u683c\u6765\u8bf4&#xff0c;cmd() \u662f\u4e00\u4e2a\u7c7b\u578b\u5b89\u5168\u7684\u5de5\u5382\u51fd\u6570&#xff0c;\u5b83\u5728\u8fd0\u884c\u65f6\u662f\u5b8c\u5168\u900f\u660e\u7684&#xff0c;\u4ec5\u5728\u7f16\u8bd1\u671f\u63d0\u4f9b\u589e\u5f3a\u7684\u7c7b\u578b\u63a8\u65ad\u548c IDE \u4f53\u9a8c\u3002<\/p>\n<p>\u8fd9\u79cd\u6a21\u5f0f\u5728 TypeScript CLI \u9879\u76ee\u4e2d\u975e\u5e38\u5e38\u89c1&#xff0c;\u7c7b\u4f3c\u7684\u8fd8\u6709 Hono \u7684 app.get()\u3001Fastify \u7684\u8def\u7531\u6ce8\u518c\u7b49\u2014\u2014\u90fd\u662f\u7528\u4e00\u5c42\u8584\u8584\u7684\u51fd\u6570\u5305\u88f9\u6765\u6362\u53d6\u66f4\u597d\u7684\u5f00\u53d1\u4f53\u9a8c&#xff0c;\u800c\u4e0d\u5f15\u5165\u4efb\u4f55\u8fd0\u884c\u65f6\u6210\u672c\u3002<\/p>\n<hr \/>\n<p>\u4e0b\u9762\u518d\u4ecb\u7ecd\u4e0b\u8fd9\u4e2a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260812224859-6a7cf85bdc3be.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>type WithDoubleDash<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">T<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token constant\">T<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string\">&#034;&#8211;&#034;<\/span><span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> string<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u662f\u6cdb\u578b\u8bed\u6cd5&#xff0c;\u66f4\u51c6\u786e\u5730\u8bf4&#xff0c;\u5b83\u7ec4\u5408\u4e86\u4e09\u4e2a TypeScript \u7279\u6027&#xff1a;\u6cdb\u578b &#043; \u4ea4\u53c9\u7c7b\u578b &#043; \u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u5c5e\u6027\u540d&#xff0c;\u4e0b\u9762\u628a\u5b83\u62c6\u6210\u4e09\u5757\u6765\u770b&#xff1a;<\/p>\n<li>&lt;T&gt; \u2014 \u6cdb\u578b\u53c2\u6570<\/li>\n<p>type WithDoubleDash<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">T<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token operator\">&#8230;<\/span><br \/>\n<span class=\"token comment\">\/\/                  ^^^<\/span><br \/>\n<span class=\"token comment\">\/\/              T \u662f\u4e00\u4e2a\u5360\u4f4d\u7b26&#xff0c;\u4ee3\u8868&#034;\u4efb\u610f\u7c7b\u578b&#034;<\/span><\/p>\n<p>\u548c\u51fd\u6570\u53c2\u6570\u4e00\u6837&#xff0c;\u53ea\u4e0d\u8fc7\u8fd9\u91cc\u662f\u7c7b\u578b\u5c42\u9762\u7684\u53c2\u6570\u3002\u4f7f\u7528\u65f6\u4f20\u5165\u5177\u4f53\u7c7b\u578b&#xff0c;\u6bd4\u5982&#xff1a;<\/p>\n<p>WithDoubleDash<span class=\"token operator\">&lt;<\/span><span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">name<\/span><span class=\"token operator\">:<\/span> string <span class=\"token punctuation\">}<\/span><span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token comment\">\/\/             ^^^^^^^^^^^^^^^^<\/span><br \/>\n<span class=\"token comment\">\/\/             T \u88ab\u66ff\u6362\u4e3a { name: string }<\/span><\/p>\n<hr \/>\n<li>&amp; \u2014 \u4ea4\u53c9\u7c7b\u578b<\/li>\n<p><span class=\"token constant\">A<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token constant\">B<\/span><\/p>\n<p>\u610f\u601d\u662f&#xff1a;\u540c\u65f6\u6ee1\u8db3 A \u548c B \u7684\u6240\u6709\u5c5e\u6027\u3002\u7c7b\u4f3c\u96c6\u5408\u7684&#034;\u4ea4\u96c6&#034;\u6982\u5ff5&#xff08;\u4f46\u5728 TS \u91cc\u5b9e\u9645\u662f\u5c5e\u6027\u7684\u5408\u5e76\/\u5e76\u96c6&#xff09;\u3002<\/p>\n<p><span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">name<\/span><span class=\"token operator\">:<\/span> string <span class=\"token punctuation\">}<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">age<\/span><span class=\"token operator\">:<\/span> number <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">\/\/ \u2193 \u7b49\u4ef7\u4e8e<\/span><br \/>\n<span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">name<\/span><span class=\"token operator\">:<\/span> string<span class=\"token punctuation\">;<\/span> age<span class=\"token operator\">:<\/span> number <span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<li>&#034;&#8211;&#034;?: string[] \u2014 \u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u5c5e\u6027\u540d<\/li>\n<p><span class=\"token punctuation\">{<\/span> <span class=\"token string\">&#034;&#8211;&#034;<\/span><span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> string<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\">\/\/ ^^^^  ^^  ^^^^^^^^<\/span><br \/>\n<span class=\"token comment\">\/\/ |     |   \u2514\u2500\u2500 \u503c\u7c7b\u578b&#xff1a;\u5b57\u7b26\u4e32\u6570\u7ec4<\/span><br \/>\n<span class=\"token comment\">\/\/ |     \u2514\u2500\u2500\u2500\u2500\u2500\u2500 ? \u8868\u793a\u53ef\u9009&#xff08;\u53ef\u4ee5\u4e0d\u4f20&#xff09;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u5c5e\u6027\u540d\u5c31\u662f\u5b57\u9762\u91cf &#034;&#8211;&#034;&#xff08;\u4e24\u4e2a\u8fde\u5b57\u7b26&#xff09;<\/span><\/p>\n<p>TypeScript \u5141\u8bb8\u7528\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\u4f5c\u4e3a\u5c5e\u6027\u540d&#xff0c;\u8fd9\u6837\u5c31\u80fd\u4f7f\u7528 -\u3001\u7a7a\u683c\u7b49\u6b63\u5e38\u6807\u8bc6\u7b26\u4e0d\u5141\u8bb8\u7684\u5b57\u7b26\u3002\u8bbf\u95ee\u65f6\u7528\u65b9\u62ec\u53f7\u8bed\u6cd5&#xff1a;<\/p>\n<p>argv<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;&#8211;&#034;<\/span><span class=\"token punctuation\">]<\/span>  <span class=\"token comment\">\/\/ \u2705 \u5408\u6cd5<\/span><br \/>\nargv<span class=\"token punctuation\">.<\/span><span class=\"token operator\">&#8212;<\/span>     <span class=\"token comment\">\/\/ \u274c \u8bed\u6cd5\u9519\u8bef<\/span><\/p>\n<hr \/>\n<p>&#x1f9e9; \u5408\u5728\u4e00\u8d77<\/p>\n<p>type WithDoubleDash<span class=\"token operator\">&lt;<\/span><span class=\"token constant\">T<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token constant\">T<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string\">&#034;&#8211;&#034;<\/span><span class=\"token operator\">?<\/span><span class=\"token operator\">:<\/span> string<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">}<\/span><\/p>\n<p>\u7ffb\u8bd1\u6210\u81ea\u7136\u8bed\u8a00\u5c31\u662f&#xff1a;<\/p>\n<p>\u4e00\u4e2a\u65b0\u7c7b\u578b &#061; \u539f\u6765\u7684\u7c7b\u578b T &#043; \u4e00\u4e2a\u989d\u5916\u7684\u53ef\u9009\u5c5e\u6027 &#034;&#8211;&#034;&#xff08;\u7c7b\u578b\u4e3a string[]&#xff09;<\/p>\n<p>\u5b9e\u9645\u6548\u679c\u6f14\u793a&#xff1a;<\/p>\n<p>type Original <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token literal-property property\">project<\/span><span class=\"token operator\">:<\/span> string<span class=\"token punctuation\">;<\/span> model<span class=\"token operator\">:<\/span> string <span class=\"token punctuation\">}<\/span><\/p>\n<p>type Enhanced <span class=\"token operator\">&#061;<\/span> WithDoubleDash<span class=\"token operator\">&lt;<\/span>Original<span class=\"token operator\">&gt;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u2193 \u5c55\u5f00\u540e\u7b49\u4ef7\u4e8e<\/span><br \/>\n<span class=\"token comment\">\/\/ {<\/span><br \/>\n<span class=\"token comment\">\/\/   project: string;<\/span><br \/>\n<span class=\"token comment\">\/\/   model: string;<\/span><br \/>\n<span class=\"token comment\">\/\/   &#034;&#8211;&#034;?: string[];    \u2190 \u51ed\u7a7a\u591a\u51fa\u6765\u7684<\/span><br \/>\n<span class=\"token comment\">\/\/ }<\/span><\/p>\n<p>\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48 handler \u91cc\u53ef\u4ee5\u5b89\u5168\u5730\u5199 argv[&#034;&#8211;&#034;] \u800c\u4e0d\u4f1a\u62a5\u7c7b\u578b\u9519\u8bef\u2014\u2014cmd() \u901a\u8fc7\u8fd9\u4e2a\u7c7b\u578b\u53d8\u6362&#xff0c;\u628a yargs \u8fd0\u884c\u65f6\u5b9e\u9645\u5b58\u5728\u4f46\u7c7b\u578b\u5b9a\u4e49\u91cc\u7f3a\u5931\u7684\u5b57\u6bb5\u8865\u4e0a\u4e86\u3002<\/p>\n<hr \/>\n<p>OK&#xff0c;\u672c\u7bc7\u5148\u5230\u8fd9\u91cc&#xff0c;\u5982\u6709\u7591\u95ee&#xff0c;\u6b22\u8fce\u8bc4\u8bba\u533a\u7559\u8a00\u8ba8\u8bba&#xff0c;\u795d\u5404\u4f4d\u529f\u529b\u5927\u6da8&#xff0c;\u6280\u672f\u66f4\u4e0a\u4e00\u5c42\u697c&#xff01;&#xff01;&#xff01;\u66f4\u591a\u5185\u5bb9\u89c1\u4e0b\u7bc7 blog<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u58f0\u660e\u3011\u672c\u535a\u5ba2\u6240\u6709\u5185\u5bb9\u5747\u4e3a\u4e2a\u4eba\u4e1a\u4f59\u65f6\u95f4\u521b\u4f5c&#xff0c;\u6240\u8ff0\u6280\u672f\u6848\u4f8b\u5747\u6765\u81ea\u516c\u5f00\u5f00\u6e90\u9879\u76ee&#xff08;\u5982Github&#xff0c;Apache\u57fa\u91d1\u4f1a&#xff09;&#xff0c;\u4e0d\u6d89\u53ca\u4efb\u4f55\u4f01\u4e1a\u673a\u5bc6\u6216\u672a\u516c\u5f00\u6280\u672f&#xff0c;\u5982\u6709\u4fb5\u6743\u8bf7\u8054\u7cfb\u5220\u9664 \u6807\u9898<br \/>\n173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;cmd\u5de5\u5382&#xff09;<br \/>\n\u80cc\u666f<br \/>\n\u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;\u9009\u9879\u6ce8\u5165\u5668&amp;<\/p>\n","protected":false},"author":2,"featured_media":93708,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7616,74,50],"topic":[],"class_list":["post-93711","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-opencode","tag-agent","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/93711.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u3010\u58f0\u660e\u3011\u672c\u535a\u5ba2\u6240\u6709\u5185\u5bb9\u5747\u4e3a\u4e2a\u4eba\u4e1a\u4f59\u65f6\u95f4\u521b\u4f5c&#xff0c;\u6240\u8ff0\u6280\u672f\u6848\u4f8b\u5747\u6765\u81ea\u516c\u5f00\u5f00\u6e90\u9879\u76ee&#xff08;\u5982Github&#xff0c;Apache\u57fa\u91d1\u4f1a&#xff09;&#xff0c;\u4e0d\u6d89\u53ca\u4efb\u4f55\u4f01\u4e1a\u673a\u5bc6\u6216\u672a\u516c\u5f00\u6280\u672f&#xff0c;\u5982\u6709\u4fb5\u6743\u8bf7\u8054\u7cfb\u5220\u9664 \u6807\u9898 173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;cmd\u5de5\u5382&#xff09; \u80cc\u666f \u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;\u9009\u9879\u6ce8\u5165\u5668&amp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/93711.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-12T22:49:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260812224859-6a7cf85ba932c.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/93711.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/93711.html\",\"name\":\"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-12T22:49:00+00:00\",\"dateModified\":\"2026-08-12T22:49:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/93711.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/93711.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/93711.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/93711.html","og_locale":"zh_CN","og_type":"article","og_title":"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u3010\u58f0\u660e\u3011\u672c\u535a\u5ba2\u6240\u6709\u5185\u5bb9\u5747\u4e3a\u4e2a\u4eba\u4e1a\u4f59\u65f6\u95f4\u521b\u4f5c&#xff0c;\u6240\u8ff0\u6280\u672f\u6848\u4f8b\u5747\u6765\u81ea\u516c\u5f00\u5f00\u6e90\u9879\u76ee&#xff08;\u5982Github&#xff0c;Apache\u57fa\u91d1\u4f1a&#xff09;&#xff0c;\u4e0d\u6d89\u53ca\u4efb\u4f55\u4f01\u4e1a\u673a\u5bc6\u6216\u672a\u516c\u5f00\u6280\u672f&#xff0c;\u5982\u6709\u4fb5\u6743\u8bf7\u8054\u7cfb\u5220\u9664 \u6807\u9898 173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;cmd\u5de5\u5382&#xff09; \u80cc\u666f \u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;\u9009\u9879\u6ce8\u5165\u5668&amp;","og_url":"https:\/\/www.wsisp.com\/helps\/93711.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-12T22:49:00+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260812224859-6a7cf85ba932c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/93711.html","url":"https:\/\/www.wsisp.com\/helps\/93711.html","name":"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-12T22:49:00+00:00","dateModified":"2026-08-12T22:49:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/93711.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/93711.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/93711.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"173\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd\uff08cmd\u5de5\u5382\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/93711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=93711"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/93711\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/93708"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=93711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=93711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=93711"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=93711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}