filecat 6.20.0 → 6.20.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.
- package/build/dist/1448.467a35319888cabf7a70.js +1 -0
- package/build/dist/{1472.3ec00b3ff3c8a37045f3.js → 1472.782b2a63883164086791.js} +1 -1
- package/build/dist/{9258.af81dfbd7c2bd191c90a.js → 9258.21069de8306973ad782d.js} +1 -1
- package/build/dist/index.html +1 -1
- package/build/dist/main.6fd1b5c98924fc45c86f.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/1448.a04f4e4820cf310af59b.js +0 -1
- package/build/dist/main.4e3dcb6bafc56360eb2b.js +0 -2
- /package/build/dist/{main.4e3dcb6bafc56360eb2b.js.LICENSE.txt → main.6fd1b5c98924fc45c86f.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1448],{83277(e,t,l){l.d(t,{$j:()=>r,Lv:()=>s,qq:()=>n});class i{options_agent_url_list;options_agent_key_list;options_agent_model_list;options_local_file_path_prompt_list}class s{token;open=!1;note;index;url;model;request_type;json_params;sys_prompt;dotenv="";tool_mode=!1;show_options;static get_label_by_v(e,t){if(!e||!t?.length)return e;for(const l of t)if(l.value===e)return l.label;return e}static have_label_by_v(e,t){if(!e||!t?.length)return!1;for(const l of t)if(l.value===e)return!0;return!1}}class n extends i{tool_error_max=50;tool_call_max=300;allow_exec_cmd_directly=!1;proxy_url}const a=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function r(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"text"===e.type?e.text:"[图片]").join("\n"):""}l.d(t,["CP",0,'\n\n# 工具报错最大尝试次数\ntool_error_max=50\n# 聊天循环最大次数\ntool_call_max=300\n# 是否允许AI直接执行命令而不需要用户确认,默认为false,需要用户手动确认,如果使用 workflow 这里等价于为 true\nallow_exec_cmd_directly=false\n\n# 可选的代理 url,如果指定了所有访问大模型的请求将会走代理\n#proxy_url=\n\n# 可选的多个url 以数组分割\n# options_agent_url_list=[{"value":"http://..","label":"openai"}]\n\n# 可选的多个 key\n# options_agent_key_list=[{"value":"sh-aaa","label":"option1"}]\n\n# 可选的多个 model\n# options_agent_model_list=[{"value":"gpt-5.5","label":"gpt"}]\n\n# 存放本地的 prompt 文件 用于每次聊天的时候自动读取并加载\n# options_local_file_path_prompt_list=["/prompt/a.txt"]\n',"cL",0,a])},11448(e,t,l){l.r(t),l.d(t,{RebotCardContainer:()=>f,default:()=>y});var i=l(22022),s=l(96540),n=l(85997),a=l(57952),r=l(75725),o=l(61443),c=l(70447),d=l(14284),p=l(53459),_=l(62042),h=l(78247),x=l(23430),m=l(61973),j=(l(83277),l(92350)),u=l(74848);const b={qq:{key:"qq",label:"QQ 机器人",icon:"QQ",color:"#12B7F5",fields:[{key:"appId",label:"AppId",type:"text",placeholder:"请输入机器人 AppId",required:!0},{key:"clientSecret",label:"密钥",type:"password",placeholder:"请输入机器人密钥",required:!0}]},dingtalk:{key:"dingtalk",label:"钉钉机器人",icon:"chat",color:"#0089FF",fields:[{key:"appId",label:"ClientId (AppKey)",type:"text",placeholder:"请输入应用 ClientId",required:!0},{key:"clientSecret",label:"ClientSecret (AppSecret)",type:"password",placeholder:"请输入应用 ClientSecret",required:!0}]}},g=Object.entries(b).map(([e,t])=>({value:e,title:t.label,color:t.color}));function f(e){const{t}=(0,i.Bd)(),[l,a]=(0,s.useState)(!1),[r,c]=(0,s.useState)(!1),d=(t,l)=>{const i=[...e.items];i[t]={...i[t],...l},e.setItems(i)},p=t=>{const l=[...e.items];l.splice(t,1),e.setItems(l)},_=t=>{e.setItems([...e.items,{...e.items[t],open:!1,name:(e.items[t].name||"")+" (副本)"}])};return(0,u.jsxs)(s.Fragment,{children:[(0,u.jsx)("div",{className:"airebot-setting__toolbar",children:!1!==e.have_auth_edit&&(0,u.jsxs)(u.Fragment,{children:[l?(0,u.jsxs)("div",{className:"airebot-setting__add-select",children:[(0,u.jsx)(o.l6,{options:g,defaultValue:"qq",onChange:t=>{return l=t,e.setItems([...e.items,{platform:l,name:"",open:!1,appId:"",clientSecret:"",note:""}]),void a(!1);var l},width:"180px"}),(0,u.jsx)(n.rA,{icon:"cancel",title:t("取消"),onClick:()=>a(!1)})]}):(0,u.jsx)(n.rA,{icon:"add",title:t("添加机器人"),onClick:()=>a(!0)}),(0,u.jsx)(n.rA,{icon:"save",title:t(r?"保存中...":"保存"),onClick:()=>{r||(async()=>{c(!0),await e.save(),c(!1)})()}})]})}),0===e.items.length?(0,u.jsxs)("div",{className:"airebot-setting__empty",children:[(0,u.jsx)("span",{className:"material-symbols-outlined airebot-setting__empty-icon",children:"smart_toy"}),(0,u.jsx)("p",{children:t("还没有配置任何机器人")}),(0,u.jsx)("p",{className:"airebot-setting__empty-hint",children:t("点击上方「添加机器人」按钮来开始配置")})]}):(0,u.jsx)("div",{className:"airebot-setting__grid",children:e.items.map((e,t)=>(0,u.jsx)(v,{item:e,index:t,onChange:d,onDelete:p,onCopy:_},t))})]})}const v=({item:e,index:t,onChange:l,onDelete:s,onCopy:a})=>{const{t:r}=(0,i.Bd)(),d=b[e.platform]??b.qq,p=e._status||"disconnected";e.open;return(0,u.jsx)(c.Zp,{self_title:(0,u.jsx)("div",{className:"airebot-setting__card-header",children:(0,u.jsx)("span",{className:"material-symbols-outlined airebot-setting__card-icon",style:{color:d.color},children:d.icon})}),titleCom:(0,u.jsxs)("div",{className:"airebot-setting__card-actions",children:[(0,u.jsx)(n.Ay,{checked:!!e.open,onChange:e=>l(t,{open:e})}),(0,u.jsx)(n.rA,{icon:"content_copy",title:r("复制"),onClick:()=>a(t)}),(0,u.jsx)(n.rA,{icon:"delete",title:r("删除"),onClick:()=>s(t)})]}),children:(0,u.jsxs)("div",{className:"airebot-setting__card-fields",children:[(0,u.jsxs)("div",{className:"airebot-setting__field",children:[(0,u.jsx)("label",{className:"airebot-setting__field-label",children:r("平台")}),(0,u.jsx)(o.l6,{options:g,value:e.platform,onChange:e=>l(t,{platform:e}),width:"100%"})]}),(0,u.jsxs)("div",{className:"airebot-setting__field",children:[(0,u.jsx)("label",{className:"airebot-setting__field-label",children:r("名称")}),(0,u.jsx)(o.Sm,{value:e.name||"",handleInputChange:e=>l(t,{name:e}),placeholder:r("给机器人起个名字")})]}),d.fields.map(i=>{const s=e[i.key]??"";return(0,u.jsxs)("div",{className:"airebot-setting__field",children:[(0,u.jsxs)("label",{className:"airebot-setting__field-label",children:[i.label,i.required&&(0,u.jsx)("span",{className:"airebot-setting__field-required",children:"*"})]}),(0,u.jsx)(o.Sm,{type:i.type,value:s,handleInputChange:e=>l(t,{[i.key]:e}),placeholder:i.placeholder})]},i.key)}),(0,u.jsxs)("div",{className:"airebot-setting__field ",children:[(0,u.jsx)("label",{className:"airebot-setting__field-label",children:r("模型编号")}),(0,u.jsx)(o.Sm,{value:e.model_index,handleInputChange:e=>l(t,{model_index:e}),placeholder:r("使用指定模型(可选)")})]}),(0,u.jsxs)("div",{className:"airebot-setting__field ",children:[(0,u.jsx)("label",{className:"airebot-setting__field-label",children:r("用户id")}),(0,u.jsx)(o.Sm,{value:e.user_id||"",handleInputChange:e=>l(t,{user_id:e}),placeholder:r("默认使用root账户(继承权限,可选)")})]}),(0,u.jsxs)("div",{className:"airebot-setting__field airebot-setting__field-full",children:[(0,u.jsx)("label",{className:"airebot-setting__field-label",children:r("备注")}),(0,u.jsx)(o.Sm,{value:e.note||"",handleInputChange:e=>l(t,{note:e}),placeholder:r("备注信息(可选)")})]})]})})};function y(){const{t:e}=(0,i.Bd)(),t=(0,m.Zp)(),{check_user_auth:l}=(0,h.MH)(),[o,c]=(0,s.useState)([]),b=(0,j.Q)(),g=async()=>{const e=await d.XO.get("ai_rebot_setting");e.code===p.m.Success&&c(e.data?.list??[])};(0,s.useEffect)(()=>{g()},[]);return(0,u.jsxs)("div",{className:"airebot-setting",children:[(0,u.jsx)(a.A,{children:l(x.oV.ai_agent_setting)&&(0,u.jsx)(n.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>t(-1)})}),(0,u.jsx)(r.fI,{children:(0,u.jsxs)(r.VP,{widthPer:100,children:[(0,u.jsxs)("div",{className:"airebot-setting__page-title",children:[(0,u.jsx)("h2",{children:e("机器人配置")}),(0,u.jsx)(n.rA,{icon:"info",onClick:()=>{b("机器人配置")},title:"信息"})]}),(0,u.jsx)(f,{items:o,setItems:c,save:async()=>{const t={list:o.map((e,t)=>({...e,index:t}))};(await d.XO.post("ai_rebot_setting/save",t)).code===p.m.Success&&((0,_.SK)(e("保存成功")),await g())},have_auth_edit:l(x.oV.ai_agent_setting)})]})})]})}l.d(t,["PLATFORM_META",0,b,"RebotCard",0,v])},92350(e,t,l){l.d(t,{Q:()=>p,o:()=>h});var i=l(34843),s=l(82893),n=l(74777),a=l(96540),r=l(22022),o=l(23430),c=l(14284),d=l(74848);function p(){const[e,t]=(0,i.fp)(s.AG.prompt_card),{t:l,i18n:a}=(0,r.Bd)();return e=>{let i;e===n.jk.ffmpeg?i=(0,d.jsx)("div",{children:"视频转换,rtsp播放器等媒体功能都需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置"}):e===n.jk.smartmontools?i=(0,d.jsx)("div",{children:"磁盘检查需要这个软件。linux下你可以使用apt或者yum来安装,或者直接输入软件的位置。"}):"保护目录"===e?i=(0,d.jsxs)("div",{children:["在删除的时候保护目录会拒绝删除。",(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"可以使用 /* 来表达该目录下所有文件都禁止删除"}),(0,d.jsx)("li",{children:"可以使用 /** 来表达该目录下所有子目录文件都禁止删除"})]})]}):"文件夹路径"===e?i=(0,d.jsx)("div",{children:"用于在文件夹下切换根目录"}):"环境路径"===e?i=(0,d.jsx)("div",{children:"当在不同用户环境下运行的时候由于没有执行终端去加载PATH,这里可以添加额外的PATH路径,点击这里的保存还会更新系统上的path路径"}):"pty"===e?i=(0,d.jsx)("div",{children:"一些需要Pty环境的命令"}):"文件上传"===e?i=(0,d.jsx)("div",{children:(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"对于不同的目录(包括所有子目录),可能是机械或者固态硬盘,机械硬盘在处理多个小文件的时候会做随机i/o,由于一般只有一个盘头所以会影响整体效率,特别是写操作,这里提供了上传时候的最大数量限制,对于下载数量目前不做限制."}),(0,d.jsx)("li",{children:"大文件支持断点和分块并发传输,建议并发数量设置为2,分块大小设置为10MB,大文件判断为500MB,设置过大的话会上传的时候会占据较大内存"})]})}):"目录快捷命令"===e?i=(0,d.jsx)("div",{children:"右键文件夹空白处用于,打开终端快捷执行命令"}):"文件快捷命令"===e?i=(0,d.jsx)("div",{children:"用于右键特定后缀的文件,执行一些快捷命令,文件后缀可以是多个,用空格分割"}):"Workflow"===e?i=(0,d.jsx)("div",{children:(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"在特定的时间启动系统中的workflow任务"}),(0,d.jsx)("li",{children:"cron表达式是定时器 格式为: 秒 分 时 日 月 星期"}),(0,d.jsxs)("li",{children:[(0,d.jsx)("li",{children:'1. "*"(通配符,所有值)'}),(0,d.jsx)("li",{children:'2. "," 是枚举: 0 0 1,15 * * *'}),(0,d.jsx)("li",{children:'3. "-" 是范围: 0 0 1-5 * * *'}),(0,d.jsx)("li",{children:'4. "/" 是步长,标识每隔n执行 */3 * * * * * 每隔三秒,必须配合 * 使用 ,/ 只能写一次 ,有了/就成了定时器,而不是指定时间执行'})]})]})}):"插件配置"===e?i=(0,d.jsx)("div",{children:l("路径可以是一个 js 文件也可以是一个node 项目目录")}):"机器人配置"===e&&(i=(0,d.jsxs)("div",{children:[(0,d.jsx)("dv",{children:"机器人功能用于开通各种第三方支持的机器人,让第三方机器人接入本地的 AI 模型。"}),(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:" 1. qq 机器人需要先在手机 app 中添加,然后在https://q.qq.com/qqbot/ 登录机器人配置页面,在开发管理中复制机器人的 appId,appSecret 到这里就完成了配置了。"}),(0,d.jsx)("li",{children:" 2. https://opensource.dingtalk.com/developerpedia/docs/explore/tutorials/stream/bot/nodejs/create-bot 这个是钉钉机器人开通教程,注意复制钉钉的 clientId 的是时候不要复制成appId 了。"})]})]})),t({open:!0,title:"信息",context_div:(0,d.jsx)("div",{children:i})})}}let _=o.Ky;function h(){const[e,t]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{try{const e=await c.XO.get("themes");if(0===e.code){const l=e.data||[];_=[...o.Ky,...l],t(_)}else console.warn("获取主题列表失败,使用默认列表"),t(_)}catch(e){t(_)}})()},[]),e}}}]);
|