@inkeep/open-knowledge 0.79.3 → 0.79.4
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/dist/cli.mjs +70 -68
- package/dist/constants-C6wMiGgw.mjs +1 -0
- package/dist/dist-CeD-QmMk.mjs +1 -0
- package/dist/{dist-Cmgb0r3p.mjs → dist-Dci-h_mV.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-D6ZJF6PV.mjs +1 -0
- package/dist/{init-D_DKMj1s.mjs → init-PYX9s0p3.mjs} +14 -14
- package/dist/{launch-json-removal-CMIL2ikQ.mjs → launch-json-removal-DE_lefaT.mjs} +1 -1
- package/dist/loader-CNWGHRCV.mjs +1 -0
- package/dist/{loader-N7jiS4w0.mjs → loader-SBH7CBDL.mjs} +1 -1
- package/dist/{open-browser-CNVUL-A_.mjs → open-browser-CmAzRurP.mjs} +1 -1
- package/dist/{preview-wLB8OL2o.mjs → preview-CYBCI8OL.mjs} +1 -1
- package/dist/preview-Ch3iH9hA.mjs +1 -0
- package/dist/public/assets/FeedbackForm-B2kRhtsR.js +1 -0
- package/dist/public/assets/{ImageAttachments-Cooc1nca.js → ImageAttachments-mkcDupGd.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-Bb5if0pW.js → ReportBugDialogBody-ABNMdMUU.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-DHmYILeX.js → ReportBugMenuTrigger-DRki3qOn.js} +1 -1
- package/dist/public/assets/{SessionsHost-Cdic3R-Y.js → SessionsHost-BqU3aWOR.js} +2 -2
- package/dist/public/assets/{TerminalWindowApp-C9GosoJU.js → TerminalWindowApp-QDFQJvJI.js} +1 -1
- package/dist/public/assets/{ThreadView-CPLHpCdR.js → ThreadView-e6Emlmew.js} +17 -17
- package/dist/public/assets/image-attachment-C1B_QOlM.js +1 -0
- package/dist/public/assets/index-B4DpftwC.js +2205 -0
- package/dist/public/assets/{progress-0Dfq8VnS.js → progress-ChqYJ_wo.js} +1 -1
- package/dist/public/assets/{use-installed-clis-BzQZdtk_.js → use-installed-clis-SziirqY4.js} +2 -2
- package/dist/public/index.html +6 -6
- package/dist/registry-probes-Dege_xbr.mjs +17 -0
- package/dist/{removal-file-path-CSUwOdaZ.mjs → removal-file-path-CVCUJzdD.mjs} +1 -1
- package/dist/{repair-launch-json-CHU3DQHD.mjs → repair-launch-json-B9YcmXBD.mjs} +1 -1
- package/dist/{repair-mcp-configs-BhdagblW.mjs → repair-mcp-configs-BM8NXaJm.mjs} +1 -1
- package/dist/{src-DPs9CRCY.mjs → src-B5SmbFF9.mjs} +5 -5
- package/dist/src-DsMWEyve.mjs +1 -0
- package/dist/{start-C8VxoPil.mjs → start-CtAMwLgE.mjs} +3 -3
- package/dist/start-sCxyzBNh.mjs +1 -0
- package/package.json +5 -5
- package/dist/constants-CNxoEQ5b.mjs +0 -1
- package/dist/dist-DzdGKL8W.mjs +0 -1
- package/dist/init-DsGKNoaN.mjs +0 -1
- package/dist/loader-DAk_l84X.mjs +0 -1
- package/dist/preview-CRnYd6sw.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CXLWTOXd.js +0 -1
- package/dist/public/assets/image-attachment-IlVZ-iwe.js +0 -1
- package/dist/public/assets/index-CFr0XcXQ.js +0 -2205
- package/dist/registry-probes-V6HkuVVa.mjs +0 -17
- package/dist/src-CXxDQ4LC.mjs +0 -1
- package/dist/start-Du6cCuDw.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./dist-Cr4-nBVI.js";import{t}from"./tool-list-format-C9KSFYHU.js";import{r as n}from"./acp-thread-protocol-BiCah0pm.js";var r=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),i=700*1024,a=i,o=i,s=i,c=3;function l(e){return e.kind!==`image`&&e.kind!==`blob`?0:e.sizeBytes??e.data.length}function u(e){return e.reduce((e,t)=>e+l(t),0)}function d(){return Math.round(s/1024)}var f={"unsupported-type":!1,"too-large":!1,"file-too-large":!0,"not-text":!0};function p(e){return f[e.kind]}function m(e){throw Error(`Unhandled attachment error: ${JSON.stringify(e)}`)}function h(t){switch(t.kind){case`unsupported-type`:{let n=t.mimeType;if(n.startsWith(`image/`))return e._({id:`FqMKq2`,values:{mimeType:n}});let r=n||`unknown`;return e._({id:`9gu0n7`,values:{fileType:r}})}case`too-large`:{let n=Math.round(t.limitBytes/1024),r=Math.round(t.sizeBytes/1024);return e._({id:`Kb08WL`,values:{sizeKb:r,limitKb:n}})}case`file-too-large`:case`not-text`:return _(t,[t.name]);default:return m(t)}}function g(n){let r=e.locale;if(n.length<=c)return t(n,r);let i=n.slice(0,c-1),a=n.length-i.length;return t([...i,e._({id:`uqs8Gd`,values:{others:a}})],r)}function _(t,n){let r=n.length,i=g(n);if(t.kind===`not-text`)return t.location===`outside-project`?e._({id:`f0wEYt`,values:{count:r,files:i}}):e._({id:`bsg04M`,values:{count:r,files:i}});let a=Math.round(t.limitBytes/1024);return t.location===`outside-project`?e._({id:`RVMlXa`,values:{count:r,files:i,capKb:a}}):e._({id:`NYbytK`,values:{count:r,files:i,capKb:a}})}function v(e){let t=new Map;for(let n of e){let e=`${n.kind}:${n.location}`,r=t.get(e);r===void 0?t.set(e,{first:n,names:[n.name]}):r.names.push(n.name)}return[...t.values()].map(({first:e,names:t})=>_(e,t))}async function y(e){let t=await new Promise((t,n)=>{let r=new FileReader;r.onerror=()=>n(r.error??Error(`FileReader failed`)),r.onload=()=>{let e=r.result;if(typeof e!=`string`){n(Error(`FileReader returned non-string result`));return}t(e)},r.readAsDataURL(e)}),n=t.indexOf(`,`);return{data:n>=0?t.slice(n+1):t,mimeType:e.type||`application/octet-stream`,name:e.name||`image`,sizeBytes:e.size}}async function b(e){let t=e.type||``;if(!r.has(t))return{ok:!1,error:{kind:`unsupported-type`,mimeType:t}};if(e.size>716800)return{ok:!1,error:{kind:`too-large`,sizeBytes:e.size,limitBytes:a}};let n=await y(e);return{ok:!0,part:{kind:`image`,data:n.data,mimeType:n.mimeType,name:n.name,sizeBytes:n.sizeBytes}}}function x(e){return C(e,e=>e.type.startsWith(`image/`))}function S(e){return C(e,e=>e.size>0)}function C(e,t){if(e===null)return[];let n=[],r=e=>{e!==null&&t(e)&&n.push(e)},i=!1,a=e.items;if(a)for(let e=0;e<a.length;e+=1){let t=a[e];if(t?.kind!==`file`)continue;let n=t.getAsFile();n!==null&&(i=!0,r(n))}if(!i){let t=e.files;if(t)for(let e=0;e<t.length;e+=1)r(t[e]??null)}return n}function w(e,t,n){let r=n===`\\`?e.toLowerCase():e,i=n===`\\`?t.toLowerCase():t,a=i.endsWith(n)?i:`${i}${n}`;if(r===i)return``;if(!r.startsWith(a))return null;let o=e.slice(a.length);return n===`\\`?o.replaceAll(`\\`,`/`):o}function T(e,t){let n=t.absPathOf,r=t.workspaceContentDir;if(n===void 0||r===void 0||r===``)return`unknown`;let i=n(e);if(i===null||i===``)return`unknown`;let a=w(i,r,t.pathSeparator??`/`);return a===null?`outside-project`:{path:a}}function E(e){if(e.includes(0))return null;try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e)}catch{return null}}async function D(e,t){let r=e.name||`attachment`;if(e.size>716800)return{ok:!1,error:{kind:`file-too-large`,name:r,location:t,limitBytes:o}};let i=e.type||``,a=E(new Uint8Array(await e.arrayBuffer()));return a===null?{ok:!1,error:{kind:`not-text`,name:r,location:t}}:{ok:!0,part:{kind:`blob`,data:a,textPayload:!0,mimeType:n(i)?i:`text/plain`,name:r,sizeBytes:e.size}}}async function O(e,t={}){if((e.type||``).startsWith(`image/`))return b(e);let n=T(e,t);return typeof n==`string`?D(e,n):{ok:!0,part:{kind:`file`,path:n.path,name:e.name||`attachment`}}}export{v as a,O as c,x as i,p as l,d as n,h as o,S as r,l as s,s as t,u};
|