Files
2026-09-17 17:35:03 +00:00

584 lines
277 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" href="https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png"/><link rel="stylesheet" href="/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css" data-precedence="next"/><link rel="stylesheet" href="/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/qwen-code-docs/_next/static/chunks/webpack-6175f18c4ffcc31c.js"/><script src="/qwen-code-docs/_next/static/chunks/fd9d1056-c4d7023cbe01becc.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/2117-2a033efae9becbf0.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/main-app-96783a02d9726921.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/app/layout-38b548b4f4d27f80.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/c16f53c3-b998f97655e65347.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/1105-e07e82095c5c7b4a.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/5524-d228bcaedae4ecb3.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/2770-e894e62890be5e00.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js" async=""></script><meta name="theme-color" media="(prefers-color-scheme: light)" content="rgb(250,250,250)"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="rgb(17,17,17)"/><title>CLI 命令 | </title><meta name="description" content="x"/><meta name="msapplication-TileColor" content="#fff"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Qwen Code"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><meta property="og:title" content="CLI 命令 | "/><meta property="og:description" content="x"/><meta property="og:image" content="https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"/><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="@qwenLLM"/><meta name="twitter:title" content="CLI 命令 | "/><meta name="twitter:description" content="x"/><meta name="twitter:image" content="https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"/><style>:root {
--nextra-primary-hue: 248deg;
--nextra-primary-saturation: 74%;
--nextra-primary-lightness: 45%;
--nextra-bg: 250,250,250;
--nextra-content-width: 90rem;
}
.dark {
--nextra-primary-hue: 248deg;
--nextra-primary-saturation: 74%;
--nextra-primary-lightness: 55%;
--nextra-bg: 17,17,17;
}
::selection {
background: hsla(var(--nextra-primary-hue),var(--nextra-primary-saturation),var(--nextra-primary-lightness),.3);
}
html {
background: rgb(var(--nextra-bg));
}</style><script src="/qwen-code-docs/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><script>((e,i,s,n,l,r,d,h)=>{let t=document.documentElement,a=["light","dark"];function c(i){(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,n=s&&r?l.map(e=>r[e]||e):l;s?(t.classList.remove(...n),t.classList.add(r&&r[i]?r[i]:i)):t.setAttribute(e,i)}),h&&a.includes(i)&&(t.style.colorScheme=i)}if(n)c(n);else try{let e=localStorage.getItem(i)||s,n=d&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(n)}catch(e){}})("class","theme","light",null,["light","dark"],null,true,true)</script><a href="#nextra-skip-nav" class="nextra-skip-nav x:sr-only" type="button" data-headlessui-state="">Skip to Content</a><header class="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])~&amp;]:top-(--nextra-banner-height)"><div class="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"></div><nav style="height:var(--nextra-navbar-height)" class="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"><a class="x:flex x:items-center x:me-auto x:transition-opacity x:focus-visible:nextra-focus x:hover:opacity-75" aria-label="Home page" href="/qwen-code-docs/"><span class="ms-2 select-none font-extrabold flex items-center" title="Qwen Code: AI Coding Agent"><img src="https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png" alt="Qwen Code" width="32" height="32" class="inline-block align-middle mr-2 " style="vertical-align:middle"/><span class="text-[1.3rem] font-normal align-middle mr-1 max-md:hidden">Qwen</span><span class="text-[1.3rem] font-normal align-middle max-md:hidden">Code</span></span></a><div class="x:flex x:gap-4 x:overflow-x-auto nextra-scrollbar x:py-1.5 x:max-md:hidden"></div><div class="x:max-md:hidden"><div class="nextra-search x:relative x:flex x:items-center x:text-gray-900 x:dark:text-gray-300 x:contrast-more:text-gray-800 x:contrast-more:dark:text-gray-300"><input spellCheck="false" autoComplete="off" class="x:rounded-lg x:px-3 x:py-2 x:transition-all x:w-full x:md:w-64 x:text-base x:leading-tight x:md:text-sm x:bg-black/[.05] x:dark:bg-gray-50/10 x:placeholder:text-gray-600 x:dark:placeholder:text-gray-400 x:contrast-more:border x:contrast-more:border-current x:[&amp;::-webkit-search-cancel-button]:appearance-none" placeholder="Search documentation…" id="headlessui-combobox-input-:Rbdaf9ukq:" role="combobox" type="search" aria-expanded="false" aria-autocomplete="list" data-headlessui-state="" value=""/><kbd class="x:absolute x:my-1.5 x:select-none x:pointer-events-none x:end-1.5 x:transition-all x:h-5 x:rounded x:bg-nextra-bg x:px-1.5 x:font-mono x:text-[11px] x:font-medium x:text-gray-600 x:dark:text-gray-400 x:border nextra-border x:contrast-more:text-current x:items-center x:gap-1 x:flex x:max-sm:hidden not-prose x:invisible x:opacity-0">CTRL K</kbd></div></div><a href="https://github.com/QwenLM/qwen-code" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus"><svg fill="currentColor" viewBox="3 3 18 18" height="24" aria-label="Project repository"><path d="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 3Z"></path></svg></a><div class="flex items-center gap-2 px-3 py-1.5 text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 rounded-md"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe w-4 h-4" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><span>中文</span></div><button class="x:transition x:cursor-pointer nextra-hamburger x:md:hidden" aria-label="Menu" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" height="24" class=""><g><path d="M4 6h16"></path></g><path d="M4 12h16"></path><g><path d="M4 18h16"></path></g></svg></button></nav></header><aside class="nextra-mobile-nav x:flex x:flex-col x:fixed x:inset-0 x:pt-(--nextra-navbar-height) x:z-20 x:overscroll-contain x:[contain:layout_style] x:md:hidden x:[.nextra-banner:not([class$=hidden])~&amp;]:pt-[calc(var(--nextra-banner-height)+var(--nextra-navbar-height))] x:bg-nextra-bg x:[transform:translate3d(0,-100%,0)]"><div class="x:px-4 x:pt-4"><div class="nextra-search x:relative x:flex x:items-center x:text-gray-900 x:dark:text-gray-300 x:contrast-more:text-gray-800 x:contrast-more:dark:text-gray-300"><input spellCheck="false" autoComplete="off" class="x:rounded-lg x:px-3 x:py-2 x:transition-all x:w-full x:md:w-64 x:text-base x:leading-tight x:md:text-sm x:bg-black/[.05] x:dark:bg-gray-50/10 x:placeholder:text-gray-600 x:dark:placeholder:text-gray-400 x:contrast-more:border x:contrast-more:border-current x:[&amp;::-webkit-search-cancel-button]:appearance-none" placeholder="Search documentation…" id="headlessui-combobox-input-:R1dln9ukq:" role="combobox" type="search" aria-expanded="false" aria-autocomplete="list" data-headlessui-state="" value=""/><kbd class="x:absolute x:my-1.5 x:select-none x:pointer-events-none x:end-1.5 x:transition-all x:h-5 x:rounded x:bg-nextra-bg x:px-1.5 x:font-mono x:text-[11px] x:font-medium x:text-gray-600 x:dark:text-gray-400 x:border nextra-border x:contrast-more:text-current x:items-center x:gap-1 x:flex x:max-sm:hidden not-prose x:invisible x:opacity-0">CTRL K</kbd></div></div><ul class="x:grid x:gap-1 x:p-4 x:overflow-y-auto nextra-scrollbar nextra-mask"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/">欢迎阅读 Qwen Code 文档</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/deployment/">执行与部署</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/architecture/">架构概述</a></li><li class="open"><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/cli" type="button" data-headlessui-state="">CLI 使用指南<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180 x:ltr:rotate-90 x:rtl:-rotate-270"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-100" style="transition-duration:500ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/">CLI 概述</a></li><li class="active"><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:bg-primary-100 x:font-semibold x:text-primary-800 x:dark:bg-primary-400/10 x:dark:text-primary-600 x:contrast-more:border-primary-500!" href="/qwen-code-docs/zh/cli/commands/">命令参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/configuration/">配置指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/authentication/">认证设置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/openai-auth/">OpenAI 认证</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/token-caching/">Token 缓存</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/themes/">主题配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/tutorials/">使用教程</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/welcome-back/">欢迎回来功能</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/core" type="button" data-headlessui-state="">核心详情<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/">核心概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/tools-api/">工具 API</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/memport/">内存导入处理器</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/tools" type="button" data-headlessui-state="">工具集合<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/">工具概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/file-system/">文件系统工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/multi-file/">多文件读取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/shell/">Shell 工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-fetch/">Web 获取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-search/">Web 搜索工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/memory/">内存工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/todo-write/">Todo 写入工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/mcp-server/">MCP 服务器</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/checkpointing/">检查点功能</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/extension/">扩展开发</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/ide-integration/">IDE 集成</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/telemetry/">可观测性</a></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/examples" type="button" data-headlessui-state="">示例代码<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/examples/proxy-script/">代理脚本示例</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/npm/">包管理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/gemini-ignore/">忽略文件配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/integration-tests/">集成测试</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/keyboard-shortcuts/">快捷键参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/sandbox/">沙箱机制</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/issue-and-pr-automation/">自动化处理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/troubleshooting/">故障排除</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tos-privacy/">服务条款与隐私</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/Uninstall/">卸载指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/subagents/">Subagents</a></li></ul><div class="nextra-sidebar-footer x:border-t nextra-border x:flex x:items-center x:gap-2 x:py-4 x:mx-4 x:mt-auto"><button title="Change theme" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2 x:grow" id="headlessui-listbox-button-:R1mtn9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg fill="currentColor" viewBox="2 2 20 20" stroke="currentColor" height="12"><path stroke-linecap="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>Light</button><button title="Change language" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2 x:grow x:justify-end" id="headlessui-listbox-button-:R1ndn9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg viewBox="2 2 16 16" fill="currentColor" height="12"><path fill-rule="evenodd" d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z"></path></svg>中文</button></div></aside><div class="x:mx-auto x:flex x:max-w-(--nextra-content-width)"><aside id=":Rpuun9ukq:" class="nextra-sidebar x:print:hidden x:transition-all x:ease-in-out x:max-md:hidden x:flex x:flex-col x:h-[calc(100dvh-var(--nextra-navbar-height))] x:top-(--nextra-navbar-height) x:shrink-0 x:w-64 x:sticky"><div class="x:p-4 x:overflow-y-auto nextra-scrollbar nextra-mask x:grow"><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-100" style="transition-duration:500ms"><ul class="x:grid x:gap-1"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/">欢迎阅读 Qwen Code 文档</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/deployment/">执行与部署</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/architecture/">架构概述</a></li><li class="open"><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/cli" type="button" data-headlessui-state="">CLI 使用指南<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180 x:ltr:rotate-90 x:rtl:-rotate-270"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-100" style="transition-duration:500ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/">CLI 概述</a></li><li class="active"><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:bg-primary-100 x:font-semibold x:text-primary-800 x:dark:bg-primary-400/10 x:dark:text-primary-600 x:contrast-more:border-primary-500!" href="/qwen-code-docs/zh/cli/commands/">命令参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/configuration/">配置指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/authentication/">认证设置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/openai-auth/">OpenAI 认证</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/token-caching/">Token 缓存</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/themes/">主题配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/tutorials/">使用教程</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/welcome-back/">欢迎回来功能</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/core" type="button" data-headlessui-state="">核心详情<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/">核心概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/tools-api/">工具 API</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/memport/">内存导入处理器</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/tools" type="button" data-headlessui-state="">工具集合<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/">工具概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/file-system/">文件系统工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/multi-file/">多文件读取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/shell/">Shell 工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-fetch/">Web 获取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-search/">Web 搜索工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/memory/">内存工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/todo-write/">Todo 写入工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/mcp-server/">MCP 服务器</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/checkpointing/">检查点功能</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/extension/">扩展开发</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/ide-integration/">IDE 集成</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/telemetry/">可观测性</a></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/examples" type="button" data-headlessui-state="">示例代码<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[&quot;&quot;] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/examples/proxy-script/">代理脚本示例</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/npm/">包管理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/gemini-ignore/">忽略文件配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/integration-tests/">集成测试</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/keyboard-shortcuts/">快捷键参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/sandbox/">沙箱机制</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/issue-and-pr-automation/">自动化处理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/troubleshooting/">故障排除</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tos-privacy/">服务条款与隐私</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/Uninstall/">卸载指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/subagents/">Subagents</a></li></ul></div></div><div class="x:sticky x:bottom-0 x:bg-nextra-bg nextra-sidebar-footer x:border-t nextra-border x:flex x:items-center x:gap-2 x:py-4 x:mx-4"><button title="Change language" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2 x:grow" id="headlessui-listbox-button-:R6rapuun9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg viewBox="2 2 16 16" fill="currentColor" height="12"><path fill-rule="evenodd" d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z"></path></svg>中文</button><button title="Change theme" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2" id="headlessui-listbox-button-:R6tapuun9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg fill="currentColor" viewBox="2 2 20 20" stroke="currentColor" height="12"><path stroke-linecap="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg></button><button class="x:transition x:cursor-pointer x:rounded-md x:p-2 x:text-gray-600 x:dark:text-gray-400" aria-expanded="true" aria-controls=":Rpuun9ukq:" title="Collapse sidebar" type="button" data-headlessui-state=""><svg viewBox="0 0 16 16" fill="currentColor" height="12" class=""><path d="M4.177 7.823l2.396-2.396A.25.25 0 017 5.604v4.792a.25.25 0 01-.427.177L4.177 8.177a.25.25 0 010-.354z"></path><path fill-rule="evenodd" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0114.25 16H1.75A1.75 1.75 0 010 14.25V1.75zm1.75-.25a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25H9.5v-13H1.75zm12.5 13H11v-13h3.25a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25z"></path></svg></button></div></aside><nav class="nextra-toc x:order-last x:max-xl:hidden x:w-64 x:shrink-0 x:print:hidden" aria-label="table of contents"><div class="x:grid x:grid-rows-[min-content_1fr_min-content] x:sticky x:top-(--nextra-navbar-height) x:text-sm x:max-h-[calc(100vh-var(--nextra-navbar-height))]"><p class="x:pt-6 x:px-4 x:font-semibold x:tracking-tight">On This Page</p><ul class="x:p-4 nextra-scrollbar x:overscroll-y-contain x:overflow-y-auto x:hyphens-auto nextra-mask"><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#斜杠命令-" class="x:focus-visible:nextra-focus x:font-semibold x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">斜杠命令 (<code class="nextra-code" dir="ltr">/</code>)</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#内置命令" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">内置命令</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#自定义命令" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">自定义命令</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#文件位置与优先级" class="x:focus-visible:nextra-focus x:ms-6 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">文件位置与优先级</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#命名与命名空间" class="x:focus-visible:nextra-focus x:ms-6 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">命名与命名空间</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#toml-文件格式-v1" class="x:focus-visible:nextra-focus x:ms-6 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">TOML 文件格式 (v1)</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#必填字段" class="x:focus-visible:nextra-focus x:ms-9 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">必填字段</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#可选字段" class="x:focus-visible:nextra-focus x:ms-9 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">可选字段</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#处理参数" class="x:focus-visible:nextra-focus x:ms-6 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">处理参数</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#1-使用-args-的上下文感知注入" class="x:focus-visible:nextra-focus x:ms-9 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">1. 使用 <code class="nextra-code" dir="ltr">{{args}}</code> 的上下文感知注入</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#2-默认参数处理" class="x:focus-visible:nextra-focus x:ms-9 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">2. 默认参数处理</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#3-使用--执行-shell-命令" class="x:focus-visible:nextra-focus x:ms-9 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">3. 使用 <code class="nextra-code" dir="ltr">!{...}</code> 执行 Shell 命令</a></li></ul><div class="x:grid x:gap-2 x:py-4 x:mx-4 x:border-t nextra-border"><a href="https://github.com/QwenLM/qwen-code/issues/new?title=Feedback%20for%20%E2%80%9CCLI%20%E5%91%BD%E4%BB%A4%E2%80%9D&amp;labels=feedback" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-xs x:font-medium x:transition x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100">Question? Give us feedback<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a><a href="https://github.com/QwenLM/qwen-code/blob/main/docs/content/zh/cli/commands.md" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-xs x:font-medium x:transition x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100">Edit this page<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a><button class="x:transition x:cursor-pointer x:flex x:items-center x:gap-1.5 x:whitespace-nowrap x:opacity-0 x:text-xs x:font-medium x:transition x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100" aria-hidden="true" type="button" disabled="" data-headlessui-state="disabled" data-disabled="">Scroll to top<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="1.1em" class="x:-rotate-90 x:border x:rounded-full x:border-current"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button></div></div></nav><article class="x:w-full x:min-w-0 x:break-words x:min-h-[calc(100vh-var(--nextra-navbar-height))] x:text-slate-700 x:dark:text-slate-200 x:pb-8 x:px-4 x:pt-4 x:md:px-12"><div class="nextra-breadcrumb x:mt-1.5 x:flex x:items-center x:gap-1 x:overflow-hidden x:text-sm x:text-gray-600 x:dark:text-gray-400 x:contrast-more:text-current"><a class="x:whitespace-nowrap x:transition-colors x:min-w-6 x:overflow-hidden x:text-ellipsis x:focus-visible:nextra-focus x:ring-inset x:hover:text-gray-900 x:dark:hover:text-gray-100" title="CLI 使用指南" href="/qwen-code-docs/zh/cli/">CLI 使用指南</a><svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="14" class="x:shrink-0 x:rtl:rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="x:whitespace-nowrap x:transition-colors x:font-medium x:text-black x:dark:text-gray-100" title="命令参考">命令参考</span></div><div id="nextra-skip-nav"></div><main data-pagefind-body="true"><h1 class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-bold x:mt-2 x:text-4xl">CLI 命令</h1>
<p class="x:not-first:mt-[1.25em] x:leading-7">Qwen Code 支持多个内置命令,帮助你管理会话、自定义界面并控制其行为。这些命令以斜杠 (<code class="nextra-code" dir="ltr">/</code>)、@ 符号 (<code class="nextra-code" dir="ltr">@</code>) 或感叹号 (<code class="nextra-code" dir="ltr">!</code>) 作为前缀。</p>
<h2 id="斜杠命令-" class="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">斜杠命令 (<code class="nextra-code" dir="ltr">/</code>)<a href="#斜杠命令-" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2>
<p class="x:not-first:mt-[1.25em] x:leading-7">斜杠命令提供对 CLI 本身的元级别控制。</p>
<h3 id="内置命令" class="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">内置命令<a href="#内置命令" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/bug</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 提交一个关于 Qwen Code 的 issue。默认情况下,issue 会提交到 Qwen Code 的 GitHub 仓库中。你在 <code class="nextra-code" dir="ltr">/bug</code> 后输入的字符串将成为该 bug 的标题。你可以通过在 <code class="nextra-code" dir="ltr">.qwen/settings.json</code> 文件中配置 <code class="nextra-code" dir="ltr">bugCommand</code> 设置来修改 <code class="nextra-code" dir="ltr">/bug</code> 的默认行为。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/chat</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 交互式地保存和恢复对话历史,以便在不同分支对话状态之间切换,或在后续会话中恢复之前的对话状态。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">save</code></strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 保存当前对话历史。你必须添加一个 <code class="nextra-code" dir="ltr">&lt;tag&gt;</code> 来标识该对话状态。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/chat save &lt;tag&gt;</code></li>
<li class="x:my-[.5em]"><strong>检查点位置详情:</strong> 默认的聊天检查点保存位置为:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]">Linux/macOS: <code class="nextra-code" dir="ltr">~/.config/qwen-code/checkpoints/</code></li>
<li class="x:my-[.5em]">Windows: <code class="nextra-code" dir="ltr">C:\Users\&lt;YourUsername&gt;\AppData\Roaming\qwen-code\checkpoints\</code></li>
<li class="x:my-[.5em]">当你运行 <code class="nextra-code" dir="ltr">/chat list</code> 时,CLI 只会扫描这些特定目录以查找可用的检查点。</li>
<li class="x:my-[.5em]"><strong>注意:</strong> 这些检查点用于手动保存和恢复对话状态。如需了解在文件修改前自动创建的检查点,请参阅 <a class="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]" href="../checkpointing">Checkpointing documentation</a>。</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">resume</code></strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 从之前的保存点恢复对话。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/chat resume &lt;tag&gt;</code></li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">list</code></strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 列出可用于恢复对话状态的标签。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">delete</code></strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 删除已保存的对话检查点。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/chat delete &lt;tag&gt;</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/clear</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 清除终端屏幕,包括 CLI 中可见的会话历史和滚动缓冲区。底层会话数据(用于历史回溯)可能会根据具体实现保留,但视觉显示会被清除。</li>
<li class="x:my-[.5em]"><strong>快捷键:</strong> 随时按 <strong>Ctrl+L</strong> 执行清除操作。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/summary</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 根据当前对话历史生成一个全面的项目摘要,并保存到 <code class="nextra-code" dir="ltr">.qwen/PROJECT_SUMMARY.md</code>。该摘要包括总体目标、关键知识、最近操作和当前计划,非常适合在未来的会话中恢复工作。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/summary</code></li>
<li class="x:my-[.5em]"><strong>功能:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]">分析整个对话历史以提取重要上下文</li>
<li class="x:my-[.5em]">创建结构化的 markdown 摘要,包含目标、知识、操作和计划等部分</li>
<li class="x:my-[.5em]">自动保存到项目根目录下的 <code class="nextra-code" dir="ltr">.qwen/PROJECT_SUMMARY.md</code></li>
<li class="x:my-[.5em]">在生成和保存过程中显示进度指示器</li>
<li class="x:my-[.5em]">与 Welcome Back 功能集成,实现无缝会话恢复</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>注意:</strong> 此命令需要至少包含 2 条消息的活跃对话才能生成有意义的摘要。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/compress</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 用摘要替换整个聊天上下文。这可以节省未来任务使用的 token 数量,同时保留已发生事件的高级摘要。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/copy</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 将 Qwen Code 生成的最后一个输出复制到剪贴板,方便分享或重复使用。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/directory</code></strong>(或 <strong><code class="nextra-code" dir="ltr">/dir</code></strong>)</p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 管理工作区目录,支持多目录操作。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">add</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 将目录添加到工作区。路径可以是绝对路径或相对于当前工作目录的相对路径。也支持从主目录开始的路径引用。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/directory add &lt;path1&gt;,&lt;path2&gt;</code></li>
<li class="x:my-[.5em]"><strong>注意:</strong> 在限制性沙盒配置文件中禁用此功能。如果你正在使用该配置,请在启动会话时使用 <code class="nextra-code" dir="ltr">--include-directories</code> 参数。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">show</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示通过 <code class="nextra-code" dir="ltr">/directory add</code> 和 <code class="nextra-code" dir="ltr">--include-directories</code> 添加的所有目录。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/directory show</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/directory</code></strong>(或 <strong><code class="nextra-code" dir="ltr">/dir</code></strong>)</p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 管理工作区目录,支持多目录操作。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">add</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 将目录添加到工作区。路径可以是绝对路径或相对于当前工作目录的相对路径。也支持从主目录开始的路径引用。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/directory add &lt;path1&gt;,&lt;path2&gt;</code></li>
<li class="x:my-[.5em]"><strong>注意:</strong> 在限制性沙盒配置文件中禁用此功能。如果你正在使用该配置,请在启动会话时使用 <code class="nextra-code" dir="ltr">--include-directories</code> 参数。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">show</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示通过 <code class="nextra-code" dir="ltr">/directory add</code> 和 <code class="nextra-code" dir="ltr">--include-directories</code> 添加的所有目录。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/directory show</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/editor</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 打开一个对话框,用于选择支持的编辑器。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/extensions</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 列出当前 Qwen Code 会话中所有激活的扩展。详见 <a class="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]" href="../extension">Qwen Code Extensions</a>。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/help</code></strong>(或 <strong><code class="nextra-code" dir="ltr">/?</code></strong>)</p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示 Qwen Code 的帮助信息,包括可用命令及其用法。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/mcp</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 列出已配置的 Model Context Protocol (MCP) 服务器、其连接状态、服务器详情和可用工具。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">desc</code></strong> 或 <strong><code class="nextra-code" dir="ltr">descriptions</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示 MCP 服务器和工具的详细描述。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">nodesc</code></strong> 或 <strong><code class="nextra-code" dir="ltr">nodescriptions</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 隐藏工具描述,仅显示工具名称。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">schema</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示工具配置参数的完整 JSON schema。</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>快捷键:</strong> 随时按 <strong>Ctrl+T</strong> 在显示和隐藏工具描述之间切换。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/memory</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 管理 AI 的指令上下文(默认从 <code class="nextra-code" dir="ltr">QWEN.md</code> 文件加载的分层内存;可通过 <code class="nextra-code" dir="ltr">contextFileName</code> 配置)。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">add</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 将以下文本添加到 AI 的内存中。用法:<code class="nextra-code" dir="ltr">/memory add &lt;text to remember&gt;</code></li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">show</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示从所有上下文文件(如 <code class="nextra-code" dir="ltr">QWEN.md</code>)加载的当前分层内存的完整内容。这让你可以检查提供给模型的指令上下文。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">refresh</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 从配置位置(全局、项目/祖先目录和子目录)中找到的所有上下文文件(默认:<code class="nextra-code" dir="ltr">QWEN.md</code>)重新加载分层指令内存。这会用最新的上下文内容更新模型。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>注意:</strong> 有关上下文文件如何贡献于分层内存的更多详情,请参阅 <a class="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]" href="./configuration#context-files-hierarchical-instructional-context">CLI Configuration documentation</a>。</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/restore</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 将项目文件恢复到工具执行前的状态。这对于撤销工具进行的文件编辑特别有用。如果在没有工具调用 ID 的情况下运行,它将列出可恢复的检查点。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/restore [tool_call_id]</code></li>
<li class="x:my-[.5em]"><strong>注意:</strong> 仅在使用 <code class="nextra-code" dir="ltr">--checkpointing</code> 选项调用 CLI 或通过 <a class="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]" href="./configuration">settings</a> 配置时可用。详见 <a class="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]" href="../checkpointing">Checkpointing documentation</a>。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/settings</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 打开设置编辑器以查看和修改 Qwen Code 设置。</li>
<li class="x:my-[.5em]"><strong>详情:</strong> 此命令提供了一个用户友好的界面来更改控制 Qwen Code 行为和外观的设置。它等效于手动编辑 <code class="nextra-code" dir="ltr">.qwen/settings.json</code> 文件,但带有验证和指导以防止错误。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> 简单运行 <code class="nextra-code" dir="ltr">/settings</code>,编辑器将打开。然后你可以浏览或搜索特定设置,查看其当前值并按需修改。某些设置的更改会立即生效,而其他设置需要重启。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/stats</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示当前 Qwen Code 会话的详细统计信息,包括 token 使用量、缓存 token 节省量(如果可用)和会话持续时间。注意:缓存 token 信息仅在使用缓存 token 时显示,这在使用 API key 认证时发生,但目前在 OAuth 认证时不发生。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><a class="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]" href="./themes"><strong><code class="nextra-code" dir="ltr">/theme</code></strong></a></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 打开一个对话框,让你更改 Qwen Code 的视觉主题。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/auth</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 打开一个对话框,让你更改认证方法。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/about</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示版本信息。提交 issue 时请分享此信息。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/agents</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 管理专门用于特定任务的 AI 子代理。子代理是配置了特定专业知识和工具访问权限的独立 AI 助手。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">create</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 启动交互式向导以创建新的子代理。向导会引导你完成位置选择、AI 驱动的提示生成、工具选择和视觉定制。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/agents create</code></li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">manage</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 打开交互式管理对话框以查看、编辑和删除现有子代理。显示项目级和用户级代理。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/agents manage</code></li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>存储位置:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>项目级:</strong> <code class="nextra-code" dir="ltr">.qwen/agents/</code>(与团队共享,优先级更高)</li>
<li class="x:my-[.5em]"><strong>用户级:</strong> <code class="nextra-code" dir="ltr">~/.qwen/agents/</code>(个人代理,跨项目可用)</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>注意:</strong> 有关创建和管理子代理的详细信息,请参阅 <a class="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]" href="../subagents">Subagents documentation</a>。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><a class="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]" href="../tools/index"><strong><code class="nextra-code" dir="ltr">/tools</code></strong></a></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示当前在 Qwen Code 中可用的工具列表。</li>
<li class="x:my-[.5em]"><strong>子命令:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">desc</code></strong> 或 <strong><code class="nextra-code" dir="ltr">descriptions</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示每个工具的详细描述,包括提供给模型的每个工具的名称及其完整描述。</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong><code class="nextra-code" dir="ltr">nodesc</code></strong> 或 <strong><code class="nextra-code" dir="ltr">nodescriptions</code></strong>:
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 隐藏工具描述,仅显示工具名称。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/privacy</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 显示隐私声明,并允许用户选择是否同意收集其数据以改进服务。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/quit-confirm</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 退出 Qwen Code 前显示确认对话框,让你选择如何处理当前会话。</li>
<li class="x:my-[.5em]"><strong>用法:</strong> <code class="nextra-code" dir="ltr">/quit-confirm</code></li>
<li class="x:my-[.5em]"><strong>功能:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>立即退出:</strong> 不保存任何内容直接退出(等效于 <code class="nextra-code" dir="ltr">/quit</code>)</li>
<li class="x:my-[.5em]"><strong>生成摘要并退出:</strong> 使用 <code class="nextra-code" dir="ltr">/summary</code> 创建项目摘要后退出</li>
<li class="x:my-[.5em]"><strong>保存对话并退出:</strong> 使用自动生成的标签保存当前对话后退出</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>快捷键:</strong> 连续按两次 <strong>Ctrl+C</strong> 触发退出确认对话框</li>
<li class="x:my-[.5em]"><strong>注意:</strong> 此命令在你按一次 Ctrl+C 时自动触发,提供防止意外退出的安全机制。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/quit</code></strong>(或 <strong><code class="nextra-code" dir="ltr">/exit</code></strong>)</p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 立即退出 Qwen Code,不显示任何确认对话框。</li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/vim</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 切换 vim 模式开/关。启用 vim 模式时,输入区域在 NORMAL 和 INSERT 模式下都支持 vim 风格的导航和编辑命令。</li>
<li class="x:my-[.5em]"><strong>功能:</strong>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>NORMAL 模式:</strong> 使用 <code class="nextra-code" dir="ltr">h</code>, <code class="nextra-code" dir="ltr">j</code>, <code class="nextra-code" dir="ltr">k</code>, <code class="nextra-code" dir="ltr">l</code> 导航;使用 <code class="nextra-code" dir="ltr">w</code>, <code class="nextra-code" dir="ltr">b</code>, <code class="nextra-code" dir="ltr">e</code> 按单词跳转;使用 <code class="nextra-code" dir="ltr">0</code>, <code class="nextra-code" dir="ltr">$</code>, <code class="nextra-code" dir="ltr">^</code> 跳转到行首/行尾;使用 <code class="nextra-code" dir="ltr">G</code>(或 <code class="nextra-code" dir="ltr">gg</code> 跳转到第一行)跳转到特定行</li>
<li class="x:my-[.5em]"><strong>INSERT 模式:</strong> 标准文本输入,按 Esc 返回 NORMAL 模式</li>
<li class="x:my-[.5em]"><strong>编辑命令:</strong> 使用 <code class="nextra-code" dir="ltr">x</code> 删除,使用 <code class="nextra-code" dir="ltr">c</code> 更改,使用 <code class="nextra-code" dir="ltr">i</code>, <code class="nextra-code" dir="ltr">a</code>, <code class="nextra-code" dir="ltr">o</code>, <code class="nextra-code" dir="ltr">O</code> 插入;复杂操作如 <code class="nextra-code" dir="ltr">dd</code>, <code class="nextra-code" dir="ltr">cc</code>, <code class="nextra-code" dir="ltr">dw</code>, <code class="nextra-code" dir="ltr">cw</code></li>
<li class="x:my-[.5em]"><strong>计数支持:</strong> 在命令前加数字前缀(如 <code class="nextra-code" dir="ltr">3h</code>, <code class="nextra-code" dir="ltr">5w</code>, <code class="nextra-code" dir="ltr">10G</code>)</li>
<li class="x:my-[.5em]"><strong>重复最后命令:</strong> 使用 <code class="nextra-code" dir="ltr">.</code> 重复最后的编辑操作</li>
<li class="x:my-[.5em]"><strong>持久设置:</strong> Vim 模式偏好设置保存到 <code class="nextra-code" dir="ltr">~/.qwen/settings.json</code> 并在会话间恢复</li>
</ul>
</li>
<li class="x:my-[.5em]"><strong>状态指示器:</strong> 启用时在页脚显示 <code class="nextra-code" dir="ltr">[NORMAL]</code> 或 <code class="nextra-code" dir="ltr">[INSERT]</code></li>
</ul>
</li>
<li class="x:my-[.5em]">
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong><code class="nextra-code" dir="ltr">/init</code></strong></p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><strong>描述:</strong> 分析当前目录并创建一个 <code class="nextra-code" dir="ltr">QWEN.md</code> 上下文文件(或由 <code class="nextra-code" dir="ltr">contextFileName</code> 指定的文件名)。如果已存在非空文件,则不进行任何更改。该命令会初始化一个空文件并提示模型用项目特定的指令填充它。</li>
</ul>
</li>
</ul>
<h3 id="自定义命令" class="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">自定义命令<a href="#自定义命令" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
<p class="x:not-first:mt-[1.25em] x:leading-7">快速入门,请参见下方的<a href="#example-a-pure-function-refactoring-command" class="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]">示例</a>。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7">自定义命令允许你将最常用或最喜欢的 prompt 保存为 Qwen Code 中的个人快捷方式。你可以创建仅适用于单个项目的命令,也可以创建在所有项目中全局可用的命令,从而简化工作流程并确保一致性。</p>
<h4 id="文件位置与优先级" class="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">文件位置与优先级<a href="#文件位置与优先级" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4>
<p class="x:not-first:mt-[1.25em] x:leading-7">Qwen Code 从两个位置发现命令,按特定顺序加载:</p>
<ol class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6">
<li class="x:my-[.5em]"><strong>用户命令(全局):</strong> 位于 <code class="nextra-code" dir="ltr">~/.qwen/commands/</code>。这些命令在你正在处理的任何项目中都可用。</li>
<li class="x:my-[.5em]"><strong>项目命令(本地):</strong> 位于 <code class="nextra-code" dir="ltr">&lt;your-project-root&gt;/.qwen/commands/</code>。这些命令特定于当前项目,可以纳入版本控制并与团队共享。</li>
</ol>
<p class="x:not-first:mt-[1.25em] x:leading-7">如果项目目录中的命令与用户目录中的命令同名,则<strong>始终使用项目命令</strong>。这允许项目使用特定于项目的版本覆盖全局命令。</p>
<h4 id="命名与命名空间" class="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">命名与命名空间<a href="#命名与命名空间" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4>
<p class="x:not-first:mt-[1.25em] x:leading-7">命令的名称由其相对于 <code class="nextra-code" dir="ltr">commands</code> 目录的文件路径决定。子目录用于创建带命名空间的命令,路径分隔符(<code class="nextra-code" dir="ltr">/</code> 或 <code class="nextra-code" dir="ltr">\</code>)会被转换为冒号(<code class="nextra-code" dir="ltr">:</code>)。</p>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]">位于 <code class="nextra-code" dir="ltr">~/.qwen/commands/test.toml</code> 的文件会成为命令 <code class="nextra-code" dir="ltr">/test</code>。</li>
<li class="x:my-[.5em]">位于 <code class="nextra-code" dir="ltr">&lt;project&gt;/.qwen/commands/git/commit.toml</code> 的文件会成为带命名空间的命令 <code class="nextra-code" dir="ltr">/git:commit</code>。</li>
</ul>
<h4 id="toml-文件格式-v1" class="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">TOML 文件格式 (v1)<a href="#toml-文件格式-v1" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4>
<p class="x:not-first:mt-[1.25em] x:leading-7">你的命令定义文件必须使用 TOML 格式编写,并使用 <code class="nextra-code" dir="ltr">.toml</code> 文件扩展名。</p>
<h5 id="必填字段" class="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">必填字段<a href="#必填字段" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">prompt</code> (String):命令执行时发送给模型的 prompt。可以是单行或多行字符串。</li>
</ul>
<h5 id="可选字段" class="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">可选字段<a href="#可选字段" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5>
<ul class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">description</code> (String):命令功能的简短一行描述。这段文字会显示在 <code class="nextra-code" dir="ltr">/help</code> 菜单中你的命令旁边。<strong>如果你省略此字段,系统会根据文件名自动生成一个通用描述。</strong></li>
</ul>
<h4 id="处理参数" class="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">处理参数<a href="#处理参数" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h4>
<p class="x:not-first:mt-[1.25em] x:leading-7">自定义命令支持两种强大的参数处理方法。CLI 会根据你的命令 <code class="nextra-code" dir="ltr">prompt</code> 内容自动选择正确的方法。</p>
<h5 id="1-使用-args-的上下文感知注入" class="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">1. 使用 <code class="nextra-code" dir="ltr">{{args}}</code> 的上下文感知注入<a href="#1-使用-args-的上下文感知注入" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5>
<p class="x:not-first:mt-[1.25em] x:leading-7">如果你的 <code class="nextra-code" dir="ltr">prompt</code> 包含特殊占位符 <code class="nextra-code" dir="ltr">{{args}}</code>,CLI 会将该占位符替换为用户在命令名后输入的文本。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7">这种注入的行为取决于它被使用的位置:</p>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>A. 原始注入(在 Shell 命令外部)</strong></p>
<p class="x:not-first:mt-[1.25em] x:leading-7">当在 prompt 的主体中使用时,参数会按用户输入的原样注入。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>示例 (<code class="nextra-code" dir="ltr">git/fix.toml</code>):</strong></p>
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="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"><div class="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"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path 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"></path></svg></button></div><code class="nextra-code" dir="ltr"><span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 调用方式:/git:fix &quot;按钮未对齐&quot;</span></span>
<span> </span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">description = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;为给定问题生成修复方案。&quot;</span></span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">prompt = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;请为这里描述的问题提供代码修复:{{args}}。&quot;</span></span></code></pre></div>
<p class="x:not-first:mt-[1.25em] x:leading-7">模型接收到的内容是:<code class="nextra-code" dir="ltr">请为这里描述的问题提供代码修复:&quot;按钮未对齐&quot;。</code></p>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>B. 在 Shell 命令中使用参数(在 <code class="nextra-code" dir="ltr">!{...}</code> 块内)</strong></p>
<p class="x:not-first:mt-[1.25em] x:leading-7">当你在 shell 注入块(<code class="nextra-code" dir="ltr">!{...}</code>)中使用 <code class="nextra-code" dir="ltr">{{args}}</code> 时,参数会在替换前自动进行 <strong>shell 转义</strong>。这使得你可以安全地将参数传递给 shell 命令,确保生成的命令语法正确且安全,同时防止命令注入漏洞。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>示例(<code class="nextra-code" dir="ltr">/grep-code.toml</code>):</strong></p>
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="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"><div class="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"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path 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"></path></svg></button></div><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">prompt = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">请总结模式 `{{args}}` 的查找结果。</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">搜索结果:</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">!{grep -r {{args}} .}</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span></code></pre></div>
<p class="x:not-first:mt-[1.25em] x:leading-7">当你运行 <code class="nextra-code" dir="ltr">/grep-code It&#x27;s complicated</code> 时:</p>
<ol class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6">
<li class="x:my-[.5em]">CLI 检测到 <code class="nextra-code" dir="ltr">{{args}}</code> 同时出现在 <code class="nextra-code" dir="ltr">!{...}</code> 块内外。</li>
<li class="x:my-[.5em]">块外:第一个 <code class="nextra-code" dir="ltr">{{args}}</code> 被直接替换为 <code class="nextra-code" dir="ltr">It&#x27;s complicated</code>。</li>
<li class="x:my-[.5em]">块内:第二个 <code class="nextra-code" dir="ltr">{{args}}</code> 被替换为转义后的版本(例如在 Linux 上是 <code class="nextra-code" dir="ltr">&quot;It&#x27;s complicated&quot;</code>)。</li>
<li class="x:my-[.5em]">实际执行的命令是 <code class="nextra-code" dir="ltr">grep -r &quot;It&#x27;s complicated&quot; .</code>。</li>
<li class="x:my-[.5em]">CLI 会提示你确认这个确切且安全的命令后再执行。</li>
<li class="x:my-[.5em]">最终 prompt 被发送出去。</li>
</ol>
<h5 id="2-默认参数处理" class="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">2. 默认参数处理<a href="#2-默认参数处理" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5>
<p class="x:not-first:mt-[1.25em] x:leading-7">如果你的 <code class="nextra-code" dir="ltr">prompt</code> 中<strong>没有</strong>包含特殊占位符 <code class="nextra-code" dir="ltr">{{args}}</code>,CLI 会使用默认行为来处理参数。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7">如果你为命令提供了参数(例如 <code class="nextra-code" dir="ltr">/mycommand arg1</code>),CLI 会在 prompt 的末尾追加你输入的完整命令,中间用两个换行符分隔。这样可以让模型同时看到原始指令和你刚刚提供的具体参数。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7">如果你<strong>没有</strong>提供任何参数(例如 <code class="nextra-code" dir="ltr">/mycommand</code>),prompt 会原样发送给模型,不追加任何内容。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>示例 (<code class="nextra-code" dir="ltr">changelog.toml</code>):</strong></p>
<p class="x:not-first:mt-[1.25em] x:leading-7">这个示例展示了如何通过为模型定义角色、说明在哪里找到用户输入以及指定预期格式和行为来创建一个健壮的命令。</p>
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="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"><div class="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"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path 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"></path></svg></button></div><code class="nextra-code" dir="ltr"><span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># In: &lt;project&gt;/.qwen/commands/changelog.toml</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 调用方式:/changelog 1.2.0 added &quot;Support for default argument parsing.&quot;</span></span>
<span> </span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">description = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;向项目的 CHANGELOG.md 文件添加新条目。&quot;</span></span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">prompt = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"># 任务:更新 Changelog</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">你是这个软件项目的专家维护者。用户调用了一个命令来向 changelog 添加新条目。</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">**用户的原始命令会附加在你的指令下方。**</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">你的任务是从用户的输入中解析出 `&lt;version&gt;`、`&lt;change_type&gt;` 和 `&lt;message&gt;`,然后使用 `write_file` 工具正确更新 `CHANGELOG.md` 文件。</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">## 预期格式</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">命令遵循以下格式:`/changelog &lt;version&gt; &lt;type&gt; &lt;message&gt;`</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">- `&lt;type&gt;` 必须是以下之一:&quot;added&quot;、&quot;changed&quot;、&quot;fixed&quot;、&quot;removed&quot;。</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">## 行为</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">1. 读取 `CHANGELOG.md` 文件。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">2. 找到指定 `&lt;version&gt;` 的部分。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">3. 在正确的 `&lt;type&gt;` 标题下添加 `&lt;message&gt;`。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">4. 如果版本或类型部分不存在,则创建它。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">5. 严格遵循 &quot;Keep a Changelog&quot; 格式。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span></code></pre></div>
<p class="x:not-first:mt-[1.25em] x:leading-7">当你运行 <code class="nextra-code" dir="ltr">/changelog 1.2.0 added &quot;New feature&quot;</code> 时,发送给模型的最终文本将是原始 prompt 后跟两个换行符和你输入的命令。</p>
<h5 id="3-使用--执行-shell-命令" class="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">3. 使用 <code class="nextra-code" dir="ltr">!{...}</code> 执行 Shell 命令<a href="#3-使用--执行-shell-命令" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h5>
<p class="x:not-first:mt-[1.25em] x:leading-7">你可以通过在 <code class="nextra-code" dir="ltr">prompt</code> 中直接执行 shell 命令并注入其输出,使你的命令更加动态化。这种方式非常适合从本地环境中获取上下文信息,例如读取文件内容或检查 Git 状态。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7">当自定义命令尝试执行 shell 命令时,Qwen Code 现在会在继续执行前提示你进行确认。这是一项安全措施,确保只有预期的命令才能被执行。</p>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>工作原理:</strong></p>
<ol class="x:[:is(ol,ul)_&amp;]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6">
<li class="x:my-[.5em]"><strong>注入命令:</strong> 使用 <code class="nextra-code" dir="ltr">!{...}</code> 语法。</li>
<li class="x:my-[.5em]"><strong>参数替换:</strong> 如果块内存在 <code class="nextra-code" dir="ltr">{{args}}</code>,它会自动进行 shell 转义(参见上文的 <a href="#1-context-aware-injection-with-args" class="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]">上下文感知注入</a>)。</li>
<li class="x:my-[.5em]"><strong>健壮解析:</strong> 解析器能够正确处理包含嵌套大括号的复杂 shell 命令,例如包含 JSON 数据的命令。</li>
<li class="x:my-[.5em]"><strong>安全检查与确认:</strong> CLI 会对最终解析后的命令(即参数转义和替换后)执行安全检查。此时会弹出一个对话框,显示即将执行的确切命令。</li>
<li class="x:my-[.5em]"><strong>执行与错误报告:</strong> 命令执行后,如果失败,注入到 prompt 中的输出将包含错误信息(stderr),并附带状态行,例如 <code class="nextra-code" dir="ltr">[Shell command exited with code 1]</code>。这有助于模型理解失败的上下文。</li>
</ol>
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>示例 (<code class="nextra-code" dir="ltr">git/commit.toml</code>):</strong></p>
<p class="x:not-first:mt-[1.25em] x:leading-7">该命令获取暂存区的 git diff,并使用它来请求模型生成一条 commit message。</p>
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="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"><div class="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"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path 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"></path></svg></button></div><code class="nextra-code" dir="ltr"><span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 位于:&lt;project&gt;/.qwen/commands/git/commit.toml</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 调用方式:/git:commit</span></span>
<span> </span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">description = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;根据暂存的更改生成 Git commit message。&quot;</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># prompt 中使用 !{...} 来执行命令并注入其输出。</span></span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">prompt = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">请根据以下 git diff 生成一条 Conventional Commit 格式的 commit message:</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">```diff</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">!{git diff --staged}</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">```</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">当你运行 `/git:commit` 时,CLI 会先执行 `git diff --staged`,然后将 `!{git diff --staged}` 替换为该命令的输出结果,最后将完整拼接好的 prompt 发送给模型。</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D">#### 示例:一个&quot;纯函数&quot;重构命令</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">让我们创建一个全局命令,用于要求模型重构一段代码。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">**1. 创建文件和目录:**</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">首先,确保用户命令目录存在,然后创建一个 `refactor` 子目录用于组织结构,以及最终的 TOML 文件。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```bash</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">mkdir -p ~/.qwen/commands/refactor</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">touch ~/.qwen/commands/refactor/pure.toml</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">**2. 向文件中添加内容:**</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">在你的编辑器中打开 `~/.qwen/commands/refactor/pure.toml` 并添加以下内容。我们包含了可选的 `description` 字段作为最佳实践。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```toml</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># In: ~/.qwen/commands/refactor/pure.toml</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 此命令将通过以下方式调用:/refactor:pure</span></span>
<span> </span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">description = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;要求模型将当前上下文重构为纯函数。&quot;</span></span>
<span> </span>
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">prompt = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">请分析我在当前上下文中提供的代码。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">将其重构为纯函数。</span></span>
<span> </span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">你的回复应包括:</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">1. 重构后的纯函数代码块。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">2. 简要说明你所做的关键更改以及为什么这些更改有助于实现纯函数。</span></span>
<span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">&quot;&quot;&quot;</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">**3. 运行命令:**</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">就是这样!你现在可以在 CLI 中运行你的命令了。首先,你可以将一个文件添加到上下文中,然后调用你的命令:</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">&gt; @my-messy-function.js</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">&gt; /refactor:pure</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">```</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">Qwen Code 将会执行你在 TOML 文件中定义的多行 prompt。</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D">## At 命令 (`@`)</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">At 命令用于将文件或目录的内容作为 prompt 的一部分发送给模型。这些命令支持 Git 感知过滤。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- **`@&lt;文件或目录路径&gt;`**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **说明:** 将指定文件或多个文件的内容注入到当前 prompt 中。适用于针对特定代码、文本或文件集合进行提问。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **示例:**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - `@path/to/your/file.txt Explain this text.`</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - `@src/my_project/ Summarize the code in this directory.`</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - `What is this file about? @README.md`</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **详细说明:**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 如果提供的是单个文件路径,则读取该文件的内容。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 如果提供的是目录路径,则尝试读取该目录及其子目录下的所有文件内容。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 路径中如果包含空格,需使用反斜杠转义(例如:`@My\ Documents/file.txt`)。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 内部使用 `read_many_files` 工具实现。内容会被读取并插入到你的查询中,然后再发送给模型。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **Git 感知过滤:** 默认情况下,会排除被 Git 忽略的文件(如 `node_modules/`、`dist/`、`.env`、`.git/`)。可以通过 `fileFiltering` 设置更改此行为。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **文件类型:** 该命令主要适用于文本文件。虽然可能会尝试读取任何类型的文件,但二进制文件或非常大的文件可能会被底层的 `read_many_files` 工具跳过或截断,以确保性能和相关性。工具会提示哪些文件被跳过了。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **输出:** CLI 会显示一条工具调用消息,表明使用了 `read_many_files`,同时会显示处理状态和所涉及的路径信息。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- **`@`(单独的 @ 符号)**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **说明:** 如果你只输入了一个 `@` 符号而没有指定路径,query 会原样发送给模型。这在你 prompt 中明确讨论 `@` 符号本身时可能有用。</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D">### `@` 命令的错误处理</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- 如果 `@` 后面指定的路径未找到或无效,将显示错误消息,查询可能不会发送到模型,或者会发送但不包含文件内容。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- 如果 `read_many_files` 工具遇到错误(例如权限问题),也会报告此错误。</span></span>
<span> </span>
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D">## Shell 模式和透传命令 (`!`)</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">使用 `!` 前缀可以直接在 Qwen Code 中与系统 shell 进行交互。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- **`!&lt;shell_command&gt;`**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **说明:** 使用 `bash`(Linux/macOS)或 `cmd.exe`(Windows)执行指定的 `&lt;shell_command&gt;`。命令的任何输出或错误都会显示在终端中。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **示例:**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - `!ls -la`(执行 `ls -la` 并返回 Qwen Code)</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - `!git status`(执行 `git status` 并返回 Qwen Code)</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- **`!`(切换 Shell 模式)**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **说明:** 单独输入 `!` 可切换 Shell 模式。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **进入 Shell 模式:**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 激活后,Shell 模式会使用不同的颜色和“Shell 模式指示器”。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 在 Shell 模式下,你输入的文本将直接作为 shell 命令解释执行。</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - **退出 Shell 模式:**</span></span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic"> - 退出后,UI 将恢复为标准外观,Qwen Code 的正常行为也将恢复。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- **所有 `!` 使用注意事项:** 在 Shell 模式下执行的命令具有与你在终端中直接运行时相同的权限和影响。</span></span>
<span> </span>
<span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic">- **环境变量:** 当通过 `!` 或 Shell 模式执行命令时,子进程中会设置 `QWEN_CODE=1` 环境变量。这允许脚本或工具检测它们是否从 CLI 中运行。</span></span></code></pre></div></main><div class="x:mt-12 x:mb-8 x:text-xs x:text-gray-600 x:text-end x:dark:text-gray-400">Last updated on<!-- --> <time dateTime="2026-09-17T17:32:34.000Z">2026年9月17日</time></div><div class="x:mb-8 x:flex x:items-center x:border-t x:pt-8 nextra-border x:print:hidden"><a title="CLI 概述" class="x:focus-visible:nextra-focus x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100 x:flex x:max-w-[50%] x:items-center x:gap-1 x:py-4 x:text-base x:font-medium x:transition-colors x:[word-break:break-word] x:md:text-lg x:pe-4" href="/qwen-code-docs/zh/cli/"><svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="20" class="x:inline x:shrink-0 x:ltr:rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg>CLI 概述</a><a title="配置指南" class="x:focus-visible:nextra-focus x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100 x:flex x:max-w-[50%] x:items-center x:gap-1 x:py-4 x:text-base x:font-medium x:transition-colors x:[word-break:break-word] x:md:text-lg x:ps-4 x:ms-auto x:text-end" href="/qwen-code-docs/zh/cli/configuration/">配置指南<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="20" class="x:inline x:shrink-0 x:rtl:rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></a></div></article></div><script src="/qwen-code-docs/_next/static/chunks/webpack-6175f18c4ffcc31c.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css\",\"style\"]\n2:HL[\"/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n6:I[4707,[],\"\"]\n9:I[36423,[],\"\"]\nb:I[78400,[\"3185\",\"static/chunks/app/layout-38b548b4f4d27f80.js\"],\"FontLoader\"]\nd:I[61060,[],\"\"]\n7:[\"lang\",\"zh\",\"d\"]\n8:[\"mdxPath\",\"cli/commands\",\"oc\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"0y8u-WGJo2VFWAF7bkrdx\",\"assetPrefix\":\"/qwen-code-docs\",\"urlParts\":[\"\",\"zh\",\"cli\",\"commands\",\"\"],\"initialTree\":[\"\",{\"children\":[[\"lang\",\"zh\",\"d\"],{\"children\":[[\"mdxPath\",\"cli/commands\",\"oc\"],{\"children\":[\"__PAGE__?{\\\"lang\\\":\\\"zh\\\",\\\"mdxPath\\\":[\\\"cli\\\",\\\"commands\\\"]}\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[[\"lang\",\"zh\",\"d\"],{\"children\":[[\"mdxPath\",\"cli/commands\",\"oc\"],{\"children\":[\"__PAGE__\",{},[[\"$L4\",\"$L5\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$7\",\"children\",\"$8\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,\"$La\"],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\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",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],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]\n"])</script><script>self.__next_f.push([1,"f: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\"]\n10: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\"]\n11: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\"]\n12: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\"]\n13: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\"]\n14: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\"]\n15: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\"],\"\"]\n16:I[88212,[\"5501\",\"static/ch"])</script><script>self.__next_f.push([1,"unks/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\"]\n18: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\"]\n19: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\"]\n1a: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\"]\n1b:\"$Sreact.fragment\"\n1c: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\"]\n1d: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\"]\n1e: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\"]\n1f:I[98451,[\"5501\",\"static/c"])</script><script>self.__next_f.push([1,"hunks/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\"]\n17: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 3Z"])</script><script>self.__next_f.push([1,"a:[\"$\",\"$Lf\",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\":[\"$\",\"$L10\",null,{}],\"navigation\":{\"next\":true,\"prev\":true},\"search\":[\"$\",\"$L11\",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\":[\"$\",\"$L12\",null,{\"attribute\":\"class\",\"defaultTheme\":\"light\",\"disableTransitionOnChange\":true,\"storageKey\":\"theme\",\"children\":[[\"$\",\"$L13\",null,{}],\"$undefined\",[\"$\",\"$L14\",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])~\u0026]: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\":[[\"$\",\"$L15\",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\"}]]}]}],[\"$\",\"$L16\",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\":\"$17\"}]}],false],\"className\":\"x:focus-visible:nextra-focus\"}],\"$undefined\",[\"$\",\"$L18\",null,{\"currentLang\":\"zh\"}]]}]]}]]}],\"footer\":null,\"children\":[[\"$\",\"$L19\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$7\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]]}]]}]}]\n"])</script><script>self.__next_f.push([1,"5:[\"$\",\"div\",null,{\"className\":\"x:mx-auto x:flex x:max-w-(--nextra-content-width)\",\"sourceCode\":\"$undefined\",\"children\":[\"$\",\"$L1a\",null,{\"value\":[{\"value\":[[\"$\",\"$1b\",\".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\":[[\"$\",\"$1b\",\".0\",{\"children\":[\"1. 使用 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"{{args}}\"}],\" 的上下文感知注入\"]}]],\"id\":\"1-使用-args-的上下文感知注入\",\"depth\":5},{\"value\":\"2. 默认参数处理\",\"id\":\"2-默认参数处理\",\"depth\":5},{\"value\":[[\"$\",\"$1b\",\".0\",{\"children\":[\"3. 使用 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"!{...}\"}],\" 执行 Shell 命令\"]}]],\"id\":\"3-使用--执行-shell-命令\",\"depth\":5}],\"children\":[[\"$\",\"$L1c\",null,{}],[\"$\",\"$L1d\",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\":\"/\"}],\")\"],[\"$\",\"$L1e\",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\":[\"内置命令\",[\"$\",\"$L1e\",null,{\"id\":\"内置命令\"}]]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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\":\"\u003ctag\u003e\"}],\" 来标识该对话状态。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"用法:\"}],\" \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"/chat save \u003ctag\u003e\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"检查点位置详情:\"}],\" 默认的聊天检查点保存位置为:\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]: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\\\\\u003cYourUsername\u003e\\\\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\":\"注意:\"}],\" 这些检查点用于手动保存和恢复对话状态。如需了解在文件修改前自动创建的检查点,请参阅 \",[\"$\",\"$L15\",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)_\u0026]: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 \u003ctag\u003e\"}]]}],\"\\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)_\u0026]: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)_\u0026]: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 \u003ctag\u003e\"}]]}],\"\\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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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 \u003cpath1\u003e,\u003cpath2\u003e\"}]]}],\"\\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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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 \u003cpath1\u003e,\u003cpath2\u003e\"}]]}],\"\\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)_\u0026]: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)_\u0026]: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)_\u0026]: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 会话中所有激活的扩展。详见 \",[\"$\",\"$L15\",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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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 \u003ctext to remember\u003e\"}]]}],\"\\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)_\u0026]: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)_\u0026]: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\":\"注意:\"}],\" 有关上下文文件如何贡献于分层内存的更多详情,请参阅 \",[\"$\",\"$L15\",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)_\u0026]: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 或通过 \",[\"$\",\"$L15\",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\"}],\" 配置时可用。详见 \",[\"$\",\"$L15\",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)_\u0026]: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)_\u0026]: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\":[\"$\",\"$L15\",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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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\":\"注意:\"}],\" 有关创建和管理子代理的详细信息,请参阅 \",[\"$\",\"$L15\",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\":[\"$\",\"$L15\",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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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)_\u0026]: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\":[\"自定义命令\",[\"$\",\"$L1e\",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\":[\"文件位置与优先级\",[\"$\",\"$L1e\",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)_\u0026]: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\":\"\u003cyour-project-root\u003e/.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\":[\"命名与命名空间\",[\"$\",\"$L1e\",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)_\u0026]: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\":\"\u003cproject\u003e/.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)\",[\"$\",\"$L1e\",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\":[\"必填字段\",[\"$\",\"$L1e\",null,{\"id\":\"必填字段\"}]]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]: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\":[\"可选字段\",[\"$\",\"$L1e\",null,{\"id\":\"可选字段\"}]]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]: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\":[\"处理参数\",[\"$\",\"$L1e\",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}}\"}],\" 的上下文感知注入\"],[\"$\",\"$L1e\",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\":[[\"$\",\"$L1f\",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\":[[\"$\",\"$L1f\",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)_\u0026]: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. 默认参数处理\",[\"$\",\"$L1e\",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\":[[\"$\",\"$L1f\",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: \u003cproject\u003e/.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\":\"你的任务是从用户的输入中解析出 `\u003cversion\u003e`、`\u003cchange_type\u003e` 和 `\u003cmessage\u003e`,然后使用 `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 \u003cversion\u003e \u003ctype\u003e \u003cmessage\u003e`\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"- `\u003ctype\u003e` 必须是以下之一:\\\"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. 找到指定 `\u003cversion\u003e` 的部分。\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"3. 在正确的 `\u003ctype\u003e` 标题下添加 `\u003cmessage\u003e`。\"}]}],\"\\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 命令\"],[\"$\",\"$L1e\",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)_\u0026]: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\":[[\"$\",\"$L1f\",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\":\"# 位于:\u003cproject\u003e/.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\":\"\u003e @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\":\"\u003e /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\":\"- **`@\u003c文件或目录路径\u003e`**\"}]}],\"\\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\":\"- **`!\u003cshell_command\u003e`**\"}]}],\"\\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)执行指定的 `\u003cshell_command\u003e`。命令的任何输出或错误都会显示在终端中。\"}]}],\"\\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 中运行。\"}]}]]}]]}]]}]]}]]}]]}]}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"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\"}]]\n4:null\n"])</script></body></html>