1import{n as e}from"./rolldown-runtime-CMxvf4Kt.js";import{Ti as t,g as n}from"./app-const-BzFqCjOv.js";import{n as r,t as i}from"./ipc-XkRXMd72.js";var a,o,s,c,l,u,d=e((()=>{n(),r(),a=new Set([`application/graphql`,`application/javascript`,`application/json`,`application/markdown`,`application/toml`,`application/xml`,`application/yaml`,...t]),o=e=>e?.split(`;`)[0].trim().toLowerCase()??``,s=e=>e.startsWith(`text/`)||a.has(e),c=async(e,t)=>{let n=await fetch(e);if(!n.ok)throw Error(`Failed to load local file: ${n.status}`);let r=o(n.headers.get(`content-type`));if(r.startsWith(`image/`))return{blob:await n.blob(),contentType:r,type:`image`};if(t===`image`)throw Error(`Unsupported local file preview type`);return s(r)?{content:await n.text(),contentType:r,type:`text`}:r===`application/pdf`?{contentType:r,type:`pdf`}:r.startsWith(`video/`)?{contentType:r,type:`video`}:{contentType:r,type:`binary`}},l=class{async listLocalFiles(e){return i().localSystem.listLocalFiles(e)}async readLocalFile(e){return i().localSystem.readFile(e)}async readLocalFiles(e){return i().localSystem.readFiles(e)}async searchLocalFiles(e){return i().localSystem.handleLocalFilesSearch(e)}async getProjectFileIndex(e){return i().localSystem.getProjectFileIndex(e)}async searchProjectFiles(e){return i().localSystem.searchProjectFiles(e)}async listProjectSkills(e){return i().workspace.listProjectSkills(e)}async openLocalFile(e){return i().localSystem.handleOpenLocalFile(e)}async openLocalFolder(e){return i().localSystem.handleOpenLocalFolder(e)}async moveLocalFiles(e){return i().localSystem.handleMoveFiles(e)}async renameLocalFile(e){return i().localSystem.handleRenameFile(e)}async writeFile(e){return i().localSystem.handleWriteFile(e)}async auditSafePaths(e){return i().localSystem.auditSafePaths(e)}async getLocalFilePreview(e){let t=await i().localSystem.getLocalFilePreviewUrl(e);if(!t.success||!t.url)throw Error(t.error||`Missing local file preview URL`);return c(t.url,e.accept)}async prepareSkillDirectory(e){return i().localSystem.handlePrepareSkillDirectory(e)}async resolveSkillResourcePath(e){return i().localSystem.handleResolveSkillResourcePath(e)}async editLocalFile(e){return i().localSystem.handleEditFile(e)}async runCommand(e){return i().shellCommand.handleRunCommand(e)}async getCommandOutput(e){return i().shellCommand.handleGetCommandOutput(e)}async killCommand(e){return i().shellCommand.handleKillCommand(e)}async grepContent(e){return i().localSystem.handleGrepContent(e)}async globFiles(e){return i().localSystem.handleGlobFiles(e)}async showSaveDialog(e){return i().localSystem.handleShowSaveDialog(e)}async openLocalFileOrFolder(e,t){return t?this.openLocalFolder({isDirectory:t,path:e}):this.openLocalFile({path:e})}async openFileFolder(e){return this.openLocalFolder({isDirectory:!1,path:e})}},u=new l}));export{u as n,d as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.