Add tests for CLI command generation and model alias resolution

- Implement `test-cli-command-gen.js` to verify the logic of `buildCliCommand` function.
- Create `test-e2e-model-alias.js` for end-to-end testing of model alias resolution in `ccw cli`.
- Add `test-model-alias.js` to test model alias resolution for different models.
- Introduce `test-model-alias.txt` for prompt testing with model alias.
- Develop `test-update-claude-command.js` to test command generation for `update_module_claude`.
- Create a test file in `test-update-claude/src` for future tests.
This commit is contained in:
catlog22
2026-02-05 20:17:10 +08:00
parent 6576886457
commit 01459a34a5
193 changed files with 4796 additions and 9405 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[647],{3531(c,s,e){e.r(s),e.d(s,{default:()=>h});e(3696);var r=e(4357),a=e(7473),u=e(8582),l=e(8150),o=e(6270),d=e(2540);function h(c){return(0,d.jsx)(u.e3,{className:(0,r.A)(a.G.wrapper.docsPages),children:(0,d.jsx)(o.A,{children:(0,l.v)(c.route.routes)})})}}}]);
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[647],{3531(c,s,e){e.r(s),e.d(s,{default:()=>h});e(3696);var r=e(4357),a=e(7473),u=e(8582),l=e(8150),o=e(8810),d=e(2540);function h(c){return(0,d.jsx)(u.e3,{className:(0,r.A)(a.G.wrapper.docsPages),children:(0,d.jsx)(o.A,{children:(0,l.v)(c.route.routes)})})}}}]);

View File

