plugin-git-manager 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/client/317.e7b1d59371812c30.js +10 -0
  2. package/dist/client/434.05d0ba2b821105dc.js +10 -0
  3. package/dist/client/453.cdcba6d2d0c9522b.js +10 -0
  4. package/dist/client/454.625da741a7e1161f.js +10 -0
  5. package/dist/client/index.js +1 -1
  6. package/dist/client-v2/317.4e116f84ed9081b6.js +10 -0
  7. package/dist/client-v2/434.764113d20743a45b.js +10 -0
  8. package/dist/client-v2/453.5ab80c06d8e61a7e.js +10 -0
  9. package/dist/client-v2/454.b885b1d35ef7ff72.js +10 -0
  10. package/dist/client-v2/index.js +1 -1
  11. package/dist/locale/en-US.json +12 -1
  12. package/dist/locale/vi-VN.json +12 -1
  13. package/dist/locale/zh-CN.json +12 -1
  14. package/dist/node_modules/simple-git/package.json +1 -1
  15. package/dist/node_modules/zod/package.json +1 -1
  16. package/dist/server/actions/git-actions.js +299 -87
  17. package/dist/server/actions/gitlab-api.js +19 -12
  18. package/dist/server/actions/subtree.js +20 -10
  19. package/dist/server/plugin.js +134 -10
  20. package/dist/server/repository-access.js +2 -2
  21. package/dist/server/request-method-policy.js +2 -1
  22. package/dist/server/services/review-source.js +2 -1
  23. package/dist/server/utils/cluster-git.js +181 -0
  24. package/package.json +2 -2
  25. package/src/client/__tests__/FileExplorerAndManage.test.tsx +236 -0
  26. package/src/client/__tests__/workflowRoutes.test.ts +3 -1
  27. package/src/client/components/CommitHistory.tsx +19 -7
  28. package/src/client/components/FileExplorer.tsx +80 -34
  29. package/src/client/components/GitManagerSettings.tsx +21 -5
  30. package/src/client/components/GitOperations.tsx +25 -4
  31. package/src/client/components/GitRuntimeBanner.tsx +97 -0
  32. package/src/client/components/RepositoryConfig.tsx +28 -6
  33. package/src/client/context/GitManagerContext.tsx +156 -13
  34. package/src/client/workflowRoutes.ts +11 -0
  35. package/src/locale/en-US.json +12 -1
  36. package/src/locale/vi-VN.json +12 -1
  37. package/src/locale/zh-CN.json +12 -1
  38. package/src/server/__tests__/git-actions.test.ts +329 -4
  39. package/src/server/__tests__/smoke.test.ts +32 -1
  40. package/src/server/actions/git-actions.ts +322 -96
  41. package/src/server/actions/gitlab-api.ts +20 -14
  42. package/src/server/actions/subtree.ts +23 -6
  43. package/src/server/plugin.ts +152 -3
  44. package/src/server/repository-access.ts +2 -2
  45. package/src/server/request-method-policy.ts +1 -0
  46. package/src/server/services/review-source.ts +3 -2
  47. package/src/server/utils/cluster-git.ts +209 -0
  48. package/dist/client/317.2d0d33871e24ee24.js +0 -10
  49. package/dist/client/434.2401f7257495b66e.js +0 -10
  50. package/dist/client/453.58657b9ba0904477.js +0 -10
  51. package/dist/client-v2/317.d2466574d00f94d0.js +0 -10
  52. package/dist/client-v2/434.32b0a07b821b9329.js +0 -10
  53. package/dist/client-v2/453.f9a0ec6d8e1bd1cc.js +0 -10
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunkplugin_git_manager_client_v2=self.webpackChunkplugin_git_manager_client_v2||[]).push([["454"],{602:function(e,t,n){n.d(t,{B:function(){return p},N:function(){return v}});var r=n(155),a=n.n(r),i=n(485),u=n(122);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n,r,a,i,u){try{var o=e[i](u),c=o.value}catch(e){n(e);return}o.done?t(c):Promise.resolve(c).then(r,a)}function l(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function u(e){c(i,r,a,u,o,"next",e)}function o(e){c(i,r,a,u,o,"throw",e)}u(void 0)})}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i=[],u=!0,o=!1;try{for(a=a.call(e);!(u=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(e){o=!0,r=e}finally{try{u||null==a.return||a.return()}finally{if(o)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),o=Object.defineProperty;return o(u,"next",{value:c(0)}),o(u,"throw",{value:c(1)}),o(u,"return",{value:c(2)}),"function"==typeof Symbol&&o(u,Symbol.iterator,{value:function(){return this}}),u;function c(o){return function(c){var l=[o,c];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var d={checked:!1,gitAvailable:!0,gitBinary:"git",clusterManager:{available:!1,gitConfigured:!1,status:"idle",progressPercent:0}},g=(0,r.createContext)(null);function p(){var e=(0,r.useContext)(g);if(!e)throw Error("useGitManager must be used within GitManagerProvider");return e}var v=function(e){var t=e.children,n=(0,i.useApp)(),o=n.apiClient,c=s((0,r.useState)([]),2),p=c[0],v=c[1],h=s((0,r.useState)(null),2),b=h[0],y=h[1],w=s((0,r.useState)(!1),2),m=w[0],k=w[1],S=s((0,r.useState)([]),2),P=S[0],R=S[1],C=s((0,r.useState)(""),2),A=C[0],I=C[1],_=s((0,r.useState)(d),2),O=_[0],E=_[1],M=s((0,r.useState)(!1),2),j=M[0],B=M[1],x=(0,r.useRef)(b);x.current=b;var V=(0,r.useRef)(O);V.current=O;var G=(0,r.useCallback)(function(e){y(e);var t,n=null!=(t=null==e?void 0:e.id)?t:null;if("u">typeof window&&window.location.pathname.endsWith("/git-manager/manage")){var r=new URL(window.location.href);null==n?r.searchParams.delete("repositoryId"):r.searchParams.set("repositoryId",String(n)),window.history.replaceState(window.history.state,"","".concat(r.pathname).concat(r.search).concat(r.hash))}},[]);(0,r.useEffect)(function(){return(0,u.SY)(n,null==b?void 0:b.id),function(){return(0,u.SY)(n)}},[n,null==b?void 0:b.id]);var U=(0,r.useCallback)(function(){return l(function(){var e,t,n,r;return f(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,o.request({url:"gitManager:runtimeStatus",skipNotify:!0})];case 1:return(n=(null==(t=a.sent().data)||null==(e=t.data)?void 0:e.data)||(null==t?void 0:t.data))&&"boolean"==typeof n.gitAvailable&&(r=n.clusterManager||{},E({checked:!0,gitAvailable:n.gitAvailable,gitBinary:"string"==typeof n.gitBinary?n.gitBinary:"git",clusterManager:{available:!!r.available,gitConfigured:!!r.gitConfigured,status:"running"===r.status||"succeeded"===r.status||"failed"===r.status?r.status:"idle",progressPercent:"number"==typeof r.progressPercent?r.progressPercent:0}})),[3,3];case 2:return a.sent(),[3,3];case 3:return[2]}})})()},[o]);(0,r.useEffect)(function(){U()},[U]),(0,r.useEffect)(function(){if(O.checked&&!O.gitAvailable&&"running"===O.clusterManager.status){var e=setInterval(function(){U()},3e3);return function(){return clearInterval(e)}}},[O.checked,O.gitAvailable,O.clusterManager.status,U]);var q=(0,r.useCallback)(function(){return l(function(){return f(this,function(e){switch(e.label){case 0:B(!0),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,o.request({url:"gitManager:installGit",method:"post"})];case 2:return e.sent(),[4,U()];case 3:return e.sent(),[2,!0];case 4:return e.sent(),[2,!1];case 5:return B(!1),[7];case 6:return[2]}})})()},[o,U]),N=(0,r.useCallback)(function(){return l(function(){var e,t,n,r,a,i;return f(this,function(u){switch(u.label){case 0:if(!(e=x.current)||"connected"!==e.status||V.current.checked&&!V.current.gitAvailable)return R([]),I(""),[2,""];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.request({url:"gitManager:branches",params:{repositoryId:e.id},skipNotify:!0})];case 2:if(r=(null==(n=u.sent().data)||null==(t=n.data)?void 0:t.data)||(null==n?void 0:n.data))return a=Array.isArray(r.all)?r.all:[],i="string"==typeof r.current?r.current:"",R(a),I(i),[2,i];return[3,4];case 3:return u.sent(),R([]),I(""),U(),[3,4];case 4:return[2,""]}})})()},[o,U]),Y=(0,r.useCallback)(function(){return l(function(){var e,t,n,r,a,i;return f(this,function(u){switch(u.label){case 0:k(!0),u.label=1;case 1:return u.trys.push([1,,3,4]),[4,o.request({url:"gitRepositories:list",params:{pageSize:100}})];case 2:return v(t=(null==(e=u.sent().data)?void 0:e.data)||[]),(n=x.current)?(r=t.find(function(e){return e.id===n.id}))&&y(r):(a="u"<typeof window?null:new URLSearchParams(window.location.search).get("repositoryId"))&&(i=t.find(function(e){return String(e.id)===a}))&&y(i),[3,4];case 3:return k(!1),[7];case 4:return[2]}})})()},[o]);return a().createElement(g.Provider,{value:{repos:p,selectedRepo:b,loading:m,branches:P,currentBranch:A,gitRuntime:O,installingGit:j,setSelectedRepo:G,refreshRepos:Y,refreshBranches:N,refreshRuntimeStatus:U,installGitViaCluster:q}},t)}},578:function(e,t,n){n.d(t,{k:function(){return a}});var r=n(485);function a(){var e=(0,r.useApp)();return function(t,n){return e.i18n.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:["plugin-git-manager","client"]},n))}}},279:function(e,t,n){n.d(t,{KG:function(){return c},PY:function(){return o},Xz:function(){return u},wJ:function(){return l}});var r=n(485);function a(e,t){return"".concat(e.replace(/\/+$/,""),"/").concat(t.replace(/^\/+/,""))}function i(e){var t="u"<typeof window?void 0:window.__nocobase_public_path__;return(0,r.stripModernClientPrefix)(t||e.getPublicPath())}function u(e,t,n){var u="modern"===(0,r.getRouteRuntimeVersion)(),o=u?"/admin/workflow/".concat("workflow"===t?"workflows":"executions","/").concat(encodeURIComponent(String(n))):"/admin/settings/workflow/".concat("workflow"===t?"workflows":"executions","/").concat(encodeURIComponent(String(n)));return a(u?(0,r.getV2EffectiveBasePath)(e):i(e),o)}function o(e){return a("modern"===(0,r.getRouteRuntimeVersion)()?(0,r.getV2EffectiveBasePath)(e):i(e),"/admin/workflow/tasks/git-review-approval/pending")}function c(e,t){var n=a("modern"===(0,r.getRouteRuntimeVersion)()?(0,r.getV2EffectiveBasePath)(e):i(e),"/admin/settings/git-manager/manage");return null==t?n:"".concat(n,"?repositoryId=").concat(encodeURIComponent(String(t)))}function l(e){return a("modern"===(0,r.getRouteRuntimeVersion)()?(0,r.getV2EffectiveBasePath)(e):i(e),"/admin/settings/plugin-cluster-manager")}}}]);
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):"function"==typeof define&&define.amd?define("plugin-git-manager/client-v2",["react-i18next","@nocobase/client-v2","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client"],t):"object"==typeof exports?exports["plugin-git-manager/client-v2"]=t(require("react-i18next"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):e["plugin-git-manager/client-v2"]=t(e["react-i18next"],e["@nocobase/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"])}(self,function(e,t,n,r,o,i,a){return function(){"use strict";var u,l,c,s={122:function(e,t,n){function r(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.d(t,{JB:function(){return c},SY:function(){return a},Z7:function(){return l},oP:function(){return u},sP:function(){return s}});var i=new WeakMap;function a(e,t){null==t?i.delete(e):i.set(e,t)}function u(e){return i.get(e)}function l(e){var t;return null==e||null==(t=e.data)?void 0:t.data}function c(e){var t=l(e);return t&&(void 0===t?"undefined":o(t))==="object"&&"success"in t&&"data"in t?t.data:t}function s(e,t,n){var i;return(i=function(){var r;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(i){switch(i.label){case 0:return[4,e.apiClient.request({url:"gitManager:chatContextContent",params:function(e,t){if("repository"===e)return{kind:e,repositoryId:t};var n=t.indexOf(":"),r=t.slice(0,n),o=t.slice(n+1);if(n<=0||!o)throw Error("Invalid Git context");return"merge-request"===e?{kind:e,repositoryId:r,mrIid:o}:{kind:e,repositoryId:r,commitHash:o}}(t,n),skipNotify:!0})];case 1:if(!(r=c(i.sent()))||(void 0===r?"undefined":o(r))!=="object")throw Error("Git context is unavailable");return[2,r]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var a=i.apply(e,t);function u(e){r(a,n,o,u,l,"next",e)}function l(e){r(a,n,o,u,l,"throw",e)}u(void 0)})})()}},375:function(e){e.exports=o},485:function(e){e.exports=t},694:function(e){e.exports=i},768:function(e){e.exports=a},59:function(e){e.exports=r},155:function(e){e.exports=n},953:function(t){t.exports=e}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return s[e].call(n.exports,n,n.exports,p),n.exports}p.m=s,p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,n){return p.f[n](e,t),t},[]))},p.u=function(e){return""+e+"."+({156:"445366026c1cc9a8",313:"3c867179c3a1e817",317:"d2466574d00f94d0",356:"3d40a34bad08f8ff",434:"32b0a07b821b9329",453:"f9a0ec6d8e1bd1cc",928:"bba701b5a1ece58e"})[e]+".js"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},p.l=function(e,t,n,r){if(d[e])return void d[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var l=a[u];if(l.getAttribute("src")==e||l.getAttribute("data-rspack")=="plugin-git-manager/client-v2:"+n){o=l;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.setAttribute("data-rspack","plugin-git-manager/client-v2:"+n),o.src=e),d[e]=[t];var c=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(m=p.g.location+"");var d,m,g=p.g.document;if(!m&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(m=g.currentScript.src),!m)){var y=g.getElementsByTagName("script");if(y.length)for(var b=y.length-1;b>-1&&(!m||!/^http(s?):/.test(m));)m=y[b--].src}if(!m)throw Error("Automatic publicPath is not supported in this browser");p.p=m.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},p.f.j=function(e,t){var n=p.o(u,e)?u[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=u[e]=[t,r]});t.push(n[2]=r);var o=p.p+p.u(e),i=Error();p.l(o,function(t){if(p.o(u,e)&&(0!==(n=u[e])&&(u[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},l=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],l=0;if(o.some(function(e){return 0!==u[e]})){for(n in i)p.o(i,n)&&(p.m[n]=i[n]);a&&a(p)}for(e&&e(t);l<o.length;l++)r=o[l],p.o(u,r)&&u[r]&&u[r][0](),u[r]=0},(c=self.webpackChunkplugin_git_manager_client_v2=self.webpackChunkplugin_git_manager_client_v2||[]).forEach(l.bind(null,0)),c.push=l.bind(null,c.push.bind(c));var v={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/plugin-git-manager/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/plugin-git-manager/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",u=a.indexOf(i);e=u>=0?a.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/plugin-git-manager/dist/client-v2/"}p.p=e}(),!function(){p.r(v),p.d(v,{default:function(){return _}});var e=p(485),t=p(155),n=p.n(t),r=p(375),o=p(768),i=p(59),a=p(953),u=p(122);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(e,t)||d(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}function m(e){if(!e)return"";var t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function g(e){var r=e.app,o=e.kind,l=e.onAdd,p=e.isActive,d=e.onClose,g=(0,a.useTranslation)("plugin-git-manager").t,y=s((0,t.useState)(""),2),b=y[0],v=y[1],h=s((0,t.useState)(1),2),w=h[0],S=h[1],k=s((0,t.useState)([]),2),x=k[0],E=k[1],O=s((0,t.useState)(!1),2),C=O[0],j=O[1],P=s((0,t.useState)(),2),I=P[0],q=P[1],_=s((0,t.useState)(!1),2),A=_[0],M=_[1],T=s((0,t.useState)(!1),2),B=T[0],R=T[1],G=s((0,t.useState)([]),2),N=G[0],L=G[1],F=s((0,t.useState)(),2),$=F[0],J=F[1],K=s((0,t.useState)("opened"),2),U=K[0],z=K[1],D=s((0,t.useState)(""),2),W=D[0],Z=D[1],H=s((0,t.useState)(1),2),Y=H[0],Q=H[1],V=s((0,t.useState)([]),2),X=V[0],ee=V[1],et=s((0,t.useState)([]),2),en=et[0],er=et[1],eo=s((0,t.useState)(!1),2),ei=eo[0],ea=eo[1],eu=s((0,t.useState)(!1),2),el=eu[0],ec=eu[1],es=s((0,t.useState)(),2),ef=es[0],ep=es[1],ed=s((0,t.useState)(""),2),em=ed[0],eg=ed[1],ey=s((0,t.useState)(""),2),eb=ey[0],ev=ey[1],eh=s((0,t.useState)(""),2),ew=eh[0],eS=eh[1],ek=s((0,t.useState)(""),2),ex=ek[0],eE=ek[1],eO=s((0,t.useState)(!1),2),eC=eO[0],ej=eO[1],eP=(0,t.useRef)(!1),eI=(0,t.useRef)(!0),eq=(0,t.useRef)(!1);(0,t.useEffect)(function(){return eI.current=!0,function(){eI.current=!1}},[]),(0,t.useEffect)(function(){var e=(0,u.oP)(r);if(null!=e){var t=!1;return r.apiClient.request({url:"gitManager:chatContextOptions",params:{kind:o,repositoryId:e,page:1,pageSize:1},skipNotify:!0}).then(function(e){var n,r=(0,u.JB)(e);!t&&!eP.current&&(null==r||null==(n=r.items)?void 0:n[0])&&q(r.items[0])}).catch(function(){}),function(){t=!0}}},[r,o]),(0,t.useEffect)(function(){var e=!1;return M(!0),r.apiClient.request({url:"gitManager:chatContextOptions",params:{kind:o,search:b,page:w,pageSize:30},skipNotify:!0}).then(function(t){if(!e){var n=(0,u.JB)(t),r=Array.isArray(null==n?void 0:n.items)?n.items:[];E(function(e){return 1===w?r:f(e).concat(f(r))}),j((null==n?void 0:n.hasMore)===!0),eg("")}}).finally(function(){e||M(!1)}).catch(function(){e||eg(g("Unable to load Git context. Check your access and try again."))}),function(){e=!0}},[r,o,w,b,g]),(0,t.useEffect)(function(){if(L([]),J(void 0),ev(""),R(!1),"commit"===o&&I){var e=!1;return R(!0),r.apiClient.request({url:"gitManager:branches",params:{repositoryId:I.id},skipNotify:!0}).then(function(t){if(!e){var n=(0,u.JB)(t),r=Array.isArray(null==n?void 0:n.all)?n.all:[];L(r);var o=!(null==n?void 0:n.detached)&&(null==n?void 0:n.current)?n.current:void 0,i=o&&r.includes(o)?o:I.defaultBranch;J(i&&r.includes(i)?i:r[0]),ev("")}}).finally(function(){e||R(!1)}).catch(function(){e||ev(g("Unable to load Git context. Check your access and try again."))}),function(){e=!0}}},[r,o,I,g]),(0,t.useEffect)(function(){if(!I||"repository"===o||"commit"===o&&!$)return void ec(!1);var e=!1;ec(!0);var t="merge-request"===o?{repositoryId:I.id,state:U,page:Y,perPage:30}:{repositoryId:I.id,branch:$,skip:(Y-1)*30,maxCount:30};return r.apiClient.request({url:"merge-request"===o?"gitManager:mergeRequests":"gitManager:log",params:t,skipNotify:!0}).then(function(t){if(!e){if("merge-request"===o){var n,r,i,a=(0,u.JB)(t),l=Array.isArray(a)?a:[],c=(0,u.Z7)(t);ee(function(e){return 1===Y?l:f(e).concat(f(l))}),ea(null!=(n=null==c||null==(r=c.pagination)?void 0:r.hasMore)?n:(null==c||null==(i=c.pagination)?void 0:i.totalPages)!=null?Y<c.pagination.totalPages:30===l.length)}else{var s=(0,u.JB)(t),p=Array.isArray(null==s?void 0:s.all)?s.all:[];er(function(e){return 1===Y?p:f(e).concat(f(p))}),ea(30===p.length)}eS("")}}).finally(function(){e||ec(!1)}).catch(function(){e||eS(g("Unable to load Git context. Check your access and try again."))}),function(){e=!0}},[r,$,Y,o,I,U,g]);var e_=(0,t.useMemo)(function(){var e=W.trim().toLowerCase().replace(/^!/,"");return X.filter(function(t){return"".concat(t.iid," ").concat(t.title).toLowerCase().includes(e)})},[W,X]),eA=(0,t.useMemo)(function(){var e=W.trim().toLowerCase();return en.filter(function(t){return"".concat(t.hash," ").concat(t.subject||t.message||"").toLowerCase().includes(e)})},[W,en]);return n().createElement(i.Form,{layout:"vertical",onFinish:function(){var e;return(e=function(){var e,t,n,i,a;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(c){switch(c.label){case 0:if(eq.current||!I||"repository"!==o&&!ef)return[2];e="repository"===o?String(I.id):"".concat(I.id,":").concat(ef),t=X.find(function(e){return String(e.iid)===ef}),n=en.find(function(e){return e.hash===ef}),i=I.name||String(I.id),a="repository"===o?i:"merge-request"===o?"".concat(i," \xb7 !").concat(ef," \xb7 ").concat((null==t?void 0:t.title)||""):"".concat(i," \xb7 ").concat(null==ef?void 0:ef.slice(0,7)," \xb7 ").concat((null==n?void 0:n.subject)||(null==n?void 0:n.message)||""),eq.current=!0,ej(!0),c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,(0,u.sP)(r,o,e)];case 2:if(c.sent(),!eI.current||p&&!p())return[2];return l({uid:e,title:a}),d(),[3,5];case 3:return c.sent(),eI.current&&eE(g("Git context is unavailable. Check your access and select it again.")),[3,5];case 4:return eq.current=!1,eI.current&&ej(!1),[7];case 5:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(void 0)})})()},disabled:eC},n().createElement(i.Form.Item,{label:g("Search repositories")},n().createElement(i.Input.Search,{allowClear:!0,onSearch:function(e,t){null==t||t.preventDefault(),eP.current=!0,S(1),v(e)},"aria-label":g("Search repositories")})),n().createElement(i.Form.Item,{label:g("Repository"),required:!0},n().createElement(i.Select,{"aria-label":g("Repository"),loading:A,value:null==I?void 0:I.id,onChange:function(e){eP.current=!0,q(x.find(function(t){return t.id===e})),J(void 0),L([]),ep(void 0),Q(1),ee([]),er([]),ea(!1),Z(""),eS(""),eE("")},placeholder:g("Select a repository"),options:(I&&!x.some(function(e){return e.id===I.id})?[I].concat(f(x)):x).map(function(e){return{value:e.id,label:[e.name||String(e.id),e.defaultBranch,e.status].filter(Boolean).join(" \xb7 ")}}),notFoundContent:A?n().createElement(i.Spin,{size:"small"}):g("No repositories available")}),C&&n().createElement(i.Button,{type:"link",loading:A,onClick:function(){return S(function(e){return e+1})}},g("Load more repositories"))),"commit"===o&&I&&n().createElement(i.Form.Item,{label:g("Branch"),required:!0},n().createElement(i.Select,{"aria-label":g("Branch"),loading:B,value:$,placeholder:g("Select a branch"),options:N.map(function(e){return{value:e,label:e}}),onChange:function(e){J(e),Q(1),er([]),ea(!1),ep(void 0),eS(""),eE("")}})),"merge-request"===o&&I&&n().createElement(i.Form.Item,{label:g("State")},n().createElement(i.Select,{"aria-label":g("State"),value:U,options:["opened","merged","closed","all"].map(function(e){return{value:e,label:g(e)}}),onChange:function(e){z(e),Q(1),ee([]),ea(!1),ep(void 0),eS(""),eE("")}})),"repository"!==o&&I&&("commit"!==o||$)&&n().createElement(n().Fragment,null,n().createElement(i.Form.Item,{label:g("Search loaded results")},n().createElement(i.Input,{"aria-label":g("Search loaded results"),value:W,onChange:function(e){Z(e.target.value),ep(void 0),eE("")},onPressEnter:function(e){return e.preventDefault()},allowClear:!0})),n().createElement(i.Form.Item,{label:g("commit"===o?"Commit":"Merge Request"),required:!0},n().createElement(i.Select,{"aria-label":g("commit"===o?"Commit":"Merge Request"),loading:el,value:ef,onChange:ep,placeholder:g("commit"===o?"Select a commit":"Select a merge request"),options:"merge-request"===o?e_.map(function(e){var t,n;return{value:String(e.iid),label:["!".concat(e.iid," \xb7 ").concat(e.title),e.sourceBranch&&e.targetBranch?"".concat(e.sourceBranch," → ").concat(e.targetBranch):"",(null==(t=e.author)?void 0:t.name)||(null==(n=e.author)?void 0:n.username),m(e.updatedAt)].filter(Boolean).join(" \xb7 ")}}):eA.map(function(e){return{value:e.hash,label:[e.hash.slice(0,7),e.subject||e.message,e.author_name,m(e.date)].filter(Boolean).join(" \xb7 ")}}),notFoundContent:el?n().createElement(i.Spin,{size:"small"}):g("No results")}),ei&&n().createElement(i.Button,{type:"link",loading:el,onClick:function(){return Q(function(e){return e+1})}},g("Load more results")))),(ex||ew||eb||em)&&n().createElement(i.Alert,{type:"error",showIcon:!0,message:ex||ew||eb||em,style:{marginBottom:16}}),n().createElement(i.Space,{style:{display:"flex",justifyContent:"flex-end"}},n().createElement(i.Button,{onClick:d},g("Cancel")),n().createElement(i.Button,{type:"primary",htmlType:"submit",loading:eC,disabled:!I||"repository"!==o&&!ef},g("Attach to chat"))),n().createElement(i.Typography.Text,{type:"secondary","aria-live":"polite"},el||A||B?g("Loading"):""))}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,u,"next",e)}function u(e){b(i,r,o,a,u,"throw",e)}a(void 0)})}}function w(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var S=["repository","merge-request","commit"],k=function(){return{repository:!1,"merge-request":!1,commit:!1}},x=new WeakMap;function E(e){var t=e.kind,o=e.title,u=(0,a.useTranslation)("plugin-git-manager").t,l={repository:n().createElement(r.BranchesOutlined,null),"merge-request":n().createElement(r.MergeOutlined,null),commit:n().createElement(r.NodeIndexOutlined,null)};return n().createElement(i.Space,{size:4},l[t],n().createElement("span",null,o||u({repository:"Git Repository","merge-request":"Git Merge Request",commit:"Git Commit"}[t])))}function O(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function C(e,t,n){return(C=q()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o}).apply(null,arguments)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t="function"==typeof Map?new Map:void 0;return(I=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return C(e,arguments,j(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)})(e)}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(q=function(){return!!e})()}var _=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=j(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,q()?Reflect.construct(e,t||[],j(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&P(r,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t,r;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:var l,c,s,f;if(!(r=null==(e=this.app.pm.get("ai"))?void 0:e.aiManager))return[3,2];return[4,(l=this.app,(c=x.get(r))||(s=l,f=r,c=h(function(){var e,t,r,a,l,c,p,d,m,b,v,x,O,C;return w(this,function(j){switch(j.label){case 0:a=k(),l=0,c=!0,p=!1,d=void 0;try{for(m=S[Symbol.iterator]();!(c=(b=m.next()).done);c=!0)v=b.value,x="git-".concat(v),f.getWorkContext(x)||f.registerWorkContext(x,function(e,t){return{name:"git-".concat(t),tag:{Component:function(e){var r=e.item;return n().createElement(E,{kind:t,title:r.title||r.uid})}},getContent:function(n,r){var o=r.uid;return h(function(){var r;return w(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,u.sP)(e,t,o)];case 1:return[2,a.sent()];case 2:throw r=a.sent(),i.message.error(n.i18n.t("Git context is unavailable. Check your access and select it again.",{ns:"plugin-git-manager"})),r;case 3:return[2]}})})()}}}(s,v))}catch(e){p=!0,d=e}finally{try{c||null==m.return||m.return()}finally{if(p)throw d}}return O=function(){var e=new o.Registry,t=!0,r=!1,i=void 0;try{for(var u,l=f.workContext.getEntities()[Symbol.iterator]();!(t=(u=l.next()).done);t=!0)!function(){var t,r,o=(t=u.value,function(e){if(Array.isArray(e))return e}(t)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],l=o[1],c=S.find(function(e){return i==="git-".concat(e)});if(!c)return e.register(i,l);l.menu;var f=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,n=Reflect.ownKeys(Object(e));o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(l,["menu"]);e.register(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},f,a[c]?{menu:(r=function(){return a[c]},{Component:function(){return n().createElement(E,{kind:c})},onClick:function(e){var t=e.ctx,o=e.onAdd;if(r())var i=!0,a=t.viewer.dialog({title:n().createElement(E,{kind:c}),width:720,zIndex:2200,onClose:function(){i=!1},content:function(){return n().createElement(g,{app:s,kind:c,onAdd:o,isActive:function(){return i&&r()},onClose:function(){a.close()}})}})}})}:{}))}()}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}f.workContext=e},C=function(){return h(function(){var e,t,n,r,o;return w(this,function(i){switch(i.label){case 0:if(e=++l,a=k(),O(),s.apiClient.auth&&!s.apiClient.auth.token)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,s.apiClient.request({url:"gitManager:chatContextOptions",skipNotify:!0,timeout:5e3})];case 2:if(o=u.JB.apply(void 0,[i.sent()]),e!==l)return[2];return a={repository:(null==o||null==(t=o.capabilities)?void 0:t.repository)===!0,"merge-request":(null==o||null==(n=o.capabilities)?void 0:n["merge-request"])===!0,commit:(null==o||null==(r=o.capabilities)?void 0:r.commit)===!0},O(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}})})()},s.eventBus.addEventListener("auth:tokenChanged",function(){C()}),null==(r=s.apiClient.axios)||null==(t=r.interceptors)||null==(e=t.response)||e.use(function(e){var t;return/(^|\/)roles:check(?:\?|$)/.test((null==(t=e.config)?void 0:t.url)||"")&&setTimeout(function(){return C()},0),e}),[4,C()];case 1:return j.sent(),[2]}})})(),x.set(r,c)),c)];case 1:a.sent(),a.label=2;case 2:return null==(t=this.app.pm.get("acl"))||t.settingsUI.addPermissionsTab({key:"git-manager",label:this.t("Git Manager"),sort:25,componentLoader:function(){return p.e("928").then(p.bind(p,43)).then(function(e){var t=e.RepositoryPermissions;return{default:function(e){var r=e.activeRole;return r?n().createElement(t,{key:r.name,activeRole:r}):null}}})}}),this.pluginSettingsManager.addMenuItem({key:"git-manager",title:this.t("Git Manager"),icon:"BranchesOutlined"}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"accounts",title:this.t("Git Accounts"),aclSnippet:"pm.plugin-git-manager.repositories",componentLoader:function(){return p.e("156").then(p.bind(p,367)).then(function(e){return{default:e.GitAccountsSettings}})}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"subtree-splits",title:this.t("Subtree Splits"),aclSnippet:"pm.plugin-git-manager.write",componentLoader:function(){return p.e("356").then(p.bind(p,935))}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"repositories",title:this.t("Repositories"),aclSnippet:"pm.plugin-git-manager.repositories",componentLoader:function(){return p.e("434").then(p.bind(p,33)).then(function(e){return{default:e.RepositoryConfigSettings}})}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"review-flows",title:this.t("Review Flows"),aclSnippet:"pm.plugin-git-manager.read",componentLoader:function(){return p.e("453").then(p.bind(p,100)).then(function(e){return{default:e.ReviewFlowsSettings}})}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"manage",title:this.t("Manage"),aclSnippet:"pm.plugin-git-manager.manage",componentLoader:function(){return Promise.all([p.e("313"),p.e("453"),p.e("317")]).then(p.bind(p,716)).then(function(e){return{default:e.GitManagerSettings}})}}),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,t),r}(I(e.Plugin))}(),v}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):"function"==typeof define&&define.amd?define("plugin-git-manager/client-v2",["react-i18next","@nocobase/client-v2","react","antd","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client"],t):"object"==typeof exports?exports["plugin-git-manager/client-v2"]=t(require("react-i18next"),require("@nocobase/client-v2"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client")):e["plugin-git-manager/client-v2"]=t(e["react-i18next"],e["@nocobase/client-v2"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"])}(self,function(e,t,n,r,o,i,a){return function(){"use strict";var u,l,c,s={122:function(e,t,n){function r(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.d(t,{JB:function(){return c},SY:function(){return a},Z7:function(){return l},oP:function(){return u},sP:function(){return s}});var i=new WeakMap;function a(e,t){null==t?i.delete(e):i.set(e,t)}function u(e){return i.get(e)}function l(e){var t;return null==e||null==(t=e.data)?void 0:t.data}function c(e){var t=l(e);return t&&(void 0===t?"undefined":o(t))==="object"&&"success"in t&&"data"in t?t.data:t}function s(e,t,n){var i;return(i=function(){var r;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(i){switch(i.label){case 0:return[4,e.apiClient.request({url:"gitManager:chatContextContent",params:function(e,t){if("repository"===e)return{kind:e,repositoryId:t};var n=t.indexOf(":"),r=t.slice(0,n),o=t.slice(n+1);if(n<=0||!o)throw Error("Invalid Git context");return"merge-request"===e?{kind:e,repositoryId:r,mrIid:o}:{kind:e,repositoryId:r,commitHash:o}}(t,n),skipNotify:!0})];case 1:if(!(r=c(i.sent()))||(void 0===r?"undefined":o(r))!=="object")throw Error("Git context is unavailable");return[2,r]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var a=i.apply(e,t);function u(e){r(a,n,o,u,l,"next",e)}function l(e){r(a,n,o,u,l,"throw",e)}u(void 0)})})()}},375:function(e){e.exports=o},485:function(e){e.exports=t},694:function(e){e.exports=i},768:function(e){e.exports=a},59:function(e){e.exports=r},155:function(e){e.exports=n},953:function(t){t.exports=e}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return s[e].call(n.exports,n,n.exports,p),n.exports}p.m=s,p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.f={},p.e=function(e){return Promise.all(Object.keys(p.f).reduce(function(t,n){return p.f[n](e,t),t},[]))},p.u=function(e){return""+e+"."+({156:"445366026c1cc9a8",313:"3c867179c3a1e817",317:"4e116f84ed9081b6",356:"3d40a34bad08f8ff",434:"764113d20743a45b",453:"5ab80c06d8e61a7e",454:"b885b1d35ef7ff72",928:"bba701b5a1ece58e"})[e]+".js"},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},p.l=function(e,t,n,r){if(d[e])return void d[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var l=a[u];if(l.getAttribute("src")==e||l.getAttribute("data-rspack")=="plugin-git-manager/client-v2:"+n){o=l;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,p.nc&&o.setAttribute("nonce",p.nc),o.setAttribute("data-rspack","plugin-git-manager/client-v2:"+n),o.src=e),d[e]=[t];var c=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},p.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.g.importScripts&&(m=p.g.location+"");var d,m,g=p.g.document;if(!m&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(m=g.currentScript.src),!m)){var y=g.getElementsByTagName("script");if(y.length)for(var v=y.length-1;v>-1&&(!m||!/^http(s?):/.test(m));)m=y[v--].src}if(!m)throw Error("Automatic publicPath is not supported in this browser");p.p=m.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u={889:0},p.f.j=function(e,t){var n=p.o(u,e)?u[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=u[e]=[t,r]});t.push(n[2]=r);var o=p.p+p.u(e),i=Error();p.l(o,function(t){if(p.o(u,e)&&(0!==(n=u[e])&&(u[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},l=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],l=0;if(o.some(function(e){return 0!==u[e]})){for(n in i)p.o(i,n)&&(p.m[n]=i[n]);a&&a(p)}for(e&&e(t);l<o.length;l++)r=o[l],p.o(u,r)&&u[r]&&u[r][0](),u[r]=0},(c=self.webpackChunkplugin_git_manager_client_v2=self.webpackChunkplugin_git_manager_client_v2||[]).forEach(l.bind(null,0)),c.push=l.bind(null,c.push.bind(c));var b={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/plugin-git-manager/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/plugin-git-manager/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",u=a.indexOf(i);e=u>=0?a.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/plugin-git-manager/dist/client-v2/"}p.p=e}(),!function(){p.r(b),p.d(b,{default:function(){return _}});var e=p(485),t=p(155),n=p.n(t),r=p(375),o=p(768),i=p(59),a=p(953),u=p(122);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(e,t)||d(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}function m(e){if(!e)return"";var t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function g(e){var r=e.app,o=e.kind,l=e.onAdd,p=e.isActive,d=e.onClose,g=(0,a.useTranslation)("plugin-git-manager").t,y=s((0,t.useState)(""),2),v=y[0],b=y[1],h=s((0,t.useState)(1),2),w=h[0],S=h[1],k=s((0,t.useState)([]),2),x=k[0],E=k[1],O=s((0,t.useState)(!1),2),C=O[0],j=O[1],P=s((0,t.useState)(),2),I=P[0],q=P[1],_=s((0,t.useState)(!1),2),A=_[0],M=_[1],T=s((0,t.useState)(!1),2),B=T[0],R=T[1],G=s((0,t.useState)([]),2),N=G[0],L=G[1],F=s((0,t.useState)(),2),$=F[0],J=F[1],K=s((0,t.useState)("opened"),2),U=K[0],z=K[1],D=s((0,t.useState)(""),2),W=D[0],Z=D[1],H=s((0,t.useState)(1),2),Y=H[0],Q=H[1],V=s((0,t.useState)([]),2),X=V[0],ee=V[1],et=s((0,t.useState)([]),2),en=et[0],er=et[1],eo=s((0,t.useState)(!1),2),ei=eo[0],ea=eo[1],eu=s((0,t.useState)(!1),2),el=eu[0],ec=eu[1],es=s((0,t.useState)(),2),ef=es[0],ep=es[1],ed=s((0,t.useState)(""),2),em=ed[0],eg=ed[1],ey=s((0,t.useState)(""),2),ev=ey[0],eb=ey[1],eh=s((0,t.useState)(""),2),ew=eh[0],eS=eh[1],ek=s((0,t.useState)(""),2),ex=ek[0],eE=ek[1],eO=s((0,t.useState)(!1),2),eC=eO[0],ej=eO[1],eP=(0,t.useRef)(!1),eI=(0,t.useRef)(!0),eq=(0,t.useRef)(!1);(0,t.useEffect)(function(){return eI.current=!0,function(){eI.current=!1}},[]),(0,t.useEffect)(function(){var e=(0,u.oP)(r);if(null!=e){var t=!1;return r.apiClient.request({url:"gitManager:chatContextOptions",params:{kind:o,repositoryId:e,page:1,pageSize:1},skipNotify:!0}).then(function(e){var n,r=(0,u.JB)(e);!t&&!eP.current&&(null==r||null==(n=r.items)?void 0:n[0])&&q(r.items[0])}).catch(function(){}),function(){t=!0}}},[r,o]),(0,t.useEffect)(function(){var e=!1;return M(!0),r.apiClient.request({url:"gitManager:chatContextOptions",params:{kind:o,search:v,page:w,pageSize:30},skipNotify:!0}).then(function(t){if(!e){var n=(0,u.JB)(t),r=Array.isArray(null==n?void 0:n.items)?n.items:[];E(function(e){return 1===w?r:f(e).concat(f(r))}),j((null==n?void 0:n.hasMore)===!0),eg("")}}).finally(function(){e||M(!1)}).catch(function(){e||eg(g("Unable to load Git context. Check your access and try again."))}),function(){e=!0}},[r,o,w,v,g]),(0,t.useEffect)(function(){if(L([]),J(void 0),eb(""),R(!1),"commit"===o&&I){var e=!1;return R(!0),r.apiClient.request({url:"gitManager:branches",params:{repositoryId:I.id},skipNotify:!0}).then(function(t){if(!e){var n=(0,u.JB)(t),r=Array.isArray(null==n?void 0:n.all)?n.all:[];L(r);var o=!(null==n?void 0:n.detached)&&(null==n?void 0:n.current)?n.current:void 0,i=o&&r.includes(o)?o:I.defaultBranch;J(i&&r.includes(i)?i:r[0]),eb("")}}).finally(function(){e||R(!1)}).catch(function(){e||eb(g("Unable to load Git context. Check your access and try again."))}),function(){e=!0}}},[r,o,I,g]),(0,t.useEffect)(function(){if(!I||"repository"===o||"commit"===o&&!$)return void ec(!1);var e=!1;ec(!0);var t="merge-request"===o?{repositoryId:I.id,state:U,page:Y,perPage:30}:{repositoryId:I.id,branch:$,skip:(Y-1)*30,maxCount:30};return r.apiClient.request({url:"merge-request"===o?"gitManager:mergeRequests":"gitManager:log",params:t,skipNotify:!0}).then(function(t){if(!e){if("merge-request"===o){var n,r,i,a=(0,u.JB)(t),l=Array.isArray(a)?a:[],c=(0,u.Z7)(t);ee(function(e){return 1===Y?l:f(e).concat(f(l))}),ea(null!=(n=null==c||null==(r=c.pagination)?void 0:r.hasMore)?n:(null==c||null==(i=c.pagination)?void 0:i.totalPages)!=null?Y<c.pagination.totalPages:30===l.length)}else{var s=(0,u.JB)(t),p=Array.isArray(null==s?void 0:s.all)?s.all:[];er(function(e){return 1===Y?p:f(e).concat(f(p))}),ea(30===p.length)}eS("")}}).finally(function(){e||ec(!1)}).catch(function(){e||eS(g("Unable to load Git context. Check your access and try again."))}),function(){e=!0}},[r,$,Y,o,I,U,g]);var e_=(0,t.useMemo)(function(){var e=W.trim().toLowerCase().replace(/^!/,"");return X.filter(function(t){return"".concat(t.iid," ").concat(t.title).toLowerCase().includes(e)})},[W,X]),eA=(0,t.useMemo)(function(){var e=W.trim().toLowerCase();return en.filter(function(t){return"".concat(t.hash," ").concat(t.subject||t.message||"").toLowerCase().includes(e)})},[W,en]);return n().createElement(i.Form,{layout:"vertical",onFinish:function(){var e;return(e=function(){var e,t,n,i,a;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(c){switch(c.label){case 0:if(eq.current||!I||"repository"!==o&&!ef)return[2];e="repository"===o?String(I.id):"".concat(I.id,":").concat(ef),t=X.find(function(e){return String(e.iid)===ef}),n=en.find(function(e){return e.hash===ef}),i=I.name||String(I.id),a="repository"===o?i:"merge-request"===o?"".concat(i," \xb7 !").concat(ef," \xb7 ").concat((null==t?void 0:t.title)||""):"".concat(i," \xb7 ").concat(null==ef?void 0:ef.slice(0,7)," \xb7 ").concat((null==n?void 0:n.subject)||(null==n?void 0:n.message)||""),eq.current=!0,ej(!0),c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,(0,u.sP)(r,o,e)];case 2:if(c.sent(),!eI.current||p&&!p())return[2];return l({uid:e,title:a}),d(),[3,5];case 3:return c.sent(),eI.current&&eE(g("Git context is unavailable. Check your access and select it again.")),[3,5];case 4:return eq.current=!1,eI.current&&ej(!1),[7];case 5:return[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(void 0)})})()},disabled:eC},n().createElement(i.Form.Item,{label:g("Search repositories")},n().createElement(i.Input.Search,{allowClear:!0,onSearch:function(e,t){null==t||t.preventDefault(),eP.current=!0,S(1),b(e)},"aria-label":g("Search repositories")})),n().createElement(i.Form.Item,{label:g("Repository"),required:!0},n().createElement(i.Select,{"aria-label":g("Repository"),loading:A,value:null==I?void 0:I.id,onChange:function(e){eP.current=!0,q(x.find(function(t){return t.id===e})),J(void 0),L([]),ep(void 0),Q(1),ee([]),er([]),ea(!1),Z(""),eS(""),eE("")},placeholder:g("Select a repository"),options:(I&&!x.some(function(e){return e.id===I.id})?[I].concat(f(x)):x).map(function(e){return{value:e.id,label:[e.name||String(e.id),e.defaultBranch,e.status].filter(Boolean).join(" \xb7 ")}}),notFoundContent:A?n().createElement(i.Spin,{size:"small"}):g("No repositories available")}),C&&n().createElement(i.Button,{type:"link",loading:A,onClick:function(){return S(function(e){return e+1})}},g("Load more repositories"))),"commit"===o&&I&&n().createElement(i.Form.Item,{label:g("Branch"),required:!0},n().createElement(i.Select,{"aria-label":g("Branch"),loading:B,value:$,placeholder:g("Select a branch"),options:N.map(function(e){return{value:e,label:e}}),onChange:function(e){J(e),Q(1),er([]),ea(!1),ep(void 0),eS(""),eE("")}})),"merge-request"===o&&I&&n().createElement(i.Form.Item,{label:g("State")},n().createElement(i.Select,{"aria-label":g("State"),value:U,options:["opened","merged","closed","all"].map(function(e){return{value:e,label:g(e)}}),onChange:function(e){z(e),Q(1),ee([]),ea(!1),ep(void 0),eS(""),eE("")}})),"repository"!==o&&I&&("commit"!==o||$)&&n().createElement(n().Fragment,null,n().createElement(i.Form.Item,{label:g("Search loaded results")},n().createElement(i.Input,{"aria-label":g("Search loaded results"),value:W,onChange:function(e){Z(e.target.value),ep(void 0),eE("")},onPressEnter:function(e){return e.preventDefault()},allowClear:!0})),n().createElement(i.Form.Item,{label:g("commit"===o?"Commit":"Merge Request"),required:!0},n().createElement(i.Select,{"aria-label":g("commit"===o?"Commit":"Merge Request"),loading:el,value:ef,onChange:ep,placeholder:g("commit"===o?"Select a commit":"Select a merge request"),options:"merge-request"===o?e_.map(function(e){var t,n;return{value:String(e.iid),label:["!".concat(e.iid," \xb7 ").concat(e.title),e.sourceBranch&&e.targetBranch?"".concat(e.sourceBranch," → ").concat(e.targetBranch):"",(null==(t=e.author)?void 0:t.name)||(null==(n=e.author)?void 0:n.username),m(e.updatedAt)].filter(Boolean).join(" \xb7 ")}}):eA.map(function(e){return{value:e.hash,label:[e.hash.slice(0,7),e.subject||e.message,e.author_name,m(e.date)].filter(Boolean).join(" \xb7 ")}}),notFoundContent:el?n().createElement(i.Spin,{size:"small"}):g("No results")}),ei&&n().createElement(i.Button,{type:"link",loading:el,onClick:function(){return Q(function(e){return e+1})}},g("Load more results")))),(ex||ew||ev||em)&&n().createElement(i.Alert,{type:"error",showIcon:!0,message:ex||ew||ev||em,style:{marginBottom:16}}),n().createElement(i.Space,{style:{display:"flex",justifyContent:"flex-end"}},n().createElement(i.Button,{onClick:d},g("Cancel")),n().createElement(i.Button,{type:"primary",htmlType:"submit",loading:eC,disabled:!I||"repository"!==o&&!ef},g("Attach to chat"))),n().createElement(i.Typography.Text,{type:"secondary","aria-live":"polite"},el||A||B?g("Loading"):""))}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,u,"next",e)}function u(e){v(i,r,o,a,u,"throw",e)}a(void 0)})}}function w(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var S=["repository","merge-request","commit"],k=function(){return{repository:!1,"merge-request":!1,commit:!1}},x=new WeakMap;function E(e){var t=e.kind,o=e.title,u=(0,a.useTranslation)("plugin-git-manager").t,l={repository:n().createElement(r.BranchesOutlined,null),"merge-request":n().createElement(r.MergeOutlined,null),commit:n().createElement(r.NodeIndexOutlined,null)};return n().createElement(i.Space,{size:4},l[t],n().createElement("span",null,o||u({repository:"Git Repository","merge-request":"Git Merge Request",commit:"Git Commit"}[t])))}function O(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){n(e);return}u.done?t(l):Promise.resolve(l).then(r,o)}function C(e,t,n){return(C=q()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o}).apply(null,arguments)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t="function"==typeof Map?new Map:void 0;return(I=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return C(e,arguments,j(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)})(e)}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(q=function(){return!!e})()}var _=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=j(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,q()?Reflect.construct(e,t||[],j(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&P(r,e),t=[{key:"load",value:function(){var e;return(e=function(){var e,t,r;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:var l,c,s,f;if(!(r=null==(e=this.app.pm.get("ai"))?void 0:e.aiManager))return[3,2];return[4,(l=this.app,(c=x.get(r))||(s=l,f=r,c=h(function(){var e,t,r,a,l,c,p,d,m,v,b,x,O,C;return w(this,function(j){switch(j.label){case 0:a=k(),l=0,c=!0,p=!1,d=void 0;try{for(m=S[Symbol.iterator]();!(c=(v=m.next()).done);c=!0)b=v.value,x="git-".concat(b),f.getWorkContext(x)||f.registerWorkContext(x,function(e,t){return{name:"git-".concat(t),tag:{Component:function(e){var r=e.item;return n().createElement(E,{kind:t,title:r.title||r.uid})}},getContent:function(n,r){var o=r.uid;return h(function(){var r;return w(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,u.sP)(e,t,o)];case 1:return[2,a.sent()];case 2:throw r=a.sent(),i.message.error(n.i18n.t("Git context is unavailable. Check your access and select it again.",{ns:"plugin-git-manager"})),r;case 3:return[2]}})})()}}}(s,b))}catch(e){p=!0,d=e}finally{try{c||null==m.return||m.return()}finally{if(p)throw d}}return O=function(){var e=new o.Registry,t=!0,r=!1,i=void 0;try{for(var u,l=f.workContext.getEntities()[Symbol.iterator]();!(t=(u=l.next()).done);t=!0)!function(){var t,r,o=(t=u.value,function(e){if(Array.isArray(e))return e}(t)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return y(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],l=o[1],c=S.find(function(e){return i==="git-".concat(e)});if(!c)return e.register(i,l);l.menu;var f=function(e,t){if(null==e)return{};var n,r,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,n=Reflect.ownKeys(Object(e));o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}(e,t),Object.getOwnPropertySymbols)for(o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(l,["menu"]);e.register(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},f,a[c]?{menu:(r=function(){return a[c]},{Component:function(){return n().createElement(E,{kind:c})},onClick:function(e){var t=e.ctx,o=e.onAdd;if(r())var i=!0,a=t.viewer.dialog({title:n().createElement(E,{kind:c}),width:720,zIndex:2200,onClose:function(){i=!1},content:function(){return n().createElement(g,{app:s,kind:c,onAdd:o,isActive:function(){return i&&r()},onClose:function(){a.close()}})}})}})}:{}))}()}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}f.workContext=e},C=function(){return h(function(){var e,t,n,r,o;return w(this,function(i){switch(i.label){case 0:if(e=++l,a=k(),O(),s.apiClient.auth&&!s.apiClient.auth.token)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,s.apiClient.request({url:"gitManager:chatContextOptions",skipNotify:!0,timeout:5e3})];case 2:if(o=u.JB.apply(void 0,[i.sent()]),e!==l)return[2];return a={repository:(null==o||null==(t=o.capabilities)?void 0:t.repository)===!0,"merge-request":(null==o||null==(n=o.capabilities)?void 0:n["merge-request"])===!0,commit:(null==o||null==(r=o.capabilities)?void 0:r.commit)===!0},O(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}})})()},s.eventBus.addEventListener("auth:tokenChanged",function(){C()}),null==(r=s.apiClient.axios)||null==(t=r.interceptors)||null==(e=t.response)||e.use(function(e){var t;return/(^|\/)roles:check(?:\?|$)/.test((null==(t=e.config)?void 0:t.url)||"")&&setTimeout(function(){return C()},0),e}),[4,C()];case 1:return j.sent(),[2]}})})(),x.set(r,c)),c)];case 1:a.sent(),a.label=2;case 2:return null==(t=this.app.pm.get("acl"))||t.settingsUI.addPermissionsTab({key:"git-manager",label:this.t("Git Manager"),sort:25,componentLoader:function(){return p.e("928").then(p.bind(p,43)).then(function(e){var t=e.RepositoryPermissions;return{default:function(e){var r=e.activeRole;return r?n().createElement(t,{key:r.name,activeRole:r}):null}}})}}),this.pluginSettingsManager.addMenuItem({key:"git-manager",title:this.t("Git Manager"),icon:"BranchesOutlined"}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"accounts",title:this.t("Git Accounts"),aclSnippet:"pm.plugin-git-manager.repositories",componentLoader:function(){return p.e("156").then(p.bind(p,367)).then(function(e){return{default:e.GitAccountsSettings}})}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"subtree-splits",title:this.t("Subtree Splits"),aclSnippet:"pm.plugin-git-manager.write",componentLoader:function(){return p.e("356").then(p.bind(p,935))}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"repositories",title:this.t("Repositories"),aclSnippet:"pm.plugin-git-manager.repositories",componentLoader:function(){return Promise.all([p.e("454"),p.e("434")]).then(p.bind(p,33)).then(function(e){return{default:e.RepositoryConfigSettings}})}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"review-flows",title:this.t("Review Flows"),aclSnippet:"pm.plugin-git-manager.read",componentLoader:function(){return Promise.all([p.e("454"),p.e("453")]).then(p.bind(p,100)).then(function(e){return{default:e.ReviewFlowsSettings}})}}),this.pluginSettingsManager.addPageTabItem({menuKey:"git-manager",key:"manage",title:this.t("Manage"),aclSnippet:"pm.plugin-git-manager.manage",componentLoader:function(){return Promise.all([p.e("313"),p.e("454"),p.e("453"),p.e("317")]).then(p.bind(p,716)).then(function(e){return{default:e.GitManagerSettings}})}}),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,t),r}(I(e.Plugin))}(),b}()});
@@ -418,5 +418,16 @@
418
418
  "Additional changed files were omitted by the provider.": "Additional changed files were omitted by the provider.",
