{"id":97712,"date":"2026-08-30T02:16:58","date_gmt":"2026-08-29T18:16:58","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/97712.html"},"modified":"2026-08-30T02:16:58","modified_gmt":"2026-08-29T18:16:58","slug":"192%e3%80%81%e3%80%90agent%e3%80%91%e3%80%90opencode%e3%80%91tuithreadcommand-handler%ef%bc%9a%e4%bb%8e%e5%8f%82%e6%95%b0%e5%88%b0-worker-%e5%b0%b1%e7%bb%aa","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/97712.html","title":{"rendered":"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea"},"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>192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler&#xff1a;\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea<\/p>\n<h2>\u80cc\u666f<\/h2>\n<p>\u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&#xff08;\u7c7b\u578b\u63a8\u5bfc\u6536\u5c3e&#xff09; \u5206\u6790\u4e86 TuiThreadCmd \u547d\u4ee4\u80cc\u540e yargs \u7684\u7c7b\u578b\u63a8\u5bfc&#xff1a;infer D \u662f&#034;\u5fc5\u8981\u7684\u515c\u5e95&#034;&#xff0c;\u5f53\u5f00\u53d1\u8005\u7701\u7565 type \u53ea\u5199 default \u65f6&#xff0c;\u7c7b\u578b\u4e5f\u80fd\u4ece\u9ed8\u8ba4\u503c\u63a8\u65ad\u51fa\u6765&#xff0c;\u800c\u4e00\u65e6 type \u4e0e default \u540c\u65f6\u51fa\u73b0&#xff0c;type \u4f5c\u4e3a&#034;\u663e\u5f0f\u5951\u7ea6&#034;\u62e5\u6709\u6700\u7ec8\u89e3\u91ca\u6743&#xff1b;\u522b\u540d Alias&lt;O&gt; \u7684\u503c\u7c7b\u578b\u4ece\u540c\u4e00\u4e2a\u914d\u7f6e O \u63a8\u5bfc&#xff0c;\u4fdd\u8bc1\u522b\u540d\u4e0e\u4e3b\u53c2\u6570\u540d\u7684\u7c7b\u578b\u6c38\u8fdc\u4e00\u81f4&#xff1b;\u6700\u540e\u8fd8\u6bd4\u8f83\u4e86 .option() \u7684\u4e24\u4e2a\u91cd\u8f7d\u2014\u2014\u7cbe\u786e\u5339\u914d\u5728\u524d\u3001\u5bbd\u6cdb\u5339\u914d\u5728\u540e&#xff0c;\u987a\u5e8f\u98a0\u5012\u5c31\u4f1a\u5bfc\u81f4\u7cbe\u786e\u91cd\u8f7d\u6c38\u8fdc\u65e0\u6cd5\u89e6\u53d1\u3002\u4e0a\u7bc7\u505c\u5728&#034;\u547d\u4ee4\u662f\u600e\u4e48\u58f0\u660e\u7684&#034;&#xff0c;\u672c\u7bc7\u987a\u7740 handler \u5f80\u4e0b\u8d70&#xff0c;\u770b\u770b\u547d\u4ee4\u771f\u6b63\u542f\u52a8 TUI \u524d&#xff0c;\u4ee3\u7801\u5148\u505a\u4e86\u54ea\u4e9b\u51c6\u5907\u5de5\u4f5c<\/p>\n<h2>OpenCode<\/h2>\n<p>thread.ts:101 \u7684 handler \u662f&#034;\u547d\u4ee4\u884c\u53c2\u6570 \u2192 TUI \u754c\u9762&#034;\u7684\u6700\u540e\u4e00\u516c\u91cc\u3002\u6709\u610f\u601d\u7684\u662f&#xff0c;\u5b83\u7684\u7b2c\u4e00\u6bb5\u4e0d\u662f\u89e3\u6790\u53c2\u6570\u3001\u4e5f\u4e0d\u662f\u8d77 Worker&#xff0c;\u800c\u662f\u4e24\u884c Windows \u9632\u5fa1\u4ee3\u7801&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a9322188b2ac.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5728 Windows \u4e0a&#xff0c;ENABLE_PROCESSED_INPUT \u7f6e\u4f4d\u65f6 Ctrl&#043;C \u4f1a\u53d8\u6210 CTRL_C_EVENT \u4fe1\u53f7&#xff0c;\u76f4\u63a5\u6740\u6389\u6574\u4e2a\u8fdb\u7a0b\u7ec4&#xff0c;\u6240\u4ee5 handler \u4e00\u8fdb\u6765\u5c31\u628a\u5b83\u5173\u6389\u5e76\u88c5\u4e0a&#034;**\u6301\u7eed\u538b\u5236&#034;**\u7684\u5b88\u536b&#xff0c;\u9000\u51fa\u65f6\u518d\u901a\u8fc7 unguard \u8fd8\u539f\u3002\u8fd9\u5957\u673a\u5236\u5b8c\u6574\u539f\u7406&#xff08;FFI \u52a0\u8f7d kernel32\u3001\u4e09\u5c42\u5b88\u536b\u3001unhook \u8fd8\u539f&#xff09;\u6d89\u53ca\u53e6\u4e00\u5904\u6e90\u7801&#xff0c;\u672c\u7bc7\u5148\u7b80\u5355\u5e26\u8fc7&#xff0c;\u540e\u7eed\u6587\u7ae0\u518d\u8be6\u7ec6\u62c6\u89e3\u3002<\/p>\n<hr \/>\n<p>&#x1f9e9; \u7b2c\u4e00\u5173&#xff1a;fork \u53c2\u6570\u6821\u9a8c<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a932218a5048.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>&#8211;fork \u7684\u8bed\u4e49\u662f&#034;\u5728\u65e7\u4f1a\u8bdd\u57fa\u7840\u4e0a\u5206\u53c9\u51fa\u65b0\u4f1a\u8bdd&#034;&#xff0c;\u5fc5\u987b\u6709 &#8211;continue \u6216 &#8211;session \u63d0\u4f9b\u6765\u6e90\u3002\u6821\u9a8c\u5931\u8d25\u4e0d\u629b\u5f02\u5e38&#xff0c;\u800c\u662f UI.error \u63d0\u793a &#043; process.exitCode &#061; 1 &#043; \u76f4\u63a5 return&#xff0c;\u628a\u9000\u51fa\u7801\u7559\u7ed9 shell \u5224\u65ad&#xff0c;\u5e72\u51c0\u5229\u843d\u3002<\/p>\n<hr \/>\n<p>&#x1f5c2;\ufe0f \u7b2c\u4e8c\u5173&#xff1a;\u5de5\u4f5c\u76ee\u5f55\u89e3\u6790<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a932218b8ab8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8fd9\u91cc\u6709\u4e2a\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u7ec6\u8282&#xff1a;root \u7528 process.env.PWD \u4f18\u5148\u3001process.cwd() \u515c\u5e95\u3002\u6ce8\u91ca\u8bf4\u660e\u539f\u56e0\u2014\u2014\u76f8\u5bf9 &#8211;project \u8def\u5f84\u8981\u4ece\u542f\u52a8\u65f6\u7684\u76ee\u5f55\u89e3\u6790&#xff0c;\u800c\u4e0d\u662f chdir \u4e4b\u540e\u3002\u89e3\u6790\u5b8c\u6210\u540e chdir \u5230\u9879\u76ee\u76ee\u5f55&#xff0c;\u518d\u53d6 chdir \u540e\u7684\u771f\u5b9e cwd \u4f5c\u4e3a\u540e\u7eed\u6240\u6709\u64cd\u4f5c\u7684 directory key&#xff0c;\u4fdd\u8bc1 thread \u548c worker \u770b\u5230\u7684\u662f\u540c\u4e00\u4e2a\u76ee\u5f55\u3002<\/p>\n<hr \/>\n<p>\u2699\ufe0f \u7b2c\u4e09\u5173&#xff1a;Worker \u542f\u52a8\u4e0e\u4e09\u7ea7\u56de\u9000<\/p>\n<p>\u542f\u52a8 Worker \u524d&#xff0c;\u5148\u8981\u51b3\u5b9a worker \u811a\u672c\u4ece\u54ea\u6765&#xff0c;target() \u7ed9\u4e86\u4e09\u4e2a\u6765\u6e90&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a932218d9630.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4f18\u5148\u7ea7\u4ece\u9ad8\u5230\u4f4e&#xff1a;\u6784\u5efa\u671f\u6ce8\u5165\u7684\u73af\u5883\u53d8\u91cf OPENCODE_WORKER_PATH \u2192 \u6253\u5305\u4ea7\u7269 worker.js \u2192 \u5f00\u53d1\u6001\u6e90\u7801 worker.ts\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u751f\u4ea7\u73af\u5883\u76f4\u63a5\u7528\u73af\u5883\u53d8\u91cf\u6307\u5b9a\u8def\u5f84&#xff0c;\u6ca1\u6307\u5b9a\u5c31\u7528\u7f16\u8bd1\u4ea7\u7269&#xff0c;\u53ea\u6709\u88f8\u5f00\u53d1\u73af\u5883\u624d\u56de\u9000\u5230\u6e90\u7801\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a932218ed999.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6ce8\u610f env \u7684\u5904\u7406&#xff1a;\u5148\u628a\u503c\u4e3a undefined \u7684\u73af\u5883\u53d8\u91cf\u8fc7\u6ee4\u6389&#xff0c;\u907f\u514d\u7a7a\u503c\u6c61\u67d3\u5b50\u8fdb\u7a0b\u73af\u5883&#xff1b;worker.onerror \u53ea\u8d1f\u8d23\u628a\u52a0\u8f7d\u9519\u8bef\u8bb0\u8fdb\u65e5\u5fd7&#xff0c;\u4e0d\u4e2d\u65ad\u4e3b\u6d41\u7a0b\u3002<\/p>\n<hr \/>\n<p>&#x1f50c; \u7b2c\u56db\u5173&#xff1a;RPC \u5ba2\u6237\u7aef\u4e0e\u4fe1\u53f7\u7ed1\u5b9a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181657-6a9322191d371.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>client \u901a\u8fc7 RPC \u534f\u8bae\u4e0e worker \u901a\u4fe1&#xff0c;typeof rpc \u8ba9 client.call \u6709\u5b8c\u6574\u7c7b\u578b\u63a8\u65ad\u3002\u4e3b\u7ebf\u7a0b\u6302\u4e86\u4e09\u4e2a\u515c\u5e95&#xff1a;\u672a\u6355\u83b7\u5f02\u5e38\u3001\u672a\u5904\u7406 Promise \u62d2\u7edd\u90fd\u53ea\u8bb0\u65e5\u5fd7&#xff1b;SIGUSR2 \u4fe1\u53f7\u89e6\u53d1\u70ed\u91cd\u8f7d\u2014\u2014\u53d1\u4e00\u4e2a reload RPC \u8ba9 worker \u81ea\u5df1\u91cd\u8f7d\u3002<\/p>\n<hr \/>\n<p>&#x1f6d1; \u7b2c\u4e94\u5173&#xff1a;\u5e42\u7b49\u6e05\u7406 stop<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181657-6a93221934cea.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>stop \u7528 stopped \u6807\u5fd7\u4fdd\u8bc1\u53ea\u6267\u884c\u4e00\u6b21&#xff1a;\u5148\u64a4\u6389\u524d\u9762\u6302\u7684\u4e09\u4e2a\u76d1\u542c&#xff0c;\u518d\u53d1 shutdown RPC \u8ba9 worker \u4f18\u96c5\u9000\u51fa\u2014\u2014withTimeout(&#8230;, 5000) \u7ed9 5 \u79d2\u8d85\u65f6&#xff0c;\u8d85\u65f6\u6216\u5931\u8d25\u53ea warn \u4e0d\u629b\u9519&#xff0c;\u6700\u540e worker.terminate() \u515c\u5e95\u5f3a\u6740\u3002\u6574\u4e2a\u987a\u5e8f\u662f&#034;\u8f6f\u5173\u95ed \u2192 \u8d85\u65f6\u515c\u5e95 \u2192 \u5f3a\u5236\u7ec8\u6b62&#034;\u4e09\u7ea7\u9012\u51cf\u3002<\/p>\n<hr \/>\n<p>&#x1f4cc; \u4e00\u53e5\u8bdd\u8bb0\u5fc6<\/p>\n<p>\u771f\u6b63\u7684 TUI \u542f\u52a8\u4e4b\u524d&#xff0c;handler \u8981\u5148\u8fc7\u4e94\u5173&#xff1a;\u9632 Ctrl&#043;C\u3001\u6821\u9a8c fork\u3001chdir \u7edf\u4e00\u76ee\u5f55\u3001target() \u4e09\u7ea7\u56de\u9000\u62c9\u8d77 Worker\u3001\u6302\u4e0a RPC \u4e0e\u515c\u5e95\u76d1\u542c&#xff0c;\u6700\u540e\u5907\u597d\u4e00\u4e2a\u5e42\u7b49\u7684 stop \u515c\u5e95\u6e05\u7406\u3002\u5230\u8fd9\u91cc&#034;\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea&#034;\u624d\u7b97\u5b8c\u6210\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;\u4e0b\u7bc7 blog \u7ee7\u7eed\u62c6 handler \u7684\u540e\u534a\u6bb5\u2014\u2014transport \u53cc\u5f62\u6001&#xff08;external \/ internal RPC \u4ee3\u7406&#xff09;\u3001\u5ef6\u8fdf\u5347\u7ea7\u68c0\u6d4b\u4e0e TUI \u542f\u52a8\u6536\u5c3e<\/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 \/>\n192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler&#xff1a;\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea<br \/>\n\u80cc\u666f<br \/>\n\u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&amp;<\/p>\n","protected":false},"author":2,"featured_media":97705,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7616,74,50],"topic":[],"class_list":["post-97712","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>192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea - \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\/97712.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea - \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 192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler&#xff1a;\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea \u80cc\u666f \u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&amp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/97712.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-29T18:16:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a9322188b2ac.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=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97712.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/97712.html\",\"name\":\"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-29T18:16:58+00:00\",\"dateModified\":\"2026-08-29T18:16:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/97712.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/97712.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97712.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea\"}]},{\"@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":"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea - \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\/97712.html","og_locale":"zh_CN","og_type":"article","og_title":"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea - \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 192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler&#xff1a;\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea \u80cc\u666f \u4e0a\u7bc7 blog \u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCmd&amp;","og_url":"https:\/\/www.wsisp.com\/helps\/97712.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-29T18:16:58+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829181656-6a9322188b2ac.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/97712.html","url":"https:\/\/www.wsisp.com\/helps\/97712.html","name":"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-29T18:16:58+00:00","dateModified":"2026-08-29T18:16:58+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/97712.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/97712.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/97712.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"192\u3001\u3010Agent\u3011\u3010OpenCode\u3011TuiThreadCommand handler\uff1a\u4ece\u53c2\u6570\u5230 Worker \u5c31\u7eea"}]},{"@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\/97712","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=97712"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97712\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/97705"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=97712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=97712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=97712"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=97712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}