mirror of
https://github.com/zenlm/zen-code-docs.git
synced 2026-10-30 14:58:40 +00:00
27 lines
115 KiB
Plaintext
27 lines
115 KiB
Plaintext
3:I[4707,[],""]
|
||
6:I[36423,[],""]
|
||
8:I[78400,["3185","static/chunks/app/layout-38b548b4f4d27f80.js"],"FontLoader"]
|
||
4:["lang","zh","d"]
|
||
5:["mdxPath","cli/commands","oc"]
|
||
0:["0y8u-WGJo2VFWAF7bkrdx",[[["",{"children":[["lang","zh","d"],{"children":[["mdxPath","cli/commands","oc"],{"children":["__PAGE__?{\"lang\":\"zh\",\"mdxPath\":[\"cli\",\"commands\"]}",{}]}]}]},"$undefined","$undefined",true],["",{"children":[["lang","zh","d"],{"children":[["mdxPath","cli/commands","oc"],{"children":["__PAGE__",{},[["$L1","$L2",[["$","link","0",{"rel":"stylesheet","href":"/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children","$5","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,"$L7"],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$undefined",["$","style",null,{"children":":root {\n --nextra-primary-hue: 248deg;\n --nextra-primary-saturation: 74%;\n --nextra-primary-lightness: 45%;\n --nextra-bg: 250,250,250;\n --nextra-content-width: 90rem;\n}\n.dark {\n --nextra-primary-hue: 248deg;\n --nextra-primary-saturation: 74%;\n --nextra-primary-lightness: 55%;\n --nextra-bg: 17,17,17;\n}\n::selection {\n background: hsla(var(--nextra-primary-hue),var(--nextra-primary-saturation),var(--nextra-primary-lightness),.3);\n}\nhtml {\n background: rgb(var(--nextra-bg));\n}"}],["$","meta",null,{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"rgb(250,250,250)"}],["$","meta",null,{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"rgb(17,17,17)"}],"$undefined"]}],["$","body",null,{"children":[["$","$L8",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]]}]],null],null],["$L9",null]]]]
|
||
a:I[54108,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ThemeConfigProvider"]
|
||
b:I[16016,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"LastUpdated"]
|
||
c:I[30763,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"Search"]
|
||
d:I[25922,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ThemeProvider"]
|
||
e:I[94328,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"SkipNavLink"]
|
||
f:I[17691,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ConfigProvider"]
|
||
10:I[72972,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],""]
|
||
11:I[88212,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ClientNavbar"]
|
||
13:I[32594,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"LanguageDropdown"]
|
||
14:I[57191,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"MobileNav"]
|
||
15:I[18960,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"TOCProvider"]
|
||
16:"$Sreact.fragment"
|
||
17:I[57191,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"Sidebar"]
|
||
18:I[98270,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ClientWrapper"]
|
||
19:I[56099,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"HeadingAnchor"]
|
||
1a:I[98451,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ToggleWordWrapButton"]
|
||
12:T481,M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z7:["$","$La",null,{"value":{"children":"$undefined","darkMode":true,"docsRepositoryBase":"https://github.com/QwenLM/qwen-code/blob/main/docs","editLink":"Edit this page","feedback":{"content":"Question? Give us feedback","labels":"feedback"},"i18n":[{"locale":"en","name":"English"},{"locale":"zh","name":"中文"},{"locale":"de","name":"Deutsch"},{"locale":"fr","name":"Français"},{"locale":"ru","name":"Русский"},{"locale":"ja","name":"日本語"}],"lastUpdated":["$","$Lb",null,{}],"navigation":{"next":true,"prev":true},"search":["$","$Lc",null,{}],"sidebar":{"defaultMenuCollapseLevel":1,"defaultOpen":true,"toggleButton":true,"autoCollapse":true},"themeSwitch":{"dark":"Dark","light":"Light","system":"System"},"toc":{"backToTop":"Scroll to top","float":true,"title":"On This Page"}},"children":["$","$Ld",null,{"attribute":"class","defaultTheme":"light","disableTransitionOnChange":true,"storageKey":"theme","children":[["$","$Le",null,{}],"$undefined",["$","$Lf",null,{"pageMap":[{"data":{"index":{"title":"欢迎阅读 Qwen Code 文档"},"deployment":{"title":"执行与部署"},"architecture":{"title":"架构概述"},"cli":{"title":"CLI 使用指南"},"core":{"title":"核心详情"},"tools":{"title":"工具集合"},"checkpointing":{"title":"检查点功能"},"extension":{"title":"扩展开发"},"ide-integration":{"title":"IDE 集成"},"telemetry":{"title":"可观测性"},"examples":{"title":"示例代码"},"npm":{"title":"包管理"},"gemini-ignore":{"title":"忽略文件配置"},"integration-tests":{"title":"集成测试"},"keyboard-shortcuts":{"title":"快捷键参考"},"sandbox":{"title":"沙箱机制"},"issue-and-pr-automation":{"title":"自动化处理"},"troubleshooting":{"title":"故障排除"},"tos-privacy":{"title":"服务条款与隐私"},"Uninstall":{"title":"卸载指南"}}},{"name":"index","route":"/zh","frontMatter":{"title":"欢迎阅读 Qwen Code 文档","filePath":"content/zh/index.md","timestamp":1789666354000},"title":"欢迎阅读 Qwen Code 文档"},{"name":"deployment","route":"/zh/deployment","frontMatter":{"title":"Qwen Code 执行与部署","filePath":"content/zh/deployment.md","timestamp":1789666354000},"title":"执行与部署"},{"name":"architecture","route":"/zh/architecture","frontMatter":{"title":"Qwen Code 架构概述","filePath":"content/zh/architecture.md","timestamp":1789666354000},"title":"架构概述"},{"name":"cli","route":"/zh/cli","children":[{"data":{"index":{"title":"CLI 概述"},"commands":{"title":"命令参考"},"configuration":{"title":"配置指南"},"authentication":{"title":"认证设置"},"openai-auth":{"title":"OpenAI 认证"},"token-caching":{"title":"Token 缓存"},"themes":{"title":"主题配置"},"tutorials":{"title":"使用教程"}}},{"name":"index","route":"/zh/cli","frontMatter":{"title":"Qwen Code CLI","filePath":"content/zh/cli/index.md","timestamp":1789666354000},"title":"CLI 概述"},{"name":"commands","route":"/zh/cli/commands","frontMatter":{"title":"CLI 命令","filePath":"content/zh/cli/commands.md","timestamp":1789666354000},"title":"命令参考"},{"name":"configuration","route":"/zh/cli/configuration","frontMatter":{"title":"Qwen Code 配置","filePath":"content/zh/cli/configuration.md","timestamp":1789666354000},"title":"配置指南"},{"name":"authentication","route":"/zh/cli/authentication","frontMatter":{"title":"认证设置","filePath":"content/zh/cli/authentication.md","timestamp":1789666354000},"title":"认证设置"},{"name":"openai-auth","route":"/zh/cli/openai-auth","frontMatter":{"title":"OpenAI 认证","filePath":"content/zh/cli/openai-auth.md","timestamp":1789666354000},"title":"OpenAI 认证"},{"name":"token-caching","route":"/zh/cli/token-caching","frontMatter":{"title":"Token 缓存与成本优化","filePath":"content/zh/cli/token-caching.md","timestamp":1789666354000},"title":"Token 缓存"},{"name":"themes","route":"/zh/cli/themes","frontMatter":{"title":"主题","filePath":"content/zh/cli/themes.md","timestamp":1789666354000},"title":"主题配置"},{"name":"tutorials","route":"/zh/cli/tutorials","frontMatter":{"title":"教程","filePath":"content/zh/cli/tutorials.md","timestamp":1789666354000},"title":"使用教程"},{"name":"welcome-back","route":"/zh/cli/welcome-back","frontMatter":{"title":"欢迎回来功能","filePath":"content/zh/cli/welcome-back.md","timestamp":1789666354000},"title":"欢迎回来功能"}],"title":"CLI 使用指南"},{"name":"core","route":"/zh/core","children":[{"data":{"index":{"title":"核心概述"},"tools-api":{"title":"工具 API"},"memport":{"title":"内存导入处理器"}}},{"name":"index","route":"/zh/core","frontMatter":{"title":"Qwen Code Core","filePath":"content/zh/core/index.md","timestamp":1789666354000},"title":"核心概述"},{"name":"tools-api","route":"/zh/core/tools-api","frontMatter":{"title":"Qwen Code Core: Tools API","filePath":"content/zh/core/tools-api.md","timestamp":1789666354000},"title":"工具 API"},{"name":"memport","route":"/zh/core/memport","frontMatter":{"title":"Memory Import Processor","filePath":"content/zh/core/memport.md","timestamp":1789666354000},"title":"内存导入处理器"}],"title":"核心详情"},{"name":"tools","route":"/zh/tools","children":[{"data":{"index":{"title":"工具概述"},"file-system":{"title":"文件系统工具"},"multi-file":{"title":"多文件读取工具"},"shell":{"title":"Shell 工具"},"web-fetch":{"title":"Web 获取工具"},"web-search":{"title":"Web 搜索工具"},"memory":{"title":"内存工具"},"todo-write":{"title":"Todo 写入工具"},"mcp-server":{"title":"MCP 服务器"}}},{"name":"index","route":"/zh/tools","frontMatter":{"title":"Qwen Code 工具","filePath":"content/zh/tools/index.md","timestamp":1789666354000},"title":"工具概述"},{"name":"file-system","route":"/zh/tools/file-system","frontMatter":{"title":"Qwen Code 文件系统工具","filePath":"content/zh/tools/file-system.md","timestamp":1789666354000},"title":"文件系统工具"},{"name":"multi-file","route":"/zh/tools/multi-file","frontMatter":{"title":"多文件读取工具 (read_many_files)","filePath":"content/zh/tools/multi-file.md","timestamp":1789666354000},"title":"多文件读取工具"},{"name":"shell","route":"/zh/tools/shell","frontMatter":{"title":"Shell 工具 (run_shell_command)","filePath":"content/zh/tools/shell.md","timestamp":1789666354000},"title":"Shell 工具"},{"name":"web-fetch","route":"/zh/tools/web-fetch","frontMatter":{"title":"Web Fetch Tool (web_fetch)","filePath":"content/zh/tools/web-fetch.md","timestamp":1789666354000},"title":"Web 获取工具"},{"name":"web-search","route":"/zh/tools/web-search","frontMatter":{"title":"Web Search Tool (web_search)","filePath":"content/zh/tools/web-search.md","timestamp":1789666354000},"title":"Web 搜索工具"},{"name":"memory","route":"/zh/tools/memory","frontMatter":{"title":"Memory Tool (save_memory)","filePath":"content/zh/tools/memory.md","timestamp":1789666354000},"title":"内存工具"},{"name":"todo-write","route":"/zh/tools/todo-write","frontMatter":{"title":"Todo Write Tool (todo_write)","filePath":"content/zh/tools/todo-write.md","timestamp":1789666354000},"title":"Todo 写入工具"},{"name":"mcp-server","route":"/zh/tools/mcp-server","frontMatter":{"title":"使用 Qwen Code 的 MCP 服务器","filePath":"content/zh/tools/mcp-server.md","timestamp":1789666354000},"title":"MCP 服务器"}],"title":"工具集合"},{"name":"checkpointing","route":"/zh/checkpointing","frontMatter":{"title":"Checkpointing","filePath":"content/zh/checkpointing.md","timestamp":1789666354000},"title":"检查点功能"},{"name":"extension","route":"/zh/extension","frontMatter":{"title":"Qwen Code Extensions","filePath":"content/zh/extension.md","timestamp":1789666354000},"title":"扩展开发"},{"name":"ide-integration","route":"/zh/ide-integration","frontMatter":{"title":"IDE 集成","filePath":"content/zh/ide-integration.md","timestamp":1789666354000},"title":"IDE 集成"},{"name":"telemetry","route":"/zh/telemetry","frontMatter":{"title":"Qwen Code 可观测性指南","filePath":"content/zh/telemetry.md","timestamp":1789666354000},"title":"可观测性"},{"name":"examples","route":"/zh/examples","children":[{"data":{"proxy-script":{"title":"代理脚本示例"}}},{"name":"proxy-script","route":"/zh/examples/proxy-script","frontMatter":{"title":"示例代理脚本","filePath":"content/zh/examples/proxy-script.md","timestamp":1789666354000},"title":"代理脚本示例"}],"title":"示例代码"},{"name":"npm","route":"/zh/npm","frontMatter":{"title":"Package Overview","filePath":"content/zh/npm.md","timestamp":1789666354000},"title":"包管理"},{"name":"gemini-ignore","route":"/zh/gemini-ignore","frontMatter":{"title":"忽略文件","filePath":"content/zh/gemini-ignore.md","timestamp":1789666354000},"title":"忽略文件配置"},{"name":"integration-tests","route":"/zh/integration-tests","frontMatter":{"title":"集成测试","filePath":"content/zh/integration-tests.md","timestamp":1789666354000},"title":"集成测试"},{"name":"keyboard-shortcuts","route":"/zh/keyboard-shortcuts","frontMatter":{"title":"Qwen Code 键盘快捷键","filePath":"content/zh/keyboard-shortcuts.md","timestamp":1789666354000},"title":"快捷键参考"},{"name":"sandbox","route":"/zh/sandbox","frontMatter":{"title":"Qwen Code 中的沙箱机制","filePath":"content/zh/sandbox.md","timestamp":1789666354000},"title":"沙箱机制"},{"name":"issue-and-pr-automation","route":"/zh/issue-and-pr-automation","frontMatter":{"title":"自动化与分类处理流程","filePath":"content/zh/issue-and-pr-automation.md","timestamp":1789666354000},"title":"自动化处理"},{"name":"troubleshooting","route":"/zh/troubleshooting","frontMatter":{"title":"故障排除指南","filePath":"content/zh/troubleshooting.md","timestamp":1789666354000},"title":"故障排除"},{"name":"tos-privacy","route":"/zh/tos-privacy","frontMatter":{"title":"Qwen Code:服务条款与隐私声明","filePath":"content/zh/tos-privacy.md","timestamp":1789666354000},"title":"服务条款与隐私"},{"name":"Uninstall","route":"/zh/Uninstall","frontMatter":{"title":"卸载 CLI","filePath":"content/zh/Uninstall.md","timestamp":1789666354000},"title":"卸载指南"},{"name":"subagents","route":"/zh/subagents","frontMatter":{"title":"Subagents","filePath":"content/zh/subagents.md","timestamp":1789666354000},"title":"Subagents"}],"navbar":["$","header",null,{"className":"nextra-navbar x:sticky x:top-0 x:z-30 x:w-full x:bg-transparent x:print:hidden x:max-md:[.nextra-banner:not([class$=hidden])~&]:top-(--nextra-banner-height)","children":[["$","div",null,{"className":"nextra-navbar-blur x:absolute x:-z-1 x:size-full nextra-border x:border-b x:backdrop-blur-md x:bg-nextra-bg/70"}],["$","nav",null,{"style":{"height":"var(--nextra-navbar-height)"},"className":"x:mx-auto x:flex x:max-w-(--nextra-content-width) x:items-center x:gap-4 x:pl-[max(env(safe-area-inset-left),1.5rem)] x:pr-[max(env(safe-area-inset-right),1.5rem)] x:justify-end","children":[["$","$L10",null,{"href":"/","className":"x:flex x:items-center x:me-auto x:transition-opacity x:focus-visible:nextra-focus x:hover:opacity-75","aria-label":"Home page","children":["$","span",null,{"className":"ms-2 select-none font-extrabold flex items-center","title":"Qwen Code: AI Coding Agent","children":[["$","img",null,{"src":"https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png","alt":"Qwen Code","width":32,"height":32,"className":"inline-block align-middle mr-2 ","style":{"verticalAlign":"middle"}}],["$","span",null,{"className":"text-[1.3rem] font-normal align-middle mr-1 max-md:hidden","children":"Qwen"}],["$","span",null,{"className":"text-[1.3rem] font-normal align-middle max-md:hidden","children":"Code"}]]}]}],["$","$L11",null,{"className":"","children":[["$","a",null,{"href":"https://github.com/QwenLM/qwen-code","target":"_blank","rel":"noreferrer","children":[["$","svg",null,{"fill":"currentColor","viewBox":"3 3 18 18","height":"24","aria-label":"Project repository","children":["$","path",null,{"d":"$12"}]}],false],"className":"x:focus-visible:nextra-focus"}],"$undefined",["$","$L13",null,{"currentLang":"zh"}]]}]]}]]}],"footer":null,"children":[["$","$L14",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]]}]]}]}]
|
||
2:["$","div",null,{"className":"x:mx-auto x:flex x:max-w-(--nextra-content-width)","sourceCode":"$undefined","children":["$","$L15",null,{"value":[{"value":[["$","$16",".0",{"children":["斜杠命令 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/"}],")"]}]],"id":"斜杠命令-","depth":2},{"value":"内置命令","id":"内置命令","depth":3},{"value":"自定义命令","id":"自定义命令","depth":3},{"value":"文件位置与优先级","id":"文件位置与优先级","depth":4},{"value":"命名与命名空间","id":"命名与命名空间","depth":4},{"value":"TOML 文件格式 (v1)","id":"toml-文件格式-v1","depth":4},{"value":"必填字段","id":"必填字段","depth":5},{"value":"可选字段","id":"可选字段","depth":5},{"value":"处理参数","id":"处理参数","depth":4},{"value":[["$","$16",".0",{"children":["1. 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}]," 的上下文感知注入"]}]],"id":"1-使用-args-的上下文感知注入","depth":5},{"value":"2. 默认参数处理","id":"2-默认参数处理","depth":5},{"value":[["$","$16",".0",{"children":["3. 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!{...}"}]," 执行 Shell 命令"]}]],"id":"3-使用--执行-shell-命令","depth":5}],"children":[["$","$L17",null,{}],["$","$L18",null,{"metadata":{"title":"CLI 命令","filePath":"content/zh/cli/commands.md","timestamp":1789666354000},"bottomContent":"$undefined","children":[["$","div",null,{"id":"nextra-skip-nav"}],["$","main",null,{"data-pagefind-body":true,"children":[["$","h1",null,{"id":"$undefined","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-bold x:mt-2 x:text-4xl","children":["CLI 命令","$undefined"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["Qwen Code 支持多个内置命令,帮助你管理会话、自定义界面并控制其行为。这些命令以斜杠 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/"}],")、@ 符号 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"@"}],") 或感叹号 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!"}],") 作为前缀。"]}],"\n",["$","h2",null,{"id":"斜杠命令-","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":[["斜杠命令 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/"}],")"],["$","$L19",null,{"id":"斜杠命令-"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"斜杠命令提供对 CLI 本身的元级别控制。"}],"\n",["$","h3",null,{"id":"内置命令","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["内置命令",["$","$L19",null,{"id":"内置命令"}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/bug"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 提交一个关于 Qwen Code 的 issue。默认情况下,issue 会提交到 Qwen Code 的 GitHub 仓库中。你在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/bug"}]," 后输入的字符串将成为该 bug 的标题。你可以通过在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":".qwen/settings.json"}]," 文件中配置 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"bugCommand"}]," 设置来修改 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/bug"}]," 的默认行为。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/chat"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 交互式地保存和恢复对话历史,以便在不同分支对话状态之间切换,或在后续会话中恢复之前的对话状态。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"save"}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 保存当前对话历史。你必须添加一个 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"<tag>"}]," 来标识该对话状态。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/chat save <tag>"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"检查点位置详情:"}]," 默认的聊天检查点保存位置为:\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":["Linux/macOS: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"~/.config/qwen-code/checkpoints/"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Windows: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"C:\\Users\\<YourUsername>\\AppData\\Roaming\\qwen-code\\checkpoints\\"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["当你运行 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/chat list"}]," 时,CLI 只会扫描这些特定目录以查找可用的检查点。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 这些检查点用于手动保存和恢复对话状态。如需了解在文件修改前自动创建的检查点,请参阅 ",["$","$L10",null,{"href":"../checkpointing","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"Checkpointing documentation"}],"。"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"resume"}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 从之前的保存点恢复对话。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/chat resume <tag>"}]]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"list"}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 列出可用于恢复对话状态的标签。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"delete"}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 删除已保存的对话检查点。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/chat delete <tag>"}]]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/clear"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 清除终端屏幕,包括 CLI 中可见的会话历史和滚动缓冲区。底层会话数据(用于历史回溯)可能会根据具体实现保留,但视觉显示会被清除。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"快捷键:"}]," 随时按 ",["$","strong",null,{"children":"Ctrl+L"}]," 执行清除操作。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/summary"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 根据当前对话历史生成一个全面的项目摘要,并保存到 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":".qwen/PROJECT_SUMMARY.md"}],"。该摘要包括总体目标、关键知识、最近操作和当前计划,非常适合在未来的会话中恢复工作。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/summary"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"功能:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":"分析整个对话历史以提取重要上下文"}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":"创建结构化的 markdown 摘要,包含目标、知识、操作和计划等部分"}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["自动保存到项目根目录下的 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":".qwen/PROJECT_SUMMARY.md"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":"在生成和保存过程中显示进度指示器"}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":"与 Welcome Back 功能集成,实现无缝会话恢复"}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 此命令需要至少包含 2 条消息的活跃对话才能生成有意义的摘要。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/compress"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 用摘要替换整个聊天上下文。这可以节省未来任务使用的 token 数量,同时保留已发生事件的高级摘要。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/copy"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 将 Qwen Code 生成的最后一个输出复制到剪贴板,方便分享或重复使用。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory"}]}],"(或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/dir"}]}],")"]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 管理工作区目录,支持多目录操作。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"add"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 将目录添加到工作区。路径可以是绝对路径或相对于当前工作目录的相对路径。也支持从主目录开始的路径引用。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory add <path1>,<path2>"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 在限制性沙盒配置文件中禁用此功能。如果你正在使用该配置,请在启动会话时使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"--include-directories"}]," 参数。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"show"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示通过 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory add"}]," 和 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"--include-directories"}]," 添加的所有目录。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory show"}]]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory"}]}],"(或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/dir"}]}],")"]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 管理工作区目录,支持多目录操作。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"add"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 将目录添加到工作区。路径可以是绝对路径或相对于当前工作目录的相对路径。也支持从主目录开始的路径引用。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory add <path1>,<path2>"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 在限制性沙盒配置文件中禁用此功能。如果你正在使用该配置,请在启动会话时使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"--include-directories"}]," 参数。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"show"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示通过 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory add"}]," 和 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"--include-directories"}]," 添加的所有目录。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/directory show"}]]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/editor"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 打开一个对话框,用于选择支持的编辑器。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/extensions"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 列出当前 Qwen Code 会话中所有激活的扩展。详见 ",["$","$L10",null,{"href":"../extension","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"Qwen Code Extensions"}],"。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/help"}]}],"(或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/?"}]}],")"]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示 Qwen Code 的帮助信息,包括可用命令及其用法。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/mcp"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 列出已配置的 Model Context Protocol (MCP) 服务器、其连接状态、服务器详情和可用工具。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"desc"}]}]," 或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"descriptions"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示 MCP 服务器和工具的详细描述。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"nodesc"}]}]," 或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"nodescriptions"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 隐藏工具描述,仅显示工具名称。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"schema"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示工具配置参数的完整 JSON schema。"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"快捷键:"}]," 随时按 ",["$","strong",null,{"children":"Ctrl+T"}]," 在显示和隐藏工具描述之间切换。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/memory"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 管理 AI 的指令上下文(默认从 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"QWEN.md"}]," 文件加载的分层内存;可通过 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"contextFileName"}]," 配置)。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"add"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 将以下文本添加到 AI 的内存中。用法:",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/memory add <text to remember>"}]]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"show"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示从所有上下文文件(如 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"QWEN.md"}],")加载的当前分层内存的完整内容。这让你可以检查提供给模型的指令上下文。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"refresh"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 从配置位置(全局、项目/祖先目录和子目录)中找到的所有上下文文件(默认:",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"QWEN.md"}],")重新加载分层指令内存。这会用最新的上下文内容更新模型。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 有关上下文文件如何贡献于分层内存的更多详情,请参阅 ",["$","$L10",null,{"href":"./configuration#context-files-hierarchical-instructional-context","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"CLI Configuration documentation"}],"。"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/restore"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 将项目文件恢复到工具执行前的状态。这对于撤销工具进行的文件编辑特别有用。如果在没有工具调用 ID 的情况下运行,它将列出可恢复的检查点。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/restore [tool_call_id]"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 仅在使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"--checkpointing"}]," 选项调用 CLI 或通过 ",["$","$L10",null,{"href":"./configuration","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"settings"}]," 配置时可用。详见 ",["$","$L10",null,{"href":"../checkpointing","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"Checkpointing documentation"}],"。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/settings"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 打开设置编辑器以查看和修改 Qwen Code 设置。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"详情:"}]," 此命令提供了一个用户友好的界面来更改控制 Qwen Code 行为和外观的设置。它等效于手动编辑 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":".qwen/settings.json"}]," 文件,但带有验证和指导以防止错误。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," 简单运行 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/settings"}],",编辑器将打开。然后你可以浏览或搜索特定设置,查看其当前值并按需修改。某些设置的更改会立即生效,而其他设置需要重启。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/stats"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示当前 Qwen Code 会话的详细统计信息,包括 token 使用量、缓存 token 节省量(如果可用)和会话持续时间。注意:缓存 token 信息仅在使用缓存 token 时显示,这在使用 API key 认证时发生,但目前在 OAuth 认证时不发生。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","$L10",null,{"href":"./themes","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/theme"}]}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 打开一个对话框,让你更改 Qwen Code 的视觉主题。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/auth"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 打开一个对话框,让你更改认证方法。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/about"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示版本信息。提交 issue 时请分享此信息。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/agents"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 管理专门用于特定任务的 AI 子代理。子代理是配置了特定专业知识和工具访问权限的独立 AI 助手。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"create"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 启动交互式向导以创建新的子代理。向导会引导你完成位置选择、AI 驱动的提示生成、工具选择和视觉定制。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/agents create"}]]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"manage"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 打开交互式管理对话框以查看、编辑和删除现有子代理。显示项目级和用户级代理。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/agents manage"}]]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"存储位置:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"项目级:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":".qwen/agents/"}],"(与团队共享,优先级更高)"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用户级:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"~/.qwen/agents/"}],"(个人代理,跨项目可用)"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 有关创建和管理子代理的详细信息,请参阅 ",["$","$L10",null,{"href":"../subagents","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"Subagents documentation"}],"。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","$L10",null,{"href":"../tools/index","prefetch":"$undefined","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/tools"}]}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示当前在 Qwen Code 中可用的工具列表。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"子命令:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"desc"}]}]," 或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"descriptions"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示每个工具的详细描述,包括提供给模型的每个工具的名称及其完整描述。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"nodesc"}]}]," 或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"nodescriptions"}]}],":\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 隐藏工具描述,仅显示工具名称。"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/privacy"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 显示隐私声明,并允许用户选择是否同意收集其数据以改进服务。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/quit-confirm"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 退出 Qwen Code 前显示确认对话框,让你选择如何处理当前会话。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用法:"}]," ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/quit-confirm"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"功能:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"立即退出:"}]," 不保存任何内容直接退出(等效于 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/quit"}],")"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"生成摘要并退出:"}]," 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/summary"}]," 创建项目摘要后退出"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"保存对话并退出:"}]," 使用自动生成的标签保存当前对话后退出"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"快捷键:"}]," 连续按两次 ",["$","strong",null,{"children":"Ctrl+C"}]," 触发退出确认对话框"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注意:"}]," 此命令在你按一次 Ctrl+C 时自动触发,提供防止意外退出的安全机制。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":[["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/quit"}]}],"(或 ",["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/exit"}]}],")"]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 立即退出 Qwen Code,不显示任何确认对话框。"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/vim"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 切换 vim 模式开/关。启用 vim 模式时,输入区域在 NORMAL 和 INSERT 模式下都支持 vim 风格的导航和编辑命令。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"功能:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"NORMAL 模式:"}]," 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"h"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"j"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"k"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"l"}]," 导航;使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"w"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"b"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"e"}]," 按单词跳转;使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"0"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"$$"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"^"}]," 跳转到行首/行尾;使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"G"}],"(或 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"gg"}]," 跳转到第一行)跳转到特定行"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"INSERT 模式:"}]," 标准文本输入,按 Esc 返回 NORMAL 模式"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"编辑命令:"}]," 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"x"}]," 删除,使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"c"}]," 更改,使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"i"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"a"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"o"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"O"}]," 插入;复杂操作如 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"dd"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"cc"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"dw"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"cw"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"计数支持:"}]," 在命令前加数字前缀(如 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"3h"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"5w"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"10G"}],")"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"重复最后命令:"}]," 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"."}]," 重复最后的编辑操作"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"持久设置:"}]," Vim 模式偏好设置保存到 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"~/.qwen/settings.json"}]," 并在会话间恢复"]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"状态指示器:"}]," 启用时在页脚显示 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"[NORMAL]"}]," 或 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"[INSERT]"}]]}],"\n"]}],"\n"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/init"}]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"描述:"}]," 分析当前目录并创建一个 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"QWEN.md"}]," 上下文文件(或由 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"contextFileName"}]," 指定的文件名)。如果已存在非空文件,则不进行任何更改。该命令会初始化一个空文件并提示模型用项目特定的指令填充它。"]}],"\n"]}],"\n"]}],"\n"]}],"\n",["$","h3",null,{"id":"自定义命令","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["自定义命令",["$","$L19",null,{"id":"自定义命令"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["快速入门,请参见下方的",["$","a",null,{"href":"#example-a-pure-function-refactoring-command","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"示例"}],"。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"自定义命令允许你将最常用或最喜欢的 prompt 保存为 Qwen Code 中的个人快捷方式。你可以创建仅适用于单个项目的命令,也可以创建在所有项目中全局可用的命令,从而简化工作流程并确保一致性。"}],"\n",["$","h4",null,{"id":"文件位置与优先级","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-xl","children":["文件位置与优先级",["$","$L19",null,{"id":"文件位置与优先级"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Qwen Code 从两个位置发现命令,按特定顺序加载:"}],"\n",["$","ol",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"用户命令(全局):"}]," 位于 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"~/.qwen/commands/"}],"。这些命令在你正在处理的任何项目中都可用。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"项目命令(本地):"}]," 位于 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"<your-project-root>/.qwen/commands/"}],"。这些命令特定于当前项目,可以纳入版本控制并与团队共享。"]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["如果项目目录中的命令与用户目录中的命令同名,则",["$","strong",null,{"children":"始终使用项目命令"}],"。这允许项目使用特定于项目的版本覆盖全局命令。"]}],"\n",["$","h4",null,{"id":"命名与命名空间","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-xl","children":["命名与命名空间",["$","$L19",null,{"id":"命名与命名空间"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["命令的名称由其相对于 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"commands"}]," 目录的文件路径决定。子目录用于创建带命名空间的命令,路径分隔符(",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/"}]," 或 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"\\"}],")会被转换为冒号(",["$","code",null,{"className":"nextra-code","dir":"ltr","children":":"}],")。"]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":["位于 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"~/.qwen/commands/test.toml"}]," 的文件会成为命令 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/test"}],"。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["位于 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"<project>/.qwen/commands/git/commit.toml"}]," 的文件会成为带命名空间的命令 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/git:commit"}],"。"]}],"\n"]}],"\n",["$","h4",null,{"id":"toml-文件格式-v1","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-xl","children":["TOML 文件格式 (v1)",["$","$L19",null,{"id":"toml-文件格式-v1"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["你的命令定义文件必须使用 TOML 格式编写,并使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":".toml"}]," 文件扩展名。"]}],"\n",["$","h5",null,{"id":"必填字段","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-lg","children":["必填字段",["$","$L19",null,{"id":"必填字段"}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"prompt"}]," (String):命令执行时发送给模型的 prompt。可以是单行或多行字符串。"]}],"\n"]}],"\n",["$","h5",null,{"id":"可选字段","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-lg","children":["可选字段",["$","$L19",null,{"id":"可选字段"}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"description"}]," (String):命令功能的简短一行描述。这段文字会显示在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/help"}]," 菜单中你的命令旁边。",["$","strong",null,{"children":"如果你省略此字段,系统会根据文件名自动生成一个通用描述。"}]]}],"\n"]}],"\n",["$","h4",null,{"id":"处理参数","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-xl","children":["处理参数",["$","$L19",null,{"id":"处理参数"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["自定义命令支持两种强大的参数处理方法。CLI 会根据你的命令 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"prompt"}]," 内容自动选择正确的方法。"]}],"\n",["$","h5",null,{"id":"1-使用-args-的上下文感知注入","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-lg","children":[["1. 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}]," 的上下文感知注入"],["$","$L19",null,{"id":"1-使用-args-的上下文感知注入"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["如果你的 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"prompt"}]," 包含特殊占位符 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}],",CLI 会将该占位符替换为用户在命令名后输入的文本。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"这种注入的行为取决于它被使用的位置:"}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":"A. 原始注入(在 Shell 命令外部)"}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"当在 prompt 的主体中使用时,参数会按用户输入的原样注入。"}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["示例 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git/fix.toml"}],"):"]}]}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# 调用方式:/git:fix \"按钮未对齐\""}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"description = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"为给定问题生成修复方案。\""}]]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"prompt = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"请为这里描述的问题提供代码修复:{{args}}。\""}]]}]]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["模型接收到的内容是:",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"请为这里描述的问题提供代码修复:\"按钮未对齐\"。"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["B. 在 Shell 命令中使用参数(在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!{...}"}]," 块内)"]}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["当你在 shell 注入块(",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!{...}"}],")中使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}]," 时,参数会在替换前自动进行 ",["$","strong",null,{"children":"shell 转义"}],"。这使得你可以安全地将参数传递给 shell 命令,确保生成的命令语法正确且安全,同时防止命令注入漏洞。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["示例(",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/grep-code.toml"}],"):"]}]}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"prompt = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"请总结模式 `{{args}}` 的查找结果。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"搜索结果:"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"!{grep -r {{args}} .}"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]}]]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["当你运行 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/grep-code It's complicated"}]," 时:"]}],"\n",["$","ol",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":["CLI 检测到 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}]," 同时出现在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!{...}"}]," 块内外。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["块外:第一个 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}]," 被直接替换为 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"It's complicated"}],"。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["块内:第二个 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}]," 被替换为转义后的版本(例如在 Linux 上是 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"\"It's complicated\""}],")。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["实际执行的命令是 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"grep -r \"It's complicated\" ."}],"。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":"CLI 会提示你确认这个确切且安全的命令后再执行。"}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":"最终 prompt 被发送出去。"}],"\n"]}],"\n",["$","h5",null,{"id":"2-默认参数处理","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-lg","children":["2. 默认参数处理",["$","$L19",null,{"id":"2-默认参数处理"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["如果你的 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"prompt"}]," 中",["$","strong",null,{"children":"没有"}],"包含特殊占位符 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}],",CLI 会使用默认行为来处理参数。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["如果你为命令提供了参数(例如 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/mycommand arg1"}],"),CLI 会在 prompt 的末尾追加你输入的完整命令,中间用两个换行符分隔。这样可以让模型同时看到原始指令和你刚刚提供的具体参数。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["如果你",["$","strong",null,{"children":"没有"}],"提供任何参数(例如 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/mycommand"}],"),prompt 会原样发送给模型,不追加任何内容。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["示例 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"changelog.toml"}],"):"]}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"这个示例展示了如何通过为模型定义角色、说明在哪里找到用户输入以及指定预期格式和行为来创建一个健壮的命令。"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# In: <project>/.qwen/commands/changelog.toml"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# 调用方式:/changelog 1.2.0 added \"Support for default argument parsing.\""}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"description = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"向项目的 CHANGELOG.md 文件添加新条目。\""}]]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"prompt = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"# 任务:更新 Changelog"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"你是这个软件项目的专家维护者。用户调用了一个命令来向 changelog 添加新条目。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"**用户的原始命令会附加在你的指令下方。**"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"你的任务是从用户的输入中解析出 `<version>`、`<change_type>` 和 `<message>`,然后使用 `write_file` 工具正确更新 `CHANGELOG.md` 文件。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"## 预期格式"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"命令遵循以下格式:`/changelog <version> <type> <message>`"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"- `<type>` 必须是以下之一:\"added\"、\"changed\"、\"fixed\"、\"removed\"。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"## 行为"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"1. 读取 `CHANGELOG.md` 文件。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"2. 找到指定 `<version>` 的部分。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"3. 在正确的 `<type>` 标题下添加 `<message>`。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"4. 如果版本或类型部分不存在,则创建它。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"5. 严格遵循 \"Keep a Changelog\" 格式。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]}]]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["当你运行 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"/changelog 1.2.0 added \"New feature\""}]," 时,发送给模型的最终文本将是原始 prompt 后跟两个换行符和你输入的命令。"]}],"\n",["$","h5",null,{"id":"3-使用--执行-shell-命令","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-lg","children":[["3. 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!{...}"}]," 执行 Shell 命令"],["$","$L19",null,{"id":"3-使用--执行-shell-命令"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["你可以通过在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"prompt"}]," 中直接执行 shell 命令并注入其输出,使你的命令更加动态化。这种方式非常适合从本地环境中获取上下文信息,例如读取文件内容或检查 Git 状态。"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"当自定义命令尝试执行 shell 命令时,Qwen Code 现在会在继续执行前提示你进行确认。这是一项安全措施,确保只有预期的命令才能被执行。"}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":"工作原理:"}]}],"\n",["$","ol",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"注入命令:"}]," 使用 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"!{...}"}]," 语法。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"参数替换:"}]," 如果块内存在 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"{{args}}"}],",它会自动进行 shell 转义(参见上文的 ",["$","a",null,{"href":"#1-context-aware-injection-with-args","className":"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]","children":"上下文感知注入"}],")。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"健壮解析:"}]," 解析器能够正确处理包含嵌套大括号的复杂 shell 命令,例如包含 JSON 数据的命令。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"安全检查与确认:"}]," CLI 会对最终解析后的命令(即参数转义和替换后)执行安全检查。此时会弹出一个对话框,显示即将执行的确切命令。"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"执行与错误报告:"}]," 命令执行后,如果失败,注入到 prompt 中的输出将包含错误信息(stderr),并附带状态行,例如 ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"[Shell command exited with code 1]"}],"。这有助于模型理解失败的上下文。"]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["示例 (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git/commit.toml"}],"):"]}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"该命令获取暂存区的 git diff,并使用它来请求模型生成一条 commit message。"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# 位于:<project>/.qwen/commands/git/commit.toml"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# 调用方式:/git:commit"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"description = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"根据暂存的更改生成 Git commit message。\""}]]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# prompt 中使用 !{...} 来执行命令并注入其输出。"}]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"prompt = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"请根据以下 git diff 生成一条 Conventional Commit 格式的 commit message:"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"```diff"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"!{git diff --staged}"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"```"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"当你运行 `/git:commit` 时,CLI 会先执行 `git diff --staged`,然后将 `!{git diff --staged}` 替换为该命令的输出结果,最后将完整拼接好的 prompt 发送给模型。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"#### 示例:一个\"纯函数\"重构命令"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"让我们创建一个全局命令,用于要求模型重构一段代码。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"**1. 创建文件和目录:**"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"首先,确保用户命令目录存在,然后创建一个 `refactor` 子目录用于组织结构,以及最终的 TOML 文件。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```bash"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"mkdir -p ~/.qwen/commands/refactor"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"touch ~/.qwen/commands/refactor/pure.toml"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"**2. 向文件中添加内容:**"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"在你的编辑器中打开 `~/.qwen/commands/refactor/pure.toml` 并添加以下内容。我们包含了可选的 `description` 字段作为最佳实践。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```toml"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# In: ~/.qwen/commands/refactor/pure.toml"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"# 此命令将通过以下方式调用:/refactor:pure"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"description = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"要求模型将当前上下文重构为纯函数。\""}]]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"prompt = "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"请分析我在当前上下文中提供的代码。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"将其重构为纯函数。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"你的回复应包括:"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"1. 重构后的纯函数代码块。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"2. 简要说明你所做的关键更改以及为什么这些更改有助于实现纯函数。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"\"\""}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"**3. 运行命令:**"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"就是这样!你现在可以在 CLI 中运行你的命令了。首先,你可以将一个文件添加到上下文中,然后调用你的命令:"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"> @my-messy-function.js"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"> /refactor:pure"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"```"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"Qwen Code 将会执行你在 TOML 文件中定义的多行 prompt。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"## At 命令 (`@`)"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"At 命令用于将文件或目录的内容作为 prompt 的一部分发送给模型。这些命令支持 Git 感知过滤。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- **`@<文件或目录路径>`**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **说明:** 将指定文件或多个文件的内容注入到当前 prompt 中。适用于针对特定代码、文本或文件集合进行提问。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **示例:**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - `@path/to/your/file.txt Explain this text.`"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - `@src/my_project/ Summarize the code in this directory.`"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - `What is this file about? @README.md`"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **详细说明:**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 如果提供的是单个文件路径,则读取该文件的内容。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 如果提供的是目录路径,则尝试读取该目录及其子目录下的所有文件内容。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 路径中如果包含空格,需使用反斜杠转义(例如:`@My\\ Documents/file.txt`)。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 内部使用 `read_many_files` 工具实现。内容会被读取并插入到你的查询中,然后再发送给模型。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **Git 感知过滤:** 默认情况下,会排除被 Git 忽略的文件(如 `node_modules/`、`dist/`、`.env`、`.git/`)。可以通过 `fileFiltering` 设置更改此行为。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **文件类型:** 该命令主要适用于文本文件。虽然可能会尝试读取任何类型的文件,但二进制文件或非常大的文件可能会被底层的 `read_many_files` 工具跳过或截断,以确保性能和相关性。工具会提示哪些文件被跳过了。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **输出:** CLI 会显示一条工具调用消息,表明使用了 `read_many_files`,同时会显示处理状态和所涉及的路径信息。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- **`@`(单独的 @ 符号)**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **说明:** 如果你只输入了一个 `@` 符号而没有指定路径,query 会原样发送给模型。这在你 prompt 中明确讨论 `@` 符号本身时可能有用。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"### `@` 命令的错误处理"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- 如果 `@` 后面指定的路径未找到或无效,将显示错误消息,查询可能不会发送到模型,或者会发送但不包含文件内容。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- 如果 `read_many_files` 工具遇到错误(例如权限问题),也会报告此错误。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},"children":"## Shell 模式和透传命令 (`!`)"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"使用 `!` 前缀可以直接在 Qwen Code 中与系统 shell 进行交互。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- **`!<shell_command>`**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **说明:** 使用 `bash`(Linux/macOS)或 `cmd.exe`(Windows)执行指定的 `<shell_command>`。命令的任何输出或错误都会显示在终端中。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **示例:**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - `!ls -la`(执行 `ls -la` 并返回 Qwen Code)"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - `!git status`(执行 `git status` 并返回 Qwen Code)"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- **`!`(切换 Shell 模式)**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **说明:** 单独输入 `!` 可切换 Shell 模式。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **进入 Shell 模式:**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 激活后,Shell 模式会使用不同的颜色和“Shell 模式指示器”。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 在 Shell 模式下,你输入的文本将直接作为 shell 命令解释执行。"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - **退出 Shell 模式:**"}]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":" - 退出后,UI 将恢复为标准外观,Qwen Code 的正常行为也将恢复。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- **所有 `!` 使用注意事项:** 在 Shell 模式下执行的命令具有与你在终端中直接运行时相同的权限和影响。"}]}],"\n",["$","span",null,{"children":" "}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#B31D28","--shiki-light-font-style":"italic","--shiki-dark":"#FDAEB7","--shiki-dark-font-style":"italic"},"children":"- **环境变量:** 当通过 `!` 或 Shell 模式执行命令时,子进程中会设置 `QWEN_CODE=1` 环境变量。这允许脚本或工具检测它们是否从 CLI 中运行。"}]}]]}]]}]]}]]}]]}]]}]}]
|
||
9:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"CLI 命令 | "}],["$","meta","3",{"name":"description","content":"x"}],["$","meta","4",{"name":"msapplication-TileColor","content":"#fff"}],["$","meta","5",{"name":"apple-mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"Qwen Code"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","meta","8",{"property":"og:title","content":"CLI 命令 | "}],["$","meta","9",{"property":"og:description","content":"x"}],["$","meta","10",{"property":"og:image","content":"https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"}],["$","meta","11",{"name":"twitter:card","content":"summary"}],["$","meta","12",{"name":"twitter:site","content":"@qwenLLM"}],["$","meta","13",{"name":"twitter:title","content":"CLI 命令 | "}],["$","meta","14",{"name":"twitter:description","content":"x"}],["$","meta","15",{"name":"twitter:image","content":"https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"}]]
|
||
1:null
|