419
419
  "The provider omitted patches for one or more files, including binary or large files.": "The provider omitted patches for one or more files, including binary or large files.",
420
420
  "The provider omitted additional changed files or patches.": "The provider omitted additional changed files or patches.",
421
- "Additional changed files or diff content were omitted.": "Additional changed files or diff content were omitted."
421
+ "Additional changed files or diff content were omitted.": "Additional changed files or diff content were omitted.",
422
+ "Repository": "Repository",
423
+ "Refresh": "Refresh",
424
+ "Installing Git via Cluster Manager...": "Installing Git via Cluster Manager...",
425
+ "Local Git operations will unlock automatically as soon as Cluster Manager finishes installing git on this node.": "Local Git operations will unlock automatically as soon as Cluster Manager finishes installing git on this node.",
426
+ "Git CLI is not installed on this node yet": "Git CLI is not installed on this node yet",
427
+ "Git is managed separately via Cluster Manager. Install git now to enable File Explorer, Commit History, Operations, and Clone.": "Git is managed separately via Cluster Manager. Install git now to enable File Explorer, Commit History, Operations, and Clone.",
428
+ "Install git in the app/worker container or set GIT_BINARY_PATH to use local repository features.": "Install git in the app/worker container or set GIT_BINARY_PATH to use local repository features.",
429
+ "Install Git via Cluster Manager": "Install Git via Cluster Manager",
430
+ "Open Cluster Package Installer": "Open Cluster Package Installer",
431
+ "Git installation dispatched via Cluster Manager": "Git installation dispatched via Cluster Manager",
432
+ "Failed to start Git installation via Cluster Manager": "Failed to start Git installation via Cluster Manager"
422
433
  }
@@ -406,5 +406,16 @@
406
406
  "Additional changed files were omitted by the provider.": "Nhà cung cấp đã lược bỏ một số tệp thay đổi khác.",
407
407
  "The provider omitted patches for one or more files, including binary or large files.": "Nhà cung cấp không trả patch cho một hoặc nhiều tệp, bao gồm tệp nhị phân hoặc tệp lớn.",
408
408
  "The provider omitted additional changed files or patches.": "Nhà cung cấp đã lược bỏ một số tệp thay đổi hoặc patch khác.",
409
- "Additional changed files or diff content were omitted.": "Một số tệp thay đổi hoặc nội dung diff khác đã được lược bỏ."
409
+ "Additional changed files or diff content were omitted.": "Một số tệp thay đổi hoặc nội dung diff khác đã được lược bỏ.",
410
+ "Repository": "Kho mã nguồn",
411
+ "Refresh": "Làm mới",
412
+ "Installing Git via Cluster Manager...": "Đang cài đặt Git qua Cluster Manager...",
413
+ "Local Git operations will unlock automatically as soon as Cluster Manager finishes installing git on this node.": "Các thao tác Git cục bộ sẽ tự động mở khóa ngay khi Cluster Manager cài xong git trên node này.",
414
+ "Git CLI is not installed on this node yet": "Node hiện tại chưa được cài đặt Git CLI",
415
+ "Git is managed separately via Cluster Manager. Install git now to enable File Explorer, Commit History, Operations, and Clone.": "Git được quản lý cài đặt riêng qua Cluster Manager. Hãy bấm cài đặt git để dùng Duyệt tệp, Lịch sử commit, Thao tác Git và Clone.",
416
+ "Install git in the app/worker container or set GIT_BINARY_PATH to use local repository features.": "Hãy cài git trong container app/worker hoặc cấu hình GIT_BINARY_PATH để dùng các tính năng kho cục bộ.",
417
+ "Install Git via Cluster Manager": "Cài đặt Git qua Cluster Manager",
418
+ "Open Cluster Package Installer": "Mở trình cài gói Cluster Manager",
419
+ "Git installation dispatched via Cluster Manager": "Đã gửi lệnh cài đặt Git qua Cluster Manager",
420
+ "Failed to start Git installation via Cluster Manager": "Không thể khởi chạy cài đặt Git qua Cluster Manager"
410
421
  }
