@nextclaw/ui 0.5.37 → 0.5.39
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.
- package/CHANGELOG.md +12 -0
- package/dist/assets/{ChannelsList-DtvhbEV9.js → ChannelsList-DI_LXa6G.js} +1 -1
- package/dist/assets/{ChatPage-Bw_aXB4R.js → ChatPage-CHiqC2bZ.js} +1 -1
- package/dist/assets/{CronConfig-BZLXcDbm.js → CronConfig-BnGmNC74.js} +1 -1
- package/dist/assets/DocBrowser-B9xGvXuH.js +1 -0
- package/dist/assets/MarketplacePage-CTiHuMSY.js +49 -0
- package/dist/assets/{ModelConfig-Bi8Q4_NG.js → ModelConfig-Dz8pUTqH.js} +1 -1
- package/dist/assets/ProvidersList-Du9TbDku.js +1 -0
- package/dist/assets/{RuntimeConfig-Bz9aUkwu.js → RuntimeConfig-a7k7OTvs.js} +1 -1
- package/dist/assets/{SecretsConfig-Bqi-biOL.js → SecretsConfig-Dv3N-3XD.js} +1 -1
- package/dist/assets/{SessionsConfig-DcWT2QvI.js → SessionsConfig-DTZsKDvH.js} +1 -1
- package/dist/assets/{card-DwZkVl7S.js → card-BrerW-Nv.js} +1 -1
- package/dist/assets/index-BeI_Pucj.js +2 -0
- package/dist/assets/index-DMEuanmd.css +1 -0
- package/dist/assets/{label-BBDuC6Nm.js → label-BDeY_kN8.js} +1 -1
- package/dist/assets/{logos-DMFt4YDI.js → logos-Qxa07LFc.js} +1 -1
- package/dist/assets/{page-layout-hPFzCUTQ.js → page-layout-BRgOXrOh.js} +1 -1
- package/dist/assets/{switch-CwkcbkEs.js → switch-CblqC0lN.js} +1 -1
- package/dist/assets/{tabs-custom-TUrWRyYy.js → tabs-custom-B8x9xWoI.js} +1 -1
- package/dist/assets/{useConfig-DZVUrqQz.js → useConfig-VP_0ZVm1.js} +1 -1
- package/dist/assets/{useConfirmDialog-D5X0Iqid.js → useConfirmDialog-BxqJXdQR.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/api/marketplace.ts +24 -0
- package/src/api/types.ts +28 -0
- package/src/components/config/ModelConfig.tsx +1 -0
- package/src/components/config/ProviderForm.tsx +5 -1
- package/src/components/doc-browser/DocBrowser.tsx +382 -323
- package/src/components/doc-browser/DocBrowserContext.tsx +389 -157
- package/src/components/layout/Sidebar.tsx +1 -1
- package/src/components/marketplace/MarketplacePage.tsx +252 -12
- package/src/lib/i18n.ts +25 -2
- package/dist/assets/DocBrowser-BY0TiFOc.js +0 -1
- package/dist/assets/MarketplacePage-BDlAw7fO.js +0 -1
- package/dist/assets/ProvidersList-D2OB0siE.js +0 -1
- package/dist/assets/index-C1NAfZSm.js +0 -2
- package/dist/assets/index-DWgSvrx4.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,j as i}from"./vendor-DN_iJQc4.js";import{c as t}from"./index-
|
|
1
|
+
import{r as e,j as i}from"./vendor-DN_iJQc4.js";import{c as t}from"./index-BeI_Pucj.js";const l=e.forwardRef(({className:o,checked:r=!1,onCheckedChange:s,...a},n)=>i.jsx("button",{type:"button",role:"switch","aria-checked":r,ref:n,className:t("peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",r?"bg-primary":"bg-gray-200/80 hover:bg-gray-300/80",o),onClick:()=>s==null?void 0:s(!r),...a,children:i.jsx("span",{className:t("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-md ring-0 transition-transform duration-fast",r?"translate-x-5":"translate-x-0")})}));l.displayName="Switch";export{l as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-DN_iJQc4.js";import{f as m,c as s}from"./index-
|
|
1
|
+
import{j as e}from"./vendor-DN_iJQc4.js";import{f as m,c as s}from"./index-BeI_Pucj.js";function c({tabs:a,activeTab:i,onChange:o,className:n}){return e.jsx("div",{className:s("flex items-center gap-6 border-b border-gray-200/60 mb-6",n),children:a.map(t=>{const r=i===t.id;return e.jsxs("button",{onClick:()=>o(t.id),className:s("relative pb-3 text-[14px] font-medium transition-all duration-fast flex items-center gap-1.5",r?"text-gray-900":"text-gray-600 hover:text-gray-900"),children:[t.label,t.count!==void 0&&e.jsx("span",{className:s("text-[11px] font-medium","text-gray-500"),children:m(t.count)}),r&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-primary rounded-full"})]},t.id)})})}export{c as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,j as F,aq as m,ar as f,as as u,ag as s}from"./vendor-DN_iJQc4.js";import{c as b,A as x,j as i,t as o}from"./index-
|
|
1
|
+
import{r as C,j as F,aq as m,ar as f,as as u,ag as s}from"./vendor-DN_iJQc4.js";import{c as b,A as x,j as i,t as o}from"./index-BeI_Pucj.js";const K=C.forwardRef(({className:n,type:e,...r},a)=>F.jsx("input",{type:e,className:b("flex h-9 w-full rounded-xl border border-gray-200/80 bg-white px-3.5 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-primary/40 focus:border-primary/40 transition-colors disabled:cursor-not-allowed disabled:opacity-50",n),ref:a,...r}));K.displayName="Input";async function k(){const n=await i.get("/api/config");if(!n.ok)throw new Error(n.error.message);return n.data}async function A(){const n=await i.get("/api/config/meta");if(!n.ok)throw new Error(n.error.message);return n.data}async function M(){const n=await i.get("/api/config/schema");if(!n.ok)throw new Error(n.error.message);return n.data}async function R(n){const e=await i.put("/api/config/model",n);if(!e.ok)throw new Error(e.error.message);return e.data}async function J(n,e){const r=await i.put(`/api/config/providers/${n}`,e);if(!r.ok)throw new Error(r.error.message);return r.data}async function Q(n,e){const r=await i.post(`/api/config/providers/${n}/test`,e);if(!r.ok)throw new Error(r.error.message);return r.data}async function U(n,e){const r=await i.put(`/api/config/channels/${n}`,e);if(!r.ok)throw new Error(r.error.message);return r.data}async function $(n){const e=await i.put("/api/config/runtime",n);if(!e.ok)throw new Error(e.error.message);return e.data}async function T(n){const e=await i.put("/api/config/secrets",n);if(!e.ok)throw new Error(e.error.message);return e.data}async function I(n,e){const r=await i.post(`/api/config/actions/${n}/execute`,e);if(!r.ok)throw new Error(r.error.message);return r.data}async function P(n){var d;const e=new URLSearchParams;(d=n==null?void 0:n.q)!=null&&d.trim()&&e.set("q",n.q.trim()),typeof(n==null?void 0:n.limit)=="number"&&Number.isFinite(n.limit)&&e.set("limit",String(Math.max(0,Math.trunc(n.limit)))),typeof(n==null?void 0:n.activeMinutes)=="number"&&Number.isFinite(n.activeMinutes)&&e.set("activeMinutes",String(Math.max(0,Math.trunc(n.activeMinutes))));const r=e.toString(),a=await i.get(r?"/api/sessions?"+r:"/api/sessions");if(!a.ok)throw new Error(a.error.message);return a.data}async function N(n,e=200){const r=await i.get(`/api/sessions/${encodeURIComponent(n)}/history?limit=${Math.max(1,Math.trunc(e))}`);if(!r.ok)throw new Error(r.error.message);return r.data}async function O(n,e){const r=await i.put(`/api/sessions/${encodeURIComponent(n)}`,e);if(!r.ok)throw new Error(r.error.message);return r.data}async function j(n){const e=await i.delete(`/api/sessions/${encodeURIComponent(n)}`);if(!e.ok)throw new Error(e.error.message);return e.data}function D(n){const e=n.split(/\r?\n/);let r="message";const a=[];for(const d of e){if(d.startsWith("event:")){r=d.slice(6).trim()||"message";continue}d.startsWith("data:")&&a.push(d.slice(5).trimStart())}return a.length===0?null:{event:r,data:a.join(`
|
|
2
2
|
`)}}async function z(n,e={}){var q;const r=await fetch(`${x}/api/chat/turn/stream`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(n),signal:e.signal});if(!r.ok){let g=`chat stream failed (${r.status} ${r.statusText})`;try{const t=await r.json();(q=t==null?void 0:t.error)!=null&&q.message&&(g=t.error.message)}catch{const t=await r.text().catch(()=>"");t.trim()&&(g=t.trim())}throw new Error(g)}if(!r.body)throw new Error("chat stream is not readable");const a=r.body.getReader(),d=new TextDecoder;let l="",w=null;const p=g=>{var y,h,E;const t=D(g);if(t){if(t.event==="ready"){try{const c=JSON.parse(t.data);(y=e.onReady)==null||y.call(e,{event:"ready",sessionKey:String(c.sessionKey??""),requestedAt:String(c.requestedAt??"")})}catch{}return}if(t.event==="delta"){try{const c=JSON.parse(t.data);typeof c.delta=="string"&&c.delta.length>0&&((h=e.onDelta)==null||h.call(e,{event:"delta",delta:c.delta}))}catch{}return}if(t.event==="session_event"){try{(E=e.onSessionEvent)==null||E.call(e,{event:"session_event",data:JSON.parse(t.data)})}catch{}return}if(t.event==="final"){w=JSON.parse(t.data);return}if(t.event==="error")try{const c=JSON.parse(t.data);throw new Error(typeof c.message=="string"&&c.message?c.message:"chat stream failed")}catch(c){throw c instanceof Error?c:new Error("chat stream failed")}}};let S=!1;for(;!S;){const{done:g,value:t}=await a.read();if(g){S=!0;continue}l+=d.decode(t,{stream:!0});let y=l.indexOf(`
|
|
3
3
|
|
|
4
4
|
`);for(;y!==-1;){const h=l.slice(0,y).trim();l=l.slice(y+2),h&&p(h),y=l.indexOf(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,aw as b,aL as w,au as ie,j as s,at as A,aB as le,ay as h,az as D,aC as ce,aM as de,aN as ue,aO as fe,aP as ge,aD as me,aQ as pe,aR as ve,ad as xe}from"./vendor-DN_iJQc4.js";import{c as N,t as x}from"./index-
|
|
1
|
+
import{r as i,aw as b,aL as w,au as ie,j as s,at as A,aB as le,ay as h,az as D,aC as ce,aM as de,aN as ue,aO as fe,aP as ge,aD as me,aQ as pe,aR as ve,ad as xe}from"./vendor-DN_iJQc4.js";import{c as N,t as x}from"./index-BeI_Pucj.js";import{B as I}from"./page-layout-BRgOXrOh.js";function Ne(e,t){return i.useReducer((o,a)=>t[o][a]??o,e)}var E=e=>{const{present:t,children:o}=e,a=De(t),r=typeof o=="function"?o({present:a.isPresent}):i.Children.only(o),n=b(a.ref,he(r));return typeof o=="function"||a.isPresent?i.cloneElement(r,{ref:n}):null};E.displayName="Presence";function De(e){const[t,o]=i.useState(),a=i.useRef(null),r=i.useRef(e),n=i.useRef("none"),l=e?"mounted":"unmounted",[c,u]=Ne(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=y(a.current);n.current=c==="mounted"?d:"none"},[c]),w(()=>{const d=a.current,f=r.current;if(f!==e){const C=n.current,p=y(d);e?u("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&C!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),w(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=p=>{const re=y(a.current).includes(CSS.escape(p.animationName));if(p.target===t&&re&&(u("ANIMATION_END"),!r.current)){const se=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=se)})}},C=p=>{p.target===t&&(n.current=y(a.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(d=>{a.current=d?getComputedStyle(d):null,o(d)},[])}}function y(e){return(e==null?void 0:e.animationName)||"none"}function he(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var O="Dialog",[M]=ce(O),[Ce,g]=M(O),T=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:r,onOpenChange:n,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d,f]=ie({prop:a,defaultProp:r??!1,onChange:n,caller:O});return s.jsx(Ce,{scope:t,triggerRef:c,contentRef:u,contentId:A(),titleId:A(),descriptionId:A(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),modal:l,children:o})};T.displayName=O;var S="DialogTrigger",ye=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(S,o),n=b(t,r.triggerRef);return s.jsx(h.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":_(r.open),...a,ref:n,onClick:D(e.onClick,r.onOpenToggle)})});ye.displayName=S;var j="DialogPortal",[Re,F]=M(j,{forceMount:void 0}),L=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:r}=e,n=g(j,t);return s.jsx(Re,{scope:t,forceMount:o,children:i.Children.map(a,l=>s.jsx(E,{present:o||n.open,children:s.jsx(le,{asChild:!0,container:r,children:l})}))})};L.displayName=j;var R="DialogOverlay",W=i.forwardRef((e,t)=>{const o=F(R,e.__scopeDialog),{forceMount:a=o.forceMount,...r}=e,n=g(R,e.__scopeDialog);return n.modal?s.jsx(E,{present:a||n.open,children:s.jsx(Ee,{...r,ref:t})}):null});W.displayName=R;var be=pe("DialogOverlay.RemoveScroll"),Ee=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(R,o);return s.jsx(ue,{as:be,allowPinchZoom:!0,shards:[r.contentRef],children:s.jsx(h.div,{"data-state":_(r.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),v="DialogContent",k=i.forwardRef((e,t)=>{const o=F(v,e.__scopeDialog),{forceMount:a=o.forceMount,...r}=e,n=g(v,e.__scopeDialog);return s.jsx(E,{present:a||n.open,children:n.modal?s.jsx(Oe,{...r,ref:t}):s.jsx(Ae,{...r,ref:t})})});k.displayName=v;var Oe=i.forwardRef((e,t)=>{const o=g(v,e.__scopeDialog),a=i.useRef(null),r=b(t,o.contentRef,a);return i.useEffect(()=>{const n=a.current;if(n)return de(n)},[]),s.jsx(U,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,n=>{var l;n.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,n=>{const l=n.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&n.preventDefault()}),onFocusOutside:D(e.onFocusOutside,n=>n.preventDefault())})}),Ae=i.forwardRef((e,t)=>{const o=g(v,e.__scopeDialog),a=i.useRef(!1),r=i.useRef(!1);return s.jsx(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,n),n.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),n.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:n=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,n),n.defaultPrevented||(a.current=!0,n.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=n.target;((d=o.triggerRef.current)==null?void 0:d.contains(l))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&r.current&&n.preventDefault()}})}),U=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:n,...l}=e,c=g(v,o),u=i.useRef(null),d=b(t,u);return fe(),s.jsxs(s.Fragment,{children:[s.jsx(ge,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:n,children:s.jsx(me,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":_(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(je,{titleId:c.titleId}),s.jsx(_e,{contentRef:u,descriptionId:c.descriptionId})]})]})}),P="DialogTitle",$=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(P,o);return s.jsx(h.h2,{id:r.titleId,...a,ref:t})});$.displayName=P;var G="DialogDescription",B=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(G,o);return s.jsx(h.p,{id:r.descriptionId,...a,ref:t})});B.displayName=G;var z="DialogClose",H=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(z,o);return s.jsx(h.button,{type:"button",...a,ref:t,onClick:D(e.onClick,()=>r.onOpenChange(!1))})});H.displayName=z;function _(e){return e?"open":"closed"}var V="DialogTitleWarning",[$e,q]=ve(V,{contentName:v,titleName:P,docsSlug:"dialog"}),je=({titleId:e})=>{const t=q(V),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
4
|
|
package/dist/index.html
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>NextClaw - 系统配置</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-BeI_Pucj.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/vendor-DN_iJQc4.js">
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DMEuanmd.css">
|
|
12
12
|
</head>
|
|
13
13
|
|
|
14
14
|
<body>
|
package/package.json
CHANGED
package/src/api/marketplace.ts
CHANGED
|
@@ -5,7 +5,9 @@ import type {
|
|
|
5
5
|
MarketplaceManageRequest,
|
|
6
6
|
MarketplaceManageResult,
|
|
7
7
|
MarketplaceInstalledView,
|
|
8
|
+
MarketplacePluginContentView,
|
|
8
9
|
MarketplaceItemType,
|
|
10
|
+
MarketplaceSkillContentView,
|
|
9
11
|
MarketplaceItemView,
|
|
10
12
|
MarketplaceListView,
|
|
11
13
|
MarketplaceRecommendationView,
|
|
@@ -68,6 +70,28 @@ export async function fetchMarketplaceItem(slug: string, type: MarketplaceItemTy
|
|
|
68
70
|
return response.data;
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
export async function fetchMarketplaceSkillContent(slug: string): Promise<MarketplaceSkillContentView> {
|
|
74
|
+
const response = await api.get<MarketplaceSkillContentView>(
|
|
75
|
+
`/api/marketplace/skills/items/${encodeURIComponent(slug)}/content`
|
|
76
|
+
);
|
|
77
|
+
if (!response.ok) {
|
|
78
|
+
throw new Error(response.error.message);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return response.data;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function fetchMarketplacePluginContent(slug: string): Promise<MarketplacePluginContentView> {
|
|
85
|
+
const response = await api.get<MarketplacePluginContentView>(
|
|
86
|
+
`/api/marketplace/plugins/items/${encodeURIComponent(slug)}/content`
|
|
87
|
+
);
|
|
88
|
+
if (!response.ok) {
|
|
89
|
+
throw new Error(response.error.message);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return response.data;
|
|
93
|
+
}
|
|
94
|
+
|
|
71
95
|
export async function fetchMarketplaceRecommendations(
|
|
72
96
|
type: MarketplaceItemType,
|
|
73
97
|
params: {
|
package/src/api/types.ts
CHANGED
|
@@ -446,12 +446,15 @@ export type MarketplaceInstallSpec = {
|
|
|
446
446
|
command: string;
|
|
447
447
|
};
|
|
448
448
|
|
|
449
|
+
export type MarketplaceLocalizedTextMap = Record<string, string>;
|
|
450
|
+
|
|
449
451
|
export type MarketplaceItemSummary = {
|
|
450
452
|
id: string;
|
|
451
453
|
slug: string;
|
|
452
454
|
type: MarketplaceItemType;
|
|
453
455
|
name: string;
|
|
454
456
|
summary: string;
|
|
457
|
+
summaryI18n: MarketplaceLocalizedTextMap;
|
|
455
458
|
tags: string[];
|
|
456
459
|
author: string;
|
|
457
460
|
install: MarketplaceInstallSpec;
|
|
@@ -460,11 +463,36 @@ export type MarketplaceItemSummary = {
|
|
|
460
463
|
|
|
461
464
|
export type MarketplaceItemView = MarketplaceItemSummary & {
|
|
462
465
|
description?: string;
|
|
466
|
+
descriptionI18n?: MarketplaceLocalizedTextMap;
|
|
463
467
|
sourceRepo?: string;
|
|
464
468
|
homepage?: string;
|
|
465
469
|
publishedAt: string;
|
|
466
470
|
};
|
|
467
471
|
|
|
472
|
+
export type MarketplaceSkillContentView = {
|
|
473
|
+
type: 'skill';
|
|
474
|
+
slug: string;
|
|
475
|
+
name: string;
|
|
476
|
+
install: MarketplaceInstallSpec;
|
|
477
|
+
source: 'workspace' | 'builtin' | 'git' | 'remote';
|
|
478
|
+
raw: string;
|
|
479
|
+
metadataRaw?: string;
|
|
480
|
+
bodyRaw: string;
|
|
481
|
+
sourceUrl?: string;
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
export type MarketplacePluginContentView = {
|
|
485
|
+
type: 'plugin';
|
|
486
|
+
slug: string;
|
|
487
|
+
name: string;
|
|
488
|
+
install: MarketplaceInstallSpec;
|
|
489
|
+
source: 'npm' | 'repo' | 'remote';
|
|
490
|
+
raw?: string;
|
|
491
|
+
bodyRaw?: string;
|
|
492
|
+
metadataRaw?: string;
|
|
493
|
+
sourceUrl?: string;
|
|
494
|
+
};
|
|
495
|
+
|
|
468
496
|
export type MarketplaceListView = {
|
|
469
497
|
total: number;
|
|
470
498
|
page: number;
|
|
@@ -259,6 +259,7 @@ export function ModelConfig() {
|
|
|
259
259
|
/>
|
|
260
260
|
</div>
|
|
261
261
|
<p className="text-xs text-gray-400">{modelHelpText}</p>
|
|
262
|
+
<p className="text-xs text-gray-500">{t('modelInputCustomHint')}</p>
|
|
262
263
|
<a
|
|
263
264
|
href={`${DOCS_DEFAULT_BASE_URL}/guide/model-selection`}
|
|
264
265
|
className="inline-flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover transition-colors"
|
|
@@ -180,6 +180,9 @@ export function ProviderForm({ providerName }: ProviderFormProps) {
|
|
|
180
180
|
() => resolveEditableModels(defaultModels, currentModels),
|
|
181
181
|
[defaultModels, currentModels]
|
|
182
182
|
);
|
|
183
|
+
const apiBaseHelpText = providerName === 'minimax'
|
|
184
|
+
? t('providerApiBaseHelpMinimax')
|
|
185
|
+
: (apiBaseHint?.help || t('providerApiBaseHelp'));
|
|
183
186
|
|
|
184
187
|
useEffect(() => {
|
|
185
188
|
if (!providerName) {
|
|
@@ -374,7 +377,7 @@ export function ProviderForm({ providerName }: ProviderFormProps) {
|
|
|
374
377
|
placeholder={defaultApiBase || apiBaseHint?.placeholder || 'https://api.example.com'}
|
|
375
378
|
className="rounded-xl"
|
|
376
379
|
/>
|
|
377
|
-
<p className="text-xs text-gray-500">{
|
|
380
|
+
<p className="text-xs text-gray-500">{apiBaseHelpText}</p>
|
|
378
381
|
</div>
|
|
379
382
|
|
|
380
383
|
{providerSpec.supportsWireApi && (
|
|
@@ -432,6 +435,7 @@ export function ProviderForm({ providerName }: ProviderFormProps) {
|
|
|
432
435
|
{t('providerAddModel')}
|
|
433
436
|
</Button>
|
|
434
437
|
</div>
|
|
438
|
+
<p className="text-xs text-gray-500">{t('providerModelInputHint')}</p>
|
|
435
439
|
|
|
436
440
|
{models.length === 0 ? (
|
|
437
441
|
<div className="rounded-xl border border-dashed border-gray-200 bg-gray-50 px-3 py-2 text-xs text-gray-500">
|