Changeset 3403852
- Timestamp:
- 11/27/2025 08:08:02 AM (4 months ago)
- Location:
- ai-mind
- Files:
-
- 12 edited
- 1 copied
-
tags/0.4.0 (copied) (copied from ai-mind/trunk)
-
tags/0.4.0/build/admin.asset.php (modified) (1 diff)
-
tags/0.4.0/build/admin.js (modified) (1 diff)
-
tags/0.4.0/classes/class-ai-api.php (modified) (3 diffs)
-
tags/0.4.0/languages/mind.pot (modified) (9 diffs)
-
tags/0.4.0/mind.php (modified) (2 diffs)
-
tags/0.4.0/readme.txt (modified) (7 diffs)
-
trunk/build/admin.asset.php (modified) (1 diff)
-
trunk/build/admin.js (modified) (1 diff)
-
trunk/classes/class-ai-api.php (modified) (3 diffs)
-
trunk/languages/mind.pot (modified) (9 diffs)
-
trunk/mind.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ai-mind/tags/0.4.0/build/admin.asset.php
r3256479 r3403852 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' dd1b4d7442e2f4d64e57');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '879c86e7a90fe3d8705e'); -
ai-mind/tags/0.4.0/build/admin.js
r3256479 r3403852 1 (()=>{"use strict";var e,t={925:(e,t,n)=>{var i={};n.r(i),n.d(i,{setActivePage:()=>Y});var a={};n.r(a),n.d(a,{getActivePage:()=>ee});var r={};n.r(r),n.d(r,{updateSettings:()=>re});var s={};n.r(s),n.d(s,{getError:()=>ce,getSetting:()=>oe,getSettings:()=>se,getUpdating:()=>le});const o=window.wp.element;function l(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=l(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}const c=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=l(e))&&(i&&(i+=" "),i+=t);return i};function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}const p=window.React;var m=n.n(p);function f(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}const g=window.ReactDOM;var h=n.n(g);const E=m().createContext(null);var v=function(e){return e.scrollTop},_="unmounted",y="exited",b="entering",x="entered",S="exiting",C=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var a,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(a=y,i.appearStatus=b):a=x:a=t.unmountOnExit||t.mountOnEnter?_:y,i.state={status:a},i.nextCallback=null,i}u(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_?{status:y}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==b&&n!==x&&(t=b):n!==b&&n!==x||(t=S)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===b){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this);n&&v(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===y&&this.setState({status:_})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[h().findDOMNode(this),i],r=a[0],s=a[1],o=this.getTimeouts(),l=i?o.appear:o.enter;e||n?(this.props.onEnter(r,s),this.safeSetState({status:b},(function(){t.props.onEntering(r,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:x},(function(){t.props.onEntered(r,s)}))}))}))):this.safeSetState({status:x},(function(){t.props.onEntered(r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:h().findDOMNode(this);t?(this.props.onExit(i),this.safeSetState({status:S},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:y},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:y},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=a[0],s=a[1];this.props.addEndListener(r,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,f(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return m().createElement(E.Provider,{value:null},"function"==typeof n?n(e,i):m().cloneElement(m().Children.only(n),i))},t}(m().Component);function k(){}C.contextType=E,C.propTypes={},C.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:k,onEntering:k,onEntered:k,onExit:k,onExiting:k,onExited:k},C.UNMOUNTED=_,C.EXITED=y,C.ENTERING=b,C.ENTERED=x,C.EXITING=S;const N=C;var O,w,P="out-in",T="in-out",A=function(e,t,n){return function(){var i;e.props[t]&&(i=e.props)[t].apply(i,arguments),n()}},D=((O={})[P]=function(e){var t=e.current,n=e.changeState;return m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){n(b,null)}))})},O[T]=function(e){var t=e.current,n=e.changeState,i=e.children;return[t,m().cloneElement(i,{in:!0,onEntered:A(i,"onEntered",(function(){n(b)}))})]},O),I=((w={})[P]=function(e){var t=e.children,n=e.changeState;return m().cloneElement(t,{in:!0,onEntered:A(t,"onEntered",(function(){n(x,m().cloneElement(t,{in:!0}))}))})},w[T]=function(e){var t=e.current,n=e.children,i=e.changeState;return[m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){i(x,m().cloneElement(n,{in:!0}))}))}),m().cloneElement(n,{in:!0})]},w),M=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).state={status:x,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}u(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===b&&e.mode===T?{status:b}:!t.current||((n=t.current)===(i=e.children)||m().isValidElement(n)&&m().isValidElement(i)&&null!=n.key&&n.key===i.key)?{current:m().cloneElement(e.children,{in:!0})}:{status:S};var n,i},n.render=function(){var e,t=this.props,n=t.children,i=t.mode,a=this.state,r=a.status,s=a.current,o={children:n,current:s,changeState:this.changeState,status:r};switch(r){case b:e=I[i](o);break;case S:e=D[i](o);break;case x:e=s}return m().createElement(E.Provider,{value:{isMounting:!this.appeared}},e)},t}(m().Component);M.propTypes={},M.defaultProps={mode:P};const R=M;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L.apply(this,arguments)}function j(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var G=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.remove(i):"string"==typeof n.className?n.className=j(n.className,i):n.setAttribute("class",j(n.className&&n.className.baseVal||"",i)));var n,i}))},U=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1];t.removeClasses(a,"exit"),t.addClass(a,r?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.addClass(a,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.removeClasses(a,r),t.addClass(a,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,i="string"==typeof n,a=i?(i&&n?n+"-":"")+e:n[e];return{baseClassName:a,activeClassName:i?a+"-active":n[e+"Active"],doneClassName:i?a+"-done":n[e+"Done"]}},t}u(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(i+=" "+a),"active"===n&&e&&v(e),i&&(this.appliedClasses[t][n]=i,function(e,t){e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i}))}(e,i))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,a=n.active,r=n.done;this.appliedClasses[t]={},i&&G(e,i),a&&G(e,a),r&&G(e,r)},n.render=function(){var e=this.props,t=(e.classNames,f(e,["classNames"]));return m().createElement(N,L({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(m().Component);U.defaultProps={classNames:""},U.propTypes={};const F=U,q=window.wp.i18n,V=window.wp.data;let Z=document.body.classList.contains("mind-admin-first-loading");function $(){return(0,o.useEffect)((()=>{Z&&(Z=!1,document.body.classList.add("mind-admin-first-loading-start"),setTimeout((()=>{document.body.classList.remove("mind-admin-first-loading-start","mind-admin-first-loading")}),8e3))}),[]),null}const B=window.lodash;var H,W;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},z.apply(this,arguments)}var K=function(e){return p.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),H||(H=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M19.75 12A7.75 7.75 0 0 0 6.52 6.52L5.4 7.64M4.25 12a7.75 7.75 0 0 0 13.23 5.48l1.12-1.12"})),W||(W=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M4.75 4.25v4h4M19.25 19.75v-4h-4"})))};const X=[{title:(0,q.__)("Claude 3.7 Sonnet","mind"),name:"claude-3-7-sonnet",description:(0,q.__)("Best quality and recommended","mind")},{title:(0,q.__)("Claude 3.5 Haiku","mind"),name:"claude-3-5-haiku",description:(0,q.__)("Fast and accurate","mind")},{title:(0,q.__)("GPT-4o","mind"),name:"gpt-4o",description:(0,q.__)("Quick and reliable","mind")},{title:(0,q.__)("GPT-4o mini","mind"),name:"gpt-4o-mini",description:(0,q.__)("Basic and fastest","mind")}],Q={welcome:{label:(0,q.__)("Welcome","mind"),block:function(){const{setActivePage:e}=(0,V.useDispatch)("mind/admin"),{settings:t}=(0,V.useSelect)((e=>{const{getSettings:t}=e("mind/settings");return{settings:t()}})),n=function(e){const t=e.ai_model||"";let n=!1;return t&&("gpt-4o"===t||"gpt-4o-mini"===t?n=!!e?.openai_api_key:e?.anthropic_api_key&&(n=!!e?.anthropic_api_key)),n}(t);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,q.sprintf)(1 (()=>{"use strict";var e,t={925:(e,t,n)=>{var i={};n.r(i),n.d(i,{setActivePage:()=>Y});var a={};n.r(a),n.d(a,{getActivePage:()=>ee});var r={};n.r(r),n.d(r,{updateSettings:()=>re});var s={};n.r(s),n.d(s,{getError:()=>ce,getSetting:()=>oe,getSettings:()=>se,getUpdating:()=>le});const o=window.wp.element;function l(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=l(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}const c=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=l(e))&&(i&&(i+=" "),i+=t);return i};function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}const p=window.React;var m=n.n(p);function f(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}const g=window.ReactDOM;var h=n.n(g);const E=m().createContext(null);var v=function(e){return e.scrollTop},_="unmounted",y="exited",b="entering",x="entered",S="exiting",C=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var a,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(a=y,i.appearStatus=b):a=x:a=t.unmountOnExit||t.mountOnEnter?_:y,i.state={status:a},i.nextCallback=null,i}u(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_?{status:y}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==b&&n!==x&&(t=b):n!==b&&n!==x||(t=S)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===b){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this);n&&v(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===y&&this.setState({status:_})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[h().findDOMNode(this),i],r=a[0],s=a[1],o=this.getTimeouts(),l=i?o.appear:o.enter;e||n?(this.props.onEnter(r,s),this.safeSetState({status:b},(function(){t.props.onEntering(r,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:x},(function(){t.props.onEntered(r,s)}))}))}))):this.safeSetState({status:x},(function(){t.props.onEntered(r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:h().findDOMNode(this);t?(this.props.onExit(i),this.safeSetState({status:S},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:y},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:y},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=a[0],s=a[1];this.props.addEndListener(r,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,f(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return m().createElement(E.Provider,{value:null},"function"==typeof n?n(e,i):m().cloneElement(m().Children.only(n),i))},t}(m().Component);function k(){}C.contextType=E,C.propTypes={},C.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:k,onEntering:k,onEntered:k,onExit:k,onExiting:k,onExited:k},C.UNMOUNTED=_,C.EXITED=y,C.ENTERING=b,C.ENTERED=x,C.EXITING=S;const N=C;var O,w,P="out-in",T="in-out",A=function(e,t,n){return function(){var i;e.props[t]&&(i=e.props)[t].apply(i,arguments),n()}},D=((O={})[P]=function(e){var t=e.current,n=e.changeState;return m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){n(b,null)}))})},O[T]=function(e){var t=e.current,n=e.changeState,i=e.children;return[t,m().cloneElement(i,{in:!0,onEntered:A(i,"onEntered",(function(){n(b)}))})]},O),I=((w={})[P]=function(e){var t=e.children,n=e.changeState;return m().cloneElement(t,{in:!0,onEntered:A(t,"onEntered",(function(){n(x,m().cloneElement(t,{in:!0}))}))})},w[T]=function(e){var t=e.current,n=e.children,i=e.changeState;return[m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){i(x,m().cloneElement(n,{in:!0}))}))}),m().cloneElement(n,{in:!0})]},w),M=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).state={status:x,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}u(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===b&&e.mode===T?{status:b}:!t.current||((n=t.current)===(i=e.children)||m().isValidElement(n)&&m().isValidElement(i)&&null!=n.key&&n.key===i.key)?{current:m().cloneElement(e.children,{in:!0})}:{status:S};var n,i},n.render=function(){var e,t=this.props,n=t.children,i=t.mode,a=this.state,r=a.status,s=a.current,o={children:n,current:s,changeState:this.changeState,status:r};switch(r){case b:e=I[i](o);break;case S:e=D[i](o);break;case x:e=s}return m().createElement(E.Provider,{value:{isMounting:!this.appeared}},e)},t}(m().Component);M.propTypes={},M.defaultProps={mode:P};const R=M;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L.apply(this,arguments)}function j(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var G=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.remove(i):"string"==typeof n.className?n.className=j(n.className,i):n.setAttribute("class",j(n.className&&n.className.baseVal||"",i)));var n,i}))},U=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1];t.removeClasses(a,"exit"),t.addClass(a,r?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.addClass(a,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.removeClasses(a,r),t.addClass(a,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,i="string"==typeof n,a=i?(i&&n?n+"-":"")+e:n[e];return{baseClassName:a,activeClassName:i?a+"-active":n[e+"Active"],doneClassName:i?a+"-done":n[e+"Done"]}},t}u(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(i+=" "+a),"active"===n&&e&&v(e),i&&(this.appliedClasses[t][n]=i,function(e,t){e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i}))}(e,i))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,a=n.active,r=n.done;this.appliedClasses[t]={},i&&G(e,i),a&&G(e,a),r&&G(e,r)},n.render=function(){var e=this.props,t=(e.classNames,f(e,["classNames"]));return m().createElement(N,L({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(m().Component);U.defaultProps={classNames:""},U.propTypes={};const F=U,q=window.wp.i18n,V=window.wp.data;let Z=document.body.classList.contains("mind-admin-first-loading");function $(){return(0,o.useEffect)((()=>{Z&&(Z=!1,document.body.classList.add("mind-admin-first-loading-start"),setTimeout((()=>{document.body.classList.remove("mind-admin-first-loading-start","mind-admin-first-loading")}),8e3))}),[]),null}const B=window.lodash;var H,W;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},z.apply(this,arguments)}var K=function(e){return p.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),H||(H=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M19.75 12A7.75 7.75 0 0 0 6.52 6.52L5.4 7.64M4.25 12a7.75 7.75 0 0 0 13.23 5.48l1.12-1.12"})),W||(W=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M4.75 4.25v4h4M19.25 19.75v-4h-4"})))};const X=[{title:(0,q.__)("Claude Sonnet 4.5","mind"),name:"claude-sonnet-4-5",description:(0,q.__)("Best quality and recommended","mind")},{title:(0,q.__)("Claude Haiku 4.5","mind"),name:"claude-haiku-4-5",description:(0,q.__)("Fast and accurate","mind")},{title:(0,q.__)("GPT-5.1","mind"),name:"gpt-5.1",description:(0,q.__)("Quick and reliable","mind")},{title:(0,q.__)("GPT-5 mini","mind"),name:"gpt-5-mini",description:(0,q.__)("Basic and fastest","mind")}],Q={welcome:{label:(0,q.__)("Welcome","mind"),block:function(){const{setActivePage:e}=(0,V.useDispatch)("mind/admin"),{settings:t}=(0,V.useSelect)((e=>{const{getSettings:t}=e("mind/settings");return{settings:t()}})),n=function(e){const t=e.ai_model||"";let n=!1;return t&&("gpt-4o"===t||"gpt-4o-mini"===t?n=!!e?.openai_api_key:e?.anthropic_api_key&&(n=!!e?.anthropic_api_key)),n}(t);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,q.sprintf)( 2 2 // translators: %s - Mind logo. 3 3 // translators: %s - Mind logo. -
ai-mind/tags/0.4.0/classes/class-ai-api.php
r3256479 r3403852 80 80 81 81 if ( $ai_model ) { 82 if ( 'gpt-4o' === $ai_model || 'gpt-4o-mini' === $ai_model ) { 83 if ( ! empty( $settings['openai_api_key'] ) ) { 84 $result = [ 85 'name' => $ai_model, 86 'key' => $settings['openai_api_key'], 87 ]; 82 if ( strpos( $ai_model, 'gpt-' ) === 0 && ! empty( $settings['openai_api_key'] ) ) { 83 $result = [ 84 'provider' => 'openai', 85 'name' => $ai_model, 86 'key' => $settings['openai_api_key'], 87 ]; 88 } elseif ( strpos( $ai_model, 'claude-' ) === 0 && ! empty( $settings['anthropic_api_key'] ) ) { 89 // Convert old model names to correct. 90 if ( $ai_model === 'claude-3-7-sonnet' ) { 91 $ai_model = 'claude-sonnet-3-7'; 92 } else if ( $ai_model === 'claude-3-7-haiku' ) { 93 $ai_model = 'claude-haiku-3-7'; 88 94 } 89 } elseif ( ! empty( $settings['anthropic_api_key'] ) ) { 95 90 96 $result = [ 91 'name' => 'claude-3-5-haiku' === $ai_model ? 'claude-3-5-haiku' : 'claude-3-7-sonnet', 92 'key' => $settings['anthropic_api_key'], 97 'provider' => 'anthropic', 98 'name' => $ai_model, 99 'key' => $settings['anthropic_api_key'], 93 100 ]; 94 101 } … … 132 139 $messages = $this->prepare_messages( $request, $selected_blocks, $page_blocks, $page_context ); 133 140 134 if ( 'gpt-4o' === $connected_model['name'] || 'gpt-4o-mini' === $connected_model['name']) {141 if ( $connected_model['provider'] === 'openai' ) { 135 142 $this->request_open_ai( $connected_model, $messages ); 136 143 } else { … … 225 232 $anthropic_messages = $this->convert_to_anthropic_messages( $messages ); 226 233 $anthropic_version = '2023-06-01'; 227 $model_name = $model['name'];228 229 if ( 'claude-3-5-haiku' === $model['name'] ) {230 $model_name = 'claude-3-5-haiku-20241022';231 } else {232 $model_name = 'claude-3-7-sonnet-20250219';233 }234 234 235 235 $body = [ 236 'model' => $model _name,236 'model' => $model['name'], 237 237 'max_tokens' => 8192, 238 238 'system' => $anthropic_messages['system'], -
ai-mind/tags/0.4.0/languages/mind.pot
r3256479 r3403852 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AI Mind 0. 3.0\n"5 "Project-Id-Version: AI Mind 0.4.0\n" 6 6 "Report-Msgid-Bugs-To: https://github.com/nk-crew/mind/issues\n" 7 7 "Last-Translator: Lazy Blocks Team\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025- 03-16T08:30:22+00:00\n"12 "POT-Creation-Date: 2025-11-27T08:06:36+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 20 20 msgstr "" 21 21 22 #. Plugin URI of the plugin 23 #. Author URI of the plugin 24 #: mind.php 25 msgid "https://www.wp-mind.com/" 26 msgstr "" 27 22 28 #. Description of the plugin 23 29 #: mind.php 24 msgid "AI Page Builder based on Anthropic and OpenAI. Build, design, improve,rewrite your page sections and blocks."30 msgid "AI Page Builder powered by Anthropic and OpenAI. Build, design, improve, and rewrite your page sections and blocks." 25 31 msgstr "" 26 32 … … 28 34 #: mind.php 29 35 msgid "Mind Team" 30 msgstr ""31 32 #. Author URI of the plugin33 #: mind.php34 msgid "https://www.wp-mind.com/"35 36 msgstr "" 36 37 … … 56 57 msgstr "" 57 58 58 #: classes/class-ai-api.php:12 159 #: classes/class-ai-api.php:128 59 60 msgid "Provide request to receive AI response." 60 61 msgstr "" 61 62 62 #: classes/class-ai-api.php:1 2863 #: classes/class-ai-api.php:135 63 64 msgid "Select an AI model and provide API key in the plugin settings." 64 65 msgstr "" … … 73 74 74 75 #: src/admin/page-settings/index.js:29 75 msgid "Claude 3.7 Sonnet"76 msgid "Claude Sonnet 4.5" 76 77 msgstr "" 77 78 … … 81 82 82 83 #: src/admin/page-settings/index.js:34 83 msgid "Claude 3.5 Haiku"84 msgid "Claude Haiku 4.5" 84 85 msgstr "" 85 86 … … 89 90 90 91 #: src/admin/page-settings/index.js:39 91 msgid "GPT- 4o"92 msgid "GPT-5.1" 92 93 msgstr "" 93 94 … … 97 98 98 99 #: src/admin/page-settings/index.js:44 99 msgid "GPT- 4omini"100 msgid "GPT-5 mini" 100 101 msgstr "" 101 102 -
ai-mind/tags/0.4.0/mind.php
r3357403 r3403852 2 2 /** 3 3 * Plugin Name: AI Mind 4 * Description: AI Page Builder based on Anthropic and OpenAI. Build, design, improve,rewrite your page sections and blocks.4 * Description: AI Page Builder powered by Anthropic and OpenAI. Build, design, improve, and rewrite your page sections and blocks. 5 5 * Requires at least: 6.5 6 6 * Requires PHP: 7.2 7 * Version: 0. 3.07 * Version: 0.4.0 8 8 * Plugin URI: https://www.wp-mind.com/ 9 9 * Author: Mind Team … … 21 21 22 22 if ( ! defined( 'MIND_VERSION' ) ) { 23 define( 'MIND_VERSION', '0. 3.0' );23 define( 'MIND_VERSION', '0.4.0' ); 24 24 } 25 25 -
ai-mind/tags/0.4.0/readme.txt
r3359620 r3403852 3 3 Tags: ai, gpt, ai page builder, ai editor, copilot 4 4 Requires at least: 6.5 5 Tested up to: 6. 75 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 0. 3.07 Stable tag: 0.4.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 26 26 === 🚀 Community-Driven Development === 27 27 28 This plugin was created as an experiment in the hope that the community will influence the course of its development. Any wishes, feature requests, or bug reports are welcome and will be the motivation for developing the functionality of the plugin in [GitHub Discussions](https://github.com/nk-crew/mind/discussions).28 This plugin was created as an experiment in the hope that the community will influence the course of its development. We welcome any wishes, feature requests, or bug reports. Join the discussion on [GitHub Discussions](https://github.com/nk-crew/mind/discussions) to help shape the future of Mind. 29 29 30 30 === ✍️ Writing Assistance === … … 32 32 Mind provides various tools to help with writing content. You can use it to write an entire post, create a catchy post title, or draft a comprehensive post outline. Whether you need assistance in brainstorming ideas or structuring your content, Mind is there to support you. 33 33 34 - Write a post about specific topic35 - Write a post title about specific topic36 - Write a post outline about specific topic34 - Write a post about a specific topic 35 - Write a post title about a specific topic 36 - Write a post outline about a specific topic 37 37 38 38 === 📝 Writing Language Improvement === … … 96 96 With its comprehensive set of features, Mind empowers content creators to build high-quality pages and engaging posts, while saving time and effort in the content creation process. 97 97 98 p.s. this plugin description is created using Mind andOpenAI API.98 P.S. This plugin description was created using Mind and the OpenAI API. 99 99 100 100 === OpenAI and Anthropic === … … 124 124 = Automatic installation = 125 125 126 Install theMind either via the WordPress plugin directory or by uploading the files to your server at `wp-content/plugins`.126 Install Mind either via the WordPress plugin directory or by uploading the files to your server at `wp-content/plugins`. 127 127 128 128 = Usage = 129 129 130 To start using the Mind features you have to insert your OpenAIAPI key in the plugin settings.130 To start using Mind features, you need to insert your OpenAI or Anthropic API key in the plugin settings. 131 131 132 - Create OpenAI API key<https://platform.openai.com/account/api-keys>132 - Get an OpenAI API key at <https://platform.openai.com/account/api-keys> 133 133 - Insert this key in the plugin settings (Admin Menu → Mind → Settings) 134 - Open any post or page in WordPress editor (Gutenberg) and you cansee the new button in the editor and paragraph toolbars134 - Open any post or page in the WordPress editor (Gutenberg) and you will see the new button in the editor and paragraph toolbars 135 135 136 136 == Frequently Asked Questions == … … 138 138 = Website and Documentation = 139 139 140 There is no documentation available yet, but in the future it will be placed here -<https://www.wp-mind.com/>140 Documentation will be available at <https://www.wp-mind.com/> 141 141 142 142 = Supported page builders = 143 143 144 Mind is de veloped for the WordPress page builder - Gutenberg. Currently we don't have support for 3rd-party builders.144 Mind is designed for the native WordPress block editor (Gutenberg). Support for 3rd-party page builders is not currently available. 145 145 146 146 = Can I create entire page layouts with Mind? = … … 160 160 161 161 == Changelog == 162 163 = 0.4.0 - Nov 27, 2025 = 164 165 - added support for Claude 4.5 Sonnet, Claude 4.5 Haiku, GPT-5.1 and GPT-5 mini 162 166 163 167 = 0.3.0 - Mar 16, 2025 = -
ai-mind/trunk/build/admin.asset.php
r3256479 r3403852 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' dd1b4d7442e2f4d64e57');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '879c86e7a90fe3d8705e'); -
ai-mind/trunk/build/admin.js
r3256479 r3403852 1 (()=>{"use strict";var e,t={925:(e,t,n)=>{var i={};n.r(i),n.d(i,{setActivePage:()=>Y});var a={};n.r(a),n.d(a,{getActivePage:()=>ee});var r={};n.r(r),n.d(r,{updateSettings:()=>re});var s={};n.r(s),n.d(s,{getError:()=>ce,getSetting:()=>oe,getSettings:()=>se,getUpdating:()=>le});const o=window.wp.element;function l(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=l(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}const c=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=l(e))&&(i&&(i+=" "),i+=t);return i};function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}const p=window.React;var m=n.n(p);function f(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}const g=window.ReactDOM;var h=n.n(g);const E=m().createContext(null);var v=function(e){return e.scrollTop},_="unmounted",y="exited",b="entering",x="entered",S="exiting",C=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var a,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(a=y,i.appearStatus=b):a=x:a=t.unmountOnExit||t.mountOnEnter?_:y,i.state={status:a},i.nextCallback=null,i}u(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_?{status:y}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==b&&n!==x&&(t=b):n!==b&&n!==x||(t=S)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===b){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this);n&&v(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===y&&this.setState({status:_})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[h().findDOMNode(this),i],r=a[0],s=a[1],o=this.getTimeouts(),l=i?o.appear:o.enter;e||n?(this.props.onEnter(r,s),this.safeSetState({status:b},(function(){t.props.onEntering(r,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:x},(function(){t.props.onEntered(r,s)}))}))}))):this.safeSetState({status:x},(function(){t.props.onEntered(r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:h().findDOMNode(this);t?(this.props.onExit(i),this.safeSetState({status:S},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:y},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:y},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=a[0],s=a[1];this.props.addEndListener(r,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,f(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return m().createElement(E.Provider,{value:null},"function"==typeof n?n(e,i):m().cloneElement(m().Children.only(n),i))},t}(m().Component);function k(){}C.contextType=E,C.propTypes={},C.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:k,onEntering:k,onEntered:k,onExit:k,onExiting:k,onExited:k},C.UNMOUNTED=_,C.EXITED=y,C.ENTERING=b,C.ENTERED=x,C.EXITING=S;const N=C;var O,w,P="out-in",T="in-out",A=function(e,t,n){return function(){var i;e.props[t]&&(i=e.props)[t].apply(i,arguments),n()}},D=((O={})[P]=function(e){var t=e.current,n=e.changeState;return m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){n(b,null)}))})},O[T]=function(e){var t=e.current,n=e.changeState,i=e.children;return[t,m().cloneElement(i,{in:!0,onEntered:A(i,"onEntered",(function(){n(b)}))})]},O),I=((w={})[P]=function(e){var t=e.children,n=e.changeState;return m().cloneElement(t,{in:!0,onEntered:A(t,"onEntered",(function(){n(x,m().cloneElement(t,{in:!0}))}))})},w[T]=function(e){var t=e.current,n=e.children,i=e.changeState;return[m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){i(x,m().cloneElement(n,{in:!0}))}))}),m().cloneElement(n,{in:!0})]},w),M=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).state={status:x,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}u(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===b&&e.mode===T?{status:b}:!t.current||((n=t.current)===(i=e.children)||m().isValidElement(n)&&m().isValidElement(i)&&null!=n.key&&n.key===i.key)?{current:m().cloneElement(e.children,{in:!0})}:{status:S};var n,i},n.render=function(){var e,t=this.props,n=t.children,i=t.mode,a=this.state,r=a.status,s=a.current,o={children:n,current:s,changeState:this.changeState,status:r};switch(r){case b:e=I[i](o);break;case S:e=D[i](o);break;case x:e=s}return m().createElement(E.Provider,{value:{isMounting:!this.appeared}},e)},t}(m().Component);M.propTypes={},M.defaultProps={mode:P};const R=M;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L.apply(this,arguments)}function j(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var G=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.remove(i):"string"==typeof n.className?n.className=j(n.className,i):n.setAttribute("class",j(n.className&&n.className.baseVal||"",i)));var n,i}))},U=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1];t.removeClasses(a,"exit"),t.addClass(a,r?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.addClass(a,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.removeClasses(a,r),t.addClass(a,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,i="string"==typeof n,a=i?(i&&n?n+"-":"")+e:n[e];return{baseClassName:a,activeClassName:i?a+"-active":n[e+"Active"],doneClassName:i?a+"-done":n[e+"Done"]}},t}u(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(i+=" "+a),"active"===n&&e&&v(e),i&&(this.appliedClasses[t][n]=i,function(e,t){e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i}))}(e,i))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,a=n.active,r=n.done;this.appliedClasses[t]={},i&&G(e,i),a&&G(e,a),r&&G(e,r)},n.render=function(){var e=this.props,t=(e.classNames,f(e,["classNames"]));return m().createElement(N,L({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(m().Component);U.defaultProps={classNames:""},U.propTypes={};const F=U,q=window.wp.i18n,V=window.wp.data;let Z=document.body.classList.contains("mind-admin-first-loading");function $(){return(0,o.useEffect)((()=>{Z&&(Z=!1,document.body.classList.add("mind-admin-first-loading-start"),setTimeout((()=>{document.body.classList.remove("mind-admin-first-loading-start","mind-admin-first-loading")}),8e3))}),[]),null}const B=window.lodash;var H,W;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},z.apply(this,arguments)}var K=function(e){return p.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),H||(H=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M19.75 12A7.75 7.75 0 0 0 6.52 6.52L5.4 7.64M4.25 12a7.75 7.75 0 0 0 13.23 5.48l1.12-1.12"})),W||(W=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M4.75 4.25v4h4M19.25 19.75v-4h-4"})))};const X=[{title:(0,q.__)("Claude 3.7 Sonnet","mind"),name:"claude-3-7-sonnet",description:(0,q.__)("Best quality and recommended","mind")},{title:(0,q.__)("Claude 3.5 Haiku","mind"),name:"claude-3-5-haiku",description:(0,q.__)("Fast and accurate","mind")},{title:(0,q.__)("GPT-4o","mind"),name:"gpt-4o",description:(0,q.__)("Quick and reliable","mind")},{title:(0,q.__)("GPT-4o mini","mind"),name:"gpt-4o-mini",description:(0,q.__)("Basic and fastest","mind")}],Q={welcome:{label:(0,q.__)("Welcome","mind"),block:function(){const{setActivePage:e}=(0,V.useDispatch)("mind/admin"),{settings:t}=(0,V.useSelect)((e=>{const{getSettings:t}=e("mind/settings");return{settings:t()}})),n=function(e){const t=e.ai_model||"";let n=!1;return t&&("gpt-4o"===t||"gpt-4o-mini"===t?n=!!e?.openai_api_key:e?.anthropic_api_key&&(n=!!e?.anthropic_api_key)),n}(t);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,q.sprintf)(1 (()=>{"use strict";var e,t={925:(e,t,n)=>{var i={};n.r(i),n.d(i,{setActivePage:()=>Y});var a={};n.r(a),n.d(a,{getActivePage:()=>ee});var r={};n.r(r),n.d(r,{updateSettings:()=>re});var s={};n.r(s),n.d(s,{getError:()=>ce,getSetting:()=>oe,getSettings:()=>se,getUpdating:()=>le});const o=window.wp.element;function l(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=l(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}const c=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=l(e))&&(i&&(i+=" "),i+=t);return i};function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}const p=window.React;var m=n.n(p);function f(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}const g=window.ReactDOM;var h=n.n(g);const E=m().createContext(null);var v=function(e){return e.scrollTop},_="unmounted",y="exited",b="entering",x="entered",S="exiting",C=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var a,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(a=y,i.appearStatus=b):a=x:a=t.unmountOnExit||t.mountOnEnter?_:y,i.state={status:a},i.nextCallback=null,i}u(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===_?{status:y}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==b&&n!==x&&(t=b):n!==b&&n!==x||(t=S)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===b){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this);n&&v(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===y&&this.setState({status:_})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[h().findDOMNode(this),i],r=a[0],s=a[1],o=this.getTimeouts(),l=i?o.appear:o.enter;e||n?(this.props.onEnter(r,s),this.safeSetState({status:b},(function(){t.props.onEntering(r,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:x},(function(){t.props.onEntered(r,s)}))}))}))):this.safeSetState({status:x},(function(){t.props.onEntered(r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:h().findDOMNode(this);t?(this.props.onExit(i),this.safeSetState({status:S},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:y},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:y},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:h().findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=a[0],s=a[1];this.props.addEndListener(r,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===_)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,f(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return m().createElement(E.Provider,{value:null},"function"==typeof n?n(e,i):m().cloneElement(m().Children.only(n),i))},t}(m().Component);function k(){}C.contextType=E,C.propTypes={},C.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:k,onEntering:k,onEntered:k,onExit:k,onExiting:k,onExited:k},C.UNMOUNTED=_,C.EXITED=y,C.ENTERING=b,C.ENTERED=x,C.EXITING=S;const N=C;var O,w,P="out-in",T="in-out",A=function(e,t,n){return function(){var i;e.props[t]&&(i=e.props)[t].apply(i,arguments),n()}},D=((O={})[P]=function(e){var t=e.current,n=e.changeState;return m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){n(b,null)}))})},O[T]=function(e){var t=e.current,n=e.changeState,i=e.children;return[t,m().cloneElement(i,{in:!0,onEntered:A(i,"onEntered",(function(){n(b)}))})]},O),I=((w={})[P]=function(e){var t=e.children,n=e.changeState;return m().cloneElement(t,{in:!0,onEntered:A(t,"onEntered",(function(){n(x,m().cloneElement(t,{in:!0}))}))})},w[T]=function(e){var t=e.current,n=e.children,i=e.changeState;return[m().cloneElement(t,{in:!1,onExited:A(t,"onExited",(function(){i(x,m().cloneElement(n,{in:!0}))}))}),m().cloneElement(n,{in:!0})]},w),M=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).state={status:x,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}u(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===b&&e.mode===T?{status:b}:!t.current||((n=t.current)===(i=e.children)||m().isValidElement(n)&&m().isValidElement(i)&&null!=n.key&&n.key===i.key)?{current:m().cloneElement(e.children,{in:!0})}:{status:S};var n,i},n.render=function(){var e,t=this.props,n=t.children,i=t.mode,a=this.state,r=a.status,s=a.current,o={children:n,current:s,changeState:this.changeState,status:r};switch(r){case b:e=I[i](o);break;case S:e=D[i](o);break;case x:e=s}return m().createElement(E.Provider,{value:{isMounting:!this.appeared}},e)},t}(m().Component);M.propTypes={},M.defaultProps={mode:P};const R=M;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L.apply(this,arguments)}function j(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var G=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.remove(i):"string"==typeof n.className?n.className=j(n.className,i):n.setAttribute("class",j(n.className&&n.className.baseVal||"",i)));var n,i}))},U=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1];t.removeClasses(a,"exit"),t.addClass(a,r?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.addClass(a,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),a=i[0],r=i[1]?"appear":"enter";t.removeClasses(a,r),t.addClass(a,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,i="string"==typeof n,a=i?(i&&n?n+"-":"")+e:n[e];return{baseClassName:a,activeClassName:i?a+"-active":n[e+"Active"],doneClassName:i?a+"-done":n[e+"Done"]}},t}u(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i=this.getClassNames(t)[n+"ClassName"],a=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&a&&(i+=" "+a),"active"===n&&e&&v(e),i&&(this.appliedClasses[t][n]=i,function(e,t){e&&t&&t.split(" ").forEach((function(t){return i=t,void((n=e).classList?n.classList.add(i):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,i)||("string"==typeof n.className?n.className=n.className+" "+i:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+i)));var n,i}))}(e,i))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,a=n.active,r=n.done;this.appliedClasses[t]={},i&&G(e,i),a&&G(e,a),r&&G(e,r)},n.render=function(){var e=this.props,t=(e.classNames,f(e,["classNames"]));return m().createElement(N,L({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(m().Component);U.defaultProps={classNames:""},U.propTypes={};const F=U,q=window.wp.i18n,V=window.wp.data;let Z=document.body.classList.contains("mind-admin-first-loading");function $(){return(0,o.useEffect)((()=>{Z&&(Z=!1,document.body.classList.add("mind-admin-first-loading-start"),setTimeout((()=>{document.body.classList.remove("mind-admin-first-loading-start","mind-admin-first-loading")}),8e3))}),[]),null}const B=window.lodash;var H,W;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},z.apply(this,arguments)}var K=function(e){return p.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),H||(H=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M19.75 12A7.75 7.75 0 0 0 6.52 6.52L5.4 7.64M4.25 12a7.75 7.75 0 0 0 13.23 5.48l1.12-1.12"})),W||(W=p.createElement("path",{fill:"transparent",stroke:"currentColor",strokeWidth:1.5,d:"M4.75 4.25v4h4M19.25 19.75v-4h-4"})))};const X=[{title:(0,q.__)("Claude Sonnet 4.5","mind"),name:"claude-sonnet-4-5",description:(0,q.__)("Best quality and recommended","mind")},{title:(0,q.__)("Claude Haiku 4.5","mind"),name:"claude-haiku-4-5",description:(0,q.__)("Fast and accurate","mind")},{title:(0,q.__)("GPT-5.1","mind"),name:"gpt-5.1",description:(0,q.__)("Quick and reliable","mind")},{title:(0,q.__)("GPT-5 mini","mind"),name:"gpt-5-mini",description:(0,q.__)("Basic and fastest","mind")}],Q={welcome:{label:(0,q.__)("Welcome","mind"),block:function(){const{setActivePage:e}=(0,V.useDispatch)("mind/admin"),{settings:t}=(0,V.useSelect)((e=>{const{getSettings:t}=e("mind/settings");return{settings:t()}})),n=function(e){const t=e.ai_model||"";let n=!1;return t&&("gpt-4o"===t||"gpt-4o-mini"===t?n=!!e?.openai_api_key:e?.anthropic_api_key&&(n=!!e?.anthropic_api_key)),n}(t);return(0,p.createElement)(p.Fragment,null,(0,p.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,q.sprintf)( 2 2 // translators: %s - Mind logo. 3 3 // translators: %s - Mind logo. -
ai-mind/trunk/classes/class-ai-api.php
r3256479 r3403852 80 80 81 81 if ( $ai_model ) { 82 if ( 'gpt-4o' === $ai_model || 'gpt-4o-mini' === $ai_model ) { 83 if ( ! empty( $settings['openai_api_key'] ) ) { 84 $result = [ 85 'name' => $ai_model, 86 'key' => $settings['openai_api_key'], 87 ]; 82 if ( strpos( $ai_model, 'gpt-' ) === 0 && ! empty( $settings['openai_api_key'] ) ) { 83 $result = [ 84 'provider' => 'openai', 85 'name' => $ai_model, 86 'key' => $settings['openai_api_key'], 87 ]; 88 } elseif ( strpos( $ai_model, 'claude-' ) === 0 && ! empty( $settings['anthropic_api_key'] ) ) { 89 // Convert old model names to correct. 90 if ( $ai_model === 'claude-3-7-sonnet' ) { 91 $ai_model = 'claude-sonnet-3-7'; 92 } else if ( $ai_model === 'claude-3-7-haiku' ) { 93 $ai_model = 'claude-haiku-3-7'; 88 94 } 89 } elseif ( ! empty( $settings['anthropic_api_key'] ) ) { 95 90 96 $result = [ 91 'name' => 'claude-3-5-haiku' === $ai_model ? 'claude-3-5-haiku' : 'claude-3-7-sonnet', 92 'key' => $settings['anthropic_api_key'], 97 'provider' => 'anthropic', 98 'name' => $ai_model, 99 'key' => $settings['anthropic_api_key'], 93 100 ]; 94 101 } … … 132 139 $messages = $this->prepare_messages( $request, $selected_blocks, $page_blocks, $page_context ); 133 140 134 if ( 'gpt-4o' === $connected_model['name'] || 'gpt-4o-mini' === $connected_model['name']) {141 if ( $connected_model['provider'] === 'openai' ) { 135 142 $this->request_open_ai( $connected_model, $messages ); 136 143 } else { … … 225 232 $anthropic_messages = $this->convert_to_anthropic_messages( $messages ); 226 233 $anthropic_version = '2023-06-01'; 227 $model_name = $model['name'];228 229 if ( 'claude-3-5-haiku' === $model['name'] ) {230 $model_name = 'claude-3-5-haiku-20241022';231 } else {232 $model_name = 'claude-3-7-sonnet-20250219';233 }234 234 235 235 $body = [ 236 'model' => $model _name,236 'model' => $model['name'], 237 237 'max_tokens' => 8192, 238 238 'system' => $anthropic_messages['system'], -
ai-mind/trunk/languages/mind.pot
r3256479 r3403852 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AI Mind 0. 3.0\n"5 "Project-Id-Version: AI Mind 0.4.0\n" 6 6 "Report-Msgid-Bugs-To: https://github.com/nk-crew/mind/issues\n" 7 7 "Last-Translator: Lazy Blocks Team\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025- 03-16T08:30:22+00:00\n"12 "POT-Creation-Date: 2025-11-27T08:06:36+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 20 20 msgstr "" 21 21 22 #. Plugin URI of the plugin 23 #. Author URI of the plugin 24 #: mind.php 25 msgid "https://www.wp-mind.com/" 26 msgstr "" 27 22 28 #. Description of the plugin 23 29 #: mind.php 24 msgid "AI Page Builder based on Anthropic and OpenAI. Build, design, improve,rewrite your page sections and blocks."30 msgid "AI Page Builder powered by Anthropic and OpenAI. Build, design, improve, and rewrite your page sections and blocks." 25 31 msgstr "" 26 32 … … 28 34 #: mind.php 29 35 msgid "Mind Team" 30 msgstr ""31 32 #. Author URI of the plugin33 #: mind.php34 msgid "https://www.wp-mind.com/"35 36 msgstr "" 36 37 … … 56 57 msgstr "" 57 58 58 #: classes/class-ai-api.php:12 159 #: classes/class-ai-api.php:128 59 60 msgid "Provide request to receive AI response." 60 61 msgstr "" 61 62 62 #: classes/class-ai-api.php:1 2863 #: classes/class-ai-api.php:135 63 64 msgid "Select an AI model and provide API key in the plugin settings." 64 65 msgstr "" … … 73 74 74 75 #: src/admin/page-settings/index.js:29 75 msgid "Claude 3.7 Sonnet"76 msgid "Claude Sonnet 4.5" 76 77 msgstr "" 77 78 … … 81 82 82 83 #: src/admin/page-settings/index.js:34 83 msgid "Claude 3.5 Haiku"84 msgid "Claude Haiku 4.5" 84 85 msgstr "" 85 86 … … 89 90 90 91 #: src/admin/page-settings/index.js:39 91 msgid "GPT- 4o"92 msgid "GPT-5.1" 92 93 msgstr "" 93 94 … … 97 98 98 99 #: src/admin/page-settings/index.js:44 99 msgid "GPT- 4omini"100 msgid "GPT-5 mini" 100 101 msgstr "" 101 102 -
ai-mind/trunk/mind.php
r3357403 r3403852 2 2 /** 3 3 * Plugin Name: AI Mind 4 * Description: AI Page Builder based on Anthropic and OpenAI. Build, design, improve,rewrite your page sections and blocks.4 * Description: AI Page Builder powered by Anthropic and OpenAI. Build, design, improve, and rewrite your page sections and blocks. 5 5 * Requires at least: 6.5 6 6 * Requires PHP: 7.2 7 * Version: 0. 3.07 * Version: 0.4.0 8 8 * Plugin URI: https://www.wp-mind.com/ 9 9 * Author: Mind Team … … 21 21 22 22 if ( ! defined( 'MIND_VERSION' ) ) { 23 define( 'MIND_VERSION', '0. 3.0' );23 define( 'MIND_VERSION', '0.4.0' ); 24 24 } 25 25 -
ai-mind/trunk/readme.txt
r3359620 r3403852 3 3 Tags: ai, gpt, ai page builder, ai editor, copilot 4 4 Requires at least: 6.5 5 Tested up to: 6. 75 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 0. 3.07 Stable tag: 0.4.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 26 26 === 🚀 Community-Driven Development === 27 27 28 This plugin was created as an experiment in the hope that the community will influence the course of its development. Any wishes, feature requests, or bug reports are welcome and will be the motivation for developing the functionality of the plugin in [GitHub Discussions](https://github.com/nk-crew/mind/discussions).28 This plugin was created as an experiment in the hope that the community will influence the course of its development. We welcome any wishes, feature requests, or bug reports. Join the discussion on [GitHub Discussions](https://github.com/nk-crew/mind/discussions) to help shape the future of Mind. 29 29 30 30 === ✍️ Writing Assistance === … … 32 32 Mind provides various tools to help with writing content. You can use it to write an entire post, create a catchy post title, or draft a comprehensive post outline. Whether you need assistance in brainstorming ideas or structuring your content, Mind is there to support you. 33 33 34 - Write a post about specific topic35 - Write a post title about specific topic36 - Write a post outline about specific topic34 - Write a post about a specific topic 35 - Write a post title about a specific topic 36 - Write a post outline about a specific topic 37 37 38 38 === 📝 Writing Language Improvement === … … 96 96 With its comprehensive set of features, Mind empowers content creators to build high-quality pages and engaging posts, while saving time and effort in the content creation process. 97 97 98 p.s. this plugin description is created using Mind andOpenAI API.98 P.S. This plugin description was created using Mind and the OpenAI API. 99 99 100 100 === OpenAI and Anthropic === … … 124 124 = Automatic installation = 125 125 126 Install theMind either via the WordPress plugin directory or by uploading the files to your server at `wp-content/plugins`.126 Install Mind either via the WordPress plugin directory or by uploading the files to your server at `wp-content/plugins`. 127 127 128 128 = Usage = 129 129 130 To start using the Mind features you have to insert your OpenAIAPI key in the plugin settings.130 To start using Mind features, you need to insert your OpenAI or Anthropic API key in the plugin settings. 131 131 132 - Create OpenAI API key<https://platform.openai.com/account/api-keys>132 - Get an OpenAI API key at <https://platform.openai.com/account/api-keys> 133 133 - Insert this key in the plugin settings (Admin Menu → Mind → Settings) 134 - Open any post or page in WordPress editor (Gutenberg) and you cansee the new button in the editor and paragraph toolbars134 - Open any post or page in the WordPress editor (Gutenberg) and you will see the new button in the editor and paragraph toolbars 135 135 136 136 == Frequently Asked Questions == … … 138 138 = Website and Documentation = 139 139 140 There is no documentation available yet, but in the future it will be placed here -<https://www.wp-mind.com/>140 Documentation will be available at <https://www.wp-mind.com/> 141 141 142 142 = Supported page builders = 143 143 144 Mind is de veloped for the WordPress page builder - Gutenberg. Currently we don't have support for 3rd-party builders.144 Mind is designed for the native WordPress block editor (Gutenberg). Support for 3rd-party page builders is not currently available. 145 145 146 146 = Can I create entire page layouts with Mind? = … … 160 160 161 161 == Changelog == 162 163 = 0.4.0 - Nov 27, 2025 = 164 165 - added support for Claude 4.5 Sonnet, Claude 4.5 Haiku, GPT-5.1 and GPT-5 mini 162 166 163 167 = 0.3.0 - Mar 16, 2025 =
Note: See TracChangeset
for help on using the changeset viewer.