@luban-code/luban-code 1.152.1 → 1.152.2
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/acp.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/extension.js +1 -1
- package/package.json +1 -1
package/dist/acp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*! Luban | Copyright 2026 eppen (liuhualiang) | SPDX-License-Identifier: Apache-2.0 */
|
|
3
|
-
"use strict";var vN=Object.create;var I0=Object.defineProperty;var TN=Object.getOwnPropertyDescriptor;var MN=Object.getOwnPropertyNames;var AN=Object.getPrototypeOf,CN=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ON=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of MN(t))!CN.call(e,s)&&s!==n&&I0(e,s,{get:()=>t[s],enumerable:!(r=TN(t,s))||r.enumerable});return e};var EN=(e,t,n)=>(n=e!=null?vN(AN(e)):{},ON(t||!e||!e.__esModule?I0(n,"default",{value:e,enumerable:!0}):n,e));var Ru=ie((Jz,PN)=>{PN.exports={name:"@luban-code/luban-code",displayName:"Luban",description:"Luban \u2014 a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",version:"1.152.1",license:"Apache-2.0",author:{name:"eppen (liuhualiang)",url:"https://github.com/eppen"},publisher:"liuhualiang",icon:"media/icon.png",homepage:"https://eppen.github.io/luban-site/",bugs:{url:"https://github.com/eppen/luban/issues"},keywords:["ai","agent","chat","coding-agent","qwen","deepseek","openai-compatible","mcp"],repository:{type:"git",url:"git+https://github.com/eppen/luban.git"},engines:{vscode:"^1.104.0"},categories:["AI","Chat","Programming Languages"],activationEvents:["onStartupFinished","onView:luban.chatView","onCommand:luban.focusView","onCommand:luban.browserPreview","onCommand:luban.markdownPreview","onCommand:luban.taskline","onCommand:luban.pending"],main:"./dist/extension.js",bin:{luban:"dist/cli.js","luban-code":"dist/cli.js","luban-acp":"dist/acp.js"},files:["dist/cli.js","dist/acp.js","dist/cli-plugin.js","dist/cli-upgrade.js","dist/cli-config.js","dist/extension.js","dist/search-worker.js","registry/","package.json"],scripts:{build:"node scripts/build.js",watch:"node scripts/build.js --watch",metrics:"node scripts/market-metrics.js",package:"node scripts/build.js","vscode:prepublish":"node scripts/build.js",prepack:"node scripts/build.js",smoke:"node scripts/build.js && node scripts/smoke.js","test:review-autokeep":"node scripts/build.js && node scripts/test-review-autokeep.js","test:approve":"node scripts/build.js && node scripts/test-approve-wiring.js","test:context-refs":"node scripts/build.js && node scripts/test-context-refs.js","test:skills":"node scripts/test-skills.js","test:rules":"node scripts/test-rules.js","test:plan-file":"node scripts/test-plan-file.js","test:plan-ext":"node scripts/build.js && node scripts/test-plan-ext.js","test:cursorplan-live":"node scripts/build.js && node scripts/live-cursorplan.js","test:plugins":"node scripts/test-plugins.js","test:plugins-ext":"node scripts/test-plugins-ext.js","test:registry":"node scripts/test-registry-client.js","test:registry-skill":"node scripts/test-registry-skill.js","test:install":"node scripts/test-install-scripts.js",cli:"node cli.js","3d-view":"node scripts/devtools-3d-view.js","test:acp":"node scripts/test-acp.js","test:acp-pkg":"node scripts/test-acp-pkg.js","acp:jetbrains":"node scripts/acp-jetbrains.js","test:acp-jetbrains":"node scripts/test-acp-jetbrains.js","test:mcp-session":"node scripts/test-mcp-session.js","test:acp-registry":"node scripts/test-acp-registry.js","test:cli-resume":"node scripts/test-cli-resume.js","test:session-store":"node scripts/test-session-store.js","test:cli-upgrade":"node scripts/test-cli-upgrade.js","test:cli-config":"node scripts/test-cli-config.js","test:cli-lang":"node scripts/test-cli-lang.js",vsix:"node scripts/vsix.js","test:general":"node scripts/test-general-settings.js","test:provider-models":"node scripts/test-provider-models.js","test:hub":"node scripts/test-hub-tabs.js","test:hub-market":"node scripts/test-hub-market.js","test:market-ext":"node scripts/test-market-ext.js","test:sync-registry":"node scripts/test-sync-registry.js","test:i18n":"node scripts/test-i18n.js","test:ws-chip":"node scripts/test-workspace-chip.js","test:css":"node scripts/test-css-vars.js","test:webdav":"node scripts/test-webdav.js","test:mcp-config":"node scripts/test-mcp-config.js","test:mcp-call":"node scripts/test-mcp-call.js","test:mcp-ext":"node scripts/test-mcp-ext.js","test:mcp-lazy":"node scripts/test-mcp-lazy.js","bench:mcp-lazy":"node scripts/bench-mcp-lazy.js","bench:mcp-ondemand":"node scripts/bench-mcp-ondemand.js","bench:mcp-cache":"node scripts/bench-mcp-cache.js","test:webdav-override":"node scripts/test-webdav-override.js","test:browser-events":"node scripts/test-browser-events.js","test:browser-tool":"node scripts/test-browser-tool.js","test:browser-launch":"node scripts/test-browser-launch.js","test:computer-linux":"node scripts/test-computer-linux.js","test:computer-linux-live":"node scripts/live-computer-linux.js","test:computer-tool":"node scripts/test-computer-tool.js","test:subagent":"node scripts/test-subagent-guards.js","test:subagent-format":"node scripts/test-subagent-format.js","test:subagent-parallel":"node scripts/test-subagent-parallel.js","test:delegate":"node scripts/test-delegate-guards.js","test:delegate-parallel":"node scripts/test-delegate-parallel.js","test:worktree":"node scripts/test-worktree-deliver.js","test:worktree-e2e":"node scripts/verify-worktree-e2e.js","test:worktree-merge":"node scripts/verify-worktree-merge.js","test:worktree-diff":"node scripts/verify-worktree-diff.js","test:roles":"node scripts/test-agent-roles.js","test:review-guards":"node scripts/test-review-guards.js","test:subagent-live":"node scripts/live-subagent.js","test:lm-provider":"node scripts/test-lm-provider.js","test:agent-budget":"node scripts/test-agent-budget.js","test:tool-errors":"node scripts/test-tool-errors.js","test:run-timeout":"node scripts/test-run-timeout.js","test:dup-body":"node scripts/test-dup-body.js","test:gamepad":"node scripts/test-gamepad.js","test:status":"node scripts/test-status.js","test:avatar":"node scripts/test-avatar.js","test:cli-md":"node scripts/test-cli-md.js","test:mdpreview":"node scripts/test-mdpreview.js","test:mdmath":"node scripts/test-mdmath.js","test:md-fileline":"node scripts/test-md-fileline.js","test:mdpreview-live":"node scripts/live-mdpreview.js","test:cli-confirm":"node scripts/test-cli-confirm.js","test:cli-settings":"node scripts/test-cli-settings.js","test:browser-profile":"node scripts/test-browser-profile.js","test:cli-yolo":"node scripts/test-cli-yolo.js","test:cli-input":"node scripts/test-cli-input.js","test:token-audit":"node scripts/test-token-audit.js","test:usage-tools":"node scripts/test-usage-tools.js","test:usage-web":"node scripts/test-usage-web-tools.js","test:server-tools":"node scripts/test-server-tools.js","test:think":"node scripts/test-think.js","test:think-tiers":"node scripts/test-think-tiers.js","test:webfetch-md":"node scripts/test-webfetch-md.js","test:tabs":"node scripts/test-workspace-tab-filter.js","test:queue-order":"node scripts/test-queue-order.js","test:status-live":"node scripts/live-status.js","test:session-dup-live":"node scripts/live-session-dup.js","test:review-freeze":"node scripts/live-review-freeze.js","test:review-focus":"node scripts/live-review-focus.js","test:3d-view":"node scripts/test-3d-view.js","test:taskline":"node scripts/test-taskline.js","test:pending":"node scripts/test-pending.js","test:taskline-e2e":"node scripts/test-taskline-e2e.js","test:layout":"node scripts/test-module-layout.js","test:patch":"node patch.js","test:search-worker":"node scripts/build.js && node scripts/test-search-worker.js","bench:search":"node scripts/bench-search.js","gen:taskline-demo":"node scripts/gen-taskline-demo.js"},capabilities:{untrustedWorkspaces:{supported:!0},virtualWorkspaces:!0,agentsWindow:{supported:!0}},contributes:{commands:[{command:"luban.focusView",title:"%cmdFocusView%",category:"Luban"},{command:"luban.openPanel",title:"%cmdOpenPanel%",category:"Luban"},{command:"luban.reloadConfig",title:"%cmdReloadConfig%",category:"Luban"},{command:"luban.providerSettings",title:"%cmdProviderSettings%",category:"Luban"},{command:"luban.dashboard",title:"%cmdDashboard%",category:"Luban"},{command:"luban.plugins",title:"%cmdPlugins%",category:"Luban"},{command:"luban.market",title:"%cmdMarket%",category:"Luban"},{command:"luban.rules.open",title:"%cmdOpenRules%",category:"Luban"},{command:"luban.agent",title:"%cmdAgent%",category:"Luban"},{command:"luban.openDiff",title:"%cmdOpenDiff%",category:"Luban"},{command:"luban.acceptHunk",title:"%cmdAcceptHunk%",category:"Luban"},{command:"luban.rejectHunk",title:"%cmdRejectHunk%",category:"Luban"},{command:"luban.acceptFile",title:"%cmdAcceptFile%",category:"Luban"},{command:"luban.rejectFile",title:"%cmdRejectFile%",category:"Luban"},{command:"luban.reviewAll",title:"%cmdReviewAll%",category:"Luban"},{command:"luban.revertAll",title:"%cmdRevertAll%",category:"Luban"},{command:"luban.revertTurn",title:"%cmdRevertTurn%",category:"Luban"},{command:"luban.newSession",title:"%cmdNewSession%",category:"Luban"},{command:"luban.sessionList",title:"%cmdSessionList%",category:"Luban"},{command:"luban.taskline",title:"%cmdTaskline%",category:"Luban"},{command:"luban.pending",title:"%cmdPending%",category:"Luban"},{command:"luban.findInSession",title:"%cmdFindInSession%",category:"Luban"},{command:"luban.cursorPlan",title:"%cmdCursorPlan%",category:"Luban"},{command:"luban.openCursorPlan",title:"%cmdOpenCursorPlan%",category:"Luban"},{command:"luban.mode.cycle",title:"%cmdModeCycle%",category:"Luban"},{command:"luban.approveRules",title:"%cmdApproveRules%",category:"Luban"},{command:"luban.addFileToChat",title:"%cmdAddFileToChat%",category:"Luban"},{command:"luban.addFolderToChat",title:"%cmdAddFolderToChat%",category:"Luban"},{command:"luban.addFileToNewChat",title:"%cmdAddFileToNewChat%",category:"Luban"},{command:"luban.addFolderToNewChat",title:"%cmdAddFolderToNewChat%",category:"Luban"},{command:"luban.addSelectionToChat",title:"%cmdAddSelectionToChat%",category:"Luban"},{command:"luban.addSelectionToNewChat",title:"%cmdAddSelectionToNewChat%",category:"Luban"},{command:"luban.inlineCompletion.toggle",title:"%cmdInlineToggle%",category:"Luban"},{command:"luban.diffAccept",title:"%cmdDiffAccept%",category:"Luban",icon:"$(check)"},{command:"luban.diffReject",title:"%cmdDiffReject%",category:"Luban",icon:"$(discard)"},{command:"luban.openInBrowser",title:"%cmdOpenInBrowser%",category:"Luban"},{command:"luban.browserCheck",title:"%cmdBrowserCheck%",category:"Luban"},{command:"luban.browserPreview",title:"%cmdBrowserPreview%",category:"Luban"},{command:"luban.markdownPreview",title:"%cmdMarkdownPreview%",category:"Luban",icon:"$(markdown)"}],menus:{"editor/title":[{command:"luban.diffAccept",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@1"},{command:"luban.diffReject",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@2"},{command:"luban.markdownPreview",when:"resourceLangId == markdown",group:"navigation@3"}],"explorer/context":[{command:"luban.addFileToChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@1"},{command:"luban.addFolderToChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@2"},{command:"luban.addFileToNewChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@3"},{command:"luban.addFolderToNewChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@4"}],"editor/context":[{command:"luban.addSelectionToChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@0"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@1"}],"webview/context":[{command:"luban.openInBrowser",when:"webviewSection == 'chat'"}],commandPalette:[{command:"luban.diffAccept",when:"luban.pendingReview > 0"},{command:"luban.diffReject",when:"luban.pendingReview > 0"},{command:"luban.addFileToChat",when:"false"},{command:"luban.addFolderToChat",when:"false"},{command:"luban.addFileToNewChat",when:"false"},{command:"luban.addFolderToNewChat",when:"false"},{command:"luban.addSelectionToChat",when:"editorHasSelection"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection"},{command:"luban.openInBrowser",when:"false"}]},keybindings:[{command:"luban.focusView",key:"cmd+shift+l",mac:"cmd+shift+l",win:"ctrl+shift+l",linux:"ctrl+shift+l"},{command:"luban.newSession",key:"cmd+alt+n",mac:"cmd+alt+n",win:"ctrl+alt+n",linux:"ctrl+alt+n"},{command:"luban.sessionList",key:"cmd+alt+h",mac:"cmd+alt+h",win:"ctrl+alt+h",linux:"ctrl+alt+h"},{command:"luban.taskline",key:"cmd+alt+t",mac:"cmd+alt+t",win:"ctrl+alt+t",linux:"ctrl+alt+t"},{command:"luban.mode.cycle",key:"shift+tab",mac:"shift+tab",win:"shift+tab",linux:"shift+tab",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"activeWebviewPanelId == 'luban'"},{command:"luban.addSelectionToChat",key:"cmd+alt+a",mac:"cmd+alt+a",win:"ctrl+alt+a",linux:"ctrl+alt+a",when:"editorHasSelection && editorTextFocus"}],viewsContainers:{activitybar:[{id:"luban",title:"Luban",icon:"media/icon.svg"}]},views:{luban:[{type:"webview",id:"luban.chatView",name:"Chat",contextualTitle:"Luban",icon:"media/icon.svg"}]},languageModelChatProviders:[{vendor:"luban",displayName:"Luban",icon:"media/icon.png",managementCommand:"luban.providerSettings"}],configuration:{title:"Luban",properties:{"luban.language":{type:"string",enum:["auto","en","zh-cn","ja"],enumDescriptions:["%cfgLanguageAuto%","%cfgLanguageEn%","%cfgLanguageZhCn%","%cfgLanguageJa%"],default:"auto",description:"%cfgLanguage%"},"luban.autoOpen":{type:"boolean",default:!0,description:"%cfgAutoOpen%"},"luban.context.autoFile":{type:"boolean",default:!0,description:"%cfgContextAutoFile%"},"luban.context.autoFileMaxChars":{type:"number",default:8e3,minimum:500,description:"%cfgContextAutoFileMaxChars%"},"luban.context.autoFileWindowLines":{type:"number",default:200,minimum:40,description:"%cfgContextAutoFileWindowLines%"},"luban.context.workset":{type:"boolean",default:!0,description:"%cfgContextWorkset%"},"luban.sessionHistory.max":{type:"number",default:50,minimum:1,description:"%cfgSessionHistoryMax%"},"luban.usage.record":{type:"boolean",default:!0,description:"%cfgUsageRecord%"},"luban.sessionMemory.enabled":{type:"boolean",default:!0,description:"%cfgSessionMemoryEnabled%"},"luban.sessionMemory.maxTurns":{type:"number",default:8,minimum:1,description:"%cfgSessionMemoryMaxTurns%"},"luban.sessionMemory.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgSessionMemoryMaxChars%"},"luban.agent.maxRounds":{type:"number",default:200,minimum:0,description:"%cfgAgentMaxRounds%"},"luban.agent.maxMinutes":{type:"number",default:30,minimum:1,description:"%cfgAgentMaxMinutes%"},"luban.agent.requestTimeoutMs":{type:"number",default:18e4,minimum:1e4,maximum:6e5,description:"%cfgAgentRequestTimeoutMs%"},"luban.agent.noWriteNudges":{type:"number",default:2,minimum:0,description:"%cfgAgentNoWriteNudges%"},"luban.agent.verifyNudges":{type:"number",default:1,minimum:0,description:"%cfgAgentVerifyNudges%"},"luban.agent.todoReminder":{type:"number",default:0,minimum:0,maximum:99,description:"%cfgAgentTodoReminder%"},"luban.agent.subagentRounds":{type:"number",default:24,minimum:0,description:"%cfgAgentSubagentRounds%"},"luban.agent.subagentMinutes":{type:"number",default:0,minimum:0,description:"%cfgAgentSubagentMinutes%"},"luban.agent.subagentParallel":{type:"number",default:2,minimum:0,maximum:8,description:"%cfgAgentSubagentParallel%"},"luban.agent.delegateModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentDelegateModels%"},"luban.agent.reviewAfterDelegate":{type:"boolean",default:!0,description:"%cfgAgentReviewAfterDelegate%"},"luban.agent.reviewModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentReviewModels%"},"luban.agent.worktreeDeliver":{type:"string",enum:["off","always","subagent"],default:"off",description:"%cfgAgentWorktreeDeliver%"},"luban.agent.worktreeRoot":{type:"string",default:"",description:"%cfgAgentWorktreeRoot%"},"luban.agent.smallWindow":{type:"string",enum:["auto","on","off"],default:"auto",description:"%cfgAgentSmallWindow%"},"luban.agent.verbosity":{type:"string",enum:["concise","normal","detailed"],default:"normal",description:"%cfgAgentVerbosity%"},"luban.search.maxFiles":{type:"number",default:5e3,minimum:100,description:"%cfgSearchMaxFiles%"},"luban.net.tlsMaxVersion":{type:"string",enum:["auto","1.2"],enumDescriptions:["%cfgNetTlsMaxVersionAuto%","%cfgNetTlsMaxVersion12%"],default:"auto",description:"%cfgNetTlsMaxVersion%"},"luban.browser.enabled":{type:"boolean",default:!1,description:"%cfgBrowserEnabled%"},"luban.browser.chromePath":{type:"string",default:"",description:"%cfgBrowserChromePath%"},"luban.browser.headless":{type:"boolean",default:!0,description:"%cfgBrowserHeadless%"},"luban.browser.viewportWidth":{type:"number",default:1280,minimum:320,maximum:4096,description:"%cfgBrowserViewportWidth%"},"luban.browser.viewportHeight":{type:"number",default:800,minimum:240,maximum:4096,description:"%cfgBrowserViewportHeight%"},"luban.browser.idleTimeoutMs":{type:"number",default:3e5,minimum:1e4,description:"%cfgBrowserIdleTimeout%"},"luban.browser.confirm":{type:"boolean",default:!0,description:"%cfgBrowserConfirm%"},"luban.browser.preview":{type:"boolean",default:!1,description:"%cfgBrowserPreview%"},"luban.computer.enabled":{type:"boolean",default:!1,description:"%cfgComputerEnabled%"},"luban.computer.confirm":{type:"boolean",default:!0,description:"%cfgComputerConfirm%"},"luban.computer.screenshotWidth":{type:"number",default:2048,minimum:320,maximum:4096,description:"%cfgComputerScreenshotWidth%"},"luban.plugins.enabled":{type:"boolean",default:!1,description:"%cfgPluginsEnabled%"},"luban.plugins.maxTools":{type:"number",default:30,minimum:1,maximum:200,description:"%cfgPluginsMaxTools%"},"luban.plugins.theme":{type:"string",default:"",description:"%cfgPluginsTheme%"},"luban.mcp.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgMcpLoadModeLazy%","%cfgMcpLoadModeEager%"],default:"lazy",description:"%cfgMcpLoadMode%"},"luban.plugins.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgPluginsLoadModeLazy%","%cfgPluginsLoadModeEager%"],default:"lazy",description:"%cfgPluginsLoadMode%"},"luban.plan.strictReadOnly":{type:"boolean",default:!0,description:"%cfgPlanStrictReadOnly%"},"luban.shell.confirmDangerous":{type:"boolean",default:!1,description:"%cfgShellConfirmDangerous%"},"luban.fs.allowOutsideWorkspace":{type:"boolean",default:!0,description:"%cfgFsAllowOutsideWorkspace%"},"luban.review.autoOpenDiff":{type:"boolean",default:!1,description:"%cfgReviewAutoOpenDiff%"},"luban.review.autoKeep":{type:"boolean",default:!1,description:"%cfgReviewAutoKeep%"},"luban.diagnostics.afterEdit":{type:"boolean",default:!0,description:"%cfgDiagAfterEdit%"},"luban.inlineCompletion.enabled":{type:"boolean",default:!1,description:"%cfgInlineEnabled%"},"luban.inlineCompletion.maxPerMinute":{type:"number",default:30,minimum:1,description:"%cfgInlineMaxPerMinute%"},"luban.inlineCompletion.debounceMs":{type:"number",default:250,minimum:0,description:"%cfgInlineDebounceMs%"},"luban.statusBar.enabled":{type:"boolean",default:!0,description:"%cfgStatusBarEnabled%"},"luban.mascot.avatar":{type:"boolean",default:!1,description:"%cfgMascotAvatar%"},"luban.rules.enabled":{type:"boolean",default:!0,description:"%cfgRulesEnabled%"},"luban.rules.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgRulesMaxChars%"},"luban.rules.indexMaxChars":{type:"number",default:2e3,minimum:200,description:"%cfgRulesIndexMaxChars%"}}}},devDependencies:{esbuild:"^0.25.0",katex:"^0.16.47",mermaid:"^11.17.2"},dependencies:{"@clack/prompts":"^1.8.1",picocolors:"^1.1.1"}}});var B0=ie((Xz,q0)=>{"use strict";var Fu=require("fs"),Tl=require("path"),Np=require("module");function Ml(e){let t=function(){return r},n={version:"1.104.0",env:{language:e.language||"zh-cn",appName:"luban-acp",uriScheme:"file",appHost:"desktop"},workspace:{textDocuments:[],getConfiguration:function(){return{get:function(){},has:function(){return!1},inspect:function(){}}},onDidChangeConfiguration:function(){return{dispose:function(){}}},fs:{writeFile:function(s,o){return new Promise(function(i,a){try{Fu.mkdirSync(Tl.dirname(s.fsPath),{recursive:!0}),Fu.writeFileSync(s.fsPath,o),i(void 0)}catch(l){a(l)}})},readFile:function(s){return new Promise(function(o,i){Fu.readFile(s.fsPath,function(a,l){a?i(a):o(l)})})},stat:function(s){return new Promise(function(o,i){Fu.stat(s.fsPath,function(a,l){a?i(a):o(l)})})}}},languages:{getDiagnostics:function(){return[]},onDidChangeDiagnostics:function(){return{dispose:function(){}}}},window:{activeTextEditor:null,visibleTextEditors:[],showErrorMessage:function(){return Promise.resolve(void 0)},showInformationMessage:function(){return Promise.resolve(void 0)},showWarningMessage:function(){return Promise.resolve(void 0)},createOutputChannel:function(){return{appendLine:function(){},append:function(){},show:function(){},dispose:function(){}}},onDidChangeActiveTextEditor:function(){return{dispose:function(){}}},createStatusBarItem:function(){return{text:"",tooltip:"",show:function(){},hide:function(){},dispose:function(){}}}},commands:{executeCommand:function(s){return Promise.reject(new Error("ACP \u8FDB\u7A0B\u6CA1\u6709\u7F16\u8F91\u5668\uFF0C\u4E0D\u80FD\u6267\u884C\u547D\u4EE4 "+s))},registerCommand:function(){return{dispose:function(){}}}},extensions:{getExtension:function(){return null},all:[]},Uri:{file:function(s){return{fsPath:s,scheme:"file",path:s,toString:function(){return"file://"+s},with:function(){return n.Uri.file(s)}}},parse:function(s){let o=/^file:\/\/(.*)$/.exec(String(s));return{fsPath:o?decodeURIComponent(o[1]):String(s),scheme:"file"}},joinPath:function(s,...o){return n.Uri.file(Tl.join(s.fsPath,...o))}},Position:function(s,o){this.line=s,this.character=o},Range:function(s,o,i,a){this.start=new n.Position(s,o),this.end=new n.Position(i,a)},CancellationTokenSource:function(){let s=[];return{token:{isCancellationRequested:!1,onCancellationRequested:function(o){return s.push(o),{dispose:function(){}}}},cancel:function(){s.forEach(function(o){try{o()}catch{}})},dispose:function(){}}},EventEmitter:function(){let s=[];return{event:function(o){return s.push(o),{dispose:function(){}}},fire:function(o){s.forEach(function(i){try{i(o)}catch{}})},dispose:function(){}}}};Object.defineProperty(n.workspace,"workspaceFolders",{enumerable:!0,get:function(){return e.root?[{uri:{fsPath:e.root,scheme:"file",toString:function(){return"file://"+e.root}},name:Tl.basename(e.root),index:0}]:[]}});let r=new Proxy(t,{get:function(s,o){if(!(o==="then"||o===Symbol.toPrimitive||o==="inspect"||o===Symbol.iterator))return o in n?n[o]:(o in s||(s[o]=Ml(e)),s[o])},apply:function(){return Ml(e)},construct:function(){return Ml(e)}});return r}function jN(e){let t=e||{},n={root:Tl.resolve(t.root||process.cwd()),language:t.language||""},r=Ml(n),s=Np._load;return Np._load=function(o,i,a){return o==="vscode"?r:s.call(this,o,i,a)},{stub:r,get root(){return n.root},setRoot:function(o){n.root=Tl.resolve(o)},restore:function(){Np._load=s}}}q0.exports={install:jN,makeStub:Ml}});var Rp=ie(($z,U0)=>{function Al(e){let t=String(e??"");return t===""?[]:t.split(`
|
|
3
|
+
"use strict";var vN=Object.create;var I0=Object.defineProperty;var TN=Object.getOwnPropertyDescriptor;var MN=Object.getOwnPropertyNames;var AN=Object.getPrototypeOf,CN=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ON=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of MN(t))!CN.call(e,s)&&s!==n&&I0(e,s,{get:()=>t[s],enumerable:!(r=TN(t,s))||r.enumerable});return e};var EN=(e,t,n)=>(n=e!=null?vN(AN(e)):{},ON(t||!e||!e.__esModule?I0(n,"default",{value:e,enumerable:!0}):n,e));var Ru=ie((Jz,PN)=>{PN.exports={name:"@luban-code/luban-code",displayName:"Luban",description:"Luban \u2014 a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",version:"1.152.2",license:"Apache-2.0",author:{name:"eppen (liuhualiang)",url:"https://github.com/eppen"},publisher:"liuhualiang",icon:"media/icon.png",homepage:"https://eppen.github.io/luban-site/",bugs:{url:"https://github.com/eppen/luban/issues"},keywords:["ai","agent","chat","coding-agent","qwen","deepseek","openai-compatible","mcp"],repository:{type:"git",url:"git+https://github.com/eppen/luban.git"},engines:{vscode:"^1.104.0"},categories:["AI","Chat","Programming Languages"],activationEvents:["onStartupFinished","onView:luban.chatView","onCommand:luban.focusView","onCommand:luban.browserPreview","onCommand:luban.markdownPreview","onCommand:luban.taskline","onCommand:luban.pending"],main:"./dist/extension.js",bin:{luban:"dist/cli.js","luban-code":"dist/cli.js","luban-acp":"dist/acp.js"},files:["dist/cli.js","dist/acp.js","dist/cli-plugin.js","dist/cli-upgrade.js","dist/cli-config.js","dist/extension.js","dist/search-worker.js","registry/","package.json"],scripts:{build:"node scripts/build.js",watch:"node scripts/build.js --watch",metrics:"node scripts/market-metrics.js",package:"node scripts/build.js","vscode:prepublish":"node scripts/build.js",prepack:"node scripts/build.js",smoke:"node scripts/build.js && node scripts/smoke.js","test:review-autokeep":"node scripts/build.js && node scripts/test-review-autokeep.js","test:approve":"node scripts/build.js && node scripts/test-approve-wiring.js","test:context-refs":"node scripts/build.js && node scripts/test-context-refs.js","test:skills":"node scripts/test-skills.js","test:rules":"node scripts/test-rules.js","test:plan-file":"node scripts/test-plan-file.js","test:plan-ext":"node scripts/build.js && node scripts/test-plan-ext.js","test:cursorplan-live":"node scripts/build.js && node scripts/live-cursorplan.js","test:plugins":"node scripts/test-plugins.js","test:plugins-ext":"node scripts/test-plugins-ext.js","test:registry":"node scripts/test-registry-client.js","test:registry-skill":"node scripts/test-registry-skill.js","test:install":"node scripts/test-install-scripts.js",cli:"node cli.js","3d-view":"node scripts/devtools-3d-view.js","test:acp":"node scripts/test-acp.js","test:acp-pkg":"node scripts/test-acp-pkg.js","acp:jetbrains":"node scripts/acp-jetbrains.js","test:acp-jetbrains":"node scripts/test-acp-jetbrains.js","test:mcp-session":"node scripts/test-mcp-session.js","test:acp-registry":"node scripts/test-acp-registry.js","test:cli-resume":"node scripts/test-cli-resume.js","test:session-store":"node scripts/test-session-store.js","test:cli-upgrade":"node scripts/test-cli-upgrade.js","test:cli-config":"node scripts/test-cli-config.js","test:cli-lang":"node scripts/test-cli-lang.js",vsix:"node scripts/vsix.js","test:general":"node scripts/test-general-settings.js","test:provider-models":"node scripts/test-provider-models.js","test:hub":"node scripts/test-hub-tabs.js","test:hub-market":"node scripts/test-hub-market.js","test:market-ext":"node scripts/test-market-ext.js","test:sync-registry":"node scripts/test-sync-registry.js","test:i18n":"node scripts/test-i18n.js","test:ws-chip":"node scripts/test-workspace-chip.js","test:css":"node scripts/test-css-vars.js","test:webdav":"node scripts/test-webdav.js","test:mcp-config":"node scripts/test-mcp-config.js","test:mcp-call":"node scripts/test-mcp-call.js","test:mcp-ext":"node scripts/test-mcp-ext.js","test:mcp-lazy":"node scripts/test-mcp-lazy.js","bench:mcp-lazy":"node scripts/bench-mcp-lazy.js","bench:mcp-ondemand":"node scripts/bench-mcp-ondemand.js","bench:mcp-cache":"node scripts/bench-mcp-cache.js","test:webdav-override":"node scripts/test-webdav-override.js","test:browser-events":"node scripts/test-browser-events.js","test:browser-tool":"node scripts/test-browser-tool.js","test:browser-launch":"node scripts/test-browser-launch.js","test:computer-linux":"node scripts/test-computer-linux.js","test:computer-linux-live":"node scripts/live-computer-linux.js","test:computer-tool":"node scripts/test-computer-tool.js","test:subagent":"node scripts/test-subagent-guards.js","test:subagent-format":"node scripts/test-subagent-format.js","test:subagent-parallel":"node scripts/test-subagent-parallel.js","test:delegate":"node scripts/test-delegate-guards.js","test:delegate-parallel":"node scripts/test-delegate-parallel.js","test:worktree":"node scripts/test-worktree-deliver.js","test:worktree-e2e":"node scripts/verify-worktree-e2e.js","test:worktree-merge":"node scripts/verify-worktree-merge.js","test:worktree-diff":"node scripts/verify-worktree-diff.js","test:roles":"node scripts/test-agent-roles.js","test:review-guards":"node scripts/test-review-guards.js","test:subagent-live":"node scripts/live-subagent.js","test:lm-provider":"node scripts/test-lm-provider.js","test:agent-budget":"node scripts/test-agent-budget.js","test:tool-errors":"node scripts/test-tool-errors.js","test:run-timeout":"node scripts/test-run-timeout.js","test:dup-body":"node scripts/test-dup-body.js","test:gamepad":"node scripts/test-gamepad.js","test:status":"node scripts/test-status.js","test:avatar":"node scripts/test-avatar.js","test:cli-md":"node scripts/test-cli-md.js","test:mdpreview":"node scripts/test-mdpreview.js","test:mdmath":"node scripts/test-mdmath.js","test:md-fileline":"node scripts/test-md-fileline.js","test:mdpreview-live":"node scripts/live-mdpreview.js","test:cli-confirm":"node scripts/test-cli-confirm.js","test:cli-settings":"node scripts/test-cli-settings.js","test:browser-profile":"node scripts/test-browser-profile.js","test:cli-yolo":"node scripts/test-cli-yolo.js","test:cli-input":"node scripts/test-cli-input.js","test:token-audit":"node scripts/test-token-audit.js","test:usage-tools":"node scripts/test-usage-tools.js","test:usage-web":"node scripts/test-usage-web-tools.js","test:server-tools":"node scripts/test-server-tools.js","test:think":"node scripts/test-think.js","test:think-tiers":"node scripts/test-think-tiers.js","test:webfetch-md":"node scripts/test-webfetch-md.js","test:tabs":"node scripts/test-workspace-tab-filter.js","test:queue-order":"node scripts/test-queue-order.js","test:status-live":"node scripts/live-status.js","test:session-dup-live":"node scripts/live-session-dup.js","test:review-freeze":"node scripts/live-review-freeze.js","test:review-focus":"node scripts/live-review-focus.js","test:3d-view":"node scripts/test-3d-view.js","test:taskline":"node scripts/test-taskline.js","test:pending":"node scripts/test-pending.js","test:taskline-e2e":"node scripts/test-taskline-e2e.js","test:layout":"node scripts/test-module-layout.js","test:patch":"node patch.js","test:search-worker":"node scripts/build.js && node scripts/test-search-worker.js","bench:search":"node scripts/bench-search.js","gen:taskline-demo":"node scripts/gen-taskline-demo.js"},capabilities:{untrustedWorkspaces:{supported:!0},virtualWorkspaces:!0,agentsWindow:{supported:!0}},contributes:{commands:[{command:"luban.focusView",title:"%cmdFocusView%",category:"Luban"},{command:"luban.openPanel",title:"%cmdOpenPanel%",category:"Luban"},{command:"luban.reloadConfig",title:"%cmdReloadConfig%",category:"Luban"},{command:"luban.providerSettings",title:"%cmdProviderSettings%",category:"Luban"},{command:"luban.dashboard",title:"%cmdDashboard%",category:"Luban"},{command:"luban.plugins",title:"%cmdPlugins%",category:"Luban"},{command:"luban.market",title:"%cmdMarket%",category:"Luban"},{command:"luban.rules.open",title:"%cmdOpenRules%",category:"Luban"},{command:"luban.agent",title:"%cmdAgent%",category:"Luban"},{command:"luban.openDiff",title:"%cmdOpenDiff%",category:"Luban"},{command:"luban.acceptHunk",title:"%cmdAcceptHunk%",category:"Luban"},{command:"luban.rejectHunk",title:"%cmdRejectHunk%",category:"Luban"},{command:"luban.acceptFile",title:"%cmdAcceptFile%",category:"Luban"},{command:"luban.rejectFile",title:"%cmdRejectFile%",category:"Luban"},{command:"luban.reviewAll",title:"%cmdReviewAll%",category:"Luban"},{command:"luban.revertAll",title:"%cmdRevertAll%",category:"Luban"},{command:"luban.revertTurn",title:"%cmdRevertTurn%",category:"Luban"},{command:"luban.newSession",title:"%cmdNewSession%",category:"Luban"},{command:"luban.sessionList",title:"%cmdSessionList%",category:"Luban"},{command:"luban.taskline",title:"%cmdTaskline%",category:"Luban"},{command:"luban.pending",title:"%cmdPending%",category:"Luban"},{command:"luban.findInSession",title:"%cmdFindInSession%",category:"Luban"},{command:"luban.cursorPlan",title:"%cmdCursorPlan%",category:"Luban"},{command:"luban.openCursorPlan",title:"%cmdOpenCursorPlan%",category:"Luban"},{command:"luban.mode.cycle",title:"%cmdModeCycle%",category:"Luban"},{command:"luban.approveRules",title:"%cmdApproveRules%",category:"Luban"},{command:"luban.addFileToChat",title:"%cmdAddFileToChat%",category:"Luban"},{command:"luban.addFolderToChat",title:"%cmdAddFolderToChat%",category:"Luban"},{command:"luban.addFileToNewChat",title:"%cmdAddFileToNewChat%",category:"Luban"},{command:"luban.addFolderToNewChat",title:"%cmdAddFolderToNewChat%",category:"Luban"},{command:"luban.addSelectionToChat",title:"%cmdAddSelectionToChat%",category:"Luban"},{command:"luban.addSelectionToNewChat",title:"%cmdAddSelectionToNewChat%",category:"Luban"},{command:"luban.inlineCompletion.toggle",title:"%cmdInlineToggle%",category:"Luban"},{command:"luban.diffAccept",title:"%cmdDiffAccept%",category:"Luban",icon:"$(check)"},{command:"luban.diffReject",title:"%cmdDiffReject%",category:"Luban",icon:"$(discard)"},{command:"luban.openInBrowser",title:"%cmdOpenInBrowser%",category:"Luban"},{command:"luban.browserCheck",title:"%cmdBrowserCheck%",category:"Luban"},{command:"luban.browserPreview",title:"%cmdBrowserPreview%",category:"Luban"},{command:"luban.markdownPreview",title:"%cmdMarkdownPreview%",category:"Luban",icon:"$(markdown)"}],menus:{"editor/title":[{command:"luban.diffAccept",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@1"},{command:"luban.diffReject",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@2"},{command:"luban.markdownPreview",when:"resourceLangId == markdown",group:"navigation@3"}],"explorer/context":[{command:"luban.addFileToChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@1"},{command:"luban.addFolderToChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@2"},{command:"luban.addFileToNewChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@3"},{command:"luban.addFolderToNewChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@4"}],"editor/context":[{command:"luban.addSelectionToChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@0"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@1"}],"webview/context":[{command:"luban.openInBrowser",when:"webviewSection == 'chat'"}],commandPalette:[{command:"luban.diffAccept",when:"luban.pendingReview > 0"},{command:"luban.diffReject",when:"luban.pendingReview > 0"},{command:"luban.addFileToChat",when:"false"},{command:"luban.addFolderToChat",when:"false"},{command:"luban.addFileToNewChat",when:"false"},{command:"luban.addFolderToNewChat",when:"false"},{command:"luban.addSelectionToChat",when:"editorHasSelection"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection"},{command:"luban.openInBrowser",when:"false"}]},keybindings:[{command:"luban.focusView",key:"cmd+shift+l",mac:"cmd+shift+l",win:"ctrl+shift+l",linux:"ctrl+shift+l"},{command:"luban.newSession",key:"cmd+alt+n",mac:"cmd+alt+n",win:"ctrl+alt+n",linux:"ctrl+alt+n"},{command:"luban.sessionList",key:"cmd+alt+h",mac:"cmd+alt+h",win:"ctrl+alt+h",linux:"ctrl+alt+h"},{command:"luban.taskline",key:"cmd+alt+t",mac:"cmd+alt+t",win:"ctrl+alt+t",linux:"ctrl+alt+t"},{command:"luban.mode.cycle",key:"shift+tab",mac:"shift+tab",win:"shift+tab",linux:"shift+tab",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"activeWebviewPanelId == 'luban'"},{command:"luban.addSelectionToChat",key:"cmd+alt+a",mac:"cmd+alt+a",win:"ctrl+alt+a",linux:"ctrl+alt+a",when:"editorHasSelection && editorTextFocus"}],viewsContainers:{activitybar:[{id:"luban",title:"Luban",icon:"media/icon.svg"}]},views:{luban:[{type:"webview",id:"luban.chatView",name:"Chat",contextualTitle:"Luban",icon:"media/icon.svg"}]},languageModelChatProviders:[{vendor:"luban",displayName:"Luban",icon:"media/icon.png",managementCommand:"luban.providerSettings"}],configuration:{title:"Luban",properties:{"luban.language":{type:"string",enum:["auto","en","zh-cn","ja"],enumDescriptions:["%cfgLanguageAuto%","%cfgLanguageEn%","%cfgLanguageZhCn%","%cfgLanguageJa%"],default:"auto",description:"%cfgLanguage%"},"luban.autoOpen":{type:"boolean",default:!0,description:"%cfgAutoOpen%"},"luban.context.autoFile":{type:"boolean",default:!0,description:"%cfgContextAutoFile%"},"luban.context.autoFileMaxChars":{type:"number",default:8e3,minimum:500,description:"%cfgContextAutoFileMaxChars%"},"luban.context.autoFileWindowLines":{type:"number",default:200,minimum:40,description:"%cfgContextAutoFileWindowLines%"},"luban.context.workset":{type:"boolean",default:!0,description:"%cfgContextWorkset%"},"luban.sessionHistory.max":{type:"number",default:50,minimum:1,description:"%cfgSessionHistoryMax%"},"luban.usage.record":{type:"boolean",default:!0,description:"%cfgUsageRecord%"},"luban.sessionMemory.enabled":{type:"boolean",default:!0,description:"%cfgSessionMemoryEnabled%"},"luban.sessionMemory.maxTurns":{type:"number",default:8,minimum:1,description:"%cfgSessionMemoryMaxTurns%"},"luban.sessionMemory.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgSessionMemoryMaxChars%"},"luban.agent.maxRounds":{type:"number",default:200,minimum:0,description:"%cfgAgentMaxRounds%"},"luban.agent.maxMinutes":{type:"number",default:30,minimum:1,description:"%cfgAgentMaxMinutes%"},"luban.agent.requestTimeoutMs":{type:"number",default:18e4,minimum:1e4,maximum:6e5,description:"%cfgAgentRequestTimeoutMs%"},"luban.agent.noWriteNudges":{type:"number",default:2,minimum:0,description:"%cfgAgentNoWriteNudges%"},"luban.agent.verifyNudges":{type:"number",default:1,minimum:0,description:"%cfgAgentVerifyNudges%"},"luban.agent.todoReminder":{type:"number",default:0,minimum:0,maximum:99,description:"%cfgAgentTodoReminder%"},"luban.agent.subagentRounds":{type:"number",default:24,minimum:0,description:"%cfgAgentSubagentRounds%"},"luban.agent.subagentMinutes":{type:"number",default:0,minimum:0,description:"%cfgAgentSubagentMinutes%"},"luban.agent.subagentParallel":{type:"number",default:2,minimum:0,maximum:8,description:"%cfgAgentSubagentParallel%"},"luban.agent.delegateModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentDelegateModels%"},"luban.agent.reviewAfterDelegate":{type:"boolean",default:!0,description:"%cfgAgentReviewAfterDelegate%"},"luban.agent.reviewModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentReviewModels%"},"luban.agent.worktreeDeliver":{type:"string",enum:["off","always","subagent"],default:"off",description:"%cfgAgentWorktreeDeliver%"},"luban.agent.worktreeRoot":{type:"string",default:"",description:"%cfgAgentWorktreeRoot%"},"luban.agent.smallWindow":{type:"string",enum:["auto","on","off"],default:"auto",description:"%cfgAgentSmallWindow%"},"luban.agent.verbosity":{type:"string",enum:["concise","normal","detailed"],default:"normal",description:"%cfgAgentVerbosity%"},"luban.search.maxFiles":{type:"number",default:5e3,minimum:100,description:"%cfgSearchMaxFiles%"},"luban.net.tlsMaxVersion":{type:"string",enum:["auto","1.2"],enumDescriptions:["%cfgNetTlsMaxVersionAuto%","%cfgNetTlsMaxVersion12%"],default:"auto",description:"%cfgNetTlsMaxVersion%"},"luban.browser.enabled":{type:"boolean",default:!1,description:"%cfgBrowserEnabled%"},"luban.browser.chromePath":{type:"string",default:"",description:"%cfgBrowserChromePath%"},"luban.browser.headless":{type:"boolean",default:!0,description:"%cfgBrowserHeadless%"},"luban.browser.viewportWidth":{type:"number",default:1280,minimum:320,maximum:4096,description:"%cfgBrowserViewportWidth%"},"luban.browser.viewportHeight":{type:"number",default:800,minimum:240,maximum:4096,description:"%cfgBrowserViewportHeight%"},"luban.browser.idleTimeoutMs":{type:"number",default:3e5,minimum:1e4,description:"%cfgBrowserIdleTimeout%"},"luban.browser.confirm":{type:"boolean",default:!0,description:"%cfgBrowserConfirm%"},"luban.browser.preview":{type:"boolean",default:!1,description:"%cfgBrowserPreview%"},"luban.computer.enabled":{type:"boolean",default:!1,description:"%cfgComputerEnabled%"},"luban.computer.confirm":{type:"boolean",default:!0,description:"%cfgComputerConfirm%"},"luban.computer.screenshotWidth":{type:"number",default:2048,minimum:320,maximum:4096,description:"%cfgComputerScreenshotWidth%"},"luban.plugins.enabled":{type:"boolean",default:!1,description:"%cfgPluginsEnabled%"},"luban.plugins.maxTools":{type:"number",default:30,minimum:1,maximum:200,description:"%cfgPluginsMaxTools%"},"luban.plugins.theme":{type:"string",default:"",description:"%cfgPluginsTheme%"},"luban.mcp.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgMcpLoadModeLazy%","%cfgMcpLoadModeEager%"],default:"lazy",description:"%cfgMcpLoadMode%"},"luban.plugins.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgPluginsLoadModeLazy%","%cfgPluginsLoadModeEager%"],default:"lazy",description:"%cfgPluginsLoadMode%"},"luban.plan.strictReadOnly":{type:"boolean",default:!0,description:"%cfgPlanStrictReadOnly%"},"luban.shell.confirmDangerous":{type:"boolean",default:!1,description:"%cfgShellConfirmDangerous%"},"luban.fs.allowOutsideWorkspace":{type:"boolean",default:!0,description:"%cfgFsAllowOutsideWorkspace%"},"luban.review.autoOpenDiff":{type:"boolean",default:!1,description:"%cfgReviewAutoOpenDiff%"},"luban.review.autoKeep":{type:"boolean",default:!1,description:"%cfgReviewAutoKeep%"},"luban.diagnostics.afterEdit":{type:"boolean",default:!0,description:"%cfgDiagAfterEdit%"},"luban.inlineCompletion.enabled":{type:"boolean",default:!1,description:"%cfgInlineEnabled%"},"luban.inlineCompletion.maxPerMinute":{type:"number",default:30,minimum:1,description:"%cfgInlineMaxPerMinute%"},"luban.inlineCompletion.debounceMs":{type:"number",default:250,minimum:0,description:"%cfgInlineDebounceMs%"},"luban.statusBar.enabled":{type:"boolean",default:!0,description:"%cfgStatusBarEnabled%"},"luban.mascot.avatar":{type:"boolean",default:!1,description:"%cfgMascotAvatar%"},"luban.rules.enabled":{type:"boolean",default:!0,description:"%cfgRulesEnabled%"},"luban.rules.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgRulesMaxChars%"},"luban.rules.indexMaxChars":{type:"number",default:2e3,minimum:200,description:"%cfgRulesIndexMaxChars%"}}}},devDependencies:{esbuild:"^0.25.0",katex:"^0.16.47",mermaid:"^11.17.2"},dependencies:{"@clack/prompts":"^1.8.1",picocolors:"^1.1.1"}}});var B0=ie((Xz,q0)=>{"use strict";var Fu=require("fs"),Tl=require("path"),Np=require("module");function Ml(e){let t=function(){return r},n={version:"1.104.0",env:{language:e.language||"zh-cn",appName:"luban-acp",uriScheme:"file",appHost:"desktop"},workspace:{textDocuments:[],getConfiguration:function(){return{get:function(){},has:function(){return!1},inspect:function(){}}},onDidChangeConfiguration:function(){return{dispose:function(){}}},fs:{writeFile:function(s,o){return new Promise(function(i,a){try{Fu.mkdirSync(Tl.dirname(s.fsPath),{recursive:!0}),Fu.writeFileSync(s.fsPath,o),i(void 0)}catch(l){a(l)}})},readFile:function(s){return new Promise(function(o,i){Fu.readFile(s.fsPath,function(a,l){a?i(a):o(l)})})},stat:function(s){return new Promise(function(o,i){Fu.stat(s.fsPath,function(a,l){a?i(a):o(l)})})}}},languages:{getDiagnostics:function(){return[]},onDidChangeDiagnostics:function(){return{dispose:function(){}}}},window:{activeTextEditor:null,visibleTextEditors:[],showErrorMessage:function(){return Promise.resolve(void 0)},showInformationMessage:function(){return Promise.resolve(void 0)},showWarningMessage:function(){return Promise.resolve(void 0)},createOutputChannel:function(){return{appendLine:function(){},append:function(){},show:function(){},dispose:function(){}}},onDidChangeActiveTextEditor:function(){return{dispose:function(){}}},createStatusBarItem:function(){return{text:"",tooltip:"",show:function(){},hide:function(){},dispose:function(){}}}},commands:{executeCommand:function(s){return Promise.reject(new Error("ACP \u8FDB\u7A0B\u6CA1\u6709\u7F16\u8F91\u5668\uFF0C\u4E0D\u80FD\u6267\u884C\u547D\u4EE4 "+s))},registerCommand:function(){return{dispose:function(){}}}},extensions:{getExtension:function(){return null},all:[]},Uri:{file:function(s){return{fsPath:s,scheme:"file",path:s,toString:function(){return"file://"+s},with:function(){return n.Uri.file(s)}}},parse:function(s){let o=/^file:\/\/(.*)$/.exec(String(s));return{fsPath:o?decodeURIComponent(o[1]):String(s),scheme:"file"}},joinPath:function(s,...o){return n.Uri.file(Tl.join(s.fsPath,...o))}},Position:function(s,o){this.line=s,this.character=o},Range:function(s,o,i,a){this.start=new n.Position(s,o),this.end=new n.Position(i,a)},CancellationTokenSource:function(){let s=[];return{token:{isCancellationRequested:!1,onCancellationRequested:function(o){return s.push(o),{dispose:function(){}}}},cancel:function(){s.forEach(function(o){try{o()}catch{}})},dispose:function(){}}},EventEmitter:function(){let s=[];return{event:function(o){return s.push(o),{dispose:function(){}}},fire:function(o){s.forEach(function(i){try{i(o)}catch{}})},dispose:function(){}}}};Object.defineProperty(n.workspace,"workspaceFolders",{enumerable:!0,get:function(){return e.root?[{uri:{fsPath:e.root,scheme:"file",toString:function(){return"file://"+e.root}},name:Tl.basename(e.root),index:0}]:[]}});let r=new Proxy(t,{get:function(s,o){if(!(o==="then"||o===Symbol.toPrimitive||o==="inspect"||o===Symbol.iterator))return o in n?n[o]:(o in s||(s[o]=Ml(e)),s[o])},apply:function(){return Ml(e)},construct:function(){return Ml(e)}});return r}function jN(e){let t=e||{},n={root:Tl.resolve(t.root||process.cwd()),language:t.language||""},r=Ml(n),s=Np._load;return Np._load=function(o,i,a){return o==="vscode"?r:s.call(this,o,i,a)},{stub:r,get root(){return n.root},setRoot:function(o){n.root=Tl.resolve(o)},restore:function(){Np._load=s}}}q0.exports={install:jN,makeStub:Ml}});var Rp=ie(($z,U0)=>{function Al(e){let t=String(e??"");return t===""?[]:t.split(`
|
|
4
4
|
`)}function Lp(e){return(e||[]).join(`
|
|
5
5
|
`)}function NN(e,t){let n=e.length,r=t.length,s=r+1,o=new Int32Array((n+1)*s);for(let c=n-1;c>=0;c--){let u=c*s,d=(c+1)*s;for(let f=r-1;f>=0;f--)o[u+f]=e[c]===t[f]?o[d+f+1]+1:Math.max(o[d+f],o[u+f+1])}let i=[],a=0,l=0;for(;a<n&&l<r;)e[a]===t[l]?(i.push({t:" ",s:e[a]}),a++,l++):o[(a+1)*s+l]>=o[a*s+l+1]?(i.push({t:"-",s:e[a]}),a++):(i.push({t:"+",s:t[l]}),l++);for(;a<n;)i.push({t:"-",s:e[a++]});for(;l<r;)i.push({t:"+",s:t[l++]});return i}function LN(e,t,n){let r=0,s=0;for(let u=0;u<t;u++)e[u].t!=="+"&&r++,e[u].t!=="-"&&s++;let o=e.slice(t,n).map(function(u){return{t:u.t,s:u.s}}),i=0,a=0,l=0,c=0;for(let u of o)u.t!=="+"&&i++,u.t!=="-"&&a++,u.t==="+"&&l++,u.t==="-"&&c++;return{oldStart:r,oldLines:i,newStart:s,newLines:a,add:l,del:c,header:"@@ -"+(r+1)+","+i+" +"+(s+1)+","+a+" @@",lines:o}}function RN(e){let t=[];for(let s=0;s<e.length;s++)e[s].t!==" "&&t.push(s);let n=[],r=0;for(;r<t.length;){let s=t[r],o=s,i=r+1;for(;i<t.length&&t[i]-o-1<=2*3;)o=t[i],i++;r=i;let a=Math.max(0,s-3),l=Math.min(e.length,o+3+1);n.push(LN(e,a,l))}return n.forEach(function(s,o){s.id="h"+(o+1)}),n}function FN(e,t){let n=Al(e),r=Al(t),s=n.length,o=r.length,i=0;for(;i<s&&i<o&&n[i]===r[i];)i++;let a=0;for(;a<s-i&&a<o-i&&n[s-1-a]===r[o-1-a];)a++;let l=n.slice(i,s-a),c=r.slice(i,o-a);if(!l.length&&!c.length)return[];let u;l.length*c.length>1e6?u=l.map(function(f){return{t:"-",s:f}}).concat(c.map(function(f){return{t:"+",s:f}})):u=NN(l,c);let d=[];for(let f=0;f<i;f++)d.push({t:" ",s:n[f]});for(let f of u)d.push(f);for(let f=s-a;f<s;f++)d.push({t:" ",s:n[f]});return RN(d)}function DN(e){let t=0,n=0;for(let r of e||[])t+=r.add,n+=r.del;return{add:t,del:n,hunks:(e||[]).length}}function IN(e,t){let n=Al(e),r=[];for(let s of t.lines)s.t!=="-"&&r.push(s.s);return Lp(n.slice(0,t.oldStart).concat(r,n.slice(t.oldStart+t.oldLines)))}function qN(e,t){let n=Al(e),r=[];for(let s of t.lines)s.t!=="+"&&r.push(s.s);return Lp(n.slice(0,t.newStart).concat(r,n.slice(t.newStart+t.newLines)))}function BN(e,t){let n=[];for(let r of t.lines)r.t!=="+"&&n.push(r.s);return{start:t.newStart,end:t.newStart+t.newLines,lines:n}}function UN(e){let t=[],n=[],r=e.newStart,s=-1,o=null;for(let i of e.lines)i.t==="+"?(s<0&&(s=r),r++):i.t==="-"?(s>=0&&(t.push({start:s,count:r-s}),s=-1),o||(o={at:r,lines:[]},n.push(o)),o.lines.push(i.s)):(s>=0&&(t.push({start:s,count:r-s}),s=-1),o=null,r++);return s>=0&&t.push({start:s,count:r-s}),{add:t,del:n}}U0.exports={CONTEXT:3,splitLines:Al,joinLines:Lp,computeHunks:FN,stats:DN,applyHunkToBaseline:IN,revertHunkText:qN,revertHunkEdit:BN,hunkRanges:UN}});var $0=ie((Vz,X0)=>{var Bt=require("fs"),ea=require("fs").promises,Dp=require("path"),K0=500,Fp=2e4,W0=2e4,WN=8e4,HN=4e3,KN=20,zN=40,z0=50,GN=300,JN=5e3,XN=7*24*60*60*1e3,$N=10*60*1e3,VN=4,YN=5*1024*1024,ZN={"image/png":"png","image/jpeg":"jpg","image/webp":"webp","image/gif":"gif"},QN=/^[A-Za-z0-9_-]+\.[a-z]{3,4}$/;function Es(e){return(e<10?"0":"")+e}function eL(e){try{Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,e)}catch{}}function Ip(e){let t=e||new Date;return t.getFullYear()+Es(t.getMonth()+1)+Es(t.getDate())+"-"+Es(t.getHours())+Es(t.getMinutes())+Es(t.getSeconds())+"-"+Math.random().toString(36).slice(2,6)}function it(e,t){let n=String(e??"");return n.length>t?n.slice(0,t)+"\u2026":n}function tL(e){if(!Array.isArray(e)||!e.length)return;let t=[];for(let n of e.slice(0,VN)){if(!n||typeof n!="object")continue;let r=it(n.file,120),s=String(n.mime==null?"":n.mime),o=ZN[s];if(!o||!QN.test(r)||r.slice(r.lastIndexOf(".")+1)!==o)continue;let i=Math.min(YN,Math.floor(Number(n.bytes)||0));i<=0||t.push({file:r,mime:s,bytes:i})}return t.length?t:void 0}function nL(e){let t=e?new Date(e):new Date;return isNaN(t.getTime())?"":Es(t.getMonth()+1)+"-"+Es(t.getDate())+" "+Es(t.getHours())+":"+Es(t.getMinutes())}var G0="\u65B0\u4F1A\u8BDD";function rL(e){typeof e=="string"&&e&&(G0=e)}function Cl(e,t,n){for(let r of e||[])if(r&&r.t==="user"&&r.text){let s=String(r.text).replace(/\s+/g," ").trim();if(s)return s.length>40?s.slice(0,40)+"\u2026":s}return(n||G0)+" \xB7 "+nL(t)}var sL=40,oL={pending:1,in_progress:1,completed:1,cancelled:1},iL=4,aL=6;function H0(e){if(!Array.isArray(e)||!e.length)return[];let t=[];for(let n of e.slice(0,sL)){if(!n||typeof n!="object")continue;let r=it(n.id,64).trim(),s=it(n.content,200).trim();if(!r||!s)continue;let o=String(n.status==null?"pending":n.status).trim().toLowerCase();t.push({id:r,content:s,status:oL[o]?o:"pending"})}return t}function lL(e){if(!Array.isArray(e)||!e.length)return[];let t=[];for(let n of e.slice(0,aL)){if(!n||typeof n!="object")continue;let r=it(n.id,64).trim(),s=it(n.label,120).trim();if(!r||!s)continue;let o={id:r,label:s};n.recommended&&(o.recommended=!0),t.push(o)}return t}function cL(e){if(!Array.isArray(e)||!e.length)return[];let t=[];for(let n of e.slice(0,iL)){if(!n||typeof n!="object")continue;let r=it(n.id,64).trim(),s=it(n.prompt,240).trim(),o=lL(n.options);if(!r||!s||o.length<2)continue;let i={id:r,prompt:s,options:o};n.allow_multiple&&(i.allow_multiple=!0),t.push(i)}return t}function uL(e,t){let n=e&&typeof e=="object"?e:{},r=Array.isArray(t)?t:[],s={};for(let o=0;o<r.length;o++){let i=r[o],a=Object.create(null);for(let c=0;c<i.options.length;c++)a[i.options[c].id]=1;let l=n[i.id];if(i.allow_multiple){let c=Array.isArray(l)?l:l==null||l===""?[]:[l],u=[],d=Object.create(null);for(let f=0;f<c.length;f++){let p=it(c[f],64).trim();!p||!a[p]||d[p]||(d[p]=1,u.push(p))}u.length&&(s[i.id]=u)}else{let c=it(Array.isArray(l)?l[0]:l,64).trim();c&&a[c]&&(s[i.id]=c)}}return s}function J0(e){let t=Object.assign({},e);if(t.t==="tool")return t.name=it(t.name,60),t.path=it(t.path,300),t.result=it(t.result,HN),t.ok=t.ok!==!1,t;if(t.t==="sources")return t.items=(t.items||[]).slice(0,KN).map(function(n){return{title:it(n&&n.title,200),url:it(n&&n.url,500),siteName:it(n&&n.siteName,80),date:it(n&&n.date,40)}}),t.query=it(t.query,200),t;if(t.t==="refs")return t.refs=(t.refs||[]).slice(0,zN).map(function(n){return{kind:n&&n.kind==="selection"?"selection":"file",path:it(n&&n.path,400),startLine:n&&n.startLine||0,endLine:n&&n.endLine||0,lines:n&&n.lines||0,truncated:!!(n&&n.truncated),omitted:!!(n&&n.omitted),label:it(n&&n.label,400)}}),t;if(t.t==="usage"){let n=function(s){return Math.max(0,Math.floor(Number(s)||0))},r=function(s){let o=Number(s);return isFinite(o)&&o>0?Math.min(1,Number(o.toFixed(3))):0};return t.requests=n(t.requests),t.promptTokens=n(t.promptTokens),t.completionTokens=n(t.completionTokens),t.totalTokens=n(t.totalTokens),t.cachedTokens=n(t.cachedTokens),t.contextTokens=n(t.contextTokens),t.window=n(t.window),t.hit=r(t.hit),t.percent=r(t.percent),t.estimated=!!t.estimated,t.model=it(t.model,120),t.breakdown&&Array.isArray(t.breakdown.segments)?t.breakdown={tokens:n(t.breakdown.tokens),estimated:!0,segments:t.breakdown.segments.slice(0,12).map(function(s){return{key:it(s&&s.key,40),tokens:n(s&&s.tokens),share:r(s&&s.share)}})}:delete t.breakdown,delete t.prefixHint,t}if(t.t==="user"){t.text=it(t.text,Fp),t.web=!!t.web,t.ctx!=null&&(t.ctx=it(t.ctx,WN)),t.exec&&(t.exec=!0);let n=tL(t.images);return n?t.images=n:delete t.images,t}if(t.t==="error")return t.message=it(t.message,2e3),t;if(t.t==="todos")return t.items=H0(t.items),t;if(t.t==="ask_question")return t.id=it(t.id,80),t.title=it(t.title,80),t.questions=cL(t.questions),t.answers=uL(t.answers,t.questions),t;if(t.t==="plan"){t.planFile=it(t.planFile,1e3),typeof t.text=="string"&&(t.text=it(t.text,Fp)),typeof t.think=="string"&&(t.think=it(t.think,W0));let n=H0(t.todos);return n.length?t.todos=n:delete t.todos,t}return typeof t.text=="string"&&(t.text=it(t.text,Fp)),typeof t.think=="string"&&(t.think=it(t.think,W0)),t}function qp(e){return{id:e.id,title:e.title||Cl(e.items,e.createdAt),createdAt:e.createdAt||"",updatedAt:e.updatedAt||"",root:e.root||"",modelKey:e.modelKey||"",mode:e.mode||"",items:(e.items||[]).length,bytes:e.bytes||0}}function nt(e,t){this.dir=e,this.max=t&&t.max||z0,this._listCache=null,this._listJson="",this._listMtime=0,this._wq=null,this._removed=new Map,this._mine=new Set,this._syncGen=0,this._tmpSeq=0,this._cleanupTmp()}nt.prototype._cleanupTmp=function(){let e=[];try{e=Bt.readdirSync(this.dir)}catch{return 0}let t=Date.now(),n=0;for(let r of e){let s=/\.tmp-(\d+)-\d+$/.exec(r);if(!s||s[1]===String(process.pid))continue;let o=Dp.join(this.dir,r);try{if(t-Bt.statSync(o).mtimeMs<$N)continue;Bt.unlinkSync(o),n++}catch{}}return n};nt.prototype.setMax=function(e){let t=Number(e);return isFinite(t)&&t>=1&&(this.max=Math.floor(t)),this.max};nt.prototype.fileOf=function(e){return Dp.join(this.dir,String(e)+".json")};nt.prototype.indexPath=function(){return Dp.join(this.dir,"index.json")};nt.prototype._ensureDir=function(){Bt.mkdirSync(this.dir,{recursive:!0,mode:448})};nt.prototype._write=function(e,t){this._ensureDir();let n=e+".tmp-"+process.pid+"-"+ ++this._tmpSeq;if(Bt.writeFileSync(n,t,{mode:384}),Bt.existsSync(e))try{Bt.copyFileSync(e,e+".bak")}catch{}Bt.renameSync(n,e)};nt.prototype._writeAsync=async function(e,t,n){await ea.mkdir(this.dir,{recursive:!0,mode:448});let r=e+".tmp-"+process.pid+"-"+ ++this._tmpSeq;if(await ea.writeFile(r,t,{mode:384}),typeof n=="function"&&!n()){try{await ea.unlink(r)}catch{}return!1}try{await ea.access(e);try{await ea.copyFile(e,e+".bak")}catch{}}catch{}return await ea.rename(r,e),!0};nt.prototype._mtimeOf=function(e){try{return Bt.statSync(e).mtimeMs}catch{return 0}};nt.prototype._ids=function(){let e=[];try{e=Bt.readdirSync(this.dir)}catch{return[]}let t=[];for(let n of e)!/\.json$/.test(n)||n==="index.json"||t.push(n.slice(0,-5));return t};nt.prototype.rebuildIndex=function(){let e=[];for(let n of this._ids()){let r=this.load(n);r&&e.push(qp(r))}e.sort(function(n,r){return String(r.updatedAt).localeCompare(String(n.updatedAt))});let t=this._acquireIndexLock();try{let n=this._tombstones(this._readIndexFromDisk().removed),r=this._indexText(e,n);this._write(this.indexPath(),r),this._listJson=r,this._listMtime=this._mtimeOf(this.indexPath())}catch{}finally{this._releaseIndexLock(t)}return this._listCache=e,e};nt.prototype.readIndex=function(){if(this._listCache&&this._mtimeOf(this.indexPath())===this._listMtime)return this._listCache;let e=null;try{let n=Bt.readFileSync(this.indexPath(),"utf8"),r=JSON.parse(n);Array.isArray(r)?e=r:r&&Array.isArray(r.sessions)&&(e=r.sessions),e&&(this._listJson=n,this._listMtime=this._mtimeOf(this.indexPath()))}catch{e=null}if(!e)return this.rebuildIndex();let t=this;return e=e.filter(function(n){return n&&n.id&&!t._removed.has(String(n.id))}),!e.length&&this._ids().length?this.rebuildIndex():(this._listCache=e,e)};nt.prototype._readIndexFromDisk=function(){try{let e=JSON.parse(Bt.readFileSync(this.indexPath(),"utf8")),t=Array.isArray(e)?e:e&&Array.isArray(e.sessions)?e.sessions:null,n=!Array.isArray(e)&&e&&e.removed&&typeof e.removed=="object"?e.removed:{};return{list:(t||[]).filter(function(r){return r&&r.id}),removed:n}}catch{return{list:[],removed:{}}}};nt.prototype._tombstones=function(e){let t=Date.now(),n=new Map,r=function(o,i){let a=Number(i);if(!o||!isFinite(a)||a<=0||t-a>XN)return;let l=n.get(String(o));(l===void 0||a>l)&&n.set(String(o),a)},s=e||{};for(let o of Object.keys(s))r(o,s[o]);return this._removed.forEach(function(o,i){r(i,o)}),n};nt.prototype._mergeIndex=function(e,t){let n=new Map,r=this;function s(o){if(!o||!o.id)return;let i=String(o.id);if(r._removed.has(i))return;let a=n.get(i);(!a||String(o.updatedAt||"")>=String(a.updatedAt||""))&&n.set(i,o)}return(e||[]).forEach(s),(t||[]).forEach(s),Array.from(n.values())};nt.prototype._acquireIndexLock=function(){let e=this.indexPath()+".lock",t=Date.now()+GN;for(;;)try{let n=Bt.openSync(e,"wx",384);try{Bt.writeSync(n,String(process.pid))}catch{}return Bt.closeSync(n),e}catch(n){if(!n||n.code!=="EEXIST")return null;try{if(Date.now()-Bt.statSync(e).mtimeMs>JN){Bt.unlinkSync(e);continue}}catch{}if(Date.now()>=t)return null;eL(10)}};nt.prototype._releaseIndexLock=function(e){if(e)try{Bt.unlinkSync(e)}catch{}};nt.prototype._indexText=function(e,t){let n={v:1,sessions:e};if(t&&t.size){let r={};t.forEach(function(s,o){r[o]=s}),n.removed=r}return JSON.stringify(n)+`
|
|
6
6
|
`};nt.prototype.writeIndex=function(e){let t=this._sortList(e);if(this._listCache=t,this._indexText(t,this._tombstones({}))===this._listJson)return t;let n=this._acquireIndexLock(),r=t,s="";try{let o=this._readIndexFromDisk(),i=new Set;for(let c of o.list)this._mine.has(String(c.id))||i.add(String(c.id));let a=this._tombstones(o.removed),l=this._mergeIndex(o.list,t).filter(function(c){let u=a.get(String(c.id));if(u===void 0)return!0;let d=Date.parse(String(c.updatedAt||""));return isFinite(d)&&d>u});r=this._prune(l,i),s=this._indexText(r,a),this._write(this.indexPath(),s),this._listJson=s,this._listMtime=this._mtimeOf(this.indexPath())}catch{}finally{this._releaseIndexLock(n)}return this._listCache=r,r};nt.prototype.list=function(e,t){let n=this.readIndex();return(!e||e==="all"?n:n.filter(function(s){return String(s.root||"")===String(t||"")})).slice().sort(function(s,o){return String(o.updatedAt||"").localeCompare(String(s.updatedAt||""))})};nt.prototype.create=function(e){let t=new Date;return{v:1,id:Ip(t),title:"",createdAt:t.toISOString(),updatedAt:t.toISOString(),root:String(e??""),modelKey:"",mode:"",items:[]}};nt.prototype.load=function(e){if(!/^[A-Za-z0-9_-]+$/.test(String(e||"")))return null;let t=null;try{t=JSON.parse(Bt.readFileSync(this.fileOf(e),"utf8"))}catch{t=null}if(!t)try{t=JSON.parse(Bt.readFileSync(this.fileOf(e)+".bak","utf8"))}catch{t=null}return!t||!t.id?null:(Array.isArray(t.items)||(t.items=[]),t.title||(t.title=Cl(t.items,t.createdAt)),t)};nt.prototype._dropFiles=function(e){let t=this.fileOf(e);for(let n of[t,t+".bak",t+".tmp"])try{Bt.existsSync(n)&&Bt.unlinkSync(n)}catch{}};nt.prototype._sortList=function(e){return(e||[]).slice().sort(function(t,n){return String(n.updatedAt||"").localeCompare(String(t.updatedAt||""))})};nt.prototype._prune=function(e,t){let n=this._sortList(e),r=Math.max(1,this.max);if(n.length<=r)return n;let s=n.slice(0,r);for(let o of n.slice(r))t&&t.has(String(o.id))||this._dropFiles(o.id);return s};nt.prototype._prepare=function(e){if(!e||!e.id)throw new Error("session.id \u4E0D\u80FD\u4E3A\u7A7A");Array.isArray(e.items)||(e.items=[]),e.title||(e.title=Cl(e.items,e.createdAt)),e.updatedAt=new Date().toISOString()};nt.prototype._updateList=function(e){let t=qp(e),n=this.readIndex().filter(function(r){return r.id!==e.id});return n.push(t),this._listCache=n,this._mine.add(String(e.id)),t};nt.prototype.save=function(e){this._prepare(e);let t=JSON.stringify(e)+`
|
package/dist/cli.js
CHANGED
|
@@ -177,7 +177,7 @@ Interactive UI only on TTY. Enter to send; / commands; @ files; Esc cancels the
|
|
|
177
177
|
/usage [\u7BC4\u56F2] \u30C8\u30FC\u30AF\u30F3\u4F7F\u7528\u91CF
|
|
178
178
|
/sessions \u5C65\u6B74\u4E00\u89A7
|
|
179
179
|
/resume <id|\u756A\u53F7> \u4F1A\u8A71\u3092\u518D\u958B
|
|
180
|
-
/new \u65B0\u3057\u3044\u4F1A\u8A71`,"cli.cmd.cleared":"\u4F1A\u8A71\u30E1\u30E2\u30EA\u3092\u30AF\u30EA\u30A2\u3057\u307E\u3057\u305F\uFF08{n} \u30BF\u30FC\u30F3\uFF09","cli.cmd.noSessions":"\u3053\u306E\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306B\u5C65\u6B74\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093","cli.cmd.sessionsHeader":"\u3053\u306E\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306E\u4F1A\u8A71\uFF08{n} \u4EF6\u3001\u65B0\u3057\u3044\u9806\uFF09\uFF1A","cli.cmd.sessionLine":"{n} \u30BF\u30FC\u30F3","cli.cmd.sessionsHint":" /resume <\u756A\u53F7|id> \u3067\u5FA9\u5143\uFF1B* \u306F\u73FE\u5728\u306E\u4F1A\u8A71","cli.cmd.resumeUsage":"\u4F7F\u3044\u65B9\uFF1A/resume <id|\u756A\u53F7>\uFF08/sessions \u3067\u4E00\u89A7\uFF09","cli.cmd.resumeIdxRange":"\u756A\u53F7\u304C\u7BC4\u56F2\u5916\u3067\u3059\uFF1A{raw}","cli.cmd.resumeNoMatch":"\u4E00\u81F4\u3059\u308B\u30BB\u30C3\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093\uFF1A{raw}","cli.cmd.resumeAmbiguous":"\u63A5\u982D\u8F9E {raw} \u304C {n} \u4EF6\u306B\u4E00\u81F4\u3057\u307E\u3059\u3002\u3082\u3046\u5C11\u3057\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044","cli.cmd.resumeLoadFail":"\u30BB\u30C3\u30B7\u30E7\u30F3\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3081\u307E\u305B\u3093\uFF1A{id}","cli.cmd.resumed":"\u4F1A\u8A71 {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3\uFF08\u30E2\u30C7\u30EB {model} \xB7 {mode}\uFF09","cli.cmd.newSession":"\u65B0\u3057\u3044\u4F1A\u8A71\u3092\u958B\u59CB\u3057\u307E\u3057\u305F","cli.cmd.newSessionOld":"\uFF08\u53E4\u3044 {id} \u306F\u30C7\u30A3\u30B9\u30AF\u306B\u6B8B\u308A\u307E\u3059\uFF09","cli.cmd.modeCurrent":"\u73FE\u5728\u306E\u30E2\u30FC\u30C9 {mode}","cli.cmd.modeCurrentRo":"\u73FE\u5728\u306E\u30E2\u30FC\u30C9 {mode}\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09","cli.cmd.modeUsage":"\u4F7F\u3044\u65B9\uFF1A/mode plan|explore|agent","cli.cmd.modeSwitched":"\u30E2\u30FC\u30C9\u3092 {mode} \u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","cli.cmd.on":"\u30AA\u30F3","cli.cmd.off":"\u30AA\u30D5","cli.cmd.applyMerged":"\u66F8\u304D\u8FBC\u307F\u6A29\u9650\u306F\u30E2\u30FC\u30C9\u306B\u7D71\u5408\u3055\u308C\u307E\u3057\u305F\uFF08agent \u306F\u66F8\u304D\u8FBC\u307F\u53EF\u3001plan / explore \u306F\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\uFF1A/apply on = /mode agent\u3001/apply off = /mode plan","cli.cmd.confirmStatusOff":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\uFF1A\u30AA\u30D5\uFF08\u81EA\u52D5\u8A31\u53EF\uFF09","cli.cmd.confirmStatusAll":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\uFF1A\u30AA\u30D5\uFF08\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u3059\u3079\u3066\u8A31\u53EF\u6E08\u307F\uFF09","cli.cmd.confirmStatusOn":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\uFF1A\u30AA\u30F3\uFF08\u30C7\u30A3\u30B9\u30AF\u524D\u306B diff\uFF09","cli.cmd.confirmUsage":"\u4F7F\u3044\u65B9\uFF1A/confirm on|off","cli.cmd.confirmOn":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\u3092\u30AA\u30F3\u306B\u3057\u307E\u3057\u305F","cli.cmd.confirmOff":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\u3092\u30AA\u30D5\u306B\u3057\u307E\u3057\u305F\uFF08\u3059\u3079\u3066\u81EA\u52D5\u8A31\u53EF\uFF09","cli.cmd.modelCurrent":"\u73FE\u5728\u306E\u30E2\u30C7\u30EB {key}","cli.cmd.modelMissing":"\u30E2\u30C7\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\uFF1A{key}","cli.cmd.modelSwitched":"\u30E2\u30C7\u30EB\u3092 {key} \u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","cli.cmd.modelNoKey":"\u6CE8\u610F\uFF1Aprovider {id} \u306B API key \u304C\u3042\u308A\u307E\u305B\u3093","cli.cmd.modelNoKeyHow":"\u88DC\u3044\u65B9\uFF08CLI \u306F SecretStorage \u3092\u8AAD\u307F\u307E\u305B\u3093\uFF09\uFF1A","cli.cmd.modelNoKey1":" \u2460 `luban config` \u30A6\u30A3\u30B6\u30FC\u30C9\uFF08\u63A8\u5968\uFF09","cli.cmd.modelNoKey2":" \u2461 ~/.luban/providers.json \u3067 {id} \u306B apiKeyEnv \u3092\u8A2D\u5B9A","cli.cmd.modelNoKey3":" \u305D\u306E\u5F8C export \u2026\uFF08\u307E\u305F\u306F ~/.hermes/.env\uFF09","cli.cmd.modelNoKey4":" \u2462 apiKey \u3092\u76F4\u63A5\u66F8\u304F\uFF08\u5E73\u6587\u3001\u30B3\u30DF\u30C3\u30C8\u6CE8\u610F\uFF09","cli.cmd.modelNoKey5":"\u5909\u66F4\u5F8C /reload \u3067\u518D\u8AAD\u8FBC","cli.cmd.reloadFail":"\u8A2D\u5B9A\u306E\u518D\u8AAD\u8FBC\u306B\u5931\u6557\uFF1A{msg}","cli.cmd.reloaded":"{path} \u3092\u518D\u8AAD\u8FBC\uFF1A{n} \u30E2\u30C7\u30EB","cli.cmd.modelGone":"\u73FE\u5728\u306E\u30E2\u30C7\u30EB {key} \u306F\u8A2D\u5B9A\u306B\u3042\u308A\u307E\u305B\u3093\u3002{fallback} \u306B\u623B\u308A\u307E\u3057\u305F","cli.cmd.modelChanged":"\u73FE\u5728\u306E\u30E2\u30C7\u30EB\uFF1A{before} \u2192 {after}","cli.cmd.thinkingStatusLive":"\u601D\u8003\uFF1A\u30E9\u30A4\u30D6\u8868\u793A","cli.cmd.thinkingStatusFold":"\u601D\u8003\uFF1A\u6298\u308A\u305F\u305F\u307F","cli.cmd.thinkingUsage":"\u4F7F\u3044\u65B9\uFF1A/thinking on|off","cli.cmd.thinkingLive":"\u601D\u8003\u3092\u30E9\u30A4\u30D6\u8868\u793A\u306B\u3057\u307E\u3057\u305F","cli.cmd.thinkingFold":"\u601D\u8003\u3092\u6298\u308A\u305F\u305F\u307F\u306B\u3057\u307E\u3057\u305F","cli.cmd.gamepadNotRunning":"\u30D1\u30C3\u30C9\u30C6\u30B9\u30C8\u306F\u52D5\u3044\u3066\u3044\u307E\u305B\u3093","cli.cmd.gamepadUsage":"\u4F7F\u3044\u65B9\uFF1A/gamepad [on|off|raw]","cli.cmd.usageUsage":"\u4F7F\u3044\u65B9\uFF1A/usage [today|7d|30d|thismonth|lastmonth|all|<\u958B\u59CB>..<\u7D42\u4E86>]\uFF08\u65E2\u5B9A 7d\u3001\u4F8B: 2026-01-01..2026-01-31\uFF09","cli.cmd.unknown":"\u672A\u77E5\u306E\u30B3\u30DE\u30F3\u30C9 /{cmd}\uFF08/help \u53C2\u7167\uFF09","cli.cmd.turnFailed":"\u3053\u306E\u30BF\u30FC\u30F3\u5931\u6557\uFF1A{msg}","cli.cmd.sessionSaveFail":"\u30BB\u30C3\u30B7\u30E7\u30F3\u4FDD\u5B58\u306B\u5931\u6557\uFF08\u3053\u306E\u30BF\u30FC\u30F3\u306F\u5F71\u97FF\u306A\u3057\uFF09\uFF1A{msg}","cli.cmd.replBanner":"\u5BFE\u8A71\u30E2\u30FC\u30C9 \xB7 \u30E2\u30C7\u30EB {model} \xB7 \u4F5C\u696D\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA {root}","cli.cmd.replResumed":"\u4F1A\u8A71 {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3","cli.cmd.replHints":"Enter \u9001\u4FE1 \xB7 Ctrl-J/Alt+Enter \u6539\u884C \xB7 / \u30B3\u30DE\u30F3\u30C9 \xB7 @ \u30D5\u30A1\u30A4\u30EB \xB7 Esc \u30AD\u30E3\u30F3\u30BB\u30EB \xB7 Ctrl-D \u7D42\u4E86","cli.cmd.tipAgentConfirm":"agent \u66F8\u304D\u8FBC\u307F\u53EF \xB7 \u90FD\u5EA6\u78BA\u8A8D","cli.cmd.tipAgentAuto":"agent \u66F8\u304D\u8FBC\u307F\u53EF \xB7 \u81EA\u52D5\u8A31\u53EF","cli.cmd.tipPlan":"plan \u306F\u8A08\u753B\u306E\u307F \xB7 --agent \u3067\u66F8\u304D\u8FBC\u307F","cli.cmd.tipExplore":"{mode} \u8AAD\u307F\u53D6\u308A\u5C02\u7528\u8ABF\u67FB \xB7 \u66F8\u304D\u8FBC\u307F\u306A\u3057","cli.cmd.gamepadEndedAsk":"\u30D1\u30C3\u30C9\u30C6\u30B9\u30C8\u7D42\u4E86\uFF08Q&A \u3078\uFF09","cli.cmd.gamepadEndedIdle":"\u30D1\u30C3\u30C9\u30C6\u30B9\u30C8\u7D42\u4E86\uFF08Ctrl-D \u307E\u305F\u306F /exit \u3067 CLI \u7D42\u4E86\uFF09","cli.cmd.pluginAsk":"\u30ED\u30FC\u30AB\u30EB\u30D7\u30E9\u30B0\u30A4\u30F3\u300C{name}\u300D\uFF08{tools}\uFF09\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u304B\uFF1F[y/N] ","cli.cmd.noTools":"\u30C4\u30FC\u30EB\u306A\u3057","cli.cmd.pluginsLoaded":"\u30ED\u30FC\u30AB\u30EB\u30D7\u30E9\u30B0\u30A4\u30F3 {n} \xB7 \u30C4\u30FC\u30EB {tools}","cli.cmd.pluginsSkipped":" \xB7 {n} \u4EF6\u30B9\u30AD\u30C3\u30D7\uFF08{msg}\uFF09","cli.cmd.pluginsFail":"\u30D7\u30E9\u30B0\u30A4\u30F3\u8D70\u67FB\u5931\u6557\uFF1A{msg}","cli.cmd.resumeEmpty":"\u5FA9\u5143\u3067\u304D\u308B\u4F1A\u8A71\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u65B0\u3057\u3044\u30BB\u30C3\u30B7\u30E7\u30F3\u3092\u958B\u59CB\u3057\u307E\u3059","cli.cmd.resumeLatest":"--resume \u304C\u6700\u65B0 {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3","cli.cmd.resumeOk":"--resume \u304C {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3","cli.cmd.usageEmpty":"{label} \u306B\u4F7F\u7528\u91CF\u8A18\u9332\u304C\u3042\u308A\u307E\u305B\u3093","cli.cmd.usageRangeDefault":"\u3053\u306E\u7BC4\u56F2","cli.cmd.usageHeader":"\u4F7F\u7528\u91CF \xB7 {label}\uFF1A{turns} \u30BF\u30FC\u30F3 / {requests} \u30EA\u30AF\u30A8\u30B9\u30C8","cli.cmd.usageTokens":" tokens \u5165\u529B {prompt} \xB7 \u51FA\u529B {completion} \xB7 \u5408\u8A08 {total}\uFF08\u30AD\u30E3\u30C3\u30B7\u30E5\u547D\u4E2D {hit}\uFF09","cli.cmd.usageTools":" \u30C4\u30FC\u30EB \u691C\u7D22 {search} \xB7 \u53D6\u5F97 {fetch}","cli.cmd.unknownEngine":"\u672A\u77E5\u306E\u30A8\u30F3\u30B8\u30F3","cli.cmd.byModel":" \u30E2\u30C7\u30EB\u5225\uFF1A","cli.cmd.unknownModel":"\u672A\u77E5\u306E\u30E2\u30C7\u30EB","cli.cmd.modelStat":" \u2014 {tokens} tokens \xB7 {turns} \u30BF\u30FC\u30F3 \xB7 {share}","cli.cmd.byDay":" \u65E5\u5225\uFF1A","cli.cmd.byDayRecent":" \u65E5\u5225\uFF08\u76F4\u8FD1 {n} \u65E5\uFF09\uFF1A","cli.cmd.dayStat":" {tokens} tokens \xB7 {turns} \u30BF\u30FC\u30F3"}},n="zh-cn";function r(d){let f=String(d??"").toLowerCase();if(!f||f==="auto")return null;let p=f.slice(0,2);return p==="zh"?"zh-cn":p==="ja"?"ja":"en"}function s(){let d=typeof navigator<"u"&&navigator&&navigator.language||"";return/^zh/i.test(d)?"zh-cn":/^ja/i.test(d)?"ja":"en"}function o(d){return n=r(d)||s(),n}function i(){return n}function a(d,f,p){let m=r(d)||n,w=(t[m]||t["zh-cn"])[f];return w==null&&(w=t["zh-cn"][f]),w==null?f:(p&&(w=String(w).replace(/\{(\w+)\}/g,function(b,y){return p[y]==null?b:String(p[y])})),w)}function l(d,f){return a(n,d,f)}function c(d){return t["zh-cn"][d]!=null}let u={t:l,tIn:a,setLang:o,getLang:i,has:c,normalize:r,langs:["zh-cn","en","ja"]};typeof fc<"u"&&fc&&fc.exports&&(fc.exports=u),e&&(e.LubanI18n=u)})(typeof globalThis<"u"?globalThis:cS)});var fS=re((dJ,dS)=>{"use strict";function pg(e){let t=String(e??"").trim().toLowerCase();if(!t||t==="auto")return null;let n=t.slice(0,2);return n==="zh"?"zh-cn":n==="ja"?"ja":n==="en"?"en":null}function uS(e,t){let n=e||process.env,r=[n.LC_ALL,n.LC_MESSAGES,n.LANG];for(let o=0;o<r.length;o++){let i=String(r[o]||"").trim();if(i&&!/^(C|POSIX)([._]|$)/i.test(i))return/^zh/i.test(i)?"zh-cn":/^ja/i.test(i)?"ja":"en"}let s=t;if(s==null)try{s=Intl.DateTimeFormat().resolvedOptions().locale}catch{s=""}return s=String(s||""),/^zh/i.test(s)?"zh-cn":/^ja/i.test(s)?"ja":s?"en":"zh-cn"}function zF(e,t,n){let r=pg(e);if(r)return r;let s=t||process.env,o=pg(s.LUBAN_LANG);return o||uS(s,n)||"zh-cn"}function XF(e){let t=e||[];for(let n=0;n<t.length;n++)if(t[n]==="--lang"&&t[n+1])return t[n+1];return""}dS.exports={normalizeLangToken:pg,detectOsLang:uS,resolveCliLang:zF,peekLangFlag:XF}});var Id=re((fJ,JF)=>{JF.exports={name:"@luban-code/luban-code",displayName:"Luban",description:"Luban \u2014 a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",version:"1.152.1",license:"Apache-2.0",author:{name:"eppen (liuhualiang)",url:"https://github.com/eppen"},publisher:"liuhualiang",icon:"media/icon.png",homepage:"https://eppen.github.io/luban-site/",bugs:{url:"https://github.com/eppen/luban/issues"},keywords:["ai","agent","chat","coding-agent","qwen","deepseek","openai-compatible","mcp"],repository:{type:"git",url:"git+https://github.com/eppen/luban.git"},engines:{vscode:"^1.104.0"},categories:["AI","Chat","Programming Languages"],activationEvents:["onStartupFinished","onView:luban.chatView","onCommand:luban.focusView","onCommand:luban.browserPreview","onCommand:luban.markdownPreview","onCommand:luban.taskline","onCommand:luban.pending"],main:"./dist/extension.js",bin:{luban:"dist/cli.js","luban-code":"dist/cli.js","luban-acp":"dist/acp.js"},files:["dist/cli.js","dist/acp.js","dist/cli-plugin.js","dist/cli-upgrade.js","dist/cli-config.js","dist/extension.js","dist/search-worker.js","registry/","package.json"],scripts:{build:"node scripts/build.js",watch:"node scripts/build.js --watch",metrics:"node scripts/market-metrics.js",package:"node scripts/build.js","vscode:prepublish":"node scripts/build.js",prepack:"node scripts/build.js",smoke:"node scripts/build.js && node scripts/smoke.js","test:review-autokeep":"node scripts/build.js && node scripts/test-review-autokeep.js","test:approve":"node scripts/build.js && node scripts/test-approve-wiring.js","test:context-refs":"node scripts/build.js && node scripts/test-context-refs.js","test:skills":"node scripts/test-skills.js","test:rules":"node scripts/test-rules.js","test:plan-file":"node scripts/test-plan-file.js","test:plan-ext":"node scripts/build.js && node scripts/test-plan-ext.js","test:cursorplan-live":"node scripts/build.js && node scripts/live-cursorplan.js","test:plugins":"node scripts/test-plugins.js","test:plugins-ext":"node scripts/test-plugins-ext.js","test:registry":"node scripts/test-registry-client.js","test:registry-skill":"node scripts/test-registry-skill.js","test:install":"node scripts/test-install-scripts.js",cli:"node cli.js","3d-view":"node scripts/devtools-3d-view.js","test:acp":"node scripts/test-acp.js","test:acp-pkg":"node scripts/test-acp-pkg.js","acp:jetbrains":"node scripts/acp-jetbrains.js","test:acp-jetbrains":"node scripts/test-acp-jetbrains.js","test:mcp-session":"node scripts/test-mcp-session.js","test:acp-registry":"node scripts/test-acp-registry.js","test:cli-resume":"node scripts/test-cli-resume.js","test:session-store":"node scripts/test-session-store.js","test:cli-upgrade":"node scripts/test-cli-upgrade.js","test:cli-config":"node scripts/test-cli-config.js","test:cli-lang":"node scripts/test-cli-lang.js",vsix:"node scripts/vsix.js","test:general":"node scripts/test-general-settings.js","test:provider-models":"node scripts/test-provider-models.js","test:hub":"node scripts/test-hub-tabs.js","test:hub-market":"node scripts/test-hub-market.js","test:market-ext":"node scripts/test-market-ext.js","test:sync-registry":"node scripts/test-sync-registry.js","test:i18n":"node scripts/test-i18n.js","test:ws-chip":"node scripts/test-workspace-chip.js","test:css":"node scripts/test-css-vars.js","test:webdav":"node scripts/test-webdav.js","test:mcp-config":"node scripts/test-mcp-config.js","test:mcp-call":"node scripts/test-mcp-call.js","test:mcp-ext":"node scripts/test-mcp-ext.js","test:mcp-lazy":"node scripts/test-mcp-lazy.js","bench:mcp-lazy":"node scripts/bench-mcp-lazy.js","bench:mcp-ondemand":"node scripts/bench-mcp-ondemand.js","bench:mcp-cache":"node scripts/bench-mcp-cache.js","test:webdav-override":"node scripts/test-webdav-override.js","test:browser-events":"node scripts/test-browser-events.js","test:browser-tool":"node scripts/test-browser-tool.js","test:browser-launch":"node scripts/test-browser-launch.js","test:computer-linux":"node scripts/test-computer-linux.js","test:computer-linux-live":"node scripts/live-computer-linux.js","test:computer-tool":"node scripts/test-computer-tool.js","test:subagent":"node scripts/test-subagent-guards.js","test:subagent-format":"node scripts/test-subagent-format.js","test:subagent-parallel":"node scripts/test-subagent-parallel.js","test:delegate":"node scripts/test-delegate-guards.js","test:delegate-parallel":"node scripts/test-delegate-parallel.js","test:worktree":"node scripts/test-worktree-deliver.js","test:worktree-e2e":"node scripts/verify-worktree-e2e.js","test:worktree-merge":"node scripts/verify-worktree-merge.js","test:worktree-diff":"node scripts/verify-worktree-diff.js","test:roles":"node scripts/test-agent-roles.js","test:review-guards":"node scripts/test-review-guards.js","test:subagent-live":"node scripts/live-subagent.js","test:lm-provider":"node scripts/test-lm-provider.js","test:agent-budget":"node scripts/test-agent-budget.js","test:tool-errors":"node scripts/test-tool-errors.js","test:run-timeout":"node scripts/test-run-timeout.js","test:dup-body":"node scripts/test-dup-body.js","test:gamepad":"node scripts/test-gamepad.js","test:status":"node scripts/test-status.js","test:avatar":"node scripts/test-avatar.js","test:cli-md":"node scripts/test-cli-md.js","test:mdpreview":"node scripts/test-mdpreview.js","test:mdmath":"node scripts/test-mdmath.js","test:md-fileline":"node scripts/test-md-fileline.js","test:mdpreview-live":"node scripts/live-mdpreview.js","test:cli-confirm":"node scripts/test-cli-confirm.js","test:cli-settings":"node scripts/test-cli-settings.js","test:browser-profile":"node scripts/test-browser-profile.js","test:cli-yolo":"node scripts/test-cli-yolo.js","test:cli-input":"node scripts/test-cli-input.js","test:token-audit":"node scripts/test-token-audit.js","test:usage-tools":"node scripts/test-usage-tools.js","test:usage-web":"node scripts/test-usage-web-tools.js","test:server-tools":"node scripts/test-server-tools.js","test:think":"node scripts/test-think.js","test:think-tiers":"node scripts/test-think-tiers.js","test:webfetch-md":"node scripts/test-webfetch-md.js","test:tabs":"node scripts/test-workspace-tab-filter.js","test:queue-order":"node scripts/test-queue-order.js","test:status-live":"node scripts/live-status.js","test:session-dup-live":"node scripts/live-session-dup.js","test:review-freeze":"node scripts/live-review-freeze.js","test:review-focus":"node scripts/live-review-focus.js","test:3d-view":"node scripts/test-3d-view.js","test:taskline":"node scripts/test-taskline.js","test:pending":"node scripts/test-pending.js","test:taskline-e2e":"node scripts/test-taskline-e2e.js","test:layout":"node scripts/test-module-layout.js","test:patch":"node patch.js","test:search-worker":"node scripts/build.js && node scripts/test-search-worker.js","bench:search":"node scripts/bench-search.js","gen:taskline-demo":"node scripts/gen-taskline-demo.js"},capabilities:{untrustedWorkspaces:{supported:!0},virtualWorkspaces:!0,agentsWindow:{supported:!0}},contributes:{commands:[{command:"luban.focusView",title:"%cmdFocusView%",category:"Luban"},{command:"luban.openPanel",title:"%cmdOpenPanel%",category:"Luban"},{command:"luban.reloadConfig",title:"%cmdReloadConfig%",category:"Luban"},{command:"luban.providerSettings",title:"%cmdProviderSettings%",category:"Luban"},{command:"luban.dashboard",title:"%cmdDashboard%",category:"Luban"},{command:"luban.plugins",title:"%cmdPlugins%",category:"Luban"},{command:"luban.market",title:"%cmdMarket%",category:"Luban"},{command:"luban.rules.open",title:"%cmdOpenRules%",category:"Luban"},{command:"luban.agent",title:"%cmdAgent%",category:"Luban"},{command:"luban.openDiff",title:"%cmdOpenDiff%",category:"Luban"},{command:"luban.acceptHunk",title:"%cmdAcceptHunk%",category:"Luban"},{command:"luban.rejectHunk",title:"%cmdRejectHunk%",category:"Luban"},{command:"luban.acceptFile",title:"%cmdAcceptFile%",category:"Luban"},{command:"luban.rejectFile",title:"%cmdRejectFile%",category:"Luban"},{command:"luban.reviewAll",title:"%cmdReviewAll%",category:"Luban"},{command:"luban.revertAll",title:"%cmdRevertAll%",category:"Luban"},{command:"luban.revertTurn",title:"%cmdRevertTurn%",category:"Luban"},{command:"luban.newSession",title:"%cmdNewSession%",category:"Luban"},{command:"luban.sessionList",title:"%cmdSessionList%",category:"Luban"},{command:"luban.taskline",title:"%cmdTaskline%",category:"Luban"},{command:"luban.pending",title:"%cmdPending%",category:"Luban"},{command:"luban.findInSession",title:"%cmdFindInSession%",category:"Luban"},{command:"luban.cursorPlan",title:"%cmdCursorPlan%",category:"Luban"},{command:"luban.openCursorPlan",title:"%cmdOpenCursorPlan%",category:"Luban"},{command:"luban.mode.cycle",title:"%cmdModeCycle%",category:"Luban"},{command:"luban.approveRules",title:"%cmdApproveRules%",category:"Luban"},{command:"luban.addFileToChat",title:"%cmdAddFileToChat%",category:"Luban"},{command:"luban.addFolderToChat",title:"%cmdAddFolderToChat%",category:"Luban"},{command:"luban.addFileToNewChat",title:"%cmdAddFileToNewChat%",category:"Luban"},{command:"luban.addFolderToNewChat",title:"%cmdAddFolderToNewChat%",category:"Luban"},{command:"luban.addSelectionToChat",title:"%cmdAddSelectionToChat%",category:"Luban"},{command:"luban.addSelectionToNewChat",title:"%cmdAddSelectionToNewChat%",category:"Luban"},{command:"luban.inlineCompletion.toggle",title:"%cmdInlineToggle%",category:"Luban"},{command:"luban.diffAccept",title:"%cmdDiffAccept%",category:"Luban",icon:"$(check)"},{command:"luban.diffReject",title:"%cmdDiffReject%",category:"Luban",icon:"$(discard)"},{command:"luban.openInBrowser",title:"%cmdOpenInBrowser%",category:"Luban"},{command:"luban.browserCheck",title:"%cmdBrowserCheck%",category:"Luban"},{command:"luban.browserPreview",title:"%cmdBrowserPreview%",category:"Luban"},{command:"luban.markdownPreview",title:"%cmdMarkdownPreview%",category:"Luban",icon:"$(markdown)"}],menus:{"editor/title":[{command:"luban.diffAccept",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@1"},{command:"luban.diffReject",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@2"},{command:"luban.markdownPreview",when:"resourceLangId == markdown",group:"navigation@3"}],"explorer/context":[{command:"luban.addFileToChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@1"},{command:"luban.addFolderToChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@2"},{command:"luban.addFileToNewChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@3"},{command:"luban.addFolderToNewChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@4"}],"editor/context":[{command:"luban.addSelectionToChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@0"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@1"}],"webview/context":[{command:"luban.openInBrowser",when:"webviewSection == 'chat'"}],commandPalette:[{command:"luban.diffAccept",when:"luban.pendingReview > 0"},{command:"luban.diffReject",when:"luban.pendingReview > 0"},{command:"luban.addFileToChat",when:"false"},{command:"luban.addFolderToChat",when:"false"},{command:"luban.addFileToNewChat",when:"false"},{command:"luban.addFolderToNewChat",when:"false"},{command:"luban.addSelectionToChat",when:"editorHasSelection"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection"},{command:"luban.openInBrowser",when:"false"}]},keybindings:[{command:"luban.focusView",key:"cmd+shift+l",mac:"cmd+shift+l",win:"ctrl+shift+l",linux:"ctrl+shift+l"},{command:"luban.newSession",key:"cmd+alt+n",mac:"cmd+alt+n",win:"ctrl+alt+n",linux:"ctrl+alt+n"},{command:"luban.sessionList",key:"cmd+alt+h",mac:"cmd+alt+h",win:"ctrl+alt+h",linux:"ctrl+alt+h"},{command:"luban.taskline",key:"cmd+alt+t",mac:"cmd+alt+t",win:"ctrl+alt+t",linux:"ctrl+alt+t"},{command:"luban.mode.cycle",key:"shift+tab",mac:"shift+tab",win:"shift+tab",linux:"shift+tab",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"activeWebviewPanelId == 'luban'"},{command:"luban.addSelectionToChat",key:"cmd+alt+a",mac:"cmd+alt+a",win:"ctrl+alt+a",linux:"ctrl+alt+a",when:"editorHasSelection && editorTextFocus"}],viewsContainers:{activitybar:[{id:"luban",title:"Luban",icon:"media/icon.svg"}]},views:{luban:[{type:"webview",id:"luban.chatView",name:"Chat",contextualTitle:"Luban",icon:"media/icon.svg"}]},languageModelChatProviders:[{vendor:"luban",displayName:"Luban",icon:"media/icon.png",managementCommand:"luban.providerSettings"}],configuration:{title:"Luban",properties:{"luban.language":{type:"string",enum:["auto","en","zh-cn","ja"],enumDescriptions:["%cfgLanguageAuto%","%cfgLanguageEn%","%cfgLanguageZhCn%","%cfgLanguageJa%"],default:"auto",description:"%cfgLanguage%"},"luban.autoOpen":{type:"boolean",default:!0,description:"%cfgAutoOpen%"},"luban.context.autoFile":{type:"boolean",default:!0,description:"%cfgContextAutoFile%"},"luban.context.autoFileMaxChars":{type:"number",default:8e3,minimum:500,description:"%cfgContextAutoFileMaxChars%"},"luban.context.autoFileWindowLines":{type:"number",default:200,minimum:40,description:"%cfgContextAutoFileWindowLines%"},"luban.context.workset":{type:"boolean",default:!0,description:"%cfgContextWorkset%"},"luban.sessionHistory.max":{type:"number",default:50,minimum:1,description:"%cfgSessionHistoryMax%"},"luban.usage.record":{type:"boolean",default:!0,description:"%cfgUsageRecord%"},"luban.sessionMemory.enabled":{type:"boolean",default:!0,description:"%cfgSessionMemoryEnabled%"},"luban.sessionMemory.maxTurns":{type:"number",default:8,minimum:1,description:"%cfgSessionMemoryMaxTurns%"},"luban.sessionMemory.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgSessionMemoryMaxChars%"},"luban.agent.maxRounds":{type:"number",default:200,minimum:0,description:"%cfgAgentMaxRounds%"},"luban.agent.maxMinutes":{type:"number",default:30,minimum:1,description:"%cfgAgentMaxMinutes%"},"luban.agent.requestTimeoutMs":{type:"number",default:18e4,minimum:1e4,maximum:6e5,description:"%cfgAgentRequestTimeoutMs%"},"luban.agent.noWriteNudges":{type:"number",default:2,minimum:0,description:"%cfgAgentNoWriteNudges%"},"luban.agent.verifyNudges":{type:"number",default:1,minimum:0,description:"%cfgAgentVerifyNudges%"},"luban.agent.todoReminder":{type:"number",default:0,minimum:0,maximum:99,description:"%cfgAgentTodoReminder%"},"luban.agent.subagentRounds":{type:"number",default:24,minimum:0,description:"%cfgAgentSubagentRounds%"},"luban.agent.subagentMinutes":{type:"number",default:0,minimum:0,description:"%cfgAgentSubagentMinutes%"},"luban.agent.subagentParallel":{type:"number",default:2,minimum:0,maximum:8,description:"%cfgAgentSubagentParallel%"},"luban.agent.delegateModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentDelegateModels%"},"luban.agent.reviewAfterDelegate":{type:"boolean",default:!0,description:"%cfgAgentReviewAfterDelegate%"},"luban.agent.reviewModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentReviewModels%"},"luban.agent.worktreeDeliver":{type:"string",enum:["off","always","subagent"],default:"off",description:"%cfgAgentWorktreeDeliver%"},"luban.agent.worktreeRoot":{type:"string",default:"",description:"%cfgAgentWorktreeRoot%"},"luban.agent.smallWindow":{type:"string",enum:["auto","on","off"],default:"auto",description:"%cfgAgentSmallWindow%"},"luban.agent.verbosity":{type:"string",enum:["concise","normal","detailed"],default:"normal",description:"%cfgAgentVerbosity%"},"luban.search.maxFiles":{type:"number",default:5e3,minimum:100,description:"%cfgSearchMaxFiles%"},"luban.net.tlsMaxVersion":{type:"string",enum:["auto","1.2"],enumDescriptions:["%cfgNetTlsMaxVersionAuto%","%cfgNetTlsMaxVersion12%"],default:"auto",description:"%cfgNetTlsMaxVersion%"},"luban.browser.enabled":{type:"boolean",default:!1,description:"%cfgBrowserEnabled%"},"luban.browser.chromePath":{type:"string",default:"",description:"%cfgBrowserChromePath%"},"luban.browser.headless":{type:"boolean",default:!0,description:"%cfgBrowserHeadless%"},"luban.browser.viewportWidth":{type:"number",default:1280,minimum:320,maximum:4096,description:"%cfgBrowserViewportWidth%"},"luban.browser.viewportHeight":{type:"number",default:800,minimum:240,maximum:4096,description:"%cfgBrowserViewportHeight%"},"luban.browser.idleTimeoutMs":{type:"number",default:3e5,minimum:1e4,description:"%cfgBrowserIdleTimeout%"},"luban.browser.confirm":{type:"boolean",default:!0,description:"%cfgBrowserConfirm%"},"luban.browser.preview":{type:"boolean",default:!1,description:"%cfgBrowserPreview%"},"luban.computer.enabled":{type:"boolean",default:!1,description:"%cfgComputerEnabled%"},"luban.computer.confirm":{type:"boolean",default:!0,description:"%cfgComputerConfirm%"},"luban.computer.screenshotWidth":{type:"number",default:2048,minimum:320,maximum:4096,description:"%cfgComputerScreenshotWidth%"},"luban.plugins.enabled":{type:"boolean",default:!1,description:"%cfgPluginsEnabled%"},"luban.plugins.maxTools":{type:"number",default:30,minimum:1,maximum:200,description:"%cfgPluginsMaxTools%"},"luban.plugins.theme":{type:"string",default:"",description:"%cfgPluginsTheme%"},"luban.mcp.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgMcpLoadModeLazy%","%cfgMcpLoadModeEager%"],default:"lazy",description:"%cfgMcpLoadMode%"},"luban.plugins.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgPluginsLoadModeLazy%","%cfgPluginsLoadModeEager%"],default:"lazy",description:"%cfgPluginsLoadMode%"},"luban.plan.strictReadOnly":{type:"boolean",default:!0,description:"%cfgPlanStrictReadOnly%"},"luban.shell.confirmDangerous":{type:"boolean",default:!1,description:"%cfgShellConfirmDangerous%"},"luban.fs.allowOutsideWorkspace":{type:"boolean",default:!0,description:"%cfgFsAllowOutsideWorkspace%"},"luban.review.autoOpenDiff":{type:"boolean",default:!1,description:"%cfgReviewAutoOpenDiff%"},"luban.review.autoKeep":{type:"boolean",default:!1,description:"%cfgReviewAutoKeep%"},"luban.diagnostics.afterEdit":{type:"boolean",default:!0,description:"%cfgDiagAfterEdit%"},"luban.inlineCompletion.enabled":{type:"boolean",default:!1,description:"%cfgInlineEnabled%"},"luban.inlineCompletion.maxPerMinute":{type:"number",default:30,minimum:1,description:"%cfgInlineMaxPerMinute%"},"luban.inlineCompletion.debounceMs":{type:"number",default:250,minimum:0,description:"%cfgInlineDebounceMs%"},"luban.statusBar.enabled":{type:"boolean",default:!0,description:"%cfgStatusBarEnabled%"},"luban.mascot.avatar":{type:"boolean",default:!1,description:"%cfgMascotAvatar%"},"luban.rules.enabled":{type:"boolean",default:!0,description:"%cfgRulesEnabled%"},"luban.rules.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgRulesMaxChars%"},"luban.rules.indexMaxChars":{type:"number",default:2e3,minimum:200,description:"%cfgRulesIndexMaxChars%"}}}},devDependencies:{esbuild:"^0.25.0",katex:"^0.16.47",mermaid:"^11.17.2"},dependencies:{"@clack/prompts":"^1.8.1",picocolors:"^1.1.1"}}});var gg=re((pJ,pS)=>{function pc(e){let t=String(e??"");return t===""?[]:t.split(`
|
|
180
|
+
/new \u65B0\u3057\u3044\u4F1A\u8A71`,"cli.cmd.cleared":"\u4F1A\u8A71\u30E1\u30E2\u30EA\u3092\u30AF\u30EA\u30A2\u3057\u307E\u3057\u305F\uFF08{n} \u30BF\u30FC\u30F3\uFF09","cli.cmd.noSessions":"\u3053\u306E\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306B\u5C65\u6B74\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093","cli.cmd.sessionsHeader":"\u3053\u306E\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306E\u4F1A\u8A71\uFF08{n} \u4EF6\u3001\u65B0\u3057\u3044\u9806\uFF09\uFF1A","cli.cmd.sessionLine":"{n} \u30BF\u30FC\u30F3","cli.cmd.sessionsHint":" /resume <\u756A\u53F7|id> \u3067\u5FA9\u5143\uFF1B* \u306F\u73FE\u5728\u306E\u4F1A\u8A71","cli.cmd.resumeUsage":"\u4F7F\u3044\u65B9\uFF1A/resume <id|\u756A\u53F7>\uFF08/sessions \u3067\u4E00\u89A7\uFF09","cli.cmd.resumeIdxRange":"\u756A\u53F7\u304C\u7BC4\u56F2\u5916\u3067\u3059\uFF1A{raw}","cli.cmd.resumeNoMatch":"\u4E00\u81F4\u3059\u308B\u30BB\u30C3\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093\uFF1A{raw}","cli.cmd.resumeAmbiguous":"\u63A5\u982D\u8F9E {raw} \u304C {n} \u4EF6\u306B\u4E00\u81F4\u3057\u307E\u3059\u3002\u3082\u3046\u5C11\u3057\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044","cli.cmd.resumeLoadFail":"\u30BB\u30C3\u30B7\u30E7\u30F3\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3081\u307E\u305B\u3093\uFF1A{id}","cli.cmd.resumed":"\u4F1A\u8A71 {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3\uFF08\u30E2\u30C7\u30EB {model} \xB7 {mode}\uFF09","cli.cmd.newSession":"\u65B0\u3057\u3044\u4F1A\u8A71\u3092\u958B\u59CB\u3057\u307E\u3057\u305F","cli.cmd.newSessionOld":"\uFF08\u53E4\u3044 {id} \u306F\u30C7\u30A3\u30B9\u30AF\u306B\u6B8B\u308A\u307E\u3059\uFF09","cli.cmd.modeCurrent":"\u73FE\u5728\u306E\u30E2\u30FC\u30C9 {mode}","cli.cmd.modeCurrentRo":"\u73FE\u5728\u306E\u30E2\u30FC\u30C9 {mode}\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09","cli.cmd.modeUsage":"\u4F7F\u3044\u65B9\uFF1A/mode plan|explore|agent","cli.cmd.modeSwitched":"\u30E2\u30FC\u30C9\u3092 {mode} \u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","cli.cmd.on":"\u30AA\u30F3","cli.cmd.off":"\u30AA\u30D5","cli.cmd.applyMerged":"\u66F8\u304D\u8FBC\u307F\u6A29\u9650\u306F\u30E2\u30FC\u30C9\u306B\u7D71\u5408\u3055\u308C\u307E\u3057\u305F\uFF08agent \u306F\u66F8\u304D\u8FBC\u307F\u53EF\u3001plan / explore \u306F\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\uFF1A/apply on = /mode agent\u3001/apply off = /mode plan","cli.cmd.confirmStatusOff":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\uFF1A\u30AA\u30D5\uFF08\u81EA\u52D5\u8A31\u53EF\uFF09","cli.cmd.confirmStatusAll":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\uFF1A\u30AA\u30D5\uFF08\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u3059\u3079\u3066\u8A31\u53EF\u6E08\u307F\uFF09","cli.cmd.confirmStatusOn":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\uFF1A\u30AA\u30F3\uFF08\u30C7\u30A3\u30B9\u30AF\u524D\u306B diff\uFF09","cli.cmd.confirmUsage":"\u4F7F\u3044\u65B9\uFF1A/confirm on|off","cli.cmd.confirmOn":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\u3092\u30AA\u30F3\u306B\u3057\u307E\u3057\u305F","cli.cmd.confirmOff":"\u66F8\u304D\u8FBC\u307F\u78BA\u8A8D\u3092\u30AA\u30D5\u306B\u3057\u307E\u3057\u305F\uFF08\u3059\u3079\u3066\u81EA\u52D5\u8A31\u53EF\uFF09","cli.cmd.modelCurrent":"\u73FE\u5728\u306E\u30E2\u30C7\u30EB {key}","cli.cmd.modelMissing":"\u30E2\u30C7\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\uFF1A{key}","cli.cmd.modelSwitched":"\u30E2\u30C7\u30EB\u3092 {key} \u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","cli.cmd.modelNoKey":"\u6CE8\u610F\uFF1Aprovider {id} \u306B API key \u304C\u3042\u308A\u307E\u305B\u3093","cli.cmd.modelNoKeyHow":"\u88DC\u3044\u65B9\uFF08CLI \u306F SecretStorage \u3092\u8AAD\u307F\u307E\u305B\u3093\uFF09\uFF1A","cli.cmd.modelNoKey1":" \u2460 `luban config` \u30A6\u30A3\u30B6\u30FC\u30C9\uFF08\u63A8\u5968\uFF09","cli.cmd.modelNoKey2":" \u2461 ~/.luban/providers.json \u3067 {id} \u306B apiKeyEnv \u3092\u8A2D\u5B9A","cli.cmd.modelNoKey3":" \u305D\u306E\u5F8C export \u2026\uFF08\u307E\u305F\u306F ~/.hermes/.env\uFF09","cli.cmd.modelNoKey4":" \u2462 apiKey \u3092\u76F4\u63A5\u66F8\u304F\uFF08\u5E73\u6587\u3001\u30B3\u30DF\u30C3\u30C8\u6CE8\u610F\uFF09","cli.cmd.modelNoKey5":"\u5909\u66F4\u5F8C /reload \u3067\u518D\u8AAD\u8FBC","cli.cmd.reloadFail":"\u8A2D\u5B9A\u306E\u518D\u8AAD\u8FBC\u306B\u5931\u6557\uFF1A{msg}","cli.cmd.reloaded":"{path} \u3092\u518D\u8AAD\u8FBC\uFF1A{n} \u30E2\u30C7\u30EB","cli.cmd.modelGone":"\u73FE\u5728\u306E\u30E2\u30C7\u30EB {key} \u306F\u8A2D\u5B9A\u306B\u3042\u308A\u307E\u305B\u3093\u3002{fallback} \u306B\u623B\u308A\u307E\u3057\u305F","cli.cmd.modelChanged":"\u73FE\u5728\u306E\u30E2\u30C7\u30EB\uFF1A{before} \u2192 {after}","cli.cmd.thinkingStatusLive":"\u601D\u8003\uFF1A\u30E9\u30A4\u30D6\u8868\u793A","cli.cmd.thinkingStatusFold":"\u601D\u8003\uFF1A\u6298\u308A\u305F\u305F\u307F","cli.cmd.thinkingUsage":"\u4F7F\u3044\u65B9\uFF1A/thinking on|off","cli.cmd.thinkingLive":"\u601D\u8003\u3092\u30E9\u30A4\u30D6\u8868\u793A\u306B\u3057\u307E\u3057\u305F","cli.cmd.thinkingFold":"\u601D\u8003\u3092\u6298\u308A\u305F\u305F\u307F\u306B\u3057\u307E\u3057\u305F","cli.cmd.gamepadNotRunning":"\u30D1\u30C3\u30C9\u30C6\u30B9\u30C8\u306F\u52D5\u3044\u3066\u3044\u307E\u305B\u3093","cli.cmd.gamepadUsage":"\u4F7F\u3044\u65B9\uFF1A/gamepad [on|off|raw]","cli.cmd.usageUsage":"\u4F7F\u3044\u65B9\uFF1A/usage [today|7d|30d|thismonth|lastmonth|all|<\u958B\u59CB>..<\u7D42\u4E86>]\uFF08\u65E2\u5B9A 7d\u3001\u4F8B: 2026-01-01..2026-01-31\uFF09","cli.cmd.unknown":"\u672A\u77E5\u306E\u30B3\u30DE\u30F3\u30C9 /{cmd}\uFF08/help \u53C2\u7167\uFF09","cli.cmd.turnFailed":"\u3053\u306E\u30BF\u30FC\u30F3\u5931\u6557\uFF1A{msg}","cli.cmd.sessionSaveFail":"\u30BB\u30C3\u30B7\u30E7\u30F3\u4FDD\u5B58\u306B\u5931\u6557\uFF08\u3053\u306E\u30BF\u30FC\u30F3\u306F\u5F71\u97FF\u306A\u3057\uFF09\uFF1A{msg}","cli.cmd.replBanner":"\u5BFE\u8A71\u30E2\u30FC\u30C9 \xB7 \u30E2\u30C7\u30EB {model} \xB7 \u4F5C\u696D\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA {root}","cli.cmd.replResumed":"\u4F1A\u8A71 {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3","cli.cmd.replHints":"Enter \u9001\u4FE1 \xB7 Ctrl-J/Alt+Enter \u6539\u884C \xB7 / \u30B3\u30DE\u30F3\u30C9 \xB7 @ \u30D5\u30A1\u30A4\u30EB \xB7 Esc \u30AD\u30E3\u30F3\u30BB\u30EB \xB7 Ctrl-D \u7D42\u4E86","cli.cmd.tipAgentConfirm":"agent \u66F8\u304D\u8FBC\u307F\u53EF \xB7 \u90FD\u5EA6\u78BA\u8A8D","cli.cmd.tipAgentAuto":"agent \u66F8\u304D\u8FBC\u307F\u53EF \xB7 \u81EA\u52D5\u8A31\u53EF","cli.cmd.tipPlan":"plan \u306F\u8A08\u753B\u306E\u307F \xB7 --agent \u3067\u66F8\u304D\u8FBC\u307F","cli.cmd.tipExplore":"{mode} \u8AAD\u307F\u53D6\u308A\u5C02\u7528\u8ABF\u67FB \xB7 \u66F8\u304D\u8FBC\u307F\u306A\u3057","cli.cmd.gamepadEndedAsk":"\u30D1\u30C3\u30C9\u30C6\u30B9\u30C8\u7D42\u4E86\uFF08Q&A \u3078\uFF09","cli.cmd.gamepadEndedIdle":"\u30D1\u30C3\u30C9\u30C6\u30B9\u30C8\u7D42\u4E86\uFF08Ctrl-D \u307E\u305F\u306F /exit \u3067 CLI \u7D42\u4E86\uFF09","cli.cmd.pluginAsk":"\u30ED\u30FC\u30AB\u30EB\u30D7\u30E9\u30B0\u30A4\u30F3\u300C{name}\u300D\uFF08{tools}\uFF09\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u304B\uFF1F[y/N] ","cli.cmd.noTools":"\u30C4\u30FC\u30EB\u306A\u3057","cli.cmd.pluginsLoaded":"\u30ED\u30FC\u30AB\u30EB\u30D7\u30E9\u30B0\u30A4\u30F3 {n} \xB7 \u30C4\u30FC\u30EB {tools}","cli.cmd.pluginsSkipped":" \xB7 {n} \u4EF6\u30B9\u30AD\u30C3\u30D7\uFF08{msg}\uFF09","cli.cmd.pluginsFail":"\u30D7\u30E9\u30B0\u30A4\u30F3\u8D70\u67FB\u5931\u6557\uFF1A{msg}","cli.cmd.resumeEmpty":"\u5FA9\u5143\u3067\u304D\u308B\u4F1A\u8A71\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u65B0\u3057\u3044\u30BB\u30C3\u30B7\u30E7\u30F3\u3092\u958B\u59CB\u3057\u307E\u3059","cli.cmd.resumeLatest":"--resume \u304C\u6700\u65B0 {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3","cli.cmd.resumeOk":"--resume \u304C {id} \u3092\u5FA9\u5143 \xB7 {n} \u30BF\u30FC\u30F3","cli.cmd.usageEmpty":"{label} \u306B\u4F7F\u7528\u91CF\u8A18\u9332\u304C\u3042\u308A\u307E\u305B\u3093","cli.cmd.usageRangeDefault":"\u3053\u306E\u7BC4\u56F2","cli.cmd.usageHeader":"\u4F7F\u7528\u91CF \xB7 {label}\uFF1A{turns} \u30BF\u30FC\u30F3 / {requests} \u30EA\u30AF\u30A8\u30B9\u30C8","cli.cmd.usageTokens":" tokens \u5165\u529B {prompt} \xB7 \u51FA\u529B {completion} \xB7 \u5408\u8A08 {total}\uFF08\u30AD\u30E3\u30C3\u30B7\u30E5\u547D\u4E2D {hit}\uFF09","cli.cmd.usageTools":" \u30C4\u30FC\u30EB \u691C\u7D22 {search} \xB7 \u53D6\u5F97 {fetch}","cli.cmd.unknownEngine":"\u672A\u77E5\u306E\u30A8\u30F3\u30B8\u30F3","cli.cmd.byModel":" \u30E2\u30C7\u30EB\u5225\uFF1A","cli.cmd.unknownModel":"\u672A\u77E5\u306E\u30E2\u30C7\u30EB","cli.cmd.modelStat":" \u2014 {tokens} tokens \xB7 {turns} \u30BF\u30FC\u30F3 \xB7 {share}","cli.cmd.byDay":" \u65E5\u5225\uFF1A","cli.cmd.byDayRecent":" \u65E5\u5225\uFF08\u76F4\u8FD1 {n} \u65E5\uFF09\uFF1A","cli.cmd.dayStat":" {tokens} tokens \xB7 {turns} \u30BF\u30FC\u30F3"}},n="zh-cn";function r(d){let f=String(d??"").toLowerCase();if(!f||f==="auto")return null;let p=f.slice(0,2);return p==="zh"?"zh-cn":p==="ja"?"ja":"en"}function s(){let d=typeof navigator<"u"&&navigator&&navigator.language||"";return/^zh/i.test(d)?"zh-cn":/^ja/i.test(d)?"ja":"en"}function o(d){return n=r(d)||s(),n}function i(){return n}function a(d,f,p){let m=r(d)||n,w=(t[m]||t["zh-cn"])[f];return w==null&&(w=t["zh-cn"][f]),w==null?f:(p&&(w=String(w).replace(/\{(\w+)\}/g,function(b,y){return p[y]==null?b:String(p[y])})),w)}function l(d,f){return a(n,d,f)}function c(d){return t["zh-cn"][d]!=null}let u={t:l,tIn:a,setLang:o,getLang:i,has:c,normalize:r,langs:["zh-cn","en","ja"]};typeof fc<"u"&&fc&&fc.exports&&(fc.exports=u),e&&(e.LubanI18n=u)})(typeof globalThis<"u"?globalThis:cS)});var fS=re((dJ,dS)=>{"use strict";function pg(e){let t=String(e??"").trim().toLowerCase();if(!t||t==="auto")return null;let n=t.slice(0,2);return n==="zh"?"zh-cn":n==="ja"?"ja":n==="en"?"en":null}function uS(e,t){let n=e||process.env,r=[n.LC_ALL,n.LC_MESSAGES,n.LANG];for(let o=0;o<r.length;o++){let i=String(r[o]||"").trim();if(i&&!/^(C|POSIX)([._]|$)/i.test(i))return/^zh/i.test(i)?"zh-cn":/^ja/i.test(i)?"ja":"en"}let s=t;if(s==null)try{s=Intl.DateTimeFormat().resolvedOptions().locale}catch{s=""}return s=String(s||""),/^zh/i.test(s)?"zh-cn":/^ja/i.test(s)?"ja":s?"en":"zh-cn"}function zF(e,t,n){let r=pg(e);if(r)return r;let s=t||process.env,o=pg(s.LUBAN_LANG);return o||uS(s,n)||"zh-cn"}function XF(e){let t=e||[];for(let n=0;n<t.length;n++)if(t[n]==="--lang"&&t[n+1])return t[n+1];return""}dS.exports={normalizeLangToken:pg,detectOsLang:uS,resolveCliLang:zF,peekLangFlag:XF}});var Id=re((fJ,JF)=>{JF.exports={name:"@luban-code/luban-code",displayName:"Luban",description:"Luban \u2014 a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",version:"1.152.2",license:"Apache-2.0",author:{name:"eppen (liuhualiang)",url:"https://github.com/eppen"},publisher:"liuhualiang",icon:"media/icon.png",homepage:"https://eppen.github.io/luban-site/",bugs:{url:"https://github.com/eppen/luban/issues"},keywords:["ai","agent","chat","coding-agent","qwen","deepseek","openai-compatible","mcp"],repository:{type:"git",url:"git+https://github.com/eppen/luban.git"},engines:{vscode:"^1.104.0"},categories:["AI","Chat","Programming Languages"],activationEvents:["onStartupFinished","onView:luban.chatView","onCommand:luban.focusView","onCommand:luban.browserPreview","onCommand:luban.markdownPreview","onCommand:luban.taskline","onCommand:luban.pending"],main:"./dist/extension.js",bin:{luban:"dist/cli.js","luban-code":"dist/cli.js","luban-acp":"dist/acp.js"},files:["dist/cli.js","dist/acp.js","dist/cli-plugin.js","dist/cli-upgrade.js","dist/cli-config.js","dist/extension.js","dist/search-worker.js","registry/","package.json"],scripts:{build:"node scripts/build.js",watch:"node scripts/build.js --watch",metrics:"node scripts/market-metrics.js",package:"node scripts/build.js","vscode:prepublish":"node scripts/build.js",prepack:"node scripts/build.js",smoke:"node scripts/build.js && node scripts/smoke.js","test:review-autokeep":"node scripts/build.js && node scripts/test-review-autokeep.js","test:approve":"node scripts/build.js && node scripts/test-approve-wiring.js","test:context-refs":"node scripts/build.js && node scripts/test-context-refs.js","test:skills":"node scripts/test-skills.js","test:rules":"node scripts/test-rules.js","test:plan-file":"node scripts/test-plan-file.js","test:plan-ext":"node scripts/build.js && node scripts/test-plan-ext.js","test:cursorplan-live":"node scripts/build.js && node scripts/live-cursorplan.js","test:plugins":"node scripts/test-plugins.js","test:plugins-ext":"node scripts/test-plugins-ext.js","test:registry":"node scripts/test-registry-client.js","test:registry-skill":"node scripts/test-registry-skill.js","test:install":"node scripts/test-install-scripts.js",cli:"node cli.js","3d-view":"node scripts/devtools-3d-view.js","test:acp":"node scripts/test-acp.js","test:acp-pkg":"node scripts/test-acp-pkg.js","acp:jetbrains":"node scripts/acp-jetbrains.js","test:acp-jetbrains":"node scripts/test-acp-jetbrains.js","test:mcp-session":"node scripts/test-mcp-session.js","test:acp-registry":"node scripts/test-acp-registry.js","test:cli-resume":"node scripts/test-cli-resume.js","test:session-store":"node scripts/test-session-store.js","test:cli-upgrade":"node scripts/test-cli-upgrade.js","test:cli-config":"node scripts/test-cli-config.js","test:cli-lang":"node scripts/test-cli-lang.js",vsix:"node scripts/vsix.js","test:general":"node scripts/test-general-settings.js","test:provider-models":"node scripts/test-provider-models.js","test:hub":"node scripts/test-hub-tabs.js","test:hub-market":"node scripts/test-hub-market.js","test:market-ext":"node scripts/test-market-ext.js","test:sync-registry":"node scripts/test-sync-registry.js","test:i18n":"node scripts/test-i18n.js","test:ws-chip":"node scripts/test-workspace-chip.js","test:css":"node scripts/test-css-vars.js","test:webdav":"node scripts/test-webdav.js","test:mcp-config":"node scripts/test-mcp-config.js","test:mcp-call":"node scripts/test-mcp-call.js","test:mcp-ext":"node scripts/test-mcp-ext.js","test:mcp-lazy":"node scripts/test-mcp-lazy.js","bench:mcp-lazy":"node scripts/bench-mcp-lazy.js","bench:mcp-ondemand":"node scripts/bench-mcp-ondemand.js","bench:mcp-cache":"node scripts/bench-mcp-cache.js","test:webdav-override":"node scripts/test-webdav-override.js","test:browser-events":"node scripts/test-browser-events.js","test:browser-tool":"node scripts/test-browser-tool.js","test:browser-launch":"node scripts/test-browser-launch.js","test:computer-linux":"node scripts/test-computer-linux.js","test:computer-linux-live":"node scripts/live-computer-linux.js","test:computer-tool":"node scripts/test-computer-tool.js","test:subagent":"node scripts/test-subagent-guards.js","test:subagent-format":"node scripts/test-subagent-format.js","test:subagent-parallel":"node scripts/test-subagent-parallel.js","test:delegate":"node scripts/test-delegate-guards.js","test:delegate-parallel":"node scripts/test-delegate-parallel.js","test:worktree":"node scripts/test-worktree-deliver.js","test:worktree-e2e":"node scripts/verify-worktree-e2e.js","test:worktree-merge":"node scripts/verify-worktree-merge.js","test:worktree-diff":"node scripts/verify-worktree-diff.js","test:roles":"node scripts/test-agent-roles.js","test:review-guards":"node scripts/test-review-guards.js","test:subagent-live":"node scripts/live-subagent.js","test:lm-provider":"node scripts/test-lm-provider.js","test:agent-budget":"node scripts/test-agent-budget.js","test:tool-errors":"node scripts/test-tool-errors.js","test:run-timeout":"node scripts/test-run-timeout.js","test:dup-body":"node scripts/test-dup-body.js","test:gamepad":"node scripts/test-gamepad.js","test:status":"node scripts/test-status.js","test:avatar":"node scripts/test-avatar.js","test:cli-md":"node scripts/test-cli-md.js","test:mdpreview":"node scripts/test-mdpreview.js","test:mdmath":"node scripts/test-mdmath.js","test:md-fileline":"node scripts/test-md-fileline.js","test:mdpreview-live":"node scripts/live-mdpreview.js","test:cli-confirm":"node scripts/test-cli-confirm.js","test:cli-settings":"node scripts/test-cli-settings.js","test:browser-profile":"node scripts/test-browser-profile.js","test:cli-yolo":"node scripts/test-cli-yolo.js","test:cli-input":"node scripts/test-cli-input.js","test:token-audit":"node scripts/test-token-audit.js","test:usage-tools":"node scripts/test-usage-tools.js","test:usage-web":"node scripts/test-usage-web-tools.js","test:server-tools":"node scripts/test-server-tools.js","test:think":"node scripts/test-think.js","test:think-tiers":"node scripts/test-think-tiers.js","test:webfetch-md":"node scripts/test-webfetch-md.js","test:tabs":"node scripts/test-workspace-tab-filter.js","test:queue-order":"node scripts/test-queue-order.js","test:status-live":"node scripts/live-status.js","test:session-dup-live":"node scripts/live-session-dup.js","test:review-freeze":"node scripts/live-review-freeze.js","test:review-focus":"node scripts/live-review-focus.js","test:3d-view":"node scripts/test-3d-view.js","test:taskline":"node scripts/test-taskline.js","test:pending":"node scripts/test-pending.js","test:taskline-e2e":"node scripts/test-taskline-e2e.js","test:layout":"node scripts/test-module-layout.js","test:patch":"node patch.js","test:search-worker":"node scripts/build.js && node scripts/test-search-worker.js","bench:search":"node scripts/bench-search.js","gen:taskline-demo":"node scripts/gen-taskline-demo.js"},capabilities:{untrustedWorkspaces:{supported:!0},virtualWorkspaces:!0,agentsWindow:{supported:!0}},contributes:{commands:[{command:"luban.focusView",title:"%cmdFocusView%",category:"Luban"},{command:"luban.openPanel",title:"%cmdOpenPanel%",category:"Luban"},{command:"luban.reloadConfig",title:"%cmdReloadConfig%",category:"Luban"},{command:"luban.providerSettings",title:"%cmdProviderSettings%",category:"Luban"},{command:"luban.dashboard",title:"%cmdDashboard%",category:"Luban"},{command:"luban.plugins",title:"%cmdPlugins%",category:"Luban"},{command:"luban.market",title:"%cmdMarket%",category:"Luban"},{command:"luban.rules.open",title:"%cmdOpenRules%",category:"Luban"},{command:"luban.agent",title:"%cmdAgent%",category:"Luban"},{command:"luban.openDiff",title:"%cmdOpenDiff%",category:"Luban"},{command:"luban.acceptHunk",title:"%cmdAcceptHunk%",category:"Luban"},{command:"luban.rejectHunk",title:"%cmdRejectHunk%",category:"Luban"},{command:"luban.acceptFile",title:"%cmdAcceptFile%",category:"Luban"},{command:"luban.rejectFile",title:"%cmdRejectFile%",category:"Luban"},{command:"luban.reviewAll",title:"%cmdReviewAll%",category:"Luban"},{command:"luban.revertAll",title:"%cmdRevertAll%",category:"Luban"},{command:"luban.revertTurn",title:"%cmdRevertTurn%",category:"Luban"},{command:"luban.newSession",title:"%cmdNewSession%",category:"Luban"},{command:"luban.sessionList",title:"%cmdSessionList%",category:"Luban"},{command:"luban.taskline",title:"%cmdTaskline%",category:"Luban"},{command:"luban.pending",title:"%cmdPending%",category:"Luban"},{command:"luban.findInSession",title:"%cmdFindInSession%",category:"Luban"},{command:"luban.cursorPlan",title:"%cmdCursorPlan%",category:"Luban"},{command:"luban.openCursorPlan",title:"%cmdOpenCursorPlan%",category:"Luban"},{command:"luban.mode.cycle",title:"%cmdModeCycle%",category:"Luban"},{command:"luban.approveRules",title:"%cmdApproveRules%",category:"Luban"},{command:"luban.addFileToChat",title:"%cmdAddFileToChat%",category:"Luban"},{command:"luban.addFolderToChat",title:"%cmdAddFolderToChat%",category:"Luban"},{command:"luban.addFileToNewChat",title:"%cmdAddFileToNewChat%",category:"Luban"},{command:"luban.addFolderToNewChat",title:"%cmdAddFolderToNewChat%",category:"Luban"},{command:"luban.addSelectionToChat",title:"%cmdAddSelectionToChat%",category:"Luban"},{command:"luban.addSelectionToNewChat",title:"%cmdAddSelectionToNewChat%",category:"Luban"},{command:"luban.inlineCompletion.toggle",title:"%cmdInlineToggle%",category:"Luban"},{command:"luban.diffAccept",title:"%cmdDiffAccept%",category:"Luban",icon:"$(check)"},{command:"luban.diffReject",title:"%cmdDiffReject%",category:"Luban",icon:"$(discard)"},{command:"luban.openInBrowser",title:"%cmdOpenInBrowser%",category:"Luban"},{command:"luban.browserCheck",title:"%cmdBrowserCheck%",category:"Luban"},{command:"luban.browserPreview",title:"%cmdBrowserPreview%",category:"Luban"},{command:"luban.markdownPreview",title:"%cmdMarkdownPreview%",category:"Luban",icon:"$(markdown)"}],menus:{"editor/title":[{command:"luban.diffAccept",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@1"},{command:"luban.diffReject",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@2"},{command:"luban.markdownPreview",when:"resourceLangId == markdown",group:"navigation@3"}],"explorer/context":[{command:"luban.addFileToChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@1"},{command:"luban.addFolderToChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@2"},{command:"luban.addFileToNewChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@3"},{command:"luban.addFolderToNewChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@4"}],"editor/context":[{command:"luban.addSelectionToChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@0"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@1"}],"webview/context":[{command:"luban.openInBrowser",when:"webviewSection == 'chat'"}],commandPalette:[{command:"luban.diffAccept",when:"luban.pendingReview > 0"},{command:"luban.diffReject",when:"luban.pendingReview > 0"},{command:"luban.addFileToChat",when:"false"},{command:"luban.addFolderToChat",when:"false"},{command:"luban.addFileToNewChat",when:"false"},{command:"luban.addFolderToNewChat",when:"false"},{command:"luban.addSelectionToChat",when:"editorHasSelection"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection"},{command:"luban.openInBrowser",when:"false"}]},keybindings:[{command:"luban.focusView",key:"cmd+shift+l",mac:"cmd+shift+l",win:"ctrl+shift+l",linux:"ctrl+shift+l"},{command:"luban.newSession",key:"cmd+alt+n",mac:"cmd+alt+n",win:"ctrl+alt+n",linux:"ctrl+alt+n"},{command:"luban.sessionList",key:"cmd+alt+h",mac:"cmd+alt+h",win:"ctrl+alt+h",linux:"ctrl+alt+h"},{command:"luban.taskline",key:"cmd+alt+t",mac:"cmd+alt+t",win:"ctrl+alt+t",linux:"ctrl+alt+t"},{command:"luban.mode.cycle",key:"shift+tab",mac:"shift+tab",win:"shift+tab",linux:"shift+tab",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"activeWebviewPanelId == 'luban'"},{command:"luban.addSelectionToChat",key:"cmd+alt+a",mac:"cmd+alt+a",win:"ctrl+alt+a",linux:"ctrl+alt+a",when:"editorHasSelection && editorTextFocus"}],viewsContainers:{activitybar:[{id:"luban",title:"Luban",icon:"media/icon.svg"}]},views:{luban:[{type:"webview",id:"luban.chatView",name:"Chat",contextualTitle:"Luban",icon:"media/icon.svg"}]},languageModelChatProviders:[{vendor:"luban",displayName:"Luban",icon:"media/icon.png",managementCommand:"luban.providerSettings"}],configuration:{title:"Luban",properties:{"luban.language":{type:"string",enum:["auto","en","zh-cn","ja"],enumDescriptions:["%cfgLanguageAuto%","%cfgLanguageEn%","%cfgLanguageZhCn%","%cfgLanguageJa%"],default:"auto",description:"%cfgLanguage%"},"luban.autoOpen":{type:"boolean",default:!0,description:"%cfgAutoOpen%"},"luban.context.autoFile":{type:"boolean",default:!0,description:"%cfgContextAutoFile%"},"luban.context.autoFileMaxChars":{type:"number",default:8e3,minimum:500,description:"%cfgContextAutoFileMaxChars%"},"luban.context.autoFileWindowLines":{type:"number",default:200,minimum:40,description:"%cfgContextAutoFileWindowLines%"},"luban.context.workset":{type:"boolean",default:!0,description:"%cfgContextWorkset%"},"luban.sessionHistory.max":{type:"number",default:50,minimum:1,description:"%cfgSessionHistoryMax%"},"luban.usage.record":{type:"boolean",default:!0,description:"%cfgUsageRecord%"},"luban.sessionMemory.enabled":{type:"boolean",default:!0,description:"%cfgSessionMemoryEnabled%"},"luban.sessionMemory.maxTurns":{type:"number",default:8,minimum:1,description:"%cfgSessionMemoryMaxTurns%"},"luban.sessionMemory.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgSessionMemoryMaxChars%"},"luban.agent.maxRounds":{type:"number",default:200,minimum:0,description:"%cfgAgentMaxRounds%"},"luban.agent.maxMinutes":{type:"number",default:30,minimum:1,description:"%cfgAgentMaxMinutes%"},"luban.agent.requestTimeoutMs":{type:"number",default:18e4,minimum:1e4,maximum:6e5,description:"%cfgAgentRequestTimeoutMs%"},"luban.agent.noWriteNudges":{type:"number",default:2,minimum:0,description:"%cfgAgentNoWriteNudges%"},"luban.agent.verifyNudges":{type:"number",default:1,minimum:0,description:"%cfgAgentVerifyNudges%"},"luban.agent.todoReminder":{type:"number",default:0,minimum:0,maximum:99,description:"%cfgAgentTodoReminder%"},"luban.agent.subagentRounds":{type:"number",default:24,minimum:0,description:"%cfgAgentSubagentRounds%"},"luban.agent.subagentMinutes":{type:"number",default:0,minimum:0,description:"%cfgAgentSubagentMinutes%"},"luban.agent.subagentParallel":{type:"number",default:2,minimum:0,maximum:8,description:"%cfgAgentSubagentParallel%"},"luban.agent.delegateModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentDelegateModels%"},"luban.agent.reviewAfterDelegate":{type:"boolean",default:!0,description:"%cfgAgentReviewAfterDelegate%"},"luban.agent.reviewModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentReviewModels%"},"luban.agent.worktreeDeliver":{type:"string",enum:["off","always","subagent"],default:"off",description:"%cfgAgentWorktreeDeliver%"},"luban.agent.worktreeRoot":{type:"string",default:"",description:"%cfgAgentWorktreeRoot%"},"luban.agent.smallWindow":{type:"string",enum:["auto","on","off"],default:"auto",description:"%cfgAgentSmallWindow%"},"luban.agent.verbosity":{type:"string",enum:["concise","normal","detailed"],default:"normal",description:"%cfgAgentVerbosity%"},"luban.search.maxFiles":{type:"number",default:5e3,minimum:100,description:"%cfgSearchMaxFiles%"},"luban.net.tlsMaxVersion":{type:"string",enum:["auto","1.2"],enumDescriptions:["%cfgNetTlsMaxVersionAuto%","%cfgNetTlsMaxVersion12%"],default:"auto",description:"%cfgNetTlsMaxVersion%"},"luban.browser.enabled":{type:"boolean",default:!1,description:"%cfgBrowserEnabled%"},"luban.browser.chromePath":{type:"string",default:"",description:"%cfgBrowserChromePath%"},"luban.browser.headless":{type:"boolean",default:!0,description:"%cfgBrowserHeadless%"},"luban.browser.viewportWidth":{type:"number",default:1280,minimum:320,maximum:4096,description:"%cfgBrowserViewportWidth%"},"luban.browser.viewportHeight":{type:"number",default:800,minimum:240,maximum:4096,description:"%cfgBrowserViewportHeight%"},"luban.browser.idleTimeoutMs":{type:"number",default:3e5,minimum:1e4,description:"%cfgBrowserIdleTimeout%"},"luban.browser.confirm":{type:"boolean",default:!0,description:"%cfgBrowserConfirm%"},"luban.browser.preview":{type:"boolean",default:!1,description:"%cfgBrowserPreview%"},"luban.computer.enabled":{type:"boolean",default:!1,description:"%cfgComputerEnabled%"},"luban.computer.confirm":{type:"boolean",default:!0,description:"%cfgComputerConfirm%"},"luban.computer.screenshotWidth":{type:"number",default:2048,minimum:320,maximum:4096,description:"%cfgComputerScreenshotWidth%"},"luban.plugins.enabled":{type:"boolean",default:!1,description:"%cfgPluginsEnabled%"},"luban.plugins.maxTools":{type:"number",default:30,minimum:1,maximum:200,description:"%cfgPluginsMaxTools%"},"luban.plugins.theme":{type:"string",default:"",description:"%cfgPluginsTheme%"},"luban.mcp.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgMcpLoadModeLazy%","%cfgMcpLoadModeEager%"],default:"lazy",description:"%cfgMcpLoadMode%"},"luban.plugins.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgPluginsLoadModeLazy%","%cfgPluginsLoadModeEager%"],default:"lazy",description:"%cfgPluginsLoadMode%"},"luban.plan.strictReadOnly":{type:"boolean",default:!0,description:"%cfgPlanStrictReadOnly%"},"luban.shell.confirmDangerous":{type:"boolean",default:!1,description:"%cfgShellConfirmDangerous%"},"luban.fs.allowOutsideWorkspace":{type:"boolean",default:!0,description:"%cfgFsAllowOutsideWorkspace%"},"luban.review.autoOpenDiff":{type:"boolean",default:!1,description:"%cfgReviewAutoOpenDiff%"},"luban.review.autoKeep":{type:"boolean",default:!1,description:"%cfgReviewAutoKeep%"},"luban.diagnostics.afterEdit":{type:"boolean",default:!0,description:"%cfgDiagAfterEdit%"},"luban.inlineCompletion.enabled":{type:"boolean",default:!1,description:"%cfgInlineEnabled%"},"luban.inlineCompletion.maxPerMinute":{type:"number",default:30,minimum:1,description:"%cfgInlineMaxPerMinute%"},"luban.inlineCompletion.debounceMs":{type:"number",default:250,minimum:0,description:"%cfgInlineDebounceMs%"},"luban.statusBar.enabled":{type:"boolean",default:!0,description:"%cfgStatusBarEnabled%"},"luban.mascot.avatar":{type:"boolean",default:!1,description:"%cfgMascotAvatar%"},"luban.rules.enabled":{type:"boolean",default:!0,description:"%cfgRulesEnabled%"},"luban.rules.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgRulesMaxChars%"},"luban.rules.indexMaxChars":{type:"number",default:2e3,minimum:200,description:"%cfgRulesIndexMaxChars%"}}}},devDependencies:{esbuild:"^0.25.0",katex:"^0.16.47",mermaid:"^11.17.2"},dependencies:{"@clack/prompts":"^1.8.1",picocolors:"^1.1.1"}}});var gg=re((pJ,pS)=>{function pc(e){let t=String(e??"");return t===""?[]:t.split(`
|
|
181
181
|
`)}function mg(e){return(e||[]).join(`
|
|
182
182
|
`)}function $F(e,t){let n=e.length,r=t.length,s=r+1,o=new Int32Array((n+1)*s);for(let c=n-1;c>=0;c--){let u=c*s,d=(c+1)*s;for(let f=r-1;f>=0;f--)o[u+f]=e[c]===t[f]?o[d+f+1]+1:Math.max(o[d+f],o[u+f+1])}let i=[],a=0,l=0;for(;a<n&&l<r;)e[a]===t[l]?(i.push({t:" ",s:e[a]}),a++,l++):o[(a+1)*s+l]>=o[a*s+l+1]?(i.push({t:"-",s:e[a]}),a++):(i.push({t:"+",s:t[l]}),l++);for(;a<n;)i.push({t:"-",s:e[a++]});for(;l<r;)i.push({t:"+",s:t[l++]});return i}function VF(e,t,n){let r=0,s=0;for(let u=0;u<t;u++)e[u].t!=="+"&&r++,e[u].t!=="-"&&s++;let o=e.slice(t,n).map(function(u){return{t:u.t,s:u.s}}),i=0,a=0,l=0,c=0;for(let u of o)u.t!=="+"&&i++,u.t!=="-"&&a++,u.t==="+"&&l++,u.t==="-"&&c++;return{oldStart:r,oldLines:i,newStart:s,newLines:a,add:l,del:c,header:"@@ -"+(r+1)+","+i+" +"+(s+1)+","+a+" @@",lines:o}}function YF(e){let t=[];for(let s=0;s<e.length;s++)e[s].t!==" "&&t.push(s);let n=[],r=0;for(;r<t.length;){let s=t[r],o=s,i=r+1;for(;i<t.length&&t[i]-o-1<=2*3;)o=t[i],i++;r=i;let a=Math.max(0,s-3),l=Math.min(e.length,o+3+1);n.push(VF(e,a,l))}return n.forEach(function(s,o){s.id="h"+(o+1)}),n}function ZF(e,t){let n=pc(e),r=pc(t),s=n.length,o=r.length,i=0;for(;i<s&&i<o&&n[i]===r[i];)i++;let a=0;for(;a<s-i&&a<o-i&&n[s-1-a]===r[o-1-a];)a++;let l=n.slice(i,s-a),c=r.slice(i,o-a);if(!l.length&&!c.length)return[];let u;l.length*c.length>1e6?u=l.map(function(f){return{t:"-",s:f}}).concat(c.map(function(f){return{t:"+",s:f}})):u=$F(l,c);let d=[];for(let f=0;f<i;f++)d.push({t:" ",s:n[f]});for(let f of u)d.push(f);for(let f=s-a;f<s;f++)d.push({t:" ",s:n[f]});return YF(d)}function QF(e){let t=0,n=0;for(let r of e||[])t+=r.add,n+=r.del;return{add:t,del:n,hunks:(e||[]).length}}function eD(e,t){let n=pc(e),r=[];for(let s of t.lines)s.t!=="-"&&r.push(s.s);return mg(n.slice(0,t.oldStart).concat(r,n.slice(t.oldStart+t.oldLines)))}function tD(e,t){let n=pc(e),r=[];for(let s of t.lines)s.t!=="+"&&r.push(s.s);return mg(n.slice(0,t.newStart).concat(r,n.slice(t.newStart+t.newLines)))}function nD(e,t){let n=[];for(let r of t.lines)r.t!=="+"&&n.push(r.s);return{start:t.newStart,end:t.newStart+t.newLines,lines:n}}function rD(e){let t=[],n=[],r=e.newStart,s=-1,o=null;for(let i of e.lines)i.t==="+"?(s<0&&(s=r),r++):i.t==="-"?(s>=0&&(t.push({start:s,count:r-s}),s=-1),o||(o={at:r,lines:[]},n.push(o)),o.lines.push(i.s)):(s>=0&&(t.push({start:s,count:r-s}),s=-1),o=null,r++);return s>=0&&t.push({start:s,count:r-s}),{add:t,del:n}}pS.exports={CONTEXT:3,splitLines:pc,joinLines:mg,computeHunks:ZF,stats:QF,applyHunkToBaseline:eD,revertHunkText:tD,revertHunkEdit:nD,hunkRanges:rD}});var gS=re((mS,mc)=>{(function(e){"use strict";let t={js:"break case catch class const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield async await static get set of",ts:"break case catch class const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield async await static get set of interface type enum implements private protected public readonly abstract declare namespace as satisfies keyof infer never unknown any string number boolean object symbol bigint",python:"and as assert async await break class continue def del elif else except False finally for from global if import in is lambda None nonlocal not or pass raise return True try while with yield match case",json:"true false null",go:"break case chan const continue default defer else fallthrough for func go goto if import interface map package range return select struct switch type var nil true false",rust:"as async await break const continue crate dyn else enum extern false fn for if impl in let loop match mod move mut pub ref return self Self static struct super trait true type unsafe use where while",sh:"if then else elif fi for while until do done case esac function return exit local export readonly shift",sql:"select from where insert into values update set delete create table drop alter add index join left right inner outer on group by order limit offset as and or not null primary key foreign references distinct"},n={};Object.keys(t).forEach(function(l){n[l]=new Set(t[l].split(/\s+/))});function r(l){let c=String(l||"").toLowerCase().trim();return c==="javascript"||c==="node"||c==="mjs"||c==="cjs"?"js":c==="typescript"?"ts":c==="py"||c==="python3"?"python":c==="golang"?"go":c==="rs"?"rust":c==="bash"||c==="shell"||c==="zsh"?"sh":c==="jsx"||c==="tsx"?c==="tsx"?"ts":"js":c}function s(l){let c=r(l);return n[c]?n[c]:n.js}function o(l,c){let u=s(c),d=r(c),f={kws:u,hashComment:d==="python"||d==="sh"||d==="ruby"||d==="yaml"||d==="toml",sql:d==="sql"},p=String(l??"").split(`
|
|
183
183
|
`),m=[];for(let g=0;g<p.length;g++)g>0&&m.push({k:"plain",s:`
|
package/dist/extension.js
CHANGED
|
@@ -1453,7 +1453,7 @@ isProject: false
|
|
|
1453
1453
|
\u6CA1\u6709\u76EE\u6807`,"\u515C\u5E95\u540D")==="\u515C\u5E95\u540D","\u56DE\u9000")}),process.exitCode||console.log("ALL PASS pass="+t)}});var KE=ce((G5,HE)=>{"use strict";var Qi=require("path"),_w=/!\[([^\]]*)\]\(([^()\s]*(?:\([^()\s]*\)[^()\s]*)*)\)/g;function MK(e){let t=[],n=new Set,r=String(e??""),s;for(_w.lastIndex=0;(s=_w.exec(r))!==null;){let o=String(s[2]||"").trim();o&&(n.has(o)||(n.add(o),t.push(o)))}return t}function UE(e,t){if(!e||!t)return!1;let n=Qi.resolve(e),r=Qi.resolve(t);if(n===r)return!0;let s=Qi.relative(r,n);return!!s&&!s.startsWith("..")&&!Qi.isAbsolute(s)}function $E(e){let t=String(e||"");return!t||t.startsWith("//")||t.startsWith("data:")||t.startsWith("#")?!0:/^[a-z][a-z0-9+.-]*:/i.test(t)}function AK(e){let t=String(e??"").replace(/\r\n?/g,`
|
|
1454
1454
|
`),n=Qf(),r=n.splitFrontmatter(t);if(!r.has)return{has:!1};let s=t.split(`
|
|
1455
1455
|
`),o=Math.min(r.head.length+2,s.length),i=s.map(function(l,c){return c<o?"":l}).join(`
|
|
1456
|
-
`),a=n.parse(t);return{has:!0,name:a.name||"",overview:a.overview||"",todos:Array.isArray(a.todos)?a.todos:[],body:i}}function WE(e,t,n){let r=String(e??"").trim();if(!r)return{kind:"invalid",url:r};if($E(r)){if(!/^file:/i.test(r))return{kind:"remote",url:r};let i=r.replace(/^file:\/\//i,"");return WE(i,t,n)}let s=Qi.isAbsolute(r)?Qi.resolve(r):Qi.resolve(String(t||""),r),o=Array.isArray(n)?n:[];for(let i of o)if(UE(s,i))return{kind:"workspace",abs:s,url:r};return{kind:"inline",abs:s,url:r}}HE.exports={extractImageUrls:MK,classifyImage:WE,insideRoot:UE,isRemoteLike:$E,planMetaOf:AK,IMG_RE:_w}});var GE=ce((z5,CK)=>{CK.exports={name:"@luban-code/luban-code",displayName:"Luban",description:"Luban \u2014 a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",version:"1.152.1",license:"Apache-2.0",author:{name:"eppen (liuhualiang)",url:"https://github.com/eppen"},publisher:"liuhualiang",icon:"media/icon.png",homepage:"https://eppen.github.io/luban-site/",bugs:{url:"https://github.com/eppen/luban/issues"},keywords:["ai","agent","chat","coding-agent","qwen","deepseek","openai-compatible","mcp"],repository:{type:"git",url:"git+https://github.com/eppen/luban.git"},engines:{vscode:"^1.104.0"},categories:["AI","Chat","Programming Languages"],activationEvents:["onStartupFinished","onView:luban.chatView","onCommand:luban.focusView","onCommand:luban.browserPreview","onCommand:luban.markdownPreview","onCommand:luban.taskline","onCommand:luban.pending"],main:"./dist/extension.js",bin:{luban:"dist/cli.js","luban-code":"dist/cli.js","luban-acp":"dist/acp.js"},files:["dist/cli.js","dist/acp.js","dist/cli-plugin.js","dist/cli-upgrade.js","dist/cli-config.js","dist/extension.js","dist/search-worker.js","registry/","package.json"],scripts:{build:"node scripts/build.js",watch:"node scripts/build.js --watch",metrics:"node scripts/market-metrics.js",package:"node scripts/build.js","vscode:prepublish":"node scripts/build.js",prepack:"node scripts/build.js",smoke:"node scripts/build.js && node scripts/smoke.js","test:review-autokeep":"node scripts/build.js && node scripts/test-review-autokeep.js","test:approve":"node scripts/build.js && node scripts/test-approve-wiring.js","test:context-refs":"node scripts/build.js && node scripts/test-context-refs.js","test:skills":"node scripts/test-skills.js","test:rules":"node scripts/test-rules.js","test:plan-file":"node scripts/test-plan-file.js","test:plan-ext":"node scripts/build.js && node scripts/test-plan-ext.js","test:cursorplan-live":"node scripts/build.js && node scripts/live-cursorplan.js","test:plugins":"node scripts/test-plugins.js","test:plugins-ext":"node scripts/test-plugins-ext.js","test:registry":"node scripts/test-registry-client.js","test:registry-skill":"node scripts/test-registry-skill.js","test:install":"node scripts/test-install-scripts.js",cli:"node cli.js","3d-view":"node scripts/devtools-3d-view.js","test:acp":"node scripts/test-acp.js","test:acp-pkg":"node scripts/test-acp-pkg.js","acp:jetbrains":"node scripts/acp-jetbrains.js","test:acp-jetbrains":"node scripts/test-acp-jetbrains.js","test:mcp-session":"node scripts/test-mcp-session.js","test:acp-registry":"node scripts/test-acp-registry.js","test:cli-resume":"node scripts/test-cli-resume.js","test:session-store":"node scripts/test-session-store.js","test:cli-upgrade":"node scripts/test-cli-upgrade.js","test:cli-config":"node scripts/test-cli-config.js","test:cli-lang":"node scripts/test-cli-lang.js",vsix:"node scripts/vsix.js","test:general":"node scripts/test-general-settings.js","test:provider-models":"node scripts/test-provider-models.js","test:hub":"node scripts/test-hub-tabs.js","test:hub-market":"node scripts/test-hub-market.js","test:market-ext":"node scripts/test-market-ext.js","test:sync-registry":"node scripts/test-sync-registry.js","test:i18n":"node scripts/test-i18n.js","test:ws-chip":"node scripts/test-workspace-chip.js","test:css":"node scripts/test-css-vars.js","test:webdav":"node scripts/test-webdav.js","test:mcp-config":"node scripts/test-mcp-config.js","test:mcp-call":"node scripts/test-mcp-call.js","test:mcp-ext":"node scripts/test-mcp-ext.js","test:mcp-lazy":"node scripts/test-mcp-lazy.js","bench:mcp-lazy":"node scripts/bench-mcp-lazy.js","bench:mcp-ondemand":"node scripts/bench-mcp-ondemand.js","bench:mcp-cache":"node scripts/bench-mcp-cache.js","test:webdav-override":"node scripts/test-webdav-override.js","test:browser-events":"node scripts/test-browser-events.js","test:browser-tool":"node scripts/test-browser-tool.js","test:browser-launch":"node scripts/test-browser-launch.js","test:computer-linux":"node scripts/test-computer-linux.js","test:computer-linux-live":"node scripts/live-computer-linux.js","test:computer-tool":"node scripts/test-computer-tool.js","test:subagent":"node scripts/test-subagent-guards.js","test:subagent-format":"node scripts/test-subagent-format.js","test:subagent-parallel":"node scripts/test-subagent-parallel.js","test:delegate":"node scripts/test-delegate-guards.js","test:delegate-parallel":"node scripts/test-delegate-parallel.js","test:worktree":"node scripts/test-worktree-deliver.js","test:worktree-e2e":"node scripts/verify-worktree-e2e.js","test:worktree-merge":"node scripts/verify-worktree-merge.js","test:worktree-diff":"node scripts/verify-worktree-diff.js","test:roles":"node scripts/test-agent-roles.js","test:review-guards":"node scripts/test-review-guards.js","test:subagent-live":"node scripts/live-subagent.js","test:lm-provider":"node scripts/test-lm-provider.js","test:agent-budget":"node scripts/test-agent-budget.js","test:tool-errors":"node scripts/test-tool-errors.js","test:run-timeout":"node scripts/test-run-timeout.js","test:dup-body":"node scripts/test-dup-body.js","test:gamepad":"node scripts/test-gamepad.js","test:status":"node scripts/test-status.js","test:avatar":"node scripts/test-avatar.js","test:cli-md":"node scripts/test-cli-md.js","test:mdpreview":"node scripts/test-mdpreview.js","test:mdmath":"node scripts/test-mdmath.js","test:md-fileline":"node scripts/test-md-fileline.js","test:mdpreview-live":"node scripts/live-mdpreview.js","test:cli-confirm":"node scripts/test-cli-confirm.js","test:cli-settings":"node scripts/test-cli-settings.js","test:browser-profile":"node scripts/test-browser-profile.js","test:cli-yolo":"node scripts/test-cli-yolo.js","test:cli-input":"node scripts/test-cli-input.js","test:token-audit":"node scripts/test-token-audit.js","test:usage-tools":"node scripts/test-usage-tools.js","test:usage-web":"node scripts/test-usage-web-tools.js","test:server-tools":"node scripts/test-server-tools.js","test:think":"node scripts/test-think.js","test:think-tiers":"node scripts/test-think-tiers.js","test:webfetch-md":"node scripts/test-webfetch-md.js","test:tabs":"node scripts/test-workspace-tab-filter.js","test:queue-order":"node scripts/test-queue-order.js","test:status-live":"node scripts/live-status.js","test:session-dup-live":"node scripts/live-session-dup.js","test:review-freeze":"node scripts/live-review-freeze.js","test:review-focus":"node scripts/live-review-focus.js","test:3d-view":"node scripts/test-3d-view.js","test:taskline":"node scripts/test-taskline.js","test:pending":"node scripts/test-pending.js","test:taskline-e2e":"node scripts/test-taskline-e2e.js","test:layout":"node scripts/test-module-layout.js","test:patch":"node patch.js","test:search-worker":"node scripts/build.js && node scripts/test-search-worker.js","bench:search":"node scripts/bench-search.js","gen:taskline-demo":"node scripts/gen-taskline-demo.js"},capabilities:{untrustedWorkspaces:{supported:!0},virtualWorkspaces:!0,agentsWindow:{supported:!0}},contributes:{commands:[{command:"luban.focusView",title:"%cmdFocusView%",category:"Luban"},{command:"luban.openPanel",title:"%cmdOpenPanel%",category:"Luban"},{command:"luban.reloadConfig",title:"%cmdReloadConfig%",category:"Luban"},{command:"luban.providerSettings",title:"%cmdProviderSettings%",category:"Luban"},{command:"luban.dashboard",title:"%cmdDashboard%",category:"Luban"},{command:"luban.plugins",title:"%cmdPlugins%",category:"Luban"},{command:"luban.market",title:"%cmdMarket%",category:"Luban"},{command:"luban.rules.open",title:"%cmdOpenRules%",category:"Luban"},{command:"luban.agent",title:"%cmdAgent%",category:"Luban"},{command:"luban.openDiff",title:"%cmdOpenDiff%",category:"Luban"},{command:"luban.acceptHunk",title:"%cmdAcceptHunk%",category:"Luban"},{command:"luban.rejectHunk",title:"%cmdRejectHunk%",category:"Luban"},{command:"luban.acceptFile",title:"%cmdAcceptFile%",category:"Luban"},{command:"luban.rejectFile",title:"%cmdRejectFile%",category:"Luban"},{command:"luban.reviewAll",title:"%cmdReviewAll%",category:"Luban"},{command:"luban.revertAll",title:"%cmdRevertAll%",category:"Luban"},{command:"luban.revertTurn",title:"%cmdRevertTurn%",category:"Luban"},{command:"luban.newSession",title:"%cmdNewSession%",category:"Luban"},{command:"luban.sessionList",title:"%cmdSessionList%",category:"Luban"},{command:"luban.taskline",title:"%cmdTaskline%",category:"Luban"},{command:"luban.pending",title:"%cmdPending%",category:"Luban"},{command:"luban.findInSession",title:"%cmdFindInSession%",category:"Luban"},{command:"luban.cursorPlan",title:"%cmdCursorPlan%",category:"Luban"},{command:"luban.openCursorPlan",title:"%cmdOpenCursorPlan%",category:"Luban"},{command:"luban.mode.cycle",title:"%cmdModeCycle%",category:"Luban"},{command:"luban.approveRules",title:"%cmdApproveRules%",category:"Luban"},{command:"luban.addFileToChat",title:"%cmdAddFileToChat%",category:"Luban"},{command:"luban.addFolderToChat",title:"%cmdAddFolderToChat%",category:"Luban"},{command:"luban.addFileToNewChat",title:"%cmdAddFileToNewChat%",category:"Luban"},{command:"luban.addFolderToNewChat",title:"%cmdAddFolderToNewChat%",category:"Luban"},{command:"luban.addSelectionToChat",title:"%cmdAddSelectionToChat%",category:"Luban"},{command:"luban.addSelectionToNewChat",title:"%cmdAddSelectionToNewChat%",category:"Luban"},{command:"luban.inlineCompletion.toggle",title:"%cmdInlineToggle%",category:"Luban"},{command:"luban.diffAccept",title:"%cmdDiffAccept%",category:"Luban",icon:"$(check)"},{command:"luban.diffReject",title:"%cmdDiffReject%",category:"Luban",icon:"$(discard)"},{command:"luban.openInBrowser",title:"%cmdOpenInBrowser%",category:"Luban"},{command:"luban.browserCheck",title:"%cmdBrowserCheck%",category:"Luban"},{command:"luban.browserPreview",title:"%cmdBrowserPreview%",category:"Luban"},{command:"luban.markdownPreview",title:"%cmdMarkdownPreview%",category:"Luban",icon:"$(markdown)"}],menus:{"editor/title":[{command:"luban.diffAccept",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@1"},{command:"luban.diffReject",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@2"},{command:"luban.markdownPreview",when:"resourceLangId == markdown",group:"navigation@3"}],"explorer/context":[{command:"luban.addFileToChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@1"},{command:"luban.addFolderToChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@2"},{command:"luban.addFileToNewChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@3"},{command:"luban.addFolderToNewChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@4"}],"editor/context":[{command:"luban.addSelectionToChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@0"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@1"}],"webview/context":[{command:"luban.openInBrowser",when:"webviewSection == 'chat'"}],commandPalette:[{command:"luban.diffAccept",when:"luban.pendingReview > 0"},{command:"luban.diffReject",when:"luban.pendingReview > 0"},{command:"luban.addFileToChat",when:"false"},{command:"luban.addFolderToChat",when:"false"},{command:"luban.addFileToNewChat",when:"false"},{command:"luban.addFolderToNewChat",when:"false"},{command:"luban.addSelectionToChat",when:"editorHasSelection"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection"},{command:"luban.openInBrowser",when:"false"}]},keybindings:[{command:"luban.focusView",key:"cmd+shift+l",mac:"cmd+shift+l",win:"ctrl+shift+l",linux:"ctrl+shift+l"},{command:"luban.newSession",key:"cmd+alt+n",mac:"cmd+alt+n",win:"ctrl+alt+n",linux:"ctrl+alt+n"},{command:"luban.sessionList",key:"cmd+alt+h",mac:"cmd+alt+h",win:"ctrl+alt+h",linux:"ctrl+alt+h"},{command:"luban.taskline",key:"cmd+alt+t",mac:"cmd+alt+t",win:"ctrl+alt+t",linux:"ctrl+alt+t"},{command:"luban.mode.cycle",key:"shift+tab",mac:"shift+tab",win:"shift+tab",linux:"shift+tab",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"activeWebviewPanelId == 'luban'"},{command:"luban.addSelectionToChat",key:"cmd+alt+a",mac:"cmd+alt+a",win:"ctrl+alt+a",linux:"ctrl+alt+a",when:"editorHasSelection && editorTextFocus"}],viewsContainers:{activitybar:[{id:"luban",title:"Luban",icon:"media/icon.svg"}]},views:{luban:[{type:"webview",id:"luban.chatView",name:"Chat",contextualTitle:"Luban",icon:"media/icon.svg"}]},languageModelChatProviders:[{vendor:"luban",displayName:"Luban",icon:"media/icon.png",managementCommand:"luban.providerSettings"}],configuration:{title:"Luban",properties:{"luban.language":{type:"string",enum:["auto","en","zh-cn","ja"],enumDescriptions:["%cfgLanguageAuto%","%cfgLanguageEn%","%cfgLanguageZhCn%","%cfgLanguageJa%"],default:"auto",description:"%cfgLanguage%"},"luban.autoOpen":{type:"boolean",default:!0,description:"%cfgAutoOpen%"},"luban.context.autoFile":{type:"boolean",default:!0,description:"%cfgContextAutoFile%"},"luban.context.autoFileMaxChars":{type:"number",default:8e3,minimum:500,description:"%cfgContextAutoFileMaxChars%"},"luban.context.autoFileWindowLines":{type:"number",default:200,minimum:40,description:"%cfgContextAutoFileWindowLines%"},"luban.context.workset":{type:"boolean",default:!0,description:"%cfgContextWorkset%"},"luban.sessionHistory.max":{type:"number",default:50,minimum:1,description:"%cfgSessionHistoryMax%"},"luban.usage.record":{type:"boolean",default:!0,description:"%cfgUsageRecord%"},"luban.sessionMemory.enabled":{type:"boolean",default:!0,description:"%cfgSessionMemoryEnabled%"},"luban.sessionMemory.maxTurns":{type:"number",default:8,minimum:1,description:"%cfgSessionMemoryMaxTurns%"},"luban.sessionMemory.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgSessionMemoryMaxChars%"},"luban.agent.maxRounds":{type:"number",default:200,minimum:0,description:"%cfgAgentMaxRounds%"},"luban.agent.maxMinutes":{type:"number",default:30,minimum:1,description:"%cfgAgentMaxMinutes%"},"luban.agent.requestTimeoutMs":{type:"number",default:18e4,minimum:1e4,maximum:6e5,description:"%cfgAgentRequestTimeoutMs%"},"luban.agent.noWriteNudges":{type:"number",default:2,minimum:0,description:"%cfgAgentNoWriteNudges%"},"luban.agent.verifyNudges":{type:"number",default:1,minimum:0,description:"%cfgAgentVerifyNudges%"},"luban.agent.todoReminder":{type:"number",default:0,minimum:0,maximum:99,description:"%cfgAgentTodoReminder%"},"luban.agent.subagentRounds":{type:"number",default:24,minimum:0,description:"%cfgAgentSubagentRounds%"},"luban.agent.subagentMinutes":{type:"number",default:0,minimum:0,description:"%cfgAgentSubagentMinutes%"},"luban.agent.subagentParallel":{type:"number",default:2,minimum:0,maximum:8,description:"%cfgAgentSubagentParallel%"},"luban.agent.delegateModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentDelegateModels%"},"luban.agent.reviewAfterDelegate":{type:"boolean",default:!0,description:"%cfgAgentReviewAfterDelegate%"},"luban.agent.reviewModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentReviewModels%"},"luban.agent.worktreeDeliver":{type:"string",enum:["off","always","subagent"],default:"off",description:"%cfgAgentWorktreeDeliver%"},"luban.agent.worktreeRoot":{type:"string",default:"",description:"%cfgAgentWorktreeRoot%"},"luban.agent.smallWindow":{type:"string",enum:["auto","on","off"],default:"auto",description:"%cfgAgentSmallWindow%"},"luban.agent.verbosity":{type:"string",enum:["concise","normal","detailed"],default:"normal",description:"%cfgAgentVerbosity%"},"luban.search.maxFiles":{type:"number",default:5e3,minimum:100,description:"%cfgSearchMaxFiles%"},"luban.net.tlsMaxVersion":{type:"string",enum:["auto","1.2"],enumDescriptions:["%cfgNetTlsMaxVersionAuto%","%cfgNetTlsMaxVersion12%"],default:"auto",description:"%cfgNetTlsMaxVersion%"},"luban.browser.enabled":{type:"boolean",default:!1,description:"%cfgBrowserEnabled%"},"luban.browser.chromePath":{type:"string",default:"",description:"%cfgBrowserChromePath%"},"luban.browser.headless":{type:"boolean",default:!0,description:"%cfgBrowserHeadless%"},"luban.browser.viewportWidth":{type:"number",default:1280,minimum:320,maximum:4096,description:"%cfgBrowserViewportWidth%"},"luban.browser.viewportHeight":{type:"number",default:800,minimum:240,maximum:4096,description:"%cfgBrowserViewportHeight%"},"luban.browser.idleTimeoutMs":{type:"number",default:3e5,minimum:1e4,description:"%cfgBrowserIdleTimeout%"},"luban.browser.confirm":{type:"boolean",default:!0,description:"%cfgBrowserConfirm%"},"luban.browser.preview":{type:"boolean",default:!1,description:"%cfgBrowserPreview%"},"luban.computer.enabled":{type:"boolean",default:!1,description:"%cfgComputerEnabled%"},"luban.computer.confirm":{type:"boolean",default:!0,description:"%cfgComputerConfirm%"},"luban.computer.screenshotWidth":{type:"number",default:2048,minimum:320,maximum:4096,description:"%cfgComputerScreenshotWidth%"},"luban.plugins.enabled":{type:"boolean",default:!1,description:"%cfgPluginsEnabled%"},"luban.plugins.maxTools":{type:"number",default:30,minimum:1,maximum:200,description:"%cfgPluginsMaxTools%"},"luban.plugins.theme":{type:"string",default:"",description:"%cfgPluginsTheme%"},"luban.mcp.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgMcpLoadModeLazy%","%cfgMcpLoadModeEager%"],default:"lazy",description:"%cfgMcpLoadMode%"},"luban.plugins.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgPluginsLoadModeLazy%","%cfgPluginsLoadModeEager%"],default:"lazy",description:"%cfgPluginsLoadMode%"},"luban.plan.strictReadOnly":{type:"boolean",default:!0,description:"%cfgPlanStrictReadOnly%"},"luban.shell.confirmDangerous":{type:"boolean",default:!1,description:"%cfgShellConfirmDangerous%"},"luban.fs.allowOutsideWorkspace":{type:"boolean",default:!0,description:"%cfgFsAllowOutsideWorkspace%"},"luban.review.autoOpenDiff":{type:"boolean",default:!1,description:"%cfgReviewAutoOpenDiff%"},"luban.review.autoKeep":{type:"boolean",default:!1,description:"%cfgReviewAutoKeep%"},"luban.diagnostics.afterEdit":{type:"boolean",default:!0,description:"%cfgDiagAfterEdit%"},"luban.inlineCompletion.enabled":{type:"boolean",default:!1,description:"%cfgInlineEnabled%"},"luban.inlineCompletion.maxPerMinute":{type:"number",default:30,minimum:1,description:"%cfgInlineMaxPerMinute%"},"luban.inlineCompletion.debounceMs":{type:"number",default:250,minimum:0,description:"%cfgInlineDebounceMs%"},"luban.statusBar.enabled":{type:"boolean",default:!0,description:"%cfgStatusBarEnabled%"},"luban.mascot.avatar":{type:"boolean",default:!1,description:"%cfgMascotAvatar%"},"luban.rules.enabled":{type:"boolean",default:!0,description:"%cfgRulesEnabled%"},"luban.rules.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgRulesMaxChars%"},"luban.rules.indexMaxChars":{type:"number",default:2e3,minimum:200,description:"%cfgRulesIndexMaxChars%"}}}},devDependencies:{esbuild:"^0.25.0",katex:"^0.16.47",mermaid:"^11.17.2"},dependencies:{"@clack/prompts":"^1.8.1",picocolors:"^1.1.1"}}});var P=require("vscode"),de=require("fs"),xe=require("path"),Wn=require("os"),Nw=require("tls"),{execSync:OK}=require("child_process"),Xn=ym(),Fs=Qk(),EK=tx(),Rp=cx(),PK=fx(),_n=cd(),vl=qm(),zr=Px(),dp=qx(),ct=hS(),Cs=ph(),ia=av(),Ru=fv(),ra=wv(),FP=Sv(),fp=Mh(),Lw=Iv(),wl=Xv(),ht=Wm(),zE=wd(),ju=Lh(),JE=p_(),Nu=Uh(),ls=v_(),Xt=C_(),pp=W_(),{clipLine:RP}=Td(),{ARG_HINT_MAX:jK,parseToolArgs:NK,isPlaceholderArgs:LK,argString:VE,toolPath:_u,toolText:pl,applyReplace:FK,PLAN_NOT_CONNECT_FAIL:RK,PLAN_MCP_WAY_OUT:XE}=Y_(),IP=tT(),{lazyExpandedOf:DP,lazyExpand:ml,lazyExpandSig:Fw}=IP,{WEB_SINGLE_CONTENT_MAX:IK,searchBase:qP,webEngine:fo,serverBase:BP,serverCap:Hu,htmlToText:Rw,bingResultsFor:UP,formatSearchResults:m0,sourcesPayload:YE,parseWebMention:$P}=iT(),WP=cT(),{validateServerTools:DK,ocrTextOf:J5,serverOcr:HP}=WP,qK=lg(),{TOOLS:KP,SKILL_TOOL:BK,RULE_TOOL:UK,RULE_TEMPLATE:$K,PLAN_TOOLS:GP,EXPLORE_TOOLS:h0,DELEGATE_TOOLS:g0}=qK,{windowFor:Iw,turnUsage:y0,usageSummary:Iu,ctxBreakdown:zP,peakContextTokens:JP,countWebTools:WK}=kT(),VP=BT(),HK=KT(),XP=tM(),KK=Tg(),Ip=XP.makeShellGuard({wsRoot:function(){return ye()},relOf:function(e){return at(e)},rec:function(e,t){return v(e,t)},tr:function(e,t){return R(e,t)},nativeConfirm:function(e,t){return Pu(e,t)},toolResult:function(e,t,n){return Pn(e,t,n)},toolErrors:ht,getBool:function(e){try{return P.workspace.getConfiguration("luban").get(e)===!0}catch{return!1}}}),{REF_READ_MAX:GK,fenceLang:zK,relPath:Rl,refTokenForPath:YP,selectionTokenForCurrent:ZP,formatSize:JK,expandReferences:Dp}=VP,Dw=lM(),{SUBAGENT_RESULT_MAX:VK,capSubagentText:mp,subagentCaveat:hp,PARALLEL_SAFE_TOOLS:XK,NO_FP_TOTAL_TOOLS:YK,SESSION_WRITE_TOOLS:ZK,fmtCtxTokens:so,fmtElapsedMs:ao,stopText:b0,turnHasWrite:qp,changedFilesOf:w0,turnHasExplore:k0,turnIsReadOnly:gp,turnHasVerify:QP,pendingTodoCount:x0,HANDOFF_HEADINGS:Tw,handoffSections:ej,handoffIncrementHint:QK,toolLogDigest:S0,messagesHaveDirBatches:qw,normRounds:ZE,sameRoundsBody:e6,agentRounds:Bp}=Dw,tj=dM(),{pathWithin:nj,delegatePathsOverlap:t6,acquireDelegateLease:rj,releaseDelegateLease:sj}=tj,dr=OM(),Hr=HM(),De=Ga(),Os=JC(),oj=ac(),QE=Qg(),Yn=c1(),n6=b1(),yp=v1(),Ar=gb(),r6=N1(),v0=U1(),ij=Z1(),Rs=Eb(),Es=CO(),Up=process.platform==="linux",s6=process.platform==="darwin",un=Up?WO():process.platform==="win32"?aE():wE(),Kr=process.platform==="win32",_0=Ra(),aj=Kr?"Windows":s6?"macOS":Up?"Linux":"\u4EC5\u652F\u6301 macOS / Windows / Linux",o6=Kr?" \u4EE5\u7BA1\u7406\u5458\u6743\u9650\u8FD0\u884C\u7684\u7A97\u53E3\u6536\u4E0D\u5230\u666E\u901A\u8FDB\u7A0B\u7684\u70B9\u51FB / \u6309\u952E\uFF08UIPI \u89C4\u5219\uFF09\uFF0C\u9700\u8981\u65F6\u8BA9\u5BBF\u4E3B App \u4E5F\u4EE5\u7BA1\u7406\u5458\u8FD0\u884C\u3002":Up?" X11 \u4F1A\u8BDD\u6700\u5B8C\u6574\uFF1BWayland \u4E0B xdotool \u53EA\u80FD\u64CD\u4F5C XWayland \u5E94\u7528\uFF0C\u539F\u751F Wayland \u7A97\u53E3\u7684\u70B9\u51FB / \u62D6\u52A8\u4E0D\u53EF\u7528\u3002\u65E0\u5934\u73AF\u5883\u8981\u5148\u8D77 Xvfb\u3002":" \u6CA1\u6709\u300C\u8F85\u52A9\u529F\u80FD\u300D\u6743\u9650\u65F6\u70B9\u51FB\u4F1A\u88AB\u7CFB\u7EDF\u9759\u9ED8\u4E22\u5F03\uFF0C\u6CA1\u6709\u300C\u5C4F\u5E55\u5F55\u5236\u300D\u6743\u9650\u65F6\u622A\u56FE\u4F1A\u5931\u8D25 \u2014\u2014 \u5206\u522B\u53BB\u7CFB\u7EDF\u8BBE\u7F6E\u7684\u9690\u79C1\u4E0E\u5B89\u5168\u6027\u91CC\u52FE\u9009\u5BBF\u4E3B App\u3002",eP=_0.UNIT_ZH,i6=_0.SCREENSHOT_NOTE,a6=_0.COMPUTER_SHOT_NOTE;function l6(e,t){let n=An(),r=n&&n.provider;if(!r||Hu(r,"ocr")!=="deepseek")return null;let s=BP(r),o=da(r);if(!s||!o)return null;let a=String(e&&e.dataUrl||"").match(/^data:([^;,]+)(;base64)?,(.*)$/);return a?HP({filename:"screenshot.jpg",mime:a[1]||"image/jpeg",base64:a[3]||""},{base:s,key:o,signal:t&&t.signal,maxChars:t&&t.maxChars}).then(function(l){return{text:l.text,items:l.pageCount,remote:!0}}).catch(function(l){return v("server_ocr_failed",{where:"computer",message:String(l&&l.message||l).slice(0,300)}),null}):null}Kr&&typeof un.setRemoteOcr=="function"&&un.setRemoteOcr(l6);function c6(){return Kr?{a:65,p:80,bang:49}:Up?{a:97,p:112,bang:49}:{a:0,p:35,bang:18}}var Gt=Yf(),Bw=AE(),u6=Cf(),lj=jE(),d6=NE(),aa=Qf(),ai=BE(),El=iy(),cj=my(),Mw=KE(),tP=GE(),f6=Ks().SKIP_DIRS,T0=Ks().isSkippedDirName,Ns=tP&&tP.version||"0.0.0",uj=process.env.LUBAN_OUT_DIR||"/tmp/luban-ide",p6=uj+"/result.json",wn=xe.join(Wn.homedir(),".luban","providers.json"),Au={startedAt:new Date().toISOString(),steps:[],acks:[]},m6=400,nP=2e3,_l=null;function dj(){try{de.mkdirSync(uj,{recursive:!0}),de.writeFileSync(p6,JSON.stringify(Au,null,2))}catch{}}function M0(){_l&&(clearTimeout(_l),_l=null),dj()}function v(e,t){Au.steps.push({step:e,at:new Date().toISOString(),...t}),Au.steps.length>nP&&Au.steps.splice(0,Au.steps.length-nP),_l||(_l=setTimeout(function(){_l=null,dj()},m6))}var cs="",fj=[];function pj(e,t){let n=String(e??"auto").toLowerCase();if(n==="en")return"en";if(n==="ja"||n.slice(0,2)==="ja")return"ja";if(n.slice(0,2)==="zh")return"zh-cn";let r=String(t||"").toLowerCase();return r.slice(0,2)==="zh"?"zh-cn":r.slice(0,2)==="ja"?"ja":"en"}function Il(){let e="auto";try{e=P.workspace.getConfiguration("luban").get("language")}catch{}return pj(e,P.env&&P.env.language)}function R(e,t){return cj.t(e,t)}function bp(e){cs=cj.setLang(Il()),Fs.setUntitled(R("store.untitled")),y6();try{Cr&&Cr.fire()}catch{}try{z0()}catch{}return v("language_applied",{lang:cs,reason:e||""}),cs}function h6(e){for(let t of fj.splice(0))try{t(e)}catch{}}function g6(e){return new Promise(function(t){let n=!1,r=setTimeout(function(){n||(n=!0,t(null))},e||8e3);fj.push(function(s){n||(n=!0,clearTimeout(r),t(s))})})}function y6(){let e=[ze&&ze.webview,Ie&&Ie.webview,dn&&dn.webview];for(let t of e)if(t)try{t.postMessage({type:"lang",lang:cs})}catch(n){v("broadcast_lang_failed",{message:n.message})}}function b6(){let e=[ze&&ze.webview,Ie&&Ie.webview],t=_j();for(let n of e)if(n)try{n.postMessage(t)}catch(r){v("broadcast_workspace_failed",{message:r.message})}}var mj={defaultModel:"deepseek::deepseek-flash",providers:[{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",apiKeyEnv:"DEEPSEEK_API_KEY",webSearch:{baseUrl:"https://api.deepseek.com/v1/tools",count:8},models:[{id:"deepseek-flash",name:"DeepSeek Flash",maxInputTokens:65536,maxOutputTokens:8192,toolCalling:!0}]}]},jr=mj,Pl="builtin",Is=Object.create(null),Ms=null,Lu=[],hj=40,Uw=Object.create(null),rP=new Map;function w6(e){for(let t of e.providers||[])!t||!Array.isArray(t.models)||(t.models=t.models.map(function(n){return typeof n=="string"?{id:n,name:n}:(n&&typeof n=="object"&&!n.id&&n.name&&(n.id=String(n.name)),n)}).filter(function(n){return n&&typeof n=="object"&&n.id}));return e}function $p(){try{let e=JSON.parse(de.readFileSync(wn,"utf8"));if(e&&Array.isArray(e.providers)&&e.providers.length){jr=w6(e),Pl=wn,v("config_loaded",{source:wn,providers:e.providers.map(t=>t.id),models:pn().length});return}}catch(e){v("config_load_failed",{message:e.message,path:wn})}jr=mj,Pl="builtin"}function k6(){let e=[];for(let t of jr.providers||[])for(let n of t.models||[])e.push({provider:t,model:n});return e}function pn(){let e=k6(),t={};for(let n of e)t[n.model.id]=(t[n.model.id]||0)+1;return e.map(n=>({key:t[n.model.id]>1?n.provider.id+"::"+n.model.id:n.model.id,provider:n.provider,model:n.model}))}function An(e){let t=pn(),n=String(e||"");return t.find(r=>r.key===n)||t.find(r=>r.provider.id+"::"+r.model.id===n)||t.find(r=>r.model.id===n)||t.find(r=>r.key===jr.defaultModel)||t.find(r=>r.provider.id+"::"+r.model.id===jr.defaultModel)||t[0]}function ua(){let e=An(jr.defaultModel);return e?e.key:""}function x6(e){try{let t=de.readFileSync(xe.join(Wn.homedir(),".hermes",".env"),"utf8");for(let n of t.split(`
|
|
1456
|
+
`),a=n.parse(t);return{has:!0,name:a.name||"",overview:a.overview||"",todos:Array.isArray(a.todos)?a.todos:[],body:i}}function WE(e,t,n){let r=String(e??"").trim();if(!r)return{kind:"invalid",url:r};if($E(r)){if(!/^file:/i.test(r))return{kind:"remote",url:r};let i=r.replace(/^file:\/\//i,"");return WE(i,t,n)}let s=Qi.isAbsolute(r)?Qi.resolve(r):Qi.resolve(String(t||""),r),o=Array.isArray(n)?n:[];for(let i of o)if(UE(s,i))return{kind:"workspace",abs:s,url:r};return{kind:"inline",abs:s,url:r}}HE.exports={extractImageUrls:MK,classifyImage:WE,insideRoot:UE,isRemoteLike:$E,planMetaOf:AK,IMG_RE:_w}});var GE=ce((z5,CK)=>{CK.exports={name:"@luban-code/luban-code",displayName:"Luban",description:"Luban \u2014 a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",version:"1.152.2",license:"Apache-2.0",author:{name:"eppen (liuhualiang)",url:"https://github.com/eppen"},publisher:"liuhualiang",icon:"media/icon.png",homepage:"https://eppen.github.io/luban-site/",bugs:{url:"https://github.com/eppen/luban/issues"},keywords:["ai","agent","chat","coding-agent","qwen","deepseek","openai-compatible","mcp"],repository:{type:"git",url:"git+https://github.com/eppen/luban.git"},engines:{vscode:"^1.104.0"},categories:["AI","Chat","Programming Languages"],activationEvents:["onStartupFinished","onView:luban.chatView","onCommand:luban.focusView","onCommand:luban.browserPreview","onCommand:luban.markdownPreview","onCommand:luban.taskline","onCommand:luban.pending"],main:"./dist/extension.js",bin:{luban:"dist/cli.js","luban-code":"dist/cli.js","luban-acp":"dist/acp.js"},files:["dist/cli.js","dist/acp.js","dist/cli-plugin.js","dist/cli-upgrade.js","dist/cli-config.js","dist/extension.js","dist/search-worker.js","registry/","package.json"],scripts:{build:"node scripts/build.js",watch:"node scripts/build.js --watch",metrics:"node scripts/market-metrics.js",package:"node scripts/build.js","vscode:prepublish":"node scripts/build.js",prepack:"node scripts/build.js",smoke:"node scripts/build.js && node scripts/smoke.js","test:review-autokeep":"node scripts/build.js && node scripts/test-review-autokeep.js","test:approve":"node scripts/build.js && node scripts/test-approve-wiring.js","test:context-refs":"node scripts/build.js && node scripts/test-context-refs.js","test:skills":"node scripts/test-skills.js","test:rules":"node scripts/test-rules.js","test:plan-file":"node scripts/test-plan-file.js","test:plan-ext":"node scripts/build.js && node scripts/test-plan-ext.js","test:cursorplan-live":"node scripts/build.js && node scripts/live-cursorplan.js","test:plugins":"node scripts/test-plugins.js","test:plugins-ext":"node scripts/test-plugins-ext.js","test:registry":"node scripts/test-registry-client.js","test:registry-skill":"node scripts/test-registry-skill.js","test:install":"node scripts/test-install-scripts.js",cli:"node cli.js","3d-view":"node scripts/devtools-3d-view.js","test:acp":"node scripts/test-acp.js","test:acp-pkg":"node scripts/test-acp-pkg.js","acp:jetbrains":"node scripts/acp-jetbrains.js","test:acp-jetbrains":"node scripts/test-acp-jetbrains.js","test:mcp-session":"node scripts/test-mcp-session.js","test:acp-registry":"node scripts/test-acp-registry.js","test:cli-resume":"node scripts/test-cli-resume.js","test:session-store":"node scripts/test-session-store.js","test:cli-upgrade":"node scripts/test-cli-upgrade.js","test:cli-config":"node scripts/test-cli-config.js","test:cli-lang":"node scripts/test-cli-lang.js",vsix:"node scripts/vsix.js","test:general":"node scripts/test-general-settings.js","test:provider-models":"node scripts/test-provider-models.js","test:hub":"node scripts/test-hub-tabs.js","test:hub-market":"node scripts/test-hub-market.js","test:market-ext":"node scripts/test-market-ext.js","test:sync-registry":"node scripts/test-sync-registry.js","test:i18n":"node scripts/test-i18n.js","test:ws-chip":"node scripts/test-workspace-chip.js","test:css":"node scripts/test-css-vars.js","test:webdav":"node scripts/test-webdav.js","test:mcp-config":"node scripts/test-mcp-config.js","test:mcp-call":"node scripts/test-mcp-call.js","test:mcp-ext":"node scripts/test-mcp-ext.js","test:mcp-lazy":"node scripts/test-mcp-lazy.js","bench:mcp-lazy":"node scripts/bench-mcp-lazy.js","bench:mcp-ondemand":"node scripts/bench-mcp-ondemand.js","bench:mcp-cache":"node scripts/bench-mcp-cache.js","test:webdav-override":"node scripts/test-webdav-override.js","test:browser-events":"node scripts/test-browser-events.js","test:browser-tool":"node scripts/test-browser-tool.js","test:browser-launch":"node scripts/test-browser-launch.js","test:computer-linux":"node scripts/test-computer-linux.js","test:computer-linux-live":"node scripts/live-computer-linux.js","test:computer-tool":"node scripts/test-computer-tool.js","test:subagent":"node scripts/test-subagent-guards.js","test:subagent-format":"node scripts/test-subagent-format.js","test:subagent-parallel":"node scripts/test-subagent-parallel.js","test:delegate":"node scripts/test-delegate-guards.js","test:delegate-parallel":"node scripts/test-delegate-parallel.js","test:worktree":"node scripts/test-worktree-deliver.js","test:worktree-e2e":"node scripts/verify-worktree-e2e.js","test:worktree-merge":"node scripts/verify-worktree-merge.js","test:worktree-diff":"node scripts/verify-worktree-diff.js","test:roles":"node scripts/test-agent-roles.js","test:review-guards":"node scripts/test-review-guards.js","test:subagent-live":"node scripts/live-subagent.js","test:lm-provider":"node scripts/test-lm-provider.js","test:agent-budget":"node scripts/test-agent-budget.js","test:tool-errors":"node scripts/test-tool-errors.js","test:run-timeout":"node scripts/test-run-timeout.js","test:dup-body":"node scripts/test-dup-body.js","test:gamepad":"node scripts/test-gamepad.js","test:status":"node scripts/test-status.js","test:avatar":"node scripts/test-avatar.js","test:cli-md":"node scripts/test-cli-md.js","test:mdpreview":"node scripts/test-mdpreview.js","test:mdmath":"node scripts/test-mdmath.js","test:md-fileline":"node scripts/test-md-fileline.js","test:mdpreview-live":"node scripts/live-mdpreview.js","test:cli-confirm":"node scripts/test-cli-confirm.js","test:cli-settings":"node scripts/test-cli-settings.js","test:browser-profile":"node scripts/test-browser-profile.js","test:cli-yolo":"node scripts/test-cli-yolo.js","test:cli-input":"node scripts/test-cli-input.js","test:token-audit":"node scripts/test-token-audit.js","test:usage-tools":"node scripts/test-usage-tools.js","test:usage-web":"node scripts/test-usage-web-tools.js","test:server-tools":"node scripts/test-server-tools.js","test:think":"node scripts/test-think.js","test:think-tiers":"node scripts/test-think-tiers.js","test:webfetch-md":"node scripts/test-webfetch-md.js","test:tabs":"node scripts/test-workspace-tab-filter.js","test:queue-order":"node scripts/test-queue-order.js","test:status-live":"node scripts/live-status.js","test:session-dup-live":"node scripts/live-session-dup.js","test:review-freeze":"node scripts/live-review-freeze.js","test:review-focus":"node scripts/live-review-focus.js","test:3d-view":"node scripts/test-3d-view.js","test:taskline":"node scripts/test-taskline.js","test:pending":"node scripts/test-pending.js","test:taskline-e2e":"node scripts/test-taskline-e2e.js","test:layout":"node scripts/test-module-layout.js","test:patch":"node patch.js","test:search-worker":"node scripts/build.js && node scripts/test-search-worker.js","bench:search":"node scripts/bench-search.js","gen:taskline-demo":"node scripts/gen-taskline-demo.js"},capabilities:{untrustedWorkspaces:{supported:!0},virtualWorkspaces:!0,agentsWindow:{supported:!0}},contributes:{commands:[{command:"luban.focusView",title:"%cmdFocusView%",category:"Luban"},{command:"luban.openPanel",title:"%cmdOpenPanel%",category:"Luban"},{command:"luban.reloadConfig",title:"%cmdReloadConfig%",category:"Luban"},{command:"luban.providerSettings",title:"%cmdProviderSettings%",category:"Luban"},{command:"luban.dashboard",title:"%cmdDashboard%",category:"Luban"},{command:"luban.plugins",title:"%cmdPlugins%",category:"Luban"},{command:"luban.market",title:"%cmdMarket%",category:"Luban"},{command:"luban.rules.open",title:"%cmdOpenRules%",category:"Luban"},{command:"luban.agent",title:"%cmdAgent%",category:"Luban"},{command:"luban.openDiff",title:"%cmdOpenDiff%",category:"Luban"},{command:"luban.acceptHunk",title:"%cmdAcceptHunk%",category:"Luban"},{command:"luban.rejectHunk",title:"%cmdRejectHunk%",category:"Luban"},{command:"luban.acceptFile",title:"%cmdAcceptFile%",category:"Luban"},{command:"luban.rejectFile",title:"%cmdRejectFile%",category:"Luban"},{command:"luban.reviewAll",title:"%cmdReviewAll%",category:"Luban"},{command:"luban.revertAll",title:"%cmdRevertAll%",category:"Luban"},{command:"luban.revertTurn",title:"%cmdRevertTurn%",category:"Luban"},{command:"luban.newSession",title:"%cmdNewSession%",category:"Luban"},{command:"luban.sessionList",title:"%cmdSessionList%",category:"Luban"},{command:"luban.taskline",title:"%cmdTaskline%",category:"Luban"},{command:"luban.pending",title:"%cmdPending%",category:"Luban"},{command:"luban.findInSession",title:"%cmdFindInSession%",category:"Luban"},{command:"luban.cursorPlan",title:"%cmdCursorPlan%",category:"Luban"},{command:"luban.openCursorPlan",title:"%cmdOpenCursorPlan%",category:"Luban"},{command:"luban.mode.cycle",title:"%cmdModeCycle%",category:"Luban"},{command:"luban.approveRules",title:"%cmdApproveRules%",category:"Luban"},{command:"luban.addFileToChat",title:"%cmdAddFileToChat%",category:"Luban"},{command:"luban.addFolderToChat",title:"%cmdAddFolderToChat%",category:"Luban"},{command:"luban.addFileToNewChat",title:"%cmdAddFileToNewChat%",category:"Luban"},{command:"luban.addFolderToNewChat",title:"%cmdAddFolderToNewChat%",category:"Luban"},{command:"luban.addSelectionToChat",title:"%cmdAddSelectionToChat%",category:"Luban"},{command:"luban.addSelectionToNewChat",title:"%cmdAddSelectionToNewChat%",category:"Luban"},{command:"luban.inlineCompletion.toggle",title:"%cmdInlineToggle%",category:"Luban"},{command:"luban.diffAccept",title:"%cmdDiffAccept%",category:"Luban",icon:"$(check)"},{command:"luban.diffReject",title:"%cmdDiffReject%",category:"Luban",icon:"$(discard)"},{command:"luban.openInBrowser",title:"%cmdOpenInBrowser%",category:"Luban"},{command:"luban.browserCheck",title:"%cmdBrowserCheck%",category:"Luban"},{command:"luban.browserPreview",title:"%cmdBrowserPreview%",category:"Luban"},{command:"luban.markdownPreview",title:"%cmdMarkdownPreview%",category:"Luban",icon:"$(markdown)"}],menus:{"editor/title":[{command:"luban.diffAccept",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@1"},{command:"luban.diffReject",when:"isInDiffEditor && luban.reviewDiffActive && luban.pendingReview > 0",group:"navigation@2"},{command:"luban.markdownPreview",when:"resourceLangId == markdown",group:"navigation@3"}],"explorer/context":[{command:"luban.addFileToChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@1"},{command:"luban.addFolderToChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@2"},{command:"luban.addFileToNewChat",when:"!explorerResourceIsFolder && resourceScheme == file",group:"1_luban@3"},{command:"luban.addFolderToNewChat",when:"explorerResourceIsFolder && resourceScheme == file",group:"1_luban@4"}],"editor/context":[{command:"luban.addSelectionToChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@0"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection && resourceScheme == file",group:"1_luban@1"}],"webview/context":[{command:"luban.openInBrowser",when:"webviewSection == 'chat'"}],commandPalette:[{command:"luban.diffAccept",when:"luban.pendingReview > 0"},{command:"luban.diffReject",when:"luban.pendingReview > 0"},{command:"luban.addFileToChat",when:"false"},{command:"luban.addFolderToChat",when:"false"},{command:"luban.addFileToNewChat",when:"false"},{command:"luban.addFolderToNewChat",when:"false"},{command:"luban.addSelectionToChat",when:"editorHasSelection"},{command:"luban.addSelectionToNewChat",when:"editorHasSelection"},{command:"luban.openInBrowser",when:"false"}]},keybindings:[{command:"luban.focusView",key:"cmd+shift+l",mac:"cmd+shift+l",win:"ctrl+shift+l",linux:"ctrl+shift+l"},{command:"luban.newSession",key:"cmd+alt+n",mac:"cmd+alt+n",win:"ctrl+alt+n",linux:"ctrl+alt+n"},{command:"luban.sessionList",key:"cmd+alt+h",mac:"cmd+alt+h",win:"ctrl+alt+h",linux:"ctrl+alt+h"},{command:"luban.taskline",key:"cmd+alt+t",mac:"cmd+alt+t",win:"ctrl+alt+t",linux:"ctrl+alt+t"},{command:"luban.mode.cycle",key:"shift+tab",mac:"shift+tab",win:"shift+tab",linux:"shift+tab",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"focusedView == 'luban.chatView'"},{command:"luban.findInSession",key:"cmd+f",mac:"cmd+f",win:"ctrl+f",linux:"ctrl+f",when:"activeWebviewPanelId == 'luban'"},{command:"luban.addSelectionToChat",key:"cmd+alt+a",mac:"cmd+alt+a",win:"ctrl+alt+a",linux:"ctrl+alt+a",when:"editorHasSelection && editorTextFocus"}],viewsContainers:{activitybar:[{id:"luban",title:"Luban",icon:"media/icon.svg"}]},views:{luban:[{type:"webview",id:"luban.chatView",name:"Chat",contextualTitle:"Luban",icon:"media/icon.svg"}]},languageModelChatProviders:[{vendor:"luban",displayName:"Luban",icon:"media/icon.png",managementCommand:"luban.providerSettings"}],configuration:{title:"Luban",properties:{"luban.language":{type:"string",enum:["auto","en","zh-cn","ja"],enumDescriptions:["%cfgLanguageAuto%","%cfgLanguageEn%","%cfgLanguageZhCn%","%cfgLanguageJa%"],default:"auto",description:"%cfgLanguage%"},"luban.autoOpen":{type:"boolean",default:!0,description:"%cfgAutoOpen%"},"luban.context.autoFile":{type:"boolean",default:!0,description:"%cfgContextAutoFile%"},"luban.context.autoFileMaxChars":{type:"number",default:8e3,minimum:500,description:"%cfgContextAutoFileMaxChars%"},"luban.context.autoFileWindowLines":{type:"number",default:200,minimum:40,description:"%cfgContextAutoFileWindowLines%"},"luban.context.workset":{type:"boolean",default:!0,description:"%cfgContextWorkset%"},"luban.sessionHistory.max":{type:"number",default:50,minimum:1,description:"%cfgSessionHistoryMax%"},"luban.usage.record":{type:"boolean",default:!0,description:"%cfgUsageRecord%"},"luban.sessionMemory.enabled":{type:"boolean",default:!0,description:"%cfgSessionMemoryEnabled%"},"luban.sessionMemory.maxTurns":{type:"number",default:8,minimum:1,description:"%cfgSessionMemoryMaxTurns%"},"luban.sessionMemory.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgSessionMemoryMaxChars%"},"luban.agent.maxRounds":{type:"number",default:200,minimum:0,description:"%cfgAgentMaxRounds%"},"luban.agent.maxMinutes":{type:"number",default:30,minimum:1,description:"%cfgAgentMaxMinutes%"},"luban.agent.requestTimeoutMs":{type:"number",default:18e4,minimum:1e4,maximum:6e5,description:"%cfgAgentRequestTimeoutMs%"},"luban.agent.noWriteNudges":{type:"number",default:2,minimum:0,description:"%cfgAgentNoWriteNudges%"},"luban.agent.verifyNudges":{type:"number",default:1,minimum:0,description:"%cfgAgentVerifyNudges%"},"luban.agent.todoReminder":{type:"number",default:0,minimum:0,maximum:99,description:"%cfgAgentTodoReminder%"},"luban.agent.subagentRounds":{type:"number",default:24,minimum:0,description:"%cfgAgentSubagentRounds%"},"luban.agent.subagentMinutes":{type:"number",default:0,minimum:0,description:"%cfgAgentSubagentMinutes%"},"luban.agent.subagentParallel":{type:"number",default:2,minimum:0,maximum:8,description:"%cfgAgentSubagentParallel%"},"luban.agent.delegateModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentDelegateModels%"},"luban.agent.reviewAfterDelegate":{type:"boolean",default:!0,description:"%cfgAgentReviewAfterDelegate%"},"luban.agent.reviewModels":{type:"array",items:{type:"string"},default:[],description:"%cfgAgentReviewModels%"},"luban.agent.worktreeDeliver":{type:"string",enum:["off","always","subagent"],default:"off",description:"%cfgAgentWorktreeDeliver%"},"luban.agent.worktreeRoot":{type:"string",default:"",description:"%cfgAgentWorktreeRoot%"},"luban.agent.smallWindow":{type:"string",enum:["auto","on","off"],default:"auto",description:"%cfgAgentSmallWindow%"},"luban.agent.verbosity":{type:"string",enum:["concise","normal","detailed"],default:"normal",description:"%cfgAgentVerbosity%"},"luban.search.maxFiles":{type:"number",default:5e3,minimum:100,description:"%cfgSearchMaxFiles%"},"luban.net.tlsMaxVersion":{type:"string",enum:["auto","1.2"],enumDescriptions:["%cfgNetTlsMaxVersionAuto%","%cfgNetTlsMaxVersion12%"],default:"auto",description:"%cfgNetTlsMaxVersion%"},"luban.browser.enabled":{type:"boolean",default:!1,description:"%cfgBrowserEnabled%"},"luban.browser.chromePath":{type:"string",default:"",description:"%cfgBrowserChromePath%"},"luban.browser.headless":{type:"boolean",default:!0,description:"%cfgBrowserHeadless%"},"luban.browser.viewportWidth":{type:"number",default:1280,minimum:320,maximum:4096,description:"%cfgBrowserViewportWidth%"},"luban.browser.viewportHeight":{type:"number",default:800,minimum:240,maximum:4096,description:"%cfgBrowserViewportHeight%"},"luban.browser.idleTimeoutMs":{type:"number",default:3e5,minimum:1e4,description:"%cfgBrowserIdleTimeout%"},"luban.browser.confirm":{type:"boolean",default:!0,description:"%cfgBrowserConfirm%"},"luban.browser.preview":{type:"boolean",default:!1,description:"%cfgBrowserPreview%"},"luban.computer.enabled":{type:"boolean",default:!1,description:"%cfgComputerEnabled%"},"luban.computer.confirm":{type:"boolean",default:!0,description:"%cfgComputerConfirm%"},"luban.computer.screenshotWidth":{type:"number",default:2048,minimum:320,maximum:4096,description:"%cfgComputerScreenshotWidth%"},"luban.plugins.enabled":{type:"boolean",default:!1,description:"%cfgPluginsEnabled%"},"luban.plugins.maxTools":{type:"number",default:30,minimum:1,maximum:200,description:"%cfgPluginsMaxTools%"},"luban.plugins.theme":{type:"string",default:"",description:"%cfgPluginsTheme%"},"luban.mcp.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgMcpLoadModeLazy%","%cfgMcpLoadModeEager%"],default:"lazy",description:"%cfgMcpLoadMode%"},"luban.plugins.loadMode":{type:"string",enum:["lazy","eager"],enumDescriptions:["%cfgPluginsLoadModeLazy%","%cfgPluginsLoadModeEager%"],default:"lazy",description:"%cfgPluginsLoadMode%"},"luban.plan.strictReadOnly":{type:"boolean",default:!0,description:"%cfgPlanStrictReadOnly%"},"luban.shell.confirmDangerous":{type:"boolean",default:!1,description:"%cfgShellConfirmDangerous%"},"luban.fs.allowOutsideWorkspace":{type:"boolean",default:!0,description:"%cfgFsAllowOutsideWorkspace%"},"luban.review.autoOpenDiff":{type:"boolean",default:!1,description:"%cfgReviewAutoOpenDiff%"},"luban.review.autoKeep":{type:"boolean",default:!1,description:"%cfgReviewAutoKeep%"},"luban.diagnostics.afterEdit":{type:"boolean",default:!0,description:"%cfgDiagAfterEdit%"},"luban.inlineCompletion.enabled":{type:"boolean",default:!1,description:"%cfgInlineEnabled%"},"luban.inlineCompletion.maxPerMinute":{type:"number",default:30,minimum:1,description:"%cfgInlineMaxPerMinute%"},"luban.inlineCompletion.debounceMs":{type:"number",default:250,minimum:0,description:"%cfgInlineDebounceMs%"},"luban.statusBar.enabled":{type:"boolean",default:!0,description:"%cfgStatusBarEnabled%"},"luban.mascot.avatar":{type:"boolean",default:!1,description:"%cfgMascotAvatar%"},"luban.rules.enabled":{type:"boolean",default:!0,description:"%cfgRulesEnabled%"},"luban.rules.maxChars":{type:"number",default:12e3,minimum:1e3,description:"%cfgRulesMaxChars%"},"luban.rules.indexMaxChars":{type:"number",default:2e3,minimum:200,description:"%cfgRulesIndexMaxChars%"}}}},devDependencies:{esbuild:"^0.25.0",katex:"^0.16.47",mermaid:"^11.17.2"},dependencies:{"@clack/prompts":"^1.8.1",picocolors:"^1.1.1"}}});var P=require("vscode"),de=require("fs"),xe=require("path"),Wn=require("os"),Nw=require("tls"),{execSync:OK}=require("child_process"),Xn=ym(),Fs=Qk(),EK=tx(),Rp=cx(),PK=fx(),_n=cd(),vl=qm(),zr=Px(),dp=qx(),ct=hS(),Cs=ph(),ia=av(),Ru=fv(),ra=wv(),FP=Sv(),fp=Mh(),Lw=Iv(),wl=Xv(),ht=Wm(),zE=wd(),ju=Lh(),JE=p_(),Nu=Uh(),ls=v_(),Xt=C_(),pp=W_(),{clipLine:RP}=Td(),{ARG_HINT_MAX:jK,parseToolArgs:NK,isPlaceholderArgs:LK,argString:VE,toolPath:_u,toolText:pl,applyReplace:FK,PLAN_NOT_CONNECT_FAIL:RK,PLAN_MCP_WAY_OUT:XE}=Y_(),IP=tT(),{lazyExpandedOf:DP,lazyExpand:ml,lazyExpandSig:Fw}=IP,{WEB_SINGLE_CONTENT_MAX:IK,searchBase:qP,webEngine:fo,serverBase:BP,serverCap:Hu,htmlToText:Rw,bingResultsFor:UP,formatSearchResults:m0,sourcesPayload:YE,parseWebMention:$P}=iT(),WP=cT(),{validateServerTools:DK,ocrTextOf:J5,serverOcr:HP}=WP,qK=lg(),{TOOLS:KP,SKILL_TOOL:BK,RULE_TOOL:UK,RULE_TEMPLATE:$K,PLAN_TOOLS:GP,EXPLORE_TOOLS:h0,DELEGATE_TOOLS:g0}=qK,{windowFor:Iw,turnUsage:y0,usageSummary:Iu,ctxBreakdown:zP,peakContextTokens:JP,countWebTools:WK}=kT(),VP=BT(),HK=KT(),XP=tM(),KK=Tg(),Ip=XP.makeShellGuard({wsRoot:function(){return ye()},relOf:function(e){return at(e)},rec:function(e,t){return v(e,t)},tr:function(e,t){return R(e,t)},nativeConfirm:function(e,t){return Pu(e,t)},toolResult:function(e,t,n){return Pn(e,t,n)},toolErrors:ht,getBool:function(e){try{return P.workspace.getConfiguration("luban").get(e)===!0}catch{return!1}}}),{REF_READ_MAX:GK,fenceLang:zK,relPath:Rl,refTokenForPath:YP,selectionTokenForCurrent:ZP,formatSize:JK,expandReferences:Dp}=VP,Dw=lM(),{SUBAGENT_RESULT_MAX:VK,capSubagentText:mp,subagentCaveat:hp,PARALLEL_SAFE_TOOLS:XK,NO_FP_TOTAL_TOOLS:YK,SESSION_WRITE_TOOLS:ZK,fmtCtxTokens:so,fmtElapsedMs:ao,stopText:b0,turnHasWrite:qp,changedFilesOf:w0,turnHasExplore:k0,turnIsReadOnly:gp,turnHasVerify:QP,pendingTodoCount:x0,HANDOFF_HEADINGS:Tw,handoffSections:ej,handoffIncrementHint:QK,toolLogDigest:S0,messagesHaveDirBatches:qw,normRounds:ZE,sameRoundsBody:e6,agentRounds:Bp}=Dw,tj=dM(),{pathWithin:nj,delegatePathsOverlap:t6,acquireDelegateLease:rj,releaseDelegateLease:sj}=tj,dr=OM(),Hr=HM(),De=Ga(),Os=JC(),oj=ac(),QE=Qg(),Yn=c1(),n6=b1(),yp=v1(),Ar=gb(),r6=N1(),v0=U1(),ij=Z1(),Rs=Eb(),Es=CO(),Up=process.platform==="linux",s6=process.platform==="darwin",un=Up?WO():process.platform==="win32"?aE():wE(),Kr=process.platform==="win32",_0=Ra(),aj=Kr?"Windows":s6?"macOS":Up?"Linux":"\u4EC5\u652F\u6301 macOS / Windows / Linux",o6=Kr?" \u4EE5\u7BA1\u7406\u5458\u6743\u9650\u8FD0\u884C\u7684\u7A97\u53E3\u6536\u4E0D\u5230\u666E\u901A\u8FDB\u7A0B\u7684\u70B9\u51FB / \u6309\u952E\uFF08UIPI \u89C4\u5219\uFF09\uFF0C\u9700\u8981\u65F6\u8BA9\u5BBF\u4E3B App \u4E5F\u4EE5\u7BA1\u7406\u5458\u8FD0\u884C\u3002":Up?" X11 \u4F1A\u8BDD\u6700\u5B8C\u6574\uFF1BWayland \u4E0B xdotool \u53EA\u80FD\u64CD\u4F5C XWayland \u5E94\u7528\uFF0C\u539F\u751F Wayland \u7A97\u53E3\u7684\u70B9\u51FB / \u62D6\u52A8\u4E0D\u53EF\u7528\u3002\u65E0\u5934\u73AF\u5883\u8981\u5148\u8D77 Xvfb\u3002":" \u6CA1\u6709\u300C\u8F85\u52A9\u529F\u80FD\u300D\u6743\u9650\u65F6\u70B9\u51FB\u4F1A\u88AB\u7CFB\u7EDF\u9759\u9ED8\u4E22\u5F03\uFF0C\u6CA1\u6709\u300C\u5C4F\u5E55\u5F55\u5236\u300D\u6743\u9650\u65F6\u622A\u56FE\u4F1A\u5931\u8D25 \u2014\u2014 \u5206\u522B\u53BB\u7CFB\u7EDF\u8BBE\u7F6E\u7684\u9690\u79C1\u4E0E\u5B89\u5168\u6027\u91CC\u52FE\u9009\u5BBF\u4E3B App\u3002",eP=_0.UNIT_ZH,i6=_0.SCREENSHOT_NOTE,a6=_0.COMPUTER_SHOT_NOTE;function l6(e,t){let n=An(),r=n&&n.provider;if(!r||Hu(r,"ocr")!=="deepseek")return null;let s=BP(r),o=da(r);if(!s||!o)return null;let a=String(e&&e.dataUrl||"").match(/^data:([^;,]+)(;base64)?,(.*)$/);return a?HP({filename:"screenshot.jpg",mime:a[1]||"image/jpeg",base64:a[3]||""},{base:s,key:o,signal:t&&t.signal,maxChars:t&&t.maxChars}).then(function(l){return{text:l.text,items:l.pageCount,remote:!0}}).catch(function(l){return v("server_ocr_failed",{where:"computer",message:String(l&&l.message||l).slice(0,300)}),null}):null}Kr&&typeof un.setRemoteOcr=="function"&&un.setRemoteOcr(l6);function c6(){return Kr?{a:65,p:80,bang:49}:Up?{a:97,p:112,bang:49}:{a:0,p:35,bang:18}}var Gt=Yf(),Bw=AE(),u6=Cf(),lj=jE(),d6=NE(),aa=Qf(),ai=BE(),El=iy(),cj=my(),Mw=KE(),tP=GE(),f6=Ks().SKIP_DIRS,T0=Ks().isSkippedDirName,Ns=tP&&tP.version||"0.0.0",uj=process.env.LUBAN_OUT_DIR||"/tmp/luban-ide",p6=uj+"/result.json",wn=xe.join(Wn.homedir(),".luban","providers.json"),Au={startedAt:new Date().toISOString(),steps:[],acks:[]},m6=400,nP=2e3,_l=null;function dj(){try{de.mkdirSync(uj,{recursive:!0}),de.writeFileSync(p6,JSON.stringify(Au,null,2))}catch{}}function M0(){_l&&(clearTimeout(_l),_l=null),dj()}function v(e,t){Au.steps.push({step:e,at:new Date().toISOString(),...t}),Au.steps.length>nP&&Au.steps.splice(0,Au.steps.length-nP),_l||(_l=setTimeout(function(){_l=null,dj()},m6))}var cs="",fj=[];function pj(e,t){let n=String(e??"auto").toLowerCase();if(n==="en")return"en";if(n==="ja"||n.slice(0,2)==="ja")return"ja";if(n.slice(0,2)==="zh")return"zh-cn";let r=String(t||"").toLowerCase();return r.slice(0,2)==="zh"?"zh-cn":r.slice(0,2)==="ja"?"ja":"en"}function Il(){let e="auto";try{e=P.workspace.getConfiguration("luban").get("language")}catch{}return pj(e,P.env&&P.env.language)}function R(e,t){return cj.t(e,t)}function bp(e){cs=cj.setLang(Il()),Fs.setUntitled(R("store.untitled")),y6();try{Cr&&Cr.fire()}catch{}try{z0()}catch{}return v("language_applied",{lang:cs,reason:e||""}),cs}function h6(e){for(let t of fj.splice(0))try{t(e)}catch{}}function g6(e){return new Promise(function(t){let n=!1,r=setTimeout(function(){n||(n=!0,t(null))},e||8e3);fj.push(function(s){n||(n=!0,clearTimeout(r),t(s))})})}function y6(){let e=[ze&&ze.webview,Ie&&Ie.webview,dn&&dn.webview];for(let t of e)if(t)try{t.postMessage({type:"lang",lang:cs})}catch(n){v("broadcast_lang_failed",{message:n.message})}}function b6(){let e=[ze&&ze.webview,Ie&&Ie.webview],t=_j();for(let n of e)if(n)try{n.postMessage(t)}catch(r){v("broadcast_workspace_failed",{message:r.message})}}var mj={defaultModel:"deepseek::deepseek-flash",providers:[{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",apiKeyEnv:"DEEPSEEK_API_KEY",webSearch:{baseUrl:"https://api.deepseek.com/v1/tools",count:8},models:[{id:"deepseek-flash",name:"DeepSeek Flash",maxInputTokens:65536,maxOutputTokens:8192,toolCalling:!0}]}]},jr=mj,Pl="builtin",Is=Object.create(null),Ms=null,Lu=[],hj=40,Uw=Object.create(null),rP=new Map;function w6(e){for(let t of e.providers||[])!t||!Array.isArray(t.models)||(t.models=t.models.map(function(n){return typeof n=="string"?{id:n,name:n}:(n&&typeof n=="object"&&!n.id&&n.name&&(n.id=String(n.name)),n)}).filter(function(n){return n&&typeof n=="object"&&n.id}));return e}function $p(){try{let e=JSON.parse(de.readFileSync(wn,"utf8"));if(e&&Array.isArray(e.providers)&&e.providers.length){jr=w6(e),Pl=wn,v("config_loaded",{source:wn,providers:e.providers.map(t=>t.id),models:pn().length});return}}catch(e){v("config_load_failed",{message:e.message,path:wn})}jr=mj,Pl="builtin"}function k6(){let e=[];for(let t of jr.providers||[])for(let n of t.models||[])e.push({provider:t,model:n});return e}function pn(){let e=k6(),t={};for(let n of e)t[n.model.id]=(t[n.model.id]||0)+1;return e.map(n=>({key:t[n.model.id]>1?n.provider.id+"::"+n.model.id:n.model.id,provider:n.provider,model:n.model}))}function An(e){let t=pn(),n=String(e||"");return t.find(r=>r.key===n)||t.find(r=>r.provider.id+"::"+r.model.id===n)||t.find(r=>r.model.id===n)||t.find(r=>r.key===jr.defaultModel)||t.find(r=>r.provider.id+"::"+r.model.id===jr.defaultModel)||t[0]}function ua(){let e=An(jr.defaultModel);return e?e.key:""}function x6(e){try{let t=de.readFileSync(xe.join(Wn.homedir(),".hermes",".env"),"utf8");for(let n of t.split(`
|
|
1457
1457
|
`)){let r=n.match(new RegExp("^\\s*"+e+"\\s*=\\s*(.+)\\s*$"));if(r)return r[1].trim().replace(/^["']|["']$/g,"")}}catch{}return""}function Ku(e){let t=e&&e.apiKeyEnv;return t?process.env[t]?String(process.env[t]).trim():x6(t):""}function A0(e){if(!e)return"";if(e.apiKey)return String(e.apiKey);let t=Is[e.id];return t?String(t):Ku(e)}var C0="luban-local";function S6(e){let t="";try{t=new URL(String(e||"")).hostname.toLowerCase()}catch{return!1}return t?t==="localhost"||t==="::1"||t==="[::1]"||t==="0.0.0.0"?!0:/^127\./.test(t):!1}function Gu(e){return e?e.keyless===!0?!0:S6(e.baseUrl):!1}function da(e){let t=A0(e);return t||(Gu(e)?C0:"")}function gj(e){return String(e.baseUrl||"").replace(/\/+$/,"")+"/chat/completions"}var $w=2e4,v6="https://cn.bing.com/search",yj="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36",Aw=2*1024*1024;function O0(e){if(!e)return"";let t=e.inlineCompletion;if(t&&t.baseUrl)return String(t.baseUrl).replace(/\/+$/,"");let n=String(e.baseUrl||"").replace(/\/+$/,"");return/api\.deepseek\.com/i.test(n)?n.replace(/\/v1$/,"")+"/beta":""}async function bj(e){let t=e||{},n=An(t.modelKey);if(!n)throw new Error("\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u914D\u7F6E");let r=O0(n.provider);if(!r)throw new Error("\u5F53\u524D provider \u672A\u914D\u7F6E FIM \u8865\u5168\uFF08providers.json \u91CC\u52A0 inlineCompletion.baseUrl\uFF09");let s=da(n.provider);if(!s)throw new Error("provider "+n.provider.id+" \u7F3A\u5C11 API key");let o=n.provider.inlineCompletion||{},i=Lw.buildPrompt({path:t.path,text:t.text,offset:t.offset,prefixLines:o.prefixLines,suffixLines:o.suffixLines,maxChars:o.maxPromptChars}),a={model:String(o.model||"deepseek-chat"),prompt:i.prompt,suffix:i.suffix,max_tokens:Math.min(Math.max(Math.floor(Number(o.maxTokens))||256,16),2048),stream:!1},l=Math.max(500,Number(o.timeoutMs)||3e3),c=new AbortController,u=zu(t.signal);u.signal&&(u.isCancelled()?c.abort():u.signal.addEventListener("abort",function(){c.abort()}));let d=setTimeout(function(){try{c.abort()}catch{}},l);try{let f=await fetch(r+"/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+s},body:JSON.stringify(a),signal:c.signal});if(!f.ok){let w=await f.text();throw new Error("FIM HTTP "+f.status+": "+String(w).slice(0,160))}let p=await f.json(),m=p&&p.choices&&p.choices[0],h=String(m&&(m.text||m.message&&m.message.content)||"");return{text:Lw.trimCompletion(h,i.suffix),rawChars:h.length,model:a.model,promptChars:i.prompt.length,suffixChars:i.suffix.length,usage:p&&p.usage||null}}finally{clearTimeout(d)}}function wj(e,t){let n="";try{let o=JSON.parse(t);o&&o.error&&o.error.message&&(n=String(o.error.message))}catch{}let r={400:"\u8BF7\u6C42\u6216\u53C2\u6570\u4E0D\u5408\u6CD5",401:"API key \u7F3A\u5931\u6216\u65E0\u6548",402:"\u8D26\u53F7\u4F59\u989D\u4E0D\u8DB3",403:"\u8BF7\u6C42\u88AB\u5B89\u5168\u7B56\u7565\u62D2\u7EDD",404:"\u672A\u80FD\u83B7\u53D6\u53EF\u7528\u7684\u7F51\u9875\u5185\u5BB9",408:"\u8BFB\u53D6\u8BF7\u6C42\u4F53\u8D85\u65F6",413:"\u8BF7\u6C42\u4F53\u8D85\u8FC7\u5927\u5C0F\u9650\u5236",429:"\u8D85\u8FC7\u8054\u7F51\u63A5\u53E3 QPS \u9650\u901F",500:"\u670D\u52A1\u7AEF\u5185\u90E8\u9519\u8BEF",504:"\u4E0B\u6E38\u8BF7\u6C42\u8D85\u65F6"};return"\u8054\u7F51\u63A5\u53E3 HTTP "+e+(r[e]?"\uFF08"+r[e]+"\uFF09":"")+(n?"\uFF1A"+n.slice(0,200):"")}function zu(e){if(!e)return{signal:null,isCancelled:function(){return!1}};if(typeof e.aborted=="boolean"&&typeof e.addEventListener=="function")return{signal:e,isCancelled:function(){return e.aborted}};if(typeof e.onCancellationRequested=="function"){let t=new AbortController,n=!!e.isCancellationRequested;if(n)t.abort();else try{e.onCancellationRequested(function(){n=!0,t.abort()})}catch{}return{signal:t.signal,isCancelled:function(){return n}}}return{signal:null,isCancelled:function(){return!1}}}function kj(e){let t=new AbortController,n=zu(e&&e.signal),r=e&&e.timeoutMs||$w,s=setTimeout(function(){t.abort()},r);return n.signal&&(n.isCancelled()?t.abort():n.signal.addEventListener("abort",function(){t.abort()})),{ctrl:t,outer:n,timer:s,ms:r}}async function xj(e,t,n,r){let s=r||{},o=qP(n&&n.provider);if(!o)throw new Error("\u5F53\u524D provider \u672A\u914D\u7F6E\u8054\u7F51\u641C\u7D22\uFF08providers.json \u91CC\u52A0 webSearch.baseUrl\uFF09");let i=da(n.provider);if(!i)throw new Error("provider "+n.provider.id+" \u7F3A\u5C11 API key\uFF08apiKey \u6216 apiKeyEnv="+n.provider.apiKeyEnv+"\uFF09");let a=new AbortController,l=zu(s.signal),c=setTimeout(function(){a.abort()},s.timeoutMs||$w);l.signal&&(l.isCancelled()?a.abort():l.signal.addEventListener("abort",function(){a.abort()}));let u,d;try{u=await fetch(o+e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+i},body:JSON.stringify(t),signal:a.signal}),d=await u.text()}catch(f){throw f&&f.name==="AbortError"?new Error(l.isCancelled()?"\u8054\u7F51\u8BF7\u6C42\u5DF2\u53D6\u6D88":"\u8054\u7F51\u8BF7\u6C42\u8D85\u65F6\uFF08"+Math.round((s.timeoutMs||$w)/1e3)+"s\uFF09"):new Error("\u8054\u7F51\u8BF7\u6C42\u5931\u8D25\uFF1A"+(f&&f.message?f.message:String(f)))}finally{clearTimeout(c)}if(!u.ok)throw v("web_http_error",{endpoint:e,status:u.status,body:String(d).slice(0,300)}),new Error(wj(u.status,d));try{return JSON.parse(d)}catch{throw new Error("\u8054\u7F51\u63A5\u53E3\u8FD4\u56DE\u4E86\u975E JSON \u5185\u5BB9\uFF1A"+String(d).slice(0,120))}}async function _6(e,t,n){let r=n||{};if(!t)throw new Error("\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u914D\u7F6E");let s=String(e??"").replace(/\s+/g," ").trim().slice(0,128);if(!s)throw new Error("\u641C\u7D22\u8BCD\u4E3A\u7A7A");let o=t.provider.webSearch&&t.provider.webSearch.count||8,i=typeof r.count=="number"&&isFinite(r.count)?r.count:o;i=Math.min(Math.max(Math.round(i)||8,1),50);let a={query:s,count:i,need_content:!!r.needContent},l=String(r.oriQuestion==null?"":r.oriQuestion).replace(/\s+/g," ").trim().slice(0,128);l&&(a.ori_question=l);let c=await xj("/search",a,t,r),u=Array.isArray(c&&c.results)?c.results:[];return v("web_search",{provider:t.provider.id,query:s,count:i,needContent:!!r.needContent,results:u.length}),{query:s,results:u}}async function T6(e,t,n){if(!t)throw new Error("\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u914D\u7F6E");let r=String(e??"").trim();if(!/^https?:\/\/\S+$/i.test(r))throw new Error("url \u5FC5\u987B\u662F http/https \u5730\u5740\uFF1A"+r.slice(0,120));if(r.length>8192)throw new Error("url \u8FC7\u957F\uFF08\u4E0A\u9650 8192 \u5B57\u7B26\uFF09");let s=await xj("/fetch",{url:r},t,n||{}),o=String(s&&s.title||""),i=String(s&&s.content||""),a=n&&n.maxChars||12e3,l=i.length>a?i.slice(0,a)+`
|
|
1458
1458
|
\u2026[\u6B63\u6587\u5DF2\u622A\u65AD]`:i;return v("web_fetch",{provider:t.provider.id,url:r.slice(0,200),title:o,chars:i.length}),{url:r,title:o,content:l,fullChars:i.length}}async function M6(e,t){let n=t||{},r=String(e??"").replace(/\s+/g," ").trim().slice(0,128);if(!r)throw new Error("\u641C\u7D22\u8BCD\u4E3A\u7A7A");let s=typeof n.count=="number"&&isFinite(n.count)?n.count:n.cfgCount||8;s=Math.min(Math.max(Math.round(s)||8,1),50);let o=v6+"?q="+encodeURIComponent(r)+"&count="+s+"&format=rss",i=kj(n),a,l;try{a=await fetch(o,{headers:{"User-Agent":yj,Accept:"application/rss+xml, application/xml, text/xml, */*"},signal:i.ctrl.signal}),l=await a.text()}catch(u){throw u&&u.name==="AbortError"?new Error(i.outer.isCancelled()?"\u8054\u7F51\u8BF7\u6C42\u5DF2\u53D6\u6D88":"Bing \u641C\u7D22\u8D85\u65F6\uFF08"+Math.round(i.ms/1e3)+"s\uFF09"):new Error("Bing \u641C\u7D22\u8BF7\u6C42\u5931\u8D25\uFF1A"+(u&&u.message?u.message:String(u)))}finally{clearTimeout(i.timer)}if(!a.ok)throw v("web_http_error",{endpoint:"bing/search",status:a.status,body:String(l).slice(0,300)}),new Error("Bing \u641C\u7D22 HTTP "+a.status+"\uFF08\u53EF\u80FD\u88AB\u9650\u6D41\u6216\u670D\u52A1\u4E0D\u53EF\u7528\uFF0C\u7A0D\u540E\u518D\u8BD5\uFF09");let c=UP(l).slice(0,s);if(!c.length){let u=new Error("Bing \u6CA1\u6709\u8FD4\u56DE\u641C\u7D22\u7ED3\u679C\uFF08\u67E5\u8BE2\u65E0\u7ED3\u679C\u6216 RSS \u6682\u4E0D\u53EF\u7528\uFF09");throw u.noResults=!0,u}if(n.needContent)try{let u=await Sj(c[0].url,{signal:n.signal,timeoutMs:8e3,maxChars:IK,providerId:n.providerId});u&&u.content&&(c[0].content=u.content)}catch{}return v("web_search",{provider:n.providerId||"",engine:"bing",query:r,count:s,needContent:!!n.needContent,results:c.length}),{query:r,results:c}}async function Sj(e,t){let n=t||{},r=String(e??"").trim();if(!/^https?:\/\/\S+$/i.test(r))throw new Error("url \u5FC5\u987B\u662F http/https \u5730\u5740\uFF1A"+r.slice(0,120));if(r.length>8192)throw new Error("url \u8FC7\u957F\uFF08\u4E0A\u9650 8192 \u5B57\u7B26\uFF09");let s=kj(n),o,i;try{o=await fetch(r,{redirect:"follow",headers:{"User-Agent":yj,Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,text/markdown;q=0.9,text/plain;q=0.8,*/*;q=0.5"},signal:s.ctrl.signal});let d=String(o.headers.get("content-type")||"").toLowerCase();if(d&&!/text\/html|application\/xhtml|text\/plain|application\/xml|text\/xml|text\/(x-)?markdown|application\/(x-)?markdown/.test(d))throw new Error("\u4E0D\u652F\u6301\u7684\u7F51\u9875\u7C7B\u578B\uFF1A"+d.split(";")[0]);if(Number(o.headers.get("content-length")||0)>Aw)throw new Error("\u7F51\u9875\u8FC7\u5927\uFF08\u8D85\u8FC7 2MB\uFF09");i=await o.text()}catch(d){throw d&&d.message&&/^(不支持的网页类型|网页过大)/.test(d.message)?d:d&&d.name==="AbortError"?new Error(s.outer.isCancelled()?"\u8054\u7F51\u8BF7\u6C42\u5DF2\u53D6\u6D88":"\u7F51\u9875\u6293\u53D6\u8D85\u65F6\uFF08"+Math.round(s.ms/1e3)+"s\uFF09"):new Error("\u7F51\u9875\u6293\u53D6\u5931\u8D25\uFF1A"+(d&&d.message?d.message:String(d)))}finally{clearTimeout(s.timer)}if(!o.ok)throw v("web_http_error",{endpoint:"direct/fetch",status:o.status,body:r.slice(0,120)}),new Error("\u7F51\u9875\u6293\u53D6 HTTP "+o.status);i.length>Aw&&(i=i.slice(0,Aw));let a=Rw((i.match(/<title[^>]*>([\s\S]*?)<\/title>/i)||[])[1]||"").slice(0,200);if(!a){let d=i.match(/^\s{0,3}#\s+(.+)$/m);d&&(a=d[1].trim().slice(0,200))}let l=Rw(i),c=n.maxChars||12e3,u=l.length>c?l.slice(0,c)+`
|
|
1459
1459
|
\u2026[\u6B63\u6587\u5DF2\u622A\u65AD]`:l;return v("web_fetch",{provider:n.providerId||"",engine:"bing",url:r.slice(0,200),title:a,chars:l.length}),{url:r,title:a,content:u,fullChars:l.length}}async function E0(e,t,n){if(!t)throw new Error("\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u914D\u7F6E");let r=fo(t.provider);if(r==="deepseek")return _6(e,t,n);if(r==="bing")return M6(e,Object.assign({},n||{},{cfgCount:t.provider.webSearch&&t.provider.webSearch.count||8,providerId:t.provider.id}));throw new Error("\u5F53\u524D provider \u5DF2\u7981\u7528\u8054\u7F51\u641C\u7D22\uFF08providers.json \u91CC webSearch.disabled=true\uFF09")}async function P0(e,t,n){if(!t)throw new Error("\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u914D\u7F6E");let r=fo(t.provider);if(r==="deepseek")return T6(e,t,n);if(r==="bing")return Sj(e,Object.assign({},n||{},{providerId:t.provider.id}));throw new Error("\u5F53\u524D provider \u5DF2\u7981\u7528\u8054\u7F51\u6293\u53D6\uFF08providers.json \u91CC webSearch.disabled=true\uFF09")}async function vj(e,t,n){let r=n||{},s=e||"\u5F53\u524D\u6700\u65B0\u7684\u6280\u672F\u65B0\u95FB",o;try{o=await E0(s,t,{signal:r.signal,oriQuestion:e})}catch(l){if(l&&l.noResults)o={query:String(s).replace(/\s+/g," ").trim().slice(0,128),results:[]};else throw l}if(r.onSearch)try{r.onSearch(o)}catch{}let i={deepseek:"DeepSeek Search",bing:"Bing \u641C\u7D22"}[fo(t&&t.provider)]||"",a=["\u3010\u8054\u7F51\u641C\u7D22\u7ED3\u679C\u3011"+(i?"\u7531 "+i+" \u8FD4\u56DE\uFF0C":"")+"\u68C0\u7D22\u8BCD\uFF1A"+o.query,m0(o.results,o.query),"","\u5F15\u7528\u8981\u6C42\uFF1A\u56DE\u7B54\u65F6\u7528 [n] \u6807\u6CE8\u5BF9\u5E94\u7684\u641C\u7D22\u7ED3\u679C\u7F16\u53F7\uFF1B\u5982\u679C\u8FD9\u4E9B\u7ED3\u679C\u4E0D\u8DB3\u4EE5\u56DE\u7B54\uFF0C\u53EF\u4EE5\u518D\u8C03\u7528 web_search \u6362\u5173\u952E\u8BCD\uFF0C\u6216\u7528 web_fetch \u7EC6\u8BFB\u67D0\u4E2A URL\uFF1B\u4E0D\u786E\u5B9A\u7684\u4FE1\u606F\u8981\u660E\u786E\u8BF4\u660E\u3002"].join(`
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@luban-code/luban-code",
|
|
3
3
|
"displayName": "Luban",
|
|
4
4
|
"description": "Luban — a standalone sidebar AI coding agent (multi-provider, OpenAI-compatible, zero source patches)",
|
|
5
|
-
"version": "1.152.
|
|
5
|
+
"version": "1.152.2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "eppen (liuhualiang)",
|