@@ -175,5 +175,16 @@
175
175
  "Additional changed files were omitted by the provider.": "提供商省略了其他更改的文件。",
176
176
  "The provider omitted patches for one or more files, including binary or large files.": "提供商省略了一个或多个文件的补丁,包括二进制文件或大文件。",
177
177
  "The provider omitted additional changed files or patches.": "提供商省略了其他更改的文件或补丁。",
178
- "Additional changed files or diff content were omitted.": "已省略其他更改的文件或差异内容。"
178
+ "Additional changed files or diff content were omitted.": "已省略其他更改的文件或差异内容。",
179
+ "Repository": "仓库",
180
+ "Refresh": "刷新",
181
+ "Installing Git via Cluster Manager...": "正在通过集群管理器安装 Git...",
182
+ "Local Git operations will unlock automatically as soon as Cluster Manager finishes installing git on this node.": "集群管理器在此节点完成 git 安装后,本地 Git 操作将自动启用。",
183
+ "Git CLI is not installed on this node yet": "此节点尚未安装 Git CLI",
184
+ "Git is managed separately via Cluster Manager. Install git now to enable File Explorer, Commit History, Operations, and Clone.": "Git 通过集群管理器单独管理。立即安装 git 以启用文件浏览、提交历史、Git 操作与克隆功能。",
185
+ "Install git in the app/worker container or set GIT_BINARY_PATH to use local repository features.": "请在 app/worker 容器中安装 git 或设置 GIT_BINARY_PATH 以使用本地仓库功能。",
186
+ "Install Git via Cluster Manager": "通过集群管理器安装 Git",
187
+ "Open Cluster Package Installer": "打开集群包安装器",
188
+ "Git installation dispatched via Cluster Manager": "已通过集群管理器下发 Git 安装任务",
189
+ "Failed to start Git installation via Cluster Manager": "无法通过集群管理器启动 Git 安装"
179
190
  }
@@ -1 +1 @@
1
- {"name":"simple-git","description":"Simple GIT interface for node.js","version":"3.36.0","author":"Steve King <steve@mydev.co>","contributors":[{"name":"Steve King","email":"steve@mydev.co"}],"funding":{"type":"github","url":"https://github.com/steveukx/git-js?sponsor=1"},"keywords":["git","source control","vcs"],"license":"MIT","repository":{"type":"git","url":"https://github.com/steveukx/git-js.git","directory":"simple-git"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"types":"./dist/typings/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./promise":{"require":"./promise.js"}},"types":"./dist/typings/index.d.ts","files":["promise.*","dist"],"dependencies":{"@kwsites/file-exists":"^1.1.1","@kwsites/promise-deferred":"^1.1.1","@simple-git/args-pathspec":"^1.0.3","@simple-git/argv-parser":"^1.1.0","debug":"^4.4.0"},"_lastModified":"2026-11-25T03:50:17.128Z"}
1
+ {"name":"simple-git","description":"Simple GIT interface for node.js","version":"3.36.0","author":"Steve King <steve@mydev.co>","contributors":[{"name":"Steve King","email":"steve@mydev.co"}],"funding":{"type":"github","url":"https://github.com/steveukx/git-js?sponsor=1"},"keywords":["git","source control","vcs"],"license":"MIT","repository":{"type":"git","url":"https://github.com/steveukx/git-js.git","directory":"simple-git"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"types":"./dist/typings/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./promise":{"require":"./promise.js"}},"types":"./dist/typings/index.d.ts","files":["promise.*","dist"],"dependencies":{"@kwsites/file-exists":"^1.1.1","@kwsites/promise-deferred":"^1.1.1","@simple-git/args-pathspec":"^1.0.3","@simple-git/argv-parser":"^1.1.0","debug":"^4.4.0"},"_lastModified":"2026-11-27T01:55:05.978Z"}
@@ -1 +1 @@
1
- {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-11-25T03:50:16.432Z"}
1
+ {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-11-27T01:55:05.366Z"}