@@ -1 +1 @@
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[723],{2757(e,t,i){i.d(t,{A:()=>r});i(3696);var n=i(4357),o=i(9082),s=i(4441),a=i(2540);function r({className:e}){return(0,a.jsx)("main",{className:(0,n.A)("container margin-vert--xl",e),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},5723(e,t,i){i.r(t),i.d(t,{default:()=>c});i(3696);var n=i(9082),o=i(8582),s=i(6270),a=i(2757),r=i(2540);function c(){const e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.be,{title:e}),(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{})})]})}}}]);
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[723],{2757(e,t,i){i.d(t,{A:()=>r});i(3696);var n=i(4357),o=i(9082),s=i(4441),a=i(2540);function r({className:e}){return(0,a.jsx)("main",{className:(0,n.A)("container margin-vert--xl",e),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},5723(e,t,i){i.r(t),i.d(t,{default:()=>c});i(3696);var n=i(9082),o=i(8582),s=i(8810),a=i(2757),r=i(2540);function c(){const e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.be,{title:e}),(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{})})]})}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(()=>{"use strict";var e,a,c,r,t,f={},d={};function b(e){var a=d[e];if(void 0!==a)return a.exports;var c=d[e]={exports:{}};return f[e].call(c.exports,c,c.exports,b),c.exports}b.m=f,e=[],b.O=(a,c,r,t)=>{if(!c){var f=1/0;for(i=0;i<e.length;i++){for(var[c,r,t]=e[i],d=!0,o=0;o<c.length;o++)(!1&t||f>=t)&&Object.keys(b.O).every(e=>b.O[e](c[o]))?c.splice(o--,1):(d=!1,t<f&&(f=t));if(d){e.splice(i--,1);var n=r();void 0!==n&&(a=n)}}return a}t=t||0;for(var i=e.length;i>0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[c,r,t]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var t=Object.create(null);b.r(t);var f={};a=a||[null,c({}),c([]),c(c)];for(var d=2&r&&e;("object"==typeof d||"function"==typeof d)&&!~a.indexOf(d);d=c(d))Object.getOwnPropertyNames(d).forEach(a=>f[a]=()=>e[a]);return f.default=()=>e,b.d(t,f),t},b.d=(e,a)=>{for(var c in a)b.o(a,c)&&!b.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,c)=>(b.f[c](e,a),a),[])),b.u=e=>"assets/js/"+({11:"ea313555",17:"ccef5d0f",47:"157db180",48:"a94703ab",57:"19b64556",98:"a7bd4aaa",121:"5c7b2278",142:"0566a0a8",148:"4cc74730",235:"18891827",241:"d045285b",256:"11b43341",268:"60eef997",288:"666bb1bf",308:"4edc808e",368:"186dcf4e",401:"17896441",407:"611877e1",411:"d550a629",412:"1bac9067",448:"f9222419",482:"c5a82d8d",511:"bdb2b105",647:"5e95c892",725:"bcf6b37c",742:"aba21aa0",777:"fabaf1c8",814:"97c6e66a",849:"4ad7db0f",856:"2ecf8b4a",896:"f4817052",927:"04db0a2e",934:"7a1ee27c",954:"f1bf82ec",971:"fe8e3dcf",973:"9f4ca91e",975:"1e3006f3",991:"a6c3df16"}[e]||e)+"."+{11:"0d8924d5",17:"bf024fcc",47:"791164b8",48:"7b43e8e3",57:"267a65e7",98:"e4fb75f9",121:"c1c9335e",142:"502cb794",148:"46c1b3ec",235:"dc6947cb",241:"b85db2b1",256:"f1389cc9",268:"151fec41",288:"45a4152a",308:"b5696aa5",368:"19dbd8a2",401:"d1575d23",407:"45f8bc05",411:"e7b002e0",412:"db693171",448:"99229d0f",482:"d17a5054",511:"3f786190",647:"9f686774",723:"50d99bed",725:"6fb645f5",742:"dc3eeab8",777:"1c5418de",814:"5b6891f6",849:"b9b38a4a",856:"99d227b2",896:"97b6ae69",927:"b743edea",934:"d03b31a7",954:"58d787a8",971:"789ec323",973:"5435862e",975:"7fa46a95",991:"82b13c53"}[e]+".js",b.miniCssF=e=>{},b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},t="ccw-docs:",b.l=(e,a,c,f)=>{if(r[e])r[e].push(a);else{var d,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var l=n[i];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==t+c){d=l;break}}d||(o=!0,(d=document.createElement("script")).charset="utf-8",b.nc&&d.setAttribute("nonce",b.nc),d.setAttribute("data-webpack",t+c),d.src=e),r[e]=[a];var u=(a,c)=>{d.onerror=d.onload=null,clearTimeout(s);var t=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),t&&t.forEach(e=>e(c)),a)return a(c)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=u.bind(null,d.onerror),d.onload=u.bind(null,d.onload),o&&document.head.appendChild(d)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/docs/",b.gca=function(e){return e={17896441:"401",18891827:"235",ea313555:"11",ccef5d0f:"17","157db180":"47",a94703ab:"48","19b64556":"57",a7bd4aaa:"98","5c7b2278":"121","0566a0a8":"142","4cc74730":"148",d045285b:"241","11b43341":"256","60eef997":"268","666bb1bf":"288","4edc808e":"308","186dcf4e":"368","611877e1":"407",d550a629:"411","1bac9067":"412",f9222419:"448",c5a82d8d:"482",bdb2b105:"511","5e95c892":"647",bcf6b37c:"725",aba21aa0:"742",fabaf1c8:"777","97c6e66a":"814","4ad7db0f":"849","2ecf8b4a":"856",f4817052:"896","04db0a2e":"927","7a1ee27c":"934",f1bf82ec:"954",fe8e3dcf:"971","9f4ca91e":"973","1e3006f3":"975",a6c3df16:"991"}[e]||e,b.p+b.u(e)},(()=>{var e={354:0,869:0};b.f.j=(a,c)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)c.push(r[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var t=new Promise((c,t)=>r=e[a]=[c,t]);c.push(r[2]=t);var f=b.p+b.u(a),d=new Error;b.l(f,c=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var t=c&&("load"===c.type?"missing":c.type),f=c&&c.target&&c.target.src;d.message="Loading chunk "+a+" failed.\n("+t+": "+f+")",d.name="ChunkLoadError",d.type=t,d.request=f,r[1](d)}},"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,c)=>{var r,t,[f,d,o]=c,n=0;if(f.some(a=>0!==e[a])){for(r in d)b.o(d,r)&&(b.m[r]=d[r]);if(o)var i=o(b)}for(a&&a(c);n<f.length;n++)t=f[n],b.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return b.O(i)},c=globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})()})();

View File

@@ -0,0 +1 @@
(()=>{"use strict";var e,a,c,r,t,f={},d={};function b(e){var a=d[e];if(void 0!==a)return a.exports;var c=d[e]={exports:{}};return f[e].call(c.exports,c,c.exports,b),c.exports}b.m=f,e=[],b.O=(a,c,r,t)=>{if(!c){var f=1/0;for(i=0;i<e.length;i++){for(var[c,r,t]=e[i],d=!0,o=0;o<c.length;o++)(!1&t||f>=t)&&Object.keys(b.O).every(e=>b.O[e](c[o]))?c.splice(o--,1):(d=!1,t<f&&(f=t));if(d){e.splice(i--,1);var n=r();void 0!==n&&(a=n)}}return a}t=t||0;for(var i=e.length;i>0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[c,r,t]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var t=Object.create(null);b.r(t);var f={};a=a||[null,c({}),c([]),c(c)];for(var d=2&r&&e;("object"==typeof d||"function"==typeof d)&&!~a.indexOf(d);d=c(d))Object.getOwnPropertyNames(d).forEach(a=>f[a]=()=>e[a]);return f.default=()=>e,b.d(t,f),t},b.d=(e,a)=>{for(var c in a)b.o(a,c)&&!b.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,c)=>(b.f[c](e,a),a),[])),b.u=e=>"assets/js/"+({11:"ea313555",17:"ccef5d0f",47:"157db180",48:"a94703ab",57:"19b64556",98:"a7bd4aaa",121:"5c7b2278",142:"0566a0a8",148:"4cc74730",235:"18891827",241:"d045285b",256:"11b43341",268:"60eef997",288:"666bb1bf",308:"4edc808e",368:"186dcf4e",401:"17896441",407:"611877e1",411:"d550a629",412:"1bac9067",448:"f9222419",482:"c5a82d8d",511:"bdb2b105",522:"07157af6",647:"5e95c892",688:"e2121358",725:"bcf6b37c",742:"aba21aa0",777:"fabaf1c8",814:"97c6e66a",849:"4ad7db0f",856:"2ecf8b4a",896:"f4817052",927:"04db0a2e",934:"7a1ee27c",954:"f1bf82ec",971:"fe8e3dcf",973:"9f4ca91e",975:"1e3006f3",991:"a6c3df16"}[e]||e)+"."+{11:"0d8924d5",17:"bf024fcc",47:"791164b8",48:"7b43e8e3",57:"267a65e7",98:"e4fb75f9",121:"c1c9335e",142:"502cb794",148:"46c1b3ec",235:"dc6947cb",241:"b85db2b1",256:"f357fb8b",268:"151fec41",288:"45a4152a",308:"b5696aa5",368:"19dbd8a2",401:"d1575d23",407:"45f8bc05",411:"e7b002e0",412:"db693171",448:"99229d0f",482:"d17a5054",511:"3f786190",522:"8b0af19f",647:"ba4a4619",688:"bb6dea63",723:"83f5aec0",725:"6fb645f5",742:"dc3eeab8",777:"1c5418de",814:"5b6891f6",849:"b9b38a4a",856:"99d227b2",896:"97b6ae69",927:"b743edea",934:"d03b31a7",954:"58d787a8",971:"789ec323",973:"5435862e",975:"7fa46a95",991:"82b13c53"}[e]+".js",b.miniCssF=e=>{},b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},t="ccw-docs:",b.l=(e,a,c,f)=>{if(r[e])r[e].push(a);else{var d,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var l=n[i];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==t+c){d=l;break}}d||(o=!0,(d=document.createElement("script")).charset="utf-8",b.nc&&d.setAttribute("nonce",b.nc),d.setAttribute("data-webpack",t+c),d.src=e),r[e]=[a];var u=(a,c)=>{d.onerror=d.onload=null,clearTimeout(s);var t=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),t&&t.forEach(e=>e(c)),a)return a(c)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=u.bind(null,d.onerror),d.onload=u.bind(null,d.onload),o&&document.head.appendChild(d)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/docs/",b.gca=function(e){return e={17896441:"401",18891827:"235",ea313555:"11",ccef5d0f:"17","157db180":"47",a94703ab:"48","19b64556":"57",a7bd4aaa:"98","5c7b2278":"121","0566a0a8":"142","4cc74730":"148",d045285b:"241","11b43341":"256","60eef997":"268","666bb1bf":"288","4edc808e":"308","186dcf4e":"368","611877e1":"407",d550a629:"411","1bac9067":"412",f9222419:"448",c5a82d8d:"482",bdb2b105:"511","07157af6":"522","5e95c892":"647",e2121358:"688",bcf6b37c:"725",aba21aa0:"742",fabaf1c8:"777","97c6e66a":"814","4ad7db0f":"849","2ecf8b4a":"856",f4817052:"896","04db0a2e":"927","7a1ee27c":"934",f1bf82ec:"954",fe8e3dcf:"971","9f4ca91e":"973","1e3006f3":"975",a6c3df16:"991"}[e]||e,b.p+b.u(e)},(()=>{var e={354:0,869:0};b.f.j=(a,c)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)c.push(r[2]);else if(/^(354|869)$/.test(a))e[a]=0;else{var t=new Promise((c,t)=>r=e[a]=[c,t]);c.push(r[2]=t);var f=b.p+b.u(a),d=new Error;b.l(f,c=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var t=c&&("load"===c.type?"missing":c.type),f=c&&c.target&&c.target.src;d.message="Loading chunk "+a+" failed.\n("+t+": "+f+")",d.name="ChunkLoadError",d.type=t,d.request=f,r[1](d)}},"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,c)=>{var r,t,[f,d,o]=c,n=0;if(f.some(a=>0!==e[a])){for(r in d)b.o(d,r)&&(b.m[r]=d[r]);if(o)var i=o(b)}for(a&&a(c);n<f.length;n++)t=f[n],b.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return b.O(i)},c=globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})()})();