@tencent-ai/codebuddy-code 2.114.3-dev.f8e241a.202607021848 → 2.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/codebuddy-headless.js +58 -58
- package/dist/codebuddy.js +80 -80
- package/dist/web-ui/assets/{index-DN9CDKrB.js → index-i5iGMXx3.js} +1 -1
- package/dist/web-ui/index.html +1 -1
- package/dist/web-ui/sw.js +1 -1
- package/lib/node/index.js +30 -0
- package/package.json +2 -3
- package/product.cloudhosted.json +2 -2
- package/product.internal.json +2 -2
- package/product.ioa.json +2 -2
- package/product.json +2 -2
- package/product.selfhosted.json +2 -2
|
@@ -677,7 +677,7 @@ WARNING: This link could potentially be dangerous`)){const f=window.open();if(f)
|
|
|
677
677
|
示例:/goal 所有测试通过`,"goal.status.tooLong":"目标条件长度上限 {max} 字符(当前 {actual})","goal.status.hooksDisabled":"/goal 在 Hooks 被禁用时不可用(settings 中关闭了 disableAllHooks 或 allowManagedHooksOnly)。","goal.status.set":"已设置目标:{condition}","goal.status.setReplaced":"替换目标:{prev} → {condition}","goal.status.cleared":"已清除目标:{prev}","goal.status.noGoal":"当前无目标","goal.status.active":"当前目标:{condition}","goal.progress.title":"目标尚未达成… 继续","goal.progress.expand":"点击展开","goal.progress.condition":"目标","goal.progress.reason":"原因","goal.recap.active":"当前活跃目标","goal.recap.achieved":"目标已达成","goal.recap.impossible":"目标无法达成","goal.recap.empty.title":"暂未设置目标","goal.recap.empty.hint":"使用 /goal <条件> 设置一个会话级停止条件。","goal.recap.empty.example":"示例:/goal 所有测试通过","goal.recap.footer.setAnother":"/goal <条件>","goal.recap.footer.toSetAnother":" 设置新目标 · ","goal.recap.footer.escDismiss":"关闭","goal.recap.stats.turn":"轮","goal.recap.stats.turns":"轮","goal.recap.stats.token":"token","goal.recap.stats.tokens":"tokens"},en:{"app.connecting":"Connecting to CodeBuddy Code...","app.connectFailed":"Connection failed","app.retry":"Retry","app.pwa.newVersion":"A new Web UI version is available","app.pwa.reloadNow":"Reload now","app.pwa.reloadLater":"Later","app.pwa.reloadedAfterIdle":"Updated to new version","chat.empty.title":"CodeBuddy Code","chat.empty.subtitle":"How can I help you today?","chat.empty.slogan":"Claw Your Ideas . Into Reality","chat.empty.tag.slides":"Slide Generation","chat.empty.tag.research":"Deep Research","chat.empty.tag.docs":"Document Processing","chat.empty.tag.data":"Data Analysis","chat.thinking":"Thinking","chat.waitingPermission":"Waiting for permission","chat.waitingUser":"Waiting for user","chat.error":"Error","chat.sessionEnded":"Session ended","chat.stopped":"Stopped","chat.scrollToLatest":"Scroll to latest","chat.error.refusal":"The agent refused to continue execution. This may be due to content policy restrictions or other limitations.","chat.error.network":"Network connection failed or the service is temporarily unavailable. Please try again later.","chat.error.auth":"Authentication failed or insufficient permissions. Please sign in again and retry.","chat.error.quota":"Quota limit reached or too many requests. Please try again later.","chat.error.modelService":"The model service returned an error. Please retry or try again later.","chat.error.cancelled":"Request was cancelled. This can happen after system sleep or network interruption. Please try again.","chat.error.maxTokens":"Response was truncated due to reaching the maximum token limit. You may continue the conversation or ask for a more concise response.","chat.error.maxTurnRequests":"The maximum number of model requests per turn has been exceeded. You may send a new message to continue.","chat.newChat":"New Chat","chat.disclaimer":"Answers generated by AI are for reference only","chat.compacted":"Conversation compacted","chat.compacting":"Compacting conversation...","chat.compactCancelled":"Compaction cancelled","phase.preparing":"Preparing","phase.modelRequesting":"Waiting for model","phase.modelStreaming":"Streaming","phase.modelDone":"Processing","phase.toolExecuting":"Running tool","phase.modelStreamingTool":"Writing","phase.retrying":"Retrying","progress.compacting":"Compacting context","input.placeholder":"Start from an idea...","input.placeholderRunning":"Messages will be queued...","input.placeholderPending":"Please handle the permission request first...","input.send":"Send (Enter)","input.stop":"Stop","input.thinking":"Thinking","input.deepThinking":"Deep Thinking","input.promptFailed":"Prompt failed","input.sendQueued":"Send queued (Enter)","input.dropHint":"Drop files here","input.addImage":"Add image","input.addFile":"Add file","input.imageTooLarge":"Image must be under 10MB","input.tooManyImages":"Up to 5 images allowed","input.fileTooLarge":"File must be under 1MB","input.tooManyFiles":"Up to 10 files allowed","input.menu.image":"Image","input.menu.file":"File","input.menu.mode":"Mode","input.menu.model":"Model","input.modeSelector":"Mode","input.modelSelector":"Model","input.deepThinkingDesc":"Let the model reason more deeply before answering","input.modelHeader":"Model","mode.default":"Default","mode.default.desc":"Prompts for permission on first use of each tool","mode.acceptEdits":"Accept Edits","mode.acceptEdits.desc":"Automatically accepts file edit permissions for the session","mode.plan":"Plan","mode.plan.desc":"Can analyze but not modify files or execute commands","mode.auto":"Auto","mode.auto.desc":"An AI classifier reviews actions: safe ones are auto-approved, risky ones are denied. Falls back to prompting if unavailable","mode.dontAsk":"Don't Ask","mode.dontAsk.desc":"Never shows permission prompts; runs pre-approved and safe actions, denies anything requiring approval","mode.bypassPermissions":"Bypass Permissions","mode.bypassPermissions.desc":"Skips all permission prompts","input.newline":"New line","input.contextMenu.newline":"New line","input.contextMenu.send":"Send","queue.more":" more queued","status.running":"Running","tool.writeFile":"Write file","tool.readFile":"Read file","tool.execute":"Execute","tool.searchFiles":"Search files","tool.searchContent":"Search content","tool.fetchWeb":"Fetch web","tool.searchWeb":"Search web","tool.defaultName":"Tool","tool.moreItems":"... {count} more","interruption.title":"Permission Required","interruption.tool":"Tool","interruption.allow":"Allow","interruption.allowAll":"Allow All","interruption.deny":"Deny","interruption.approved":"Approved","interruption.denied":"Denied","interruption.edits":"{count} edits","interruption.yes":"Yes","interruption.keepPlanning":"No, keep planning","interruption.exitPlanMode":"Exit plan mode","interruption.readyToCode":"Ready to code?","theme.light":"Light","theme.dark":"Dark","theme.system":"System","locale.zh":"Chinese","locale.en":"English","locale.system":"System","sidebar.nav.plugins":"Plugins","sidebar.nav.tasks":"Tasks","sidebar.search.placeholder":"Search...","sidebar.chatHistory":"Chat History","sidebar.workspace":"Workspace","sidebar.connectionStatus":"Connection Status","sidebar.status":"Status","sidebar.sessionId":"Session ID","sidebar.notConnected":"Not connected","sidebar.modelSelection":"Model Selection","sidebar.noModels":"No models available","sidebar.environment":"Environment","sidebar.cwd":"Working Directory","sidebar.os":"OS","sidebar.nodeVersion":"Node.js","sidebar.gatewayMode":"Gateway Mode","sidebar.tunnelUrl":"Tunnel URL","sidebar.clickToCopy":"Click to copy","sidebar.copied":"Copied","sidebar.permissionMode":"Permission Mode","sidebar.noModes":"No modes available","sidebar.preferences":"Preferences","sidebar.toggle":"Toggle Sidebar","sidebar.keybindings":"Keybindings","sidebar.group.workspace":"Workspace","sidebar.group.observability":"Observability","sidebar.group.preferences":"Preferences","bottomSheet.attachments":"Attach","bottomSheet.navigation":"Navigate","sidebar.theme":"Theme","sidebar.language":"Language","sidebar.user":"User","sidebar.authMethod":"Password","sidebar.noAuth":"No Auth","sidebar.version":"Remote UI v1.0","connection.connected":"Connected","connection.connecting":"Connecting","connection.disconnected":"Disconnected","connection.error":"Error","message.copyToClipboard":"Copy to clipboard","message.copied":"Copied","message.copy":"Copy","message.assistantName":"CodeBuddy Code","thinking.title":"Thinking Process","thinking.thinking":"Thinking","thinking.done":"Thought for","thinking.seconds":" {n}s","thinking.expand":"Expand","thinking.collapse":"Collapse","diff.noChanges":"No changes","login.title":"CodeBuddy Remote Control","login.subtitle":"Enter the password shown in your terminal","login.placeholder":"Password","login.submit":"Login","login.error.incorrect":"Incorrect password","login.error.rateLimit":"Too many login attempts. Please try again later.","login.error.required":"Password is required","login.hint.password":"Tip: The password is displayed when the server starts.","login.hint.urlAuth":"You can also use <code>?password=xxx</code> to login automatically.","login.hint.disable":'Or set <code>gateway.auth: "none"</code> in <code>settings.json</code> under the CodeBuddy config directory (defaults to <code>~/.codebuddy</code>; override via the <code>CODEBUDDY_CONFIG_DIR</code> environment variable) to disable.',"login.slogan":"Claw Your Ideas . Into Reality","login.tagline":"Triggered Anywhere, Completed Locally.","login.privacy":"Privacy Policy","login.terms":"Terms of Service","sidebar.interactionMode":"Interaction Mode","sidebar.chatMode":"Chat","sidebar.terminalMode":"Terminal","sidebar.canvas":"Canvas","canvas.title":"Infinite Canvas","canvas.addTerminal":"Add Terminal","canvas.zoomIn":"Zoom In","canvas.zoomOut":"Zoom Out","canvas.fitView":"Fit View","canvas.resetView":"Reset View","canvas.empty":"Click the + button in the toolbar to add a terminal","canvas.openStandalone":"Open canvas in new window","canvas.tileMenu.close":"Close","canvas.tileMenu.duplicate":"Duplicate Terminal","canvas.tileMenu.maximize":"Maximize","canvas.tileMenu.minimize":"Minimize","canvas.tileMenu.restore":"Restore","canvas.tileMenu.openStandalone":"Open in new window","canvas.standalone.missingPaneId":"Missing pane ID","canvas.defaultTitle":"Terminal","terminal.connecting":"Connecting terminal...","terminal.title":"Terminal","terminal.disconnected":"Terminal disconnected","terminal.error":"Terminal connection failed","terminal.reconnect":"Reconnect","terminal.splitHorizontal":"Split Right","terminal.splitVertical":"Split Down","terminal.closePane":"Close Terminal","terminal.close":"Close","terminal.closeOthers":"Close Others","terminal.closeToRight":"Close to the Right","terminal.closeAll":"Close All","terminal.maxPanes":"Max panes reached","sidebar.instances":"Instances","sidebar.activeInstances":"active instances","sidebar.manageInstances":"Manage Instances","sidebar.remoteControl":"Channels","instance.title":"Instance List","instance.switch":"Instance","instance.switchTitle":"Switch Instance","instance.current":"Current","instance.manual":"Manual","instance.switchTo":"Switch to this instance","instance.manage":"Manage Instances","instance.managerTitle":"Instance Manager","instance.addInstance":"Add Instance","instance.name":"Instance Name","instance.namePlaceholder":"Custom instance name (optional, defaults to directory name)","instance.url":"Instance URL","instance.urlPlaceholder":"https://example.trycloudflare.com","instance.password":"Password","instance.optional":"Optional","instance.passwordPlaceholder":"Access password","instance.cancel":"Cancel","instance.add":"Add","instance.remove":"Remove this instance","instance.noInstances":"No other instances","instance.noInstancesHint":"Start more CodeBuddy Code instances or add remote instances manually","instance.cwd":"Working Directory","instance.topic":"Topic","instance.startedAt":"Started at","instance.local":"Local","instance.tunnel":"Tunnel","instance.uptime.days":"d ago","instance.uptime.hours":"h ago","instance.uptime.minutes":"m ago","instance.uptime.justNow":"Just now","instance.addError":"Failed to add instance","instance.removeError":"Failed to remove instance","instance.copyUrl":"Copy URL","instance.copied":"Copied","instance.subtitle":"Manage and switch between instances","instance.refresh":"Refresh","instance.refreshed":"Refreshed","instance.loading":"Loading instances...","instance.error":"Failed to load instances","instance.retry":"Retry","question.multiple":"multiple","question.customAnswer":"Or type a custom answer...","question.reviewAnswers":"Review answers","question.singleTitle":"Question","question.titleWithCount":"Questions ({count})","question.reviewTab":"Review","question.next":"Next","question.submit":"Submit","question.cancel":"Cancel","question.answered":"Answered","question.cancelled":"Question cancelled","todo.title":"Tasks","todo.executing":"Task {n} executing","todo.untitled":"Untitled","history.title":"Sessions","history.description":"Click a session to switch to that conversation","history.noData":"No sessions","history.noDataHint":"Start a new conversation","history.backToChat":"Back to Chat","history.loading":"Loading...","history.loadError":"Failed to load","history.retry":"Retry","history.current":"Current","history.messages":"{count} messages","history.delete":"Delete","history.deleteConfirm":"Are you sure you want to delete this session?","history.deleteCancel":"Cancel","history.deleteOk":"Delete","history.rename":"Rename","history.renameTitle":"Rename Session","history.renamePlaceholder":"Enter new name","history.renameCancel":"Cancel","history.renameOk":"OK","history.cannotDeleteCurrent":"Cannot delete current session","settings.title":"Preferences","settings.appearance":"Appearance","settings.model":"Model Selection","settings.mode":"Permission Mode","settings.systemInfo":"System Info","settings.backToChat":"Back to Chat","settings.tab.user":"User","settings.tab.project":"Project","settings.group.modelAndReasoning":"Model & Reasoning","settings.group.behavior":"Behavior","settings.group.memory":"Memory","settings.group.language":"Language","settings.group.advanced":"Advanced","settings.group.sandbox":"Security Sandbox","settings.item.model":"Default Model","settings.item.model.desc":"Set the default AI model","settings.item.reasoningEffort":"Reasoning Effort","settings.item.reasoningEffort.desc":"Control model reasoning depth","settings.item.alwaysThinkingEnabled":"Always Enable Thinking","settings.item.autoCompactEnabled":"Auto Compact Context","settings.item.includeCoAuthoredBy":"Include Co-authored-by","settings.item.fileCheckpointingEnabled":"File Checkpointing","settings.item.fileCheckpointingEnabled.desc":"Enable file version rollback","settings.item.promptSuggestionEnabled":"Prompt Suggestions","settings.item.ignoreGitIgnore":"Ignore .gitignore","settings.item.ignoreGitIgnore.desc":"Ignore .gitignore rules when searching","settings.item.deferToolLoading":"Defer Tool Loading","settings.item.hookOutputCollapsed":"Collapse Hook Output","settings.item.memory.enabled":"Enable Memory","settings.item.memory.autoMemoryEnabled":"Auto Memory","settings.item.memory.autoMemoryEnabled.desc":"Auto-save important info to memory","settings.item.language":"Response Language","settings.item.language.desc":"Language for AI responses","settings.item.cleanupPeriodDays":"Chat History Retention (days)","settings.item.imageHistoryRetainRounds":"Image Retention Rounds","settings.item.imageHistoryRetainRounds.desc":"Rounds to retain images in history","settings.item.env":"Environment Variables","settings.item.env.desc":"Variables applied to each session (JSON)","settings.item.sandbox.enabled":"Enable Sandbox","settings.item.sandbox.enabled.desc":"Run Bash commands in sandbox, restrict file and network access","settings.item.sandbox.autoAllowBashIfSandboxed":"Auto-approve in Sandbox","settings.item.sandbox.autoAllowBashIfSandboxed.desc":"Auto-approve commands when running in sandbox","settings.loading":"Loading...","settings.saved":"Saved","settings.saveFailed":"Save failed","settings.notSet":"Not set","settings.default":"Default","settings.reset":"Reset","settings.noProjectSettings":"No project-level settings available","settings.effort.minimal":"Minimal","settings.effort.low":"Low","settings.effort.medium":"Medium","settings.effort.high":"High","settings.effort.xhigh":"Extra High","settings.effort.max":"Max","page.title":"CodeBuddy Code","tool.processExited":"[Process exited]","tool.itemsCount":"{count} items","tool.showAllItems":"Show all {count} items","tool.moreLinesCount":"... {count} more lines","tool.generatedImage":"Generated image","tool.editedImage":"Edited image","tool.imageGen":"ImageGen","tool.imageEdit":"ImageEdit","tool.toolSearch":"ToolSearch","tool.teamCreate":"TeamCreate","tool.teamDelete":"TeamDelete","tool.taskCreate":"TaskCreate","tool.taskUpdate":"TaskUpdate","tool.taskList":"TaskList","tool.taskGet":"TaskGet","tool.sendMessage":"SendMessage","tool.shutdown":"Shutdown","tool.taskCompleted":"Task completed","tool.shutdownRejected":"Shutdown rejected","tool.planResponse":"Plan response","tool.approved":"approved","tool.rejected":"rejected","tool.userRejectedResult":"User rejected this tool use","tool.webSearch":"WebSearch","tool.webFetch":"WebFetch","tool.saveMemory":"SaveMemory","tool.askUserQuestion":"AskUserQuestion","tool.enterPlanMode":"Enter Plan Mode","tool.exitPlanMode":"Exit Plan Mode","tool.allowedActions":"Allowed actions:","tool.skill":"Skill","tool.agent":"Agent","tool.failed":"failed","tool.completed":"completed","tool.toolsCount":"{count} tools","tool.background":"background","tool.permissionsCount":"{count} permissions","terminal.unknownError":"Unknown error","terminal.processExited":"[Process exited]","terminal.connectionLost":"Connection lost","terminal.wsConnectionFailed":"WebSocket connection failed","terminal.createSessionFailed":"Failed to create terminal session","terminal.reconnectFailed":"Reconnect failed","team.title":"Team","team.activeCount":"{count} active","team.doneCount":"{count} done","team.waitingForTeammates":"Waiting for {count} teammate{s}…","team.backToMain":"Back to main chat","team.loadingHistory":"Loading conversation…","team.noHistory":"No conversation history yet","team.agentRunning":"Agent is running…","team.delivered":"Delivered","team.showLess":"Show less","team.moreLines":"… ({count} more lines)","team.tools":"{count} tools","team.tokens":"{count} tokens","instance.tunnelMode":"Tunnel","instance.localMode":"Local","workspace.searchPlaceholder":"Search directories...","workspace.switch":"Switch","workspace.switchHere":"Switch to this directory","workspace.switching":"Switching...","workspace.noResults":"No matching directories","workspace.emptyDir":"This directory is empty","workspace.pathPlaceholder":"Enter path or directory name...","workspace.selectDir":"Create bot in this directory","workspace.filterPlaceholder":"Filter subdirectories...","workspace.recent.title":"Recent Workspaces","workspace.recent.daysAgo":"d ago","workspace.recent.hoursAgo":"h ago","workspace.recent.minutesAgo":"m ago","workspace.recent.justNow":"Just now","workspace.recent.remove":"Remove","workspace.browseTitle":"Browse Workspaces","workspace.recentWorkspaces":"Recent Workspaces","workspace.createNew":"Create New Bot","workspace.browseDir":"Browse Directory","workspace.instanceLocal":"Local","workspace.instanceTunnel":"Tunnel","workspace.instanceCurrent":"Current","workspace.switchInstance":"Switch","workspace.switchingInstance":"Switching...","workspace.switchingWithGateway":"Preparing to switch...","workspace.instanceStarted":"Started","workspace.noWorkspaces":"No active workspaces","workspace.noWorkspacesHint":"Browse directories to create a new bot","workspace.instanceCount":"{count} bots","question.multiLabel":"multi","tasks.title":"Recommended Templates","tasks.subtitle":"Select a template to create a scheduled task","tasks.loading":"Loading recommended templates...","tasks.error":"Failed to load templates","tasks.retry":"Retry","tasks.refresh":"Refresh","tasks.refreshed":"Refreshed","tasks.empty":"No templates available","tasks.interval":"Every {value}","tasks.interval.1d":"Daily","tasks.interval.2d":"Every 2 days","tasks.interval.3d":"Every 3 days","tasks.interval.1w":"Weekly","tasks.interval.2w":"Every 2 weeks","tasks.interval.1m":"Monthly","scheduled.title":"Scheduled Tasks","scheduled.subtitle":"Active scheduled tasks in the current session","scheduled.loading":"Loading...","scheduled.empty":"No scheduled tasks","scheduled.emptyHint":"Use /loop or CronCreate in chat to create one","scheduled.create":"Create Task","scheduled.creating":"Creating...","scheduled.delete":"Delete","scheduled.cron":"Cron Expression","scheduled.prompt":"Prompt","scheduled.promptPlaceholder":"Prompt to execute on each fire...","scheduled.recurring":"Recurring","scheduled.oneShot":"One-shot","scheduled.durable":"Durable","scheduled.sessionOnly":"Session-only","scheduled.lastFired":"Last fired","plugins.title":"Plugins","plugins.installedPlugins":"Installed Plugins","plugins.browseMarketplace":"Browse Marketplace","plugins.marketplaces":"Marketplaces","plugins.enabled":"Enabled","plugins.disabled":"Disabled","plugins.enable":"Enable","plugins.disable":"Disable","plugins.uninstall":"Uninstall","plugins.install":"Install","plugins.confirmUninstall":"Are you sure you want to uninstall this plugin?","plugins.marketplace":"Marketplace","plugins.addMarketplace":"Add Marketplace","plugins.removeMarketplace":"Remove","plugins.confirmRemoveMarketplace":"Are you sure you want to remove this marketplace?","plugins.noPlugins":"No plugins installed","plugins.noPluginsHint":"Install plugins from a marketplace to extend functionality","plugins.noMarketplaces":"No marketplaces configured","plugins.noMarketplacesHint":"Add a plugin marketplace to browse and install plugins","plugins.selectMarketplace":"Select Marketplace","plugins.selectMarketplaceHint":"Select a marketplace to browse available plugins","plugins.marketplaceNotFound":"Marketplace not found","plugins.noAvailablePlugins":"No available plugins in this marketplace","plugins.noAvailablePluginsHint":"Try adding other marketplaces or check back later","plugins.installed":"Installed","plugins.browsingMarketplace":"Loading...","plugins.loading":"Loading...","plugins.error":"Failed to load plugins","plugins.retry":"Retry","plugins.sourcePlaceholder":"Marketplace URL (Git URL or local path)","plugins.namePlaceholder":"Marketplace name (optional)","plugins.cancel":"Cancel","plugins.add":"Add","plugins.version":"Version","plugins.operationFailed":"Operation failed","plugins.searchPlaceholder":"Search plugins...","plugins.allMarketplaces":"All Marketplaces","plugins.noSearchResults":"No matching plugins found","plugins.totalCount":"plugins","plugins.refresh":"Refresh","plugins.installedLabel":"Installed","plugins.category":"Category","plugins.author":"Author","plugins.license":"License","plugins.homepage":"Homepage","plugins.repository":"Repository","plugins.source":"Source","plugins.keywords":"Keywords","plugins.features":"Features","plugins.scope":"Scope","plugins.scope.user":"User","plugins.scope.project":"Project","plugins.scope.project-local":"Local","plugins.installScope.user":"Install for you (user scope)","plugins.installScope.project":"Install for all collaborators (project scope)","plugins.installScope.local":"Install for you, in this repo only (local scope)","plugins.policyCannotRemove":"Cannot be uninstalled","plugins.policyCannotSwitchoff":"Cannot be disabled","plugins.policyCannotEdit":"Cannot be edited","channel.from":"From","channel.group":"Group","channel.replyTo":"Reply to {source}","channel.wechat":"WeChat","channel.wecom":"WeCom","channel.wecomBot":"WeCom Bot","remoteControl.title":"Remote Control","remoteControl.subtitle":"Manage channel connections","remoteControl.connectedChannels":"Connected Channels","remoteControl.noChannels":"No channels connected","remoteControl.noChannelsHint":"Add a WeChat or WeCom channel, or install more from the marketplace","remoteControl.addWeChat":"Add WeChat Bot","remoteControl.addWeCom":"Add WeCom Bot","remoteControl.connect":"Connect","remoteControl.disconnect":"Disconnect","remoteControl.delete":"Delete","remoteControl.add":"Add","remoteControl.connected":"Connected","remoteControl.disconnected":"Disconnected","remoteControl.connecting":"Connecting...","remoteControl.installMore":"Install More Channels","remoteControl.installMoreHint":"Browse the plugin marketplace for third-party channel plugins","remoteControl.browseMarketplace":"Browse Marketplace","remoteControl.builtIn":"Built-in","remoteControl.plugin":"Plugin","remoteControl.rebind":"Rebind","remoteControl.unbind":"Unbind","remoteControl.bot":" Bot","remoteControl.default":"Default ","remoteControl.next":"Next","remoteControl.cancel":"Cancel","remoteControl.wecomBotIdHint":"From: WeCom Admin → Apps → AI Assistant","remoteControl.wecomSecretHint":"Enter Secret and press Enter or click Connect","remoteControl.fetchingQr":"Fetching QR code...","remoteControl.scanQr":"Scan QR code with WeChat","sidebar.docs":"Docs","docs.title":"Documentation","docs.search.placeholder":"Search docs...","docs.search.noResults":"No matching documents found","docs.search.resultsCount":"{count} results","docs.loading":"Loading...","docs.loadError":"Failed to load document","docs.notFound":"Document not found","docs.apiReference":"API Reference","docs.toc":"On this page","docs.retry":"Retry","docs.backToList":"Back to docs","docs.expandAll":"Expand all","docs.collapseAll":"Collapse all","docs.openStandalone":"Open in new window","sidebar.stats":"Statistics","stats.title":"Statistics","stats.loading":"Loading statistics...","stats.refresh":"Refresh","stats.noData":"No statistics available","stats.tab.overview":"Overview","stats.tab.models":"Models","stats.tab.tools":"Tools","stats.sessions":"Sessions","stats.messages":"Messages","stats.activeDays":"Active Days","stats.currentStreak":"Current Streak","stats.longestStreak":"Longest Streak","stats.peakHour":"Peak Hour","stats.longestSession":"Longest Session","stats.favoriteModel":"Favorite Model","stats.totalTokens":"Total Tokens","stats.timeRange":"Stats from the last {days} days","stats.heatmap.less":"Less","stats.heatmap.more":"More","stats.days":"days","stats.tokensPerDay":"Tokens per Day","stats.allModels":"All Models","stats.input":"Input","stats.output":"Output","stats.cacheRead":"Cache Read","stats.cacheHitRate":"Cache Hit Rate","stats.cost":"Cost","stats.topTools":"Top Tools","stats.session.title":"Current Session","stats.session.apiDuration":"API Duration","stats.session.wallTime":"Wall Time","stats.session.linesAdded":"Lines Added","stats.session.linesDeleted":"Lines Deleted","stats.session.tokens":"Tokens","stats.na":"N/A","stats.heatmap.messages":"messages","stats.funFact.moreTokens":"You've used ~{times}x more tokens than {book}","stats.funFact.sameTokens":"You've used the same number of tokens as {book}","stats.funFact.longerSession":"Your longest session is ~{times}x longer than {activity}","sidebar.traces":"Traces","traces.title":"Traces","traces.loading":"Loading...","traces.refresh":"Refresh","traces.clear":"Clear","traces.clearConfirm":"Clear all trace data?","traces.noData":"No trace data yet. Send a message and traces will be collected automatically.","traces.selectWorker":"Select Worker","traces.current":"current","traces.spanCount":"{count} spans","traces.duration":"Duration","traces.status.ok":"OK","traces.status.error":"Error","traces.status.running":"Running","traces.status.cancelled":"Cancelled","traces.bottleneck":"Bottleneck","traces.bottleneckTip":"Slowest span, {pct}% of total","traces.spanDetail":"Span Detail","traces.spanDetail.type":"Type","traces.spanDetail.duration":"Duration","traces.spanDetail.model":"Model","traces.spanDetail.tokens":"Tokens","traces.spanDetail.input":"Input","traces.spanDetail.output":"Output","traces.spanDetail.error":"Error","traces.spanDetail.cancelReason":"Cancel reason","traces.spanDetail.attributes":"Attributes","traces.legend.agent":"Agent","traces.legend.generation":"Generation","traces.legend.function":"Function","traces.legend.handoff":"Handoff","traces.legend.guardrail":"Guardrail","traces.back":"Back","traces.tab.timeline":"Timeline","traces.tab.tree":"Tree","traces.tab.flame":"Flame","traces.tab.graph":"Graph","traces.expandAll":"Expand All","traces.collapseAll":"Collapse All","traces.search":"Search spans...","traces.selfTime":"Self Time","traces.spanDetail.overview":"Overview","traces.spanDetail.io":"Input/Output","traces.noSpans":"No spans","traces.noSpansFiltered":"No spans match the current filter.","traces.clearFilter":"Clear filter","traces.auto":"auto","traces.auxiliaryCount":"{count} auxiliary traces (memory, title, etc.)","traces.noIO":"No input/output data","traces.noAttrs":"No attributes","traces.io.expand":"Expand","traces.io.collapse":"Collapse","traces.io.messages":"Messages","traces.io.less":"Less","traces.io.moreChars":"+{count} chars","traces.fit":"Fit","traces.allSessions":"All sessions","traces.allInstances":"All instances","traces.llmCalls":"{count} LLM","traces.errors":"errors","traces.noErrors":"No failed traces","traces.errorBanner":"{count} failed trace(s) detected","traces.errorBannerCta":"Show only errors →","traces.errorSummaryTitle":"{count} error(s) in this trace","traces.jumpToFirstError":"Jump to first error span","traces.copyError":"Copy","traces.onlyErrors":"Errors only","traces.filter.all":"All","traces.filter.error":"Error","traces.filter.running":"Running","traces.filter.cancelled":"Cancelled","traces.filter.ok":"OK","sidebar.metrics":"Metrics","metrics.title":"System Metrics","metrics.loading":"Loading metrics...","metrics.refresh":"Refresh","metrics.cpu":"CPU","metrics.memory":"Memory","metrics.disk":"Disk","metrics.cores":"cores","metrics.workers":"Workers","metrics.noWorkers":"No running workers","metrics.current":"Current","metrics.uptime":"Uptime","metrics.version":"Version","sidebar.editor":"Editor","editor.title":"Code Editor","editor.loading":"Loading...","editor.loadError":"Failed to load","editor.noFile":"Select a file to start editing","editor.unsaved":"Unsaved","editor.save":"Save","editor.saveAll":"Save All","editor.close":"Close","editor.closeOthers":"Close Others","editor.closeAll":"Close All","editor.newFile":"New File","editor.newFolder":"New Folder","editor.rename":"Rename","editor.delete":"Delete","editor.refresh":"Refresh","editor.emptyFolder":"Empty folder","editor.explorer":"EXPLORER","editor.toggleSidebar":"Toggle Sidebar","editor.collapseAll":"Collapse All","editor.openFolder":"Open Folder","editor.openFolderPlaceholder":"Enter directory path...","editor.parentFolder":"Parent Folder","editor.pin":"Pin","editor.unpin":"Unpin","editor.copyPath":"Copy Path","editor.copyRelativePath":"Copy Relative Path","editor.revealInExplorer":"Reveal in Explorer","editor.closeToRight":"Close to the Right","editor.closeSaved":"Close Saved","editor.quickOpen":"Quick Open File","editor.focusExplorer":"Focus Explorer","editor.recentFiles":"Recent Files","editor.quickOpenPlaceholder":"Type filename to search...","editor.quickOpenEmpty":"No matching files","editor.quickOpenLoading":"Loading file list...","editor.selected":"selected","editor.lines":"lines","editor.preview":"Switch to Preview","editor.source":"Switch to Source","editor.openInNewWindow":"Open in New Window","ide.explorer":"Explorer","ide.search":"Search","ide.sourceControl":"Source Control","ide.terminal":"Terminal","ide.newTerminal":"New Terminal","ide.toggleSidebar":"Toggle Sidebar","ide.toggleTerminal":"Toggle Terminal","ide.hidePanel":"Hide Panel","ide.maximizePanel":"Maximize Panel","ide.restorePanel":"Restore Panel Size","ide.listView":"List View","ide.treeView":"Tree View","ide.refresh":"Refresh","ide.scm.title":"Source Control","ide.scm.repositories":"Repositories","ide.scm.changes":"Changes","ide.scm.stagedChanges":"Staged Changes","ide.scm.untracked":"Untracked","ide.scm.noChanges":"No changes","ide.scm.notGitRepo":"Not a Git repository","ide.scm.commitPlaceholder":"Message (⌘Enter to commit)","ide.scm.commit":"Commit","ide.scm.push":"Push","ide.scm.pull":"Pull","ide.scm.stage":"Stage","ide.scm.unstage":"Unstage","ide.scm.stageAll":"Stage All","ide.scm.unstageAll":"Unstage All","ide.scm.discard":"Discard Changes","ide.scm.discardAll":"Discard All","ide.scm.copyPath":"Copy Path","ide.scm.openFile":"Open File","ide.scm.createBranch":"Create new branch...","ide.scm.newBranchPlaceholder":"New branch name...","ide.scm.branchSearchPlaceholder":"Select a branch or tag to checkout","ide.scm.switchBranch":"Switch Branch","ide.scm.localBranches":"branches","ide.scm.remoteBranches":"remotes","ide.scm.noBranchMatch":"No matching branches","ide.scm.graph":"Graph","ide.scm.closeDiff":"Close Diff","ide.scm.loadingDiff":"Loading diff...","ide.scm.diff":"Diff","ide.search.title":"Search","ide.search.placeholder":"Search","ide.search.searching":"Searching...","ide.search.noResults":"No results found","ide.search.results":"{count} results in {files} files","ide.search.matchCase":"Match Case","ide.search.wholeWord":"Match Whole Word","ide.search.regex":"Use Regular Expression","ide.search.filesToInclude":"files to include","ide.search.includePlaceholder":"e.g. *.ts, src/**/include","ide.search.filesToExclude":"files to exclude","ide.search.excludePlaceholder":"e.g. node_modules, *.min.js","ide.search.useExcludeSettings":"Use Exclude Settings and Ignore Files","ide.search.toggleFilters":"Toggle Filters","ide.search.failed":"Search failed","ide.search.timedOut":"Search timed out","sidebar.workers":"Workers","workers.title":"Worker Processes","workers.refresh":"Refresh","workers.active":"Active Workers","workers.empty":"No active worker processes","workers.daemon":"Daemon","workers.daemon.running":"Running","workers.daemon.stopped":"Stopped","workers.daemon.start":"Start","workers.daemon.starting":"Starting...","workers.daemon.stop":"Stop","workers.daemon.restart":"Restart","workers.action.logs":"Logs","workers.action.open":"Open","workers.action.kill":"Kill","workers.action.kill.confirm":"Are you sure you want to kill this worker process?","sidebar.logs":"Logs","logs.title":"Log Viewer","logs.selectWorker":"Select Worker","logs.current":"current","logs.search":"Search logs...","logs.autoRefresh":"Auto Refresh","logs.refresh":"Refresh","logs.empty":"No log content","command.btw.description":"Ask a quick side question without interrupting the main Agent work","command.clear.description":"Start a fresh conversation (previous chats remain accessible via /resume)","command.context.description":"Calculate and display context token distribution","command.cost.description":"Show the total cost and duration of the current session","command.doctor.description":"Diagnose and verify your CodeBuddy installation and settings","command.feedback.description":"Open the issue feedback page to report bugs or suggest features","command.gateway.description":'Manage the remote control gateway. Subcommands: "status" to show current status, "stop" to stop the gateway, "token" to regenerate access token, "tunnel" to start with tunnel',"command.remote-control.description":"Manage remote control long connection clients (start, stop, status, list)","command.login.description":"Switch Tencent Cloud CodeBuddy accounts","command.logout.description":"Sign out from your CodeBuddy Code account","command.plan.description":"Preview the current plan file content","command.pr-comments.description":"Get comments from a GitHub pull request","command.release-notes.description":"View release notes","command.review.description":"Review a pull request","command.skills.description":"List available skills","command.todos.description":"Display the current session's todo list","command.reload-plugins.description":"Reload all plugins, skills, agents, hooks, and MCP/LSP servers without restarting","command.plugin-validate.description":"Validate a plugin directory structure and manifest","command.init.description":"Analyzing your codebase…","command.compact.description":"Clear conversation history but keep a summary in context. Optional: /compact [instructions for summarization]","command.upgrade.description":"Open upgrade page in browser","command.statusline.description":"Set up Codebuddy Code's status line UI","command.security-review.description":"Complete a security review of the pending changes on the current branch","command.insights.description":"Generate AI-powered insights about your CodeBuddy Code usage patterns and activity","command.loop.description":"Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)","command.task-manager.description":"Team task management - Smart task entry, assignment, tracking and analysis","sidebar.changes":"Changes","fileChanges.title":"Changes","fileChanges.changesSection":"FILE CHANGES","fileChanges.empty":"No file changes","fileChanges.showChanges":"Show file changes","fileChanges.hideChanges":"Hide file changes","fileChanges.revertAll":"Revert all","fileChanges.revertCode":"Revert code","fileChanges.revertChat":"Revert chat","fileChanges.revertCodeAndChat":"Revert all","fileChanges.checkpoints":"Checkpoints","fileChanges.noCheckpoints":"No checkpoints","filePreview.binaryNotSupported":"This file cannot be previewed in the editor","filePreview.download":"Download","error.viewCrashed":"This view encountered an error","error.appCrashed":"Something went wrong","error.newChatFailed":"Failed to create new chat, please try again","error.switchSessionFailed":"Failed to switch session, please try again","commandPalette.placeholder":"Type a command...","commandPalette.commands":"Commands","commandPalette.views":"Views","commandPalette.actions":"Actions","commandPalette.noResults":"No matching commands","commandPalette.newChat":"New Chat","commandPalette.toggleTheme":"Toggle Theme","commandPalette.toggleLocale":"Toggle Language","commandPalette.tip":"Open command palette","app.confirm":"Confirm","app.cancel":"Cancel","tool.toolSingular":"tool executed","tool.toolPlural":"tools executed","tool.mcpAppLoadHint":"Click to load interactive UI","keybindings.title":"Keybindings","keybindings.search.placeholder":"Search keybindings... (e.g. submit, ctrl+enter)","keybindings.source.default":"Default","keybindings.source.user":"User","keybindings.record.title":"Record Shortcut","keybindings.record.hint":"Press desired key combination...","keybindings.record.conflict":"Conflicts with","keybindings.action.edit":"Edit","keybindings.action.reset":"Reset","keybindings.action.unbind":"Unbind","keybindings.reset.all":"Reset all","keybindings.noResults":"No matching keybindings","keybindings.empty":"No keybindings","keybindings.loading":"Loading...","keybindings.ctx.Global":"Global","keybindings.ctx.Chat":"Chat Input","keybindings.ctx.InputBox":"Text Input","keybindings.ctx.Terminal":"Terminal","keybindings.ctx.Autocomplete":"Autocomplete","keybindings.ctx.Confirmation":"Confirmation","keybindings.ctx.HistorySearch":"History Search","keybindings.ctx.Task":"Task Running","keybindings.ctx.Settings":"Settings","keybindings.ctx.CommandPalette":"Command Palette","keybindings.ctx.Select":"Select List","keybindings.ctx.PermissionDialog":"Permission Dialog","keybindings.ctx.Help":"Help","keybindings.ctx.Plugin":"Plugin","keybindings.ctx.DiffDialog":"Diff Dialog","keybindings.ctx.MessageSelector":"Message Selector","keybindings.ctxDesc.Global":"Active everywhere, regardless of focus","keybindings.ctxDesc.Chat":"When the chat input is focused","keybindings.ctxDesc.InputBox":"When a text input is active","keybindings.ctxDesc.Terminal":"When the terminal view is active","keybindings.ctxDesc.Autocomplete":"When autocomplete menu is visible","keybindings.ctxDesc.Confirmation":"When a confirmation/permission dialog is shown","keybindings.ctxDesc.HistorySearch":"When searching command history (ctrl+r)","keybindings.ctxDesc.Task":"When a task/agent is running in the foreground","keybindings.ctxDesc.Settings":"When the settings panel is open","keybindings.ctxDesc.CommandPalette":"When the command palette is open","keybindings.ctxDesc.Select":"When a select/list component is focused","keybindings.ctxDesc.PermissionDialog":"When a tool permission dialog is shown","keybindings.ctxDesc.Help":"When the help overlay is open","keybindings.ctxDesc.Plugin":"When the plugin dialog is open","keybindings.ctxDesc.DiffDialog":"When the diff dialog is open","keybindings.ctxDesc.MessageSelector":"When the message selector (rewind) is open","keybindings.act.app:interrupt":"Interrupt","keybindings.act.app:exit":"Exit","keybindings.act.app:redraw":"Redraw Screen","keybindings.act.app:toggleTodos":"Toggle Todos","keybindings.act.app:toggleTranscript":"Toggle Transcript","keybindings.act.app:toggleSidebar":"Toggle Sidebar","keybindings.act.app:toggleTerminal":"Toggle Terminal","keybindings.act.app:commandPalette":"Command Palette","keybindings.act.app:newChat":"New Chat","keybindings.act.app:settings":"Settings","keybindings.act.app:focusInput":"Focus Input","keybindings.act.app:keybindings":"Keybinding Settings","keybindings.act.history:search":"Search History","keybindings.act.history:previous":"Previous History","keybindings.act.history:next":"Next History","keybindings.act.history:open":"Open History","keybindings.act.chat:cancel":"Cancel","keybindings.act.chat:submit":"Submit","keybindings.act.chat:newline":"New Line","keybindings.act.chat:killAgents":"Kill Agents","keybindings.act.chat:cycleMode":"Cycle Mode","keybindings.act.chat:modelPicker":"Model Picker","keybindings.act.chat:thinkingToggle":"Toggle Thinking","keybindings.act.chat:undo":"Undo","keybindings.act.chat:externalEditor":"External Editor","keybindings.act.chat:stash":"Stash","keybindings.act.chat:imagePaste":"Paste Image","keybindings.act.autocomplete:accept":"Accept","keybindings.act.autocomplete:dismiss":"Dismiss","keybindings.act.autocomplete:previous":"Previous","keybindings.act.autocomplete:next":"Next","keybindings.act.confirm:yes":"Confirm","keybindings.act.confirm:no":"Cancel","keybindings.act.confirm:previous":"Previous","keybindings.act.confirm:next":"Next","keybindings.act.confirm:toggle":"Toggle","keybindings.act.confirm:toggleExplanation":"Toggle Explanation","keybindings.act.task:background":"Run in Background","keybindings.act.historySearch:next":"Next","keybindings.act.historySearch:accept":"Accept","keybindings.act.historySearch:cancel":"Cancel","keybindings.act.historySearch:execute":"Execute","keybindings.act.settings:close":"Close Settings","keybindings.act.settings:search":"Search Settings","keybindings.act.select:previous":"Previous","keybindings.act.select:next":"Next","keybindings.act.select:accept":"Select","keybindings.act.select:cancel":"Cancel","keybindings.act.commandPalette:close":"Close Palette","keybindings.act.commandPalette:execute":"Execute Command","keybindings.act.commandPalette:previous":"Previous","keybindings.act.commandPalette:next":"Next","keybindings.act.permission:toggleDebug":"Toggle Debug","keybindings.act.diff:dismiss":"Close Diff","keybindings.act.diff:previousFile":"Previous File","keybindings.act.diff:nextFile":"Next File","keybindings.act.diff:viewDetails":"View Details","keybindings.act.plugin:toggle":"Toggle Plugin","keybindings.act.plugin:install":"Install Plugin","keybindings.act.help:dismiss":"Close Help","keybindings.act.transcript:exit":"Exit Transcript","keybindings.act.transcript:toggleShowAll":"Show All","keybindings.act.messageSelector:up":"Up","keybindings.act.messageSelector:down":"Down","keybindings.act.messageSelector:top":"Top","keybindings.act.messageSelector:bottom":"Bottom","keybindings.act.messageSelector:select":"Select","common.close":"Close","changes.revert":"Revert","changes.revertDirectory":"Revert directory","message.clickToEnlarge":"Click to enlarge","channel.botIdPlaceholder":"Enter Bot ID","channel.secretPlaceholder":"Enter Secret","filePreview.zoomOut":"Zoom Out","filePreview.zoomIn":"Zoom In","filePreview.fitToWindow":"Fit to Window","filePreview.actualSize":"Actual Size (1:1)","filePreview.pdfPreview":"PDF Preview","goal.status.usage":`Usage: /goal <condition>
|
|
678
678
|
Example: /goal all tests pass`,"goal.status.tooLong":"Goal condition is limited to {max} characters (got {actual})","goal.status.hooksDisabled":"/goal cannot run while hooks are disabled (disableAllHooks or allowManagedHooksOnly is set).","goal.status.set":"Goal set: {condition}","goal.status.setReplaced":"Goal replaced: {prev} → {condition}","goal.status.cleared":"Goal cleared: {prev}","goal.status.noGoal":"No goal set","goal.status.active":"Goal active: {condition}","goal.progress.title":"Goal not yet met… continuing","goal.progress.expand":"click to expand","goal.progress.condition":"Goal","goal.progress.reason":"Reason","goal.recap.active":"Goal active","goal.recap.achieved":"Goal achieved","goal.recap.impossible":"Goal could not be achieved","goal.recap.empty.title":"No goal set yet","goal.recap.empty.hint":"Use /goal <condition> to set a session-scoped stop hook.","goal.recap.empty.example":"Example: /goal all tests pass","goal.recap.footer.setAnother":"/goal <condition>","goal.recap.footer.toSetAnother":" to set another · ","goal.recap.footer.escDismiss":"to dismiss","goal.recap.stats.turn":"turn","goal.recap.stats.turns":"turns","goal.recap.stats.token":"token","goal.recap.stats.tokens":"tokens"}};function lf(e,t){return t?e.replace(/\{(\w+)\}/g,(n,r)=>{const s=t[r];return s==null?n:String(s)}):e}function ce(){const{mode:e,resolved:t,setLocale:n,toggle:r}=ra();function s(l,a){const c=of[t][l]??l;return lf(c,a)}function o(l,a){const c=of[t][l];if(c!==void 0)return lf(c,a)}return{t:s,tryT:o,locale:e,resolved:t,setLocale:n,toggleLocale:r}}const Wn=Ye(e=>({info:null,loading:!1,fetch:async()=>{e({loading:!0});try{const t=await Ke("/api/v1/info",{headers:be()});if(t.ok){const n=await t.json(),r=n.data??n;e({info:r,loading:!1})}else e({loading:!1})}catch{e({loading:!1})}}})),sy=4;let A0=0;function L0(){return`pane-${Date.now()}-${++A0}`}function iy(e){return{id:L0(),ptySessionId:null,ptyStatus:"disconnected",errorMessage:null}}function cs(e){return e.type==="leaf"?1:cs(e.children[0])+cs(e.children[1])}function sa(e){return e.type==="leaf"?[e.paneId]:[...sa(e.children[0]),...sa(e.children[1])]}function Zo(e,t,n,r){return e.type==="leaf"?e.paneId===t?{type:"split",direction:n,children:[{type:"leaf",paneId:t},{type:"leaf",paneId:r}],ratio:.5}:e:{...e,children:[Zo(e.children[0],t,n,r),Zo(e.children[1],t,n,r)]}}function Yo(e,t){if(e.type==="leaf")return e.paneId===t?null:e;const n=Yo(e.children[0],t),r=Yo(e.children[1],t);return n===null?r:r===null?n:{...e,children:[n,r]}}function ay(e,t,n){if(t.length===0)return e.type==="split"?{...e,ratio:n}:e;if(e.type==="split"){const[r,...s]=t,o=[...e.children];return o[r]=ay(o[r],s,n),{...e,children:o}}return e}function cf(e){const t=be({"Content-Type":"application/json"});fetch(`/api/v1/pty/${e}`,{method:"DELETE",headers:t}).catch(()=>{})}function oy(){const e=iy();return{panes:{[e.id]:e},layout:{type:"leaf",paneId:e.id},activePaneId:e.id}}const po=oy(),Re=Ye()(Dr((e,t)=>({mode:"chat",mainView:"chat",terminalTitle:null,panes:po.panes,layout:po.layout,activePaneId:po.activePaneId,setMode:n=>{e({mode:n,mainView:n==="terminal"?"terminal":"chat"})},setMainView:n=>{e({mainView:n,mode:n==="terminal"?"terminal":"chat"})},setTerminalTitle:n=>e({terminalTitle:n}),splitPane:(n,r)=>{const s=t(),o=r??s.activePaneId;if(cs(s.layout)>=sy)return;const l=iy(),a=Zo(s.layout,o,n,l.id),c={...s.panes,[l.id]:l};e({layout:a,panes:c,activePaneId:l.id})},closePane:n=>{const r=t();if(cs(r.layout)<=1)return;const s=Yo(r.layout,n);if(!s)return;const o=r.panes[n];o!=null&&o.ptySessionId&&cf(o.ptySessionId);const l={...r.panes};delete l[n];const a=sa(s),c=a.includes(r.activePaneId)?r.activePaneId:a[0];e({layout:s,panes:l,activePaneId:c})},setActivePaneId:n=>e({activePaneId:n}),setRatio:(n,r)=>{const s=Math.max(.1,Math.min(.9,r)),o=ay(t().layout,n,s);e({layout:o})},setPaneSession:(n,r)=>{const s={...t().panes};s[n]&&(s[n]={...s[n],ptySessionId:r},e({panes:s}))},setPaneStatus:(n,r)=>{const s={...t().panes};s[n]&&(s[n]={...s[n],ptyStatus:r},e({panes:s}))},setPaneError:(n,r)=>{const s={...t().panes};s[n]&&(s[n]={...s[n],errorMessage:r},e({panes:s}))},setPaneTitle:(n,r)=>{const s={...t().panes};s[n]&&(s[n]={...s[n],title:r},e({panes:s}))},reset:()=>{const n=t().panes;for(const s of Object.values(n))s.ptySessionId&&cf(s.ptySessionId);const r=oy();e({panes:r.panes,layout:r.layout,activePaneId:r.activePaneId})}}),{namespace:"terminal",fields:["layout","panes","mainView"],scope:"workspace",debounceMs:500,onLoad:(e,t)=>{if(e.mainView){const n=window.location.hash.slice(2);!n||n===""?window.location.hash=`/${e.mainView}`:delete e.mainView}if(e.layout&&e.panes){const n=e.layout,r=e.panes,s=sa(n);if(s.every(o=>o in r)){const o=Re.getState().panes,l={};for(const c of s){const d=o[c],u=r[c];l[c]={...u,ptySessionId:(d==null?void 0:d.ptySessionId)??u.ptySessionId??null,ptyStatus:"disconnected",errorMessage:null}}for(const[c,d]of Object.entries(r))if(!l[c]){const u=o[c];l[c]={...d,ptySessionId:(u==null?void 0:u.ptySessionId)??d.ptySessionId??null,ptyStatus:"disconnected",errorMessage:null}}const a={layout:n,panes:l,activePaneId:s[0]};e.mainView&&(a.mainView=e.mainView),t(a);return}}e.mainView&&t({mainView:e.mainView})}})),j0="chat",df=new Set(["chat","tasks","plugins","terminal","canvas","canvas-pane","remote-control","settings","docs","editor","changes","metrics","workers","logs","keybindings","stats","traces"]);function Kl(){let t=window.location.hash.slice(1);t.startsWith("/")&&(t=t.slice(1));const n=t.split("?")[0]||"";if(df.has(n))return n;const r=n.split("/")[0];return df.has(r)?r:j0}function uf(e){const t=new URLSearchParams(window.location.search),n=window.location.hash.slice(1),r=n.indexOf("?");r!==-1&&new URLSearchParams(n.slice(r+1)).forEach((a,c)=>{t.has(c)||t.set(c,a)});const s=t.toString(),o=s?`#/${e}?${s}`:`#/${e}`;window.location.hash=o}function $0(e){const t=()=>{const n=Kl();e(n)};return window.addEventListener("hashchange",t),()=>{window.removeEventListener("hashchange",t)}}function ia(){const t=window.location.hash.slice(1).replace(/^\//,"").split("?")[0],n=t.indexOf("/");return n>0?t.slice(n+1):void 0}function $s(e,t){const r=new URLSearchParams(window.location.search).toString(),s=r?`#/${e}/${t}?${r}`:`#/${e}/${t}`;window.location.hash=s}function aa(){const e=window.location.hash.slice(1),t=e.indexOf("?");return t>=0?new URLSearchParams(e.slice(t+1)):new URLSearchParams}function Zl(e,t,n){const r=new URLSearchParams(window.location.search);r.set("path",e),t!=null&&r.set("line",String(t)),n!=null&&r.set("col",String(n)),window.location.hash=`#/editor?${r.toString()}`}const pf={background:"#ffffff",foreground:"#1e1e1e",cursor:"#1e1e1e",cursorAccent:"#ffffff",selectionBackground:"#add6ff80",black:"#000000",red:"#cd3131",green:"#00bc00",yellow:"#949800",blue:"#0451a5",magenta:"#bc05bc",cyan:"#0598bc",white:"#555555",brightBlack:"#666666",brightRed:"#cd3131",brightGreen:"#14ce14",brightYellow:"#b5ba00",brightBlue:"#0451a5",brightMagenta:"#bc05bc",brightCyan:"#0598bc",brightWhite:"#a5a5a5"},hf={background:"#191a1b",foreground:"#cccccc",cursor:"#cccccc",cursorAccent:"#191a1b",selectionBackground:"#264f7880",black:"#000000",red:"#f44747",green:"#6a9955",yellow:"#d7ba7d",blue:"#569cd6",magenta:"#c586c0",cyan:"#4ec9b0",white:"#d4d4d4",brightBlack:"#808080",brightRed:"#f44747",brightGreen:"#6a9955",brightYellow:"#d7ba7d",brightBlue:"#569cd6",brightMagenta:"#c586c0",brightCyan:"#4ec9b0",brightWhite:"#e5e5e5"},O0=2e3;function Ta(){return be({"Content-Type":"application/json"})}function D0(e){const t=window.location,n=t.protocol==="https:"?"wss:":"ws:",r=Dl(),s=r?`?token=${encodeURIComponent(r)}`:"";return`${n}//${t.host}/api/v1/pty/${e}/ws${s}`}async function mf(e){try{return(await fetch(`/api/v1/pty/${e}`,{headers:Ta()})).ok}catch{return!1}}async function ff(e,t,n){const r={cols:e,rows:t};n&&(r.cwd=n);const s=await fetch("/api/v1/pty",{method:"POST",headers:Ta(),body:JSON.stringify(r)});if(!s.ok){const a=await s.json().catch(()=>null),c=typeof(a==null?void 0:a.error)=="string"?a.error:typeof(a==null?void 0:a.message)=="string"?a.message:`HTTP ${s.status}`;throw new Error(c)}const o=await s.json(),l=o.data??o;return{sessionId:l.sessionId,cwd:typeof l.cwd=="string"?l.cwd:""}}async function gf(e){try{const t=await fetch(`/api/v1/pty/${e}`,{headers:Ta()});if(!t.ok)return null;const n=await t.json(),r=n.data??n;return{cwd:typeof(r==null?void 0:r.cwd)=="string"?r.cwd:""}}catch{return null}}async function M0(){try{const e=await fetch("/api/v1/pty",{headers:Ta()});if(!e.ok)return[];const t=await e.json();return(t.data??t).sessions||[]}catch{return[]}}function P0(e){const t=Re.getState().panes,n=new Set;for(const[r,s]of Object.entries(t))r!==e&&s.ptySessionId&&n.add(s.ptySessionId);return n}function Na({paneId:e,initialCwd:t,onPtyCreated:n}){const{t:r}=ce(),{resolved:s}=Lt(),o=Re(N=>N.panes[e]),l=Re(N=>N.activePaneId),a=Re(N=>N.layout),c=Re(N=>N.mainView),d=Re(N=>N.setActivePaneId),u=Re(N=>N.closePane),p=Re(N=>N.setPaneSession),m=Re(N=>N.setPaneStatus),b=Re(N=>N.setPaneError),w=Re(N=>N.setPaneTitle),x=Re(N=>N.setTerminalTitle),g=l===e,f=cs(a),h=S.useRef(null),y=S.useRef(null),v=S.useRef(null),E=S.useRef(null),_=S.useRef(!0),k=S.useRef(!1),C=S.useRef(!1),R=S.useRef(null),O=S.useRef(null),A=S.useRef(!1),D=S.useRef(!1),L=S.useRef(t);L.current=t;const B=S.useRef(n);B.current=n;const H=S.useCallback(()=>{const N=E.current;N&&(N.close(),E.current=null)},[]),V=S.useCallback((N,W)=>{H(),m(e,"connecting"),O.current=W;const $=new WebSocket(D0(W));E.current=$;let P=null;const z=()=>{if(!_.current)return;const ne=v.current;if(D.current=!0,ne)try{ne.fit()}catch{}A.current||N.scrollToBottom(),N.refresh(0,N.rows-1),requestAnimationFrame(()=>{D.current=!1})},F=()=>{P&&clearTimeout(P),P=setTimeout(()=>{P=null,z()},0)},M=(ne,te)=>{var de;if(!A.current){N.write(ne,te);return}const fe=(de=h.current)==null?void 0:de.querySelector(".xterm-viewport");if(!fe){N.write(ne,te);return}const pe=fe.scrollTop;D.current=!0;const ge=()=>{fe.scrollTop=pe};fe.addEventListener("scroll",ge),N.write(ne,()=>{fe.scrollTop=pe,requestAnimationFrame(()=>{fe.scrollTop=pe,fe.removeEventListener("scroll",ge),D.current=!1}),te==null||te()})};$.onopen=()=>{_.current&&(m(e,"connected"),b(e,null),requestAnimationFrame(()=>{if(!_.current)return;const ne=v.current;if(ne)try{const te=ne.proposeDimensions();te&&$.readyState===WebSocket.OPEN&&$.send(JSON.stringify({type:"resize",cols:te.cols,rows:te.rows}))}catch{}}),N.focus())},$.onmessage=ne=>{if(_.current)try{const te=JSON.parse(ne.data);switch(te.type){case"output":te.data&&M(te.data,F);break;case"exit":p(e,null),m(e,"disconnected"),C.current=!1,O.current=null,N.write(`\r
|
|
679
679
|
${r("terminal.processExited")}\r
|
|
680
|
-
`);break;case"pong":break}}catch{}},$.onerror=()=>{_.current&&(m(e,"error"),b(e,r("terminal.wsConnectionFailed")))},$.onclose=()=>{var te;if(!_.current)return;((te=Re.getState().panes[e])==null?void 0:te.ptyStatus)==="connected"&&(m(e,"error"),b(e,r("terminal.connectionLost")))};const J=N.onData(ne=>{$.readyState===WebSocket.OPEN&&$.send(JSON.stringify({type:"input",data:ne}))}),X=N.onResize(({cols:ne,rows:te})=>{$.readyState===WebSocket.OPEN&&$.send(JSON.stringify({type:"resize",cols:ne,rows:te}))});C.current=!0;const re=()=>{J.dispose(),X.dispose(),H(),O.current=null};return R.current=re,re},[H,e,p,m,b]),Y=S.useCallback(()=>{const N=h.current;if(!N||k.current)return;const W=s==="dark"?hf:pf;for(;N.firstChild;)N.removeChild(N.firstChild);const $=new R0.Terminal({cursorBlink:!0,fontSize:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:W,allowProposedApi:!0,scrollback:5e4}),P=new E0.FitAddon;$.loadAddon(P);let z=null;const F=(oe,_e)=>{z&&z.remove(),z=document.createElement("div"),z.textContent=_e,z.className="xterm-link-tooltip",Object.assign(z.style,{position:"fixed",left:`${oe.clientX}px`,top:`${oe.clientY+16}px`,padding:"2px 8px",borderRadius:"4px",fontSize:"12px",pointerEvents:"none",zIndex:"10000",maxWidth:"600px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",background:"var(--color-bg-tertiary, #333)",color:"var(--color-text-primary, #eee)",border:"1px solid var(--color-border-muted, #555)"}),document.body.appendChild(z)},M=()=>{z&&(z.remove(),z=null)},J=new T0.WebLinksAddon((oe,_e)=>{window.open(_e,"_blank","noopener")},{hover(oe,_e){F(oe,_e)},leave:M});$.loadAddon(J);const X=/(?:(?:\.{1,2}\/|\/)[a-zA-Z0-9._\-~@+/]+[a-zA-Z0-9._\-~@+])(?::(\d+)(?::(\d+))?)?/g,re=["/api/","/http","/dev/","/proc/","/sys/","/tmp/"];$.registerLinkProvider({provideLinks(oe,_e){const Be=$.buffer.active.getLine(oe-1);if(!Be){_e(void 0);return}const Ge=Be.translateToString(!0),Ze=[];X.lastIndex=0;let le;for(;(le=X.exec(Ge))!==null;){const xe=le[0],je=le.index,ct=xe.indexOf(":"),nt=ct>=0?xe.slice(0,ct):xe;if(re.some(Pt=>nt.startsWith(Pt))||!nt.includes(".")&&!nt.endsWith("/"))continue;const kt=le[1]?parseInt(le[1],10):void 0,ze=le[2]?parseInt(le[2],10):void 0,Me=kt?`${nt}:${kt}${ze?":"+ze:""}`:nt;Ze.push({range:{start:{x:je+1,y:oe},end:{x:je+xe.length+1,y:oe}},text:xe,activate(){var mr;const Pt=(mr=Wn.getState().info)==null?void 0:mr.cwd,Xa=nt.startsWith("/")?nt:Pt?`${Pt}/${nt}`:nt;Zl(Xa,kt,ze)},hover(Pt){F(Pt,`${Me} — Click to open in editor`)},leave:M})}_e(Ze.length>0?Ze:void 0)}}),$.attachCustomKeyEventHandler(oe=>oe.type==="keydown"&&oe.key==="Enter"&&oe.shiftKey?($.input("\x1B[13;2u",!0),!1):!0),$.open(N);const ne=N.querySelector(".xterm-helper-textarea");ne&&(ne.setAttribute("autocomplete","off"),ne.setAttribute("autocorrect","off"),ne.setAttribute("autocapitalize","off"),ne.setAttribute("spellcheck","false"),ne.setAttribute("unselectable","on")),y.current=$,v.current=P,k.current=!0;const te=N.querySelector(".xterm-viewport"),fe=()=>{if(D.current||!te)return;const oe=te.scrollHeight-te.scrollTop-te.clientHeight<5;A.current=!oe};te==null||te.addEventListener("scroll",fe);const pe=$.onTitleChange(oe=>{_.current&&(x(oe||null),w(e,oe||null))});let ge=null;const de=()=>{ge&&clearTimeout(ge),ge=setTimeout(()=>{if(_.current)try{D.current=!0,P.fit(),A.current||$.scrollToBottom(),$.refresh(0,$.rows-1),requestAnimationFrame(()=>{D.current=!1})}catch{D.current=!1}},50)},Ne=new ResizeObserver(de);Ne.observe(N),window.addEventListener("resize",de);const Ce=()=>{document.visibilityState==="visible"&&de()};return document.addEventListener("visibilitychange",Ce),()=>{te==null||te.removeEventListener("scroll",fe),pe.dispose(),Ne.disconnect(),window.removeEventListener("resize",de),document.removeEventListener("visibilitychange",Ce),ge&&clearTimeout(ge),z&&(z.remove(),z=null)}},[]),ee=S.useCallback(async()=>{var F,M;const N=y.current,W=v.current;if(!N||!W||!_.current||C.current)return;let $=80,P=24;try{const J=W.proposeDimensions();J&&($=J.cols,P=J.rows)}catch{}const z=(F=Re.getState().panes[e])==null?void 0:F.ptySessionId;if(z&&await mf(z)&&_.current){if(V(N,z),B.current){const X=await gf(z);X&&_.current&&B.current({sessionId:z,cwd:X.cwd})}return}if(_.current){if(!z){const J=P0(e),re=(await M0()).find(ne=>!ne.hasClient&&!J.has(ne.id));if(re&&_.current){if(p(e,re.id),V(N,re.id),B.current){const ne=await gf(re.id);ne&&_.current&&B.current({sessionId:re.id,cwd:ne.cwd})}return}}if(_.current){m(e,"connecting");try{const J=L.current||void 0,{sessionId:X,cwd:re}=await ff($,P,J);if(!_.current)return;p(e,X),V(N,X),(M=B.current)==null||M.call(B,{sessionId:X,cwd:re})}catch(J){if(!_.current)return;m(e,"error"),b(e,J.message||r("terminal.createSessionFailed"))}}}},[V,e,p,m,b]),I=S.useRef(null);S.useEffect(()=>{_.current=!0;const N=h.current;if(!N)return;const W=()=>{if(!_.current)return;const{clientWidth:P,clientHeight:z}=N;P===0||z===0||(k.current||(I.current=Y()||null),y.current&&v.current&&(C.current||ee()))};if(N.clientWidth>0&&N.clientHeight>0){const P=requestAnimationFrame(W);return()=>cancelAnimationFrame(P)}const $=new ResizeObserver(P=>{for(const z of P){const{width:F,height:M}=z.contentRect;if(F>0&&M>0){$.disconnect(),W();break}}});return $.observe(N),()=>$.disconnect()},[Y,ee]),S.useEffect(()=>()=>{var N,W,$;_.current=!1,(N=R.current)==null||N.call(R),(W=I.current)==null||W.call(I),($=y.current)==null||$.dispose(),y.current=null,v.current=null,k.current=!1,C.current=!1},[]),S.useEffect(()=>{const N=y.current;if(N){const W=s==="dark"?hf:pf;N.options.theme=W;try{N.refresh(0,N.rows-1)}catch{}}},[s,c]);const T=S.useCallback(async()=>{var W,$,P;if(H(),C.current=!1,m(e,"connecting"),b(e,null),await new Promise(z=>setTimeout(z,O0)),!_.current)return;const N=y.current;if(N)try{N.clear();try{(W=v.current)==null||W.fit()}catch{}const z=N.cols||80,F=N.rows||24,M=($=Re.getState().panes[e])==null?void 0:$.ptySessionId;if(M&&await mf(M)&&_.current){V(N,M);return}if(!_.current)return;const J=L.current||void 0,{sessionId:X,cwd:re}=await ff(z,F,J);if(!_.current)return;p(e,X),V(N,X),(P=B.current)==null||P.call(B,{sessionId:X,cwd:re})}catch(z){if(!_.current)return;m(e,"error"),b(e,z.message||r("terminal.reconnectFailed"))}},[H,V,e,p,m,b]),j=S.useCallback(()=>{var N;g||d(e),(N=y.current)==null||N.focus()},[g,e,d]);return o?i.jsxs("div",{className:`terminal-pane flex flex-col h-full w-full min-h-0 ${g&&f>1?"active":""}`,style:{backgroundColor:"var(--ide-side-panel-bg)"},onClick:j,children:[f>1&&i.jsx("div",{className:"terminal-pane-toolbar",children:i.jsx("button",{onClick:N=>{N.stopPropagation(),u(e)},className:"w-6 h-6 flex items-center justify-center rounded bg-bg-tertiary/80 text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-colors",title:r("terminal.closePane"),children:i.jsx(at,{size:14})})}),i.jsx("div",{ref:h,className:"flex-1 w-full min-h-0",style:{overflow:"hidden",padding:"4px"}}),o.ptyStatus==="connecting"&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-10",style:{backgroundColor:"var(--ide-side-panel-bg)"},children:i.jsx(Ue,{size:20,className:"animate-spin",style:{color:"var(--color-text-tertiary)"}})}),o.ptyStatus==="error"&&i.jsxs("div",{className:"absolute bottom-0 left-0 right-0 flex items-center justify-between px-4 py-2 bg-accent-red/10 border-t border-accent-red/30 z-10",children:[i.jsxs("div",{className:"flex items-center gap-2 text-accent-red text-xs",children:[i.jsx(Dw,{size:14}),i.jsx("span",{children:o.errorMessage||r("terminal.error")})]}),i.jsxs("button",{onClick:T,className:"flex items-center gap-1.5 px-3 py-1 rounded-md bg-bg-secondary border border-border-muted text-text-primary text-xs hover:bg-bg-hover transition-colors",children:[i.jsx(bt,{size:12}),i.jsx("span",{children:r("terminal.reconnect")})]})]})]}):i.jsx("div",{})}const bf=400,yf=300,ho=200,mo=150,fo=.1,go=5,Nn=20,xf=3,ly=8,F0=10,cy=32,B0=cy;function dy(){return be({"Content-Type":"application/json"})}async function z0(e){try{const t=await fetch(`/api/v1/pty/${e}`,{headers:dy()});if(!t.ok)return null;const n=await t.json(),r=n.data??n;return typeof(r==null?void 0:r.cwd)=="string"?r.cwd:null}catch{return null}}function uy(e){const t=Object.values(e);if(t.length===0)return;const r={...Re.getState().panes};let s=!1;for(const o of t){const l=r[o.paneId];l?o.ptySessionId&&l.ptySessionId!==o.ptySessionId&&(r[o.paneId]={...l,ptySessionId:o.ptySessionId},s=!0):(r[o.paneId]={id:o.paneId,ptySessionId:o.ptySessionId??null,ptyStatus:"disconnected",errorMessage:null},s=!0)}s&&Re.setState({panes:r})}const rt=Ye()(Dr((e,t)=>({viewport:{panX:0,panY:0,zoom:1},tiles:{},nextZIndex:1,selectedTileIds:[],setViewport:n=>{e({viewport:n})},addTile:()=>{const n=`tile-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,r=`canvas-pane-${n}`,{nextZIndex:s,viewport:o}=t(),l=o.zoom||1,a=(-o.panX+window.innerWidth/2)/l-bf/2,c=(-o.panY+window.innerHeight/2)/l-yf/2,d=Math.round(a/Nn)*Nn,u=Math.round(c/Nn)*Nn,p={id:n,type:"terminal",x:d,y:u,width:bf,height:yf,zIndex:s,paneId:r,windowState:"normal",ptySessionId:null,cwd:null},m=Re.getState();if(!m.panes[r]){const b={...m.panes,[r]:{id:r,ptySessionId:null,ptyStatus:"disconnected",errorMessage:null}};Re.setState({panes:b})}return e(b=>({tiles:{...b.tiles,[n]:p},nextZIndex:b.nextZIndex+1})),n},duplicateTile:n=>{var h,y,v,E;const r=t().tiles[n];if(!r)return null;const s=`tile-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,o=`canvas-pane-${s}`,{nextZIndex:l}=t(),a=((h=r.prevBounds)==null?void 0:h.width)??r.width,c=((y=r.prevBounds)==null?void 0:y.height)??r.height,d=((v=r.prevBounds)==null?void 0:v.x)??r.x,u=((E=r.prevBounds)==null?void 0:E.y)??r.y,p=Nn*2,m=Math.round((d+p)/Nn)*Nn,b=Math.round((u+p)/Nn)*Nn,w={id:s,type:"terminal",x:m,y:b,width:a,height:c,zIndex:l,paneId:o,windowState:"normal",ptySessionId:null,cwd:r.cwd??null},x=Re.getState();x.panes[o]||Re.setState({panes:{...x.panes,[o]:{id:o,ptySessionId:null,ptyStatus:"disconnected",errorMessage:null}}}),e(_=>({tiles:{..._.tiles,[s]:w},nextZIndex:_.nextZIndex+1}));const g=Re.getState().panes[r.paneId],f=g==null?void 0:g.ptySessionId;return f&&z0(f).then(_=>{_&&(t().updateTile(r.id,{cwd:_}),t().updateTile(s,{cwd:_}))}),s},removeTile:n=>{const r=t().tiles[n];if(r){const s=Re.getState(),o=s.panes[r.paneId];if(o!=null&&o.ptySessionId&&fetch(`/api/v1/pty/${o.ptySessionId}`,{method:"DELETE",headers:dy()}).catch(()=>{}),s.panes[r.paneId]){const{[r.paneId]:l,...a}=s.panes;Re.setState({panes:a})}}e(s=>{const{[n]:o,...l}=s.tiles;return{tiles:l,selectedTileIds:s.selectedTileIds.filter(a=>a!==n)}})},updateTile:(n,r)=>{e(s=>{const o=s.tiles[n];return o?{tiles:{...s.tiles,[n]:{...o,...r}}}:s})},selectTile:n=>e({selectedTileIds:[n]}),deselectAll:()=>e({selectedTileIds:[]}),selectTiles:n=>e({selectedTileIds:n}),bringToFront:n=>{e(r=>{const s=r.tiles[n];return s?{tiles:{...r.tiles,[n]:{...s,zIndex:r.nextZIndex}},nextZIndex:r.nextZIndex+1}:r})},maximizeTile:n=>{e(r=>{const s=r.tiles[n];if(!s)return r;const o=s.windowState==="normal"?{x:s.x,y:s.y,width:s.width,height:s.height}:s.prevBounds;return{tiles:{...r.tiles,[n]:{...s,windowState:"maximized",prevBounds:o,zIndex:r.nextZIndex}},nextZIndex:r.nextZIndex+1}})},minimizeTile:n=>{e(r=>{const s=r.tiles[n];if(!s)return r;const o=s.windowState==="normal"?{x:s.x,y:s.y,width:s.width,height:s.height}:s.prevBounds;return{tiles:{...r.tiles,[n]:{...s,height:B0,windowState:"minimized",prevBounds:o}}}})},restoreTile:n=>{e(r=>{const s=r.tiles[n];return!s||!s.prevBounds?s?{tiles:{...r.tiles,[n]:{...s,windowState:"normal"}}}:r:{tiles:{...r.tiles,[n]:{...s,x:s.prevBounds.x,y:s.prevBounds.y,width:s.prevBounds.width,height:s.prevBounds.height,windowState:"normal",prevBounds:void 0}}}})},toggleMaximize:n=>{const r=t().tiles[n];r&&(r.windowState==="maximized"?t().restoreTile(n):t().maximizeTile(n))},toggleMinimize:n=>{const r=t().tiles[n];r&&(r.windowState==="minimized"?t().restoreTile(n):t().minimizeTile(n))},setTilePty:(n,r,s)=>{let o=null;if(e(l=>{const a=l.tiles[n];if(!a)return l;o=a.paneId;const c={...a,ptySessionId:r};return s!==void 0&&(c.cwd=s),{tiles:{...l.tiles,[n]:c}}}),o){const l=Re.getState(),a=l.panes[o];a&&a.ptySessionId!==r&&Re.setState({panes:{...l.panes,[o]:{...a,ptySessionId:r}}})}},loadFromStorage:()=>{}}),{namespace:"canvas",fields:["viewport","tiles","nextZIndex"],scope:"workspace",debounceMs:1e3,onLoad:(e,t)=>{const n={};e.viewport&&(n.viewport=e.viewport),e.tiles&&(n.tiles=e.tiles),e.nextZIndex!==void 0&&(n.nextZIndex=e.nextZIndex),Object.keys(n).length>0&&(t(n),n.tiles&&uy(n.tiles))}}));uy(rt.getState().tiles);function U0(){const{t:e}=ce(),[t,n]=S.useState(()=>aa().get("paneId")||"");S.useEffect(()=>{const a=()=>{n(aa().get("paneId")||"")};return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]);const r=rt(a=>Object.values(a.tiles).find(c=>c.paneId===t)??null),s=Re(a=>{var c;return t?(c=a.panes[t])==null?void 0:c.title:null}),o=rt(a=>a.setTilePty),l=S.useCallback(a=>{r&&o(r.id,a.sessionId,a.cwd||null)},[r,o]);return S.useEffect(()=>{if(!t)return;const a=Re.getState();a.panes[t]||Re.setState({panes:{...a.panes,[t]:{id:t,ptySessionId:(r==null?void 0:r.ptySessionId)??null,ptyStatus:"disconnected",errorMessage:null}}})},[t,r==null?void 0:r.ptySessionId]),t?i.jsxs("div",{className:"flex flex-col h-full w-full bg-bg-primary",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 select-none",style:{height:32,background:"var(--color-canvas-tile-header)",color:"var(--color-canvas-tile-header-text)",borderBottom:"1px solid var(--color-border-default)"},children:[i.jsx(Pr,{size:14,style:{opacity:.6}}),i.jsx("span",{className:"text-xs truncate",style:{fontSize:12,fontWeight:500},children:s||e("canvas.defaultTitle")})]}),i.jsx("div",{className:"flex-1 min-h-0 relative",children:i.jsx(Na,{paneId:t,initialCwd:(r==null?void 0:r.cwd)??null,onPtyCreated:l})})]}):i.jsx("div",{className:"flex items-center justify-center h-full w-full bg-bg-primary text-text-secondary text-sm",children:e("canvas.standalone.missingPaneId")})}class Wi{constructor(){he(this,"panX",0);he(this,"panY",0);he(this,"zoom",1)}getState(){return{panX:this.panX,panY:this.panY,zoom:this.zoom}}setState(t){this.panX=t.panX,this.panY=t.panY,this.zoom=Math.max(fo,Math.min(go,t.zoom))}screenToWorld(t,n){return this.zoom===0?{x:0,y:0}:{x:(t-this.panX)/this.zoom,y:(n-this.panY)/this.zoom}}worldToScreen(t,n){return{x:t*this.zoom+this.panX,y:n*this.zoom+this.panY}}applyZoom(t,n,r){const s=this.zoom,o=Math.exp(-t*.6/100),l=Math.max(fo,Math.min(go,s*o));if(s===0)return this.zoom=l,this.getState();const a=l/s-1;return this.panX-=(n-this.panX)*a,this.panY-=(r-this.panY)*a,this.zoom=l,this.getState()}applyPan(t,n){return this.panX+=t,this.panY+=n,this.getState()}fitTiles(t,n,r,s=40){if(t.length===0)return this.resetView();let o=1/0,l=1/0,a=-1/0,c=-1/0;for(const g of t)o=Math.min(o,g.x),l=Math.min(l,g.y),a=Math.max(a,g.x+g.width),c=Math.max(c,g.y+g.height);const d=a-o,u=c-l;if(d<=0||u<=0)return this.resetView();const p=n-s*2,m=r-s*2;if(p<=0||m<=0)return this.resetView();const b=Math.max(fo,Math.min(go,Math.min(p/d,m/u))),w=(n-d*b)/2-o*b,x=(r-u*b)/2-l*b;return this.panX=w,this.panY=x,this.zoom=b,this.getState()}resetView(){return this.panX=0,this.panY=0,this.zoom=1,this.getState()}}const vf=120;function H0(){const{t:e}=ce(),t=rt(f=>f.viewport),n=rt(f=>f.tiles),r=rt(f=>f.setViewport),s=rt(f=>f.addTile),o=S.useRef(null),l=Math.round(t.zoom*100),a=typeof window<"u"&&window.location.hash.includes("standalone");if(Object.values(n).some(f=>f.windowState==="maximized"))return null;const d=()=>{var h;const f=(h=o.current)==null?void 0:h.parentElement;return{w:(f==null?void 0:f.clientWidth)??window.innerWidth,h:(f==null?void 0:f.clientHeight)??window.innerHeight}},u=()=>{const f=new Wi;f.setState(t);const{w:h,h:y}=d(),v=f.applyZoom(-vf,h/2,y/2);r(v)},p=()=>{const f=new Wi;f.setState(t);const{w:h,h:y}=d(),v=f.applyZoom(vf,h/2,y/2);r(v)},m=()=>{const f=new Wi;f.setState(t);const{w:h,h:y}=d(),v=Object.values(n);v.length===0?r(f.resetView()):r(f.fitTiles(v,h,y,60))},b=()=>{s()},w=()=>{const f=new URLSearchParams(window.location.search),h=new URLSearchParams;h.set("standalone","1"),f.forEach((v,E)=>{h.has(E)||h.set(E,v)});const y=`${window.location.pathname}${window.location.search}#/canvas?${h.toString()}`;window.open(y,"canvas-standalone","noopener,noreferrer")},x="w-8 h-8 flex items-center justify-center rounded-lg transition-colors",g={border:"none",background:"transparent",color:"var(--color-text-secondary)",cursor:"pointer"};return i.jsxs("div",{ref:o,className:"canvas-toolbar fixed bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 px-2 py-1 rounded-xl",style:{background:"var(--color-bg-card)",border:"1px solid var(--color-border-default)",boxShadow:"0 2px 12px rgba(0,0,0,0.12)",zIndex:1e4},children:[i.jsx("button",{className:x,style:g,onClick:b,title:e("canvas.addTerminal"),children:i.jsx(St,{size:16})}),i.jsx("div",{style:{width:1,height:20,background:"var(--color-border-muted)"}}),i.jsx("button",{className:x,style:g,onClick:p,title:e("canvas.zoomOut"),children:i.jsx(S0,{size:16})}),i.jsxs("span",{className:"text-xs tabular-nums select-none",style:{minWidth:40,textAlign:"center",color:"var(--color-text-secondary)"},children:[l,"%"]}),i.jsx("button",{className:x,style:g,onClick:u,title:e("canvas.zoomIn"),children:i.jsx(_0,{size:16})}),i.jsx("div",{style:{width:1,height:20,background:"var(--color-border-muted)"}}),i.jsx("button",{className:x,style:g,onClick:m,title:e("canvas.fitView"),children:i.jsx(JS,{size:16})}),!a&&i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{width:1,height:20,background:"var(--color-border-muted)"}}),i.jsx("button",{className:x,style:g,onClick:w,title:e("canvas.openStandalone"),children:i.jsx(tn,{size:16})})]})]})}function Hr(e,t=Nn,n=F0){const r=(e%t+t)%t;return r<=n?e-r:t-r<=n?e+(t-r):e}function W0(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable)}class G0{constructor(){he(this,"dragState",null);he(this,"spacePressed",!1);he(this,"callbacks",null);he(this,"keydownHandler",null);he(this,"keyupHandler",null);he(this,"dragStarted",!1);he(this,"panSamples",[])}attach(t){this.callbacks=t,this.keydownHandler=n=>{if(n.code==="Space"&&!n.repeat){if(W0(n.target))return;this.spacePressed=!0,n.preventDefault()}},this.keyupHandler=n=>{n.code==="Space"&&(this.spacePressed=!1)},window.addEventListener("keydown",this.keydownHandler),window.addEventListener("keyup",this.keyupHandler)}detach(){this.keydownHandler&&(window.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.keyupHandler&&(window.removeEventListener("keyup",this.keyupHandler),this.keyupHandler=null),this.callbacks=null,this.dragState=null}get isSpacePressed(){return this.spacePressed}get isDragging(){return this.dragState!==null&&this.dragStarted}get currentDrag(){return this.dragState}handlePointerDown(t,n,r,s){var c,d,u;const o=t.clientX,l=t.clientY;this.dragStarted=!1,this.panSamples=[],(d=(c=this.callbacks)==null?void 0:c.onInteractionStart)==null||d.call(c);const a=(u=this.callbacks)==null?void 0:u.getViewport();if(this.spacePressed||!n&&!r){const p=t.shiftKey||t.ctrlKey||t.metaKey;!this.spacePressed&&p?this.dragState={type:"select",startScreenX:o,startScreenY:l}:(this.dragState={type:"pan",startScreenX:o,startScreenY:l,initialViewport:a?{...a}:void 0},this.panSamples=[{t:performance.now(),x:o,y:l}]);return}if(n&&r){const p=s[n];if(!p)return;this.dragState={type:"resize",startScreenX:o,startScreenY:l,tileId:n,handle:r,initialTiles:{[n]:{x:p.x,y:p.y,width:p.width,height:p.height}}};return}if(n){const p=s[n];if(!p)return;const m={};m[n]={x:p.x,y:p.y,width:p.width,height:p.height},this.dragState={type:"move",startScreenX:o,startScreenY:l,tileId:n,initialTiles:m}}}handlePointerMove(t){var o,l;if(!this.dragState||!this.callbacks)return;const n=t.clientX-this.dragState.startScreenX,r=t.clientY-this.dragState.startScreenY;if(!this.dragStarted){if(Math.abs(n)<xf&&Math.abs(r)<xf)return;this.dragStarted=!0}const s=this.callbacks.getViewport();switch(this.dragState.type){case"pan":{const a=this.dragState.initialViewport;if(a){const u=n,p=r;this.callbacks.onViewportPan(a.panX+u-s.panX,a.panY+p-s.panY)}const c=performance.now();this.panSamples.push({t:c,x:t.clientX,y:t.clientY});const d=c-100;for(;this.panSamples.length>2&&this.panSamples[0].t<d;)this.panSamples.shift();break}case"move":{if(this.dragState.tileId&&s.zoom!==0){const a=n/s.zoom,c=r/s.zoom,d=(o=this.dragState.initialTiles)==null?void 0:o[this.dragState.tileId];d&&this.callbacks.onTileMove(this.dragState.tileId,Hr(d.x+a),Hr(d.y+c))}break}case"resize":{if(this.dragState.tileId&&this.dragState.handle&&s.zoom!==0){const a=(l=this.dragState.initialTiles)==null?void 0:l[this.dragState.tileId];if(a){const c=n/s.zoom,d=r/s.zoom,u=this.applyResize(this.dragState.handle,a,c,d);this.callbacks.onTileResize(this.dragState.tileId,u)}}break}case"select":{const a={x:Math.min(this.dragState.startScreenX,t.clientX),y:Math.min(this.dragState.startScreenY,t.clientY),width:Math.abs(n),height:Math.abs(r)};this.callbacks.onSelectionBox(a);break}}}handlePointerUp(t){var s,o,l,a;if(!this.callbacks){this.dragState=null;return}const n=((s=this.dragState)==null?void 0:s.type)==="pan",r=this.dragStarted;if(this.dragStarted?((a=this.dragState)==null?void 0:a.type)==="select"&&(this.callbacks.onSelectionBox(null),this.callbacks.onBoxSelectEnd([])):(o=this.dragState)!=null&&o.tileId?this.callbacks.onTileClick(this.dragState.tileId):((l=this.dragState)==null?void 0:l.type)==="select"&&this.callbacks.onCanvasClick(),n&&r&&this.panSamples.length>=2&&this.callbacks.onPanInertiaStart){const c=this.panSamples[this.panSamples.length-1],d=this.panSamples[0],u=c.t-d.t;if(u>0){const p=(c.x-d.x)/u,m=(c.y-d.y)/u;Math.hypot(p,m)>.05&&this.callbacks.onPanInertiaStart(p,m)}}this.dragState=null,this.dragStarted=!1,this.panSamples=[]}getSelectedTileIds(t,n){const r=[],s=t.x,o=t.y,l=t.width,a=t.height;for(const c of Object.values(n))c.x<s+l&&c.x+c.width>s&&c.y<o+a&&c.y+c.height>o&&r.push(c.id);return r}getResizeHandle(t,n,r,s=ly){const{x:o,y:l,width:a,height:c}=t,d=o+a/2,u=l+c/2,p=o+a,m=l+c;return this.hitTest(n,r,o,l,s)?"nw":this.hitTest(n,r,p,l,s)?"ne":this.hitTest(n,r,o,m,s)?"sw":this.hitTest(n,r,p,m,s)?"se":this.hitTest(n,r,d,l,s)?"n":this.hitTest(n,r,d,m,s)?"s":this.hitTest(n,r,o,u,s)?"w":this.hitTest(n,r,p,u,s)?"e":null}applyResize(t,n,r,s){let{x:o,y:l,width:a,height:c}=n;switch(t){case"n":l=n.y+s,c=n.height-s;break;case"s":c=n.height+s;break;case"w":o=n.x+r,a=n.width-r;break;case"e":a=n.width+r;break;case"nw":o=n.x+r,l=n.y+s,a=n.width-r,c=n.height-s;break;case"ne":l=n.y+s,a=n.width+r,c=n.height-s;break;case"sw":o=n.x+r,a=n.width-r,c=n.height+s;break;case"se":a=n.width+r,c=n.height+s;break}return a<ho&&((t==="w"||t==="nw"||t==="sw")&&(o=n.x+n.width-ho),a=ho),c<mo&&((t==="n"||t==="nw"||t==="ne")&&(l=n.y+n.height-mo),c=mo),o=Hr(o),l=Hr(l),a=Hr(a),c=Hr(c),{x:o,y:l,width:a,height:c}}isInTileHeader(t,n,r,s){const o=cy*s;return n>=t.x&&n<=t.x+t.width&&r>=t.y&&r<=t.y+o}hitTest(t,n,r,s,o){return Math.abs(t-r)<=o&&Math.abs(n-s)<=o}}const q0=[{position:"n",cursor:"ns-resize",className:"top-0 left-2 right-2 h-1.5 -translate-y-1/2"},{position:"s",cursor:"ns-resize",className:"bottom-0 left-2 right-2 h-1.5 translate-y-1/2"},{position:"e",cursor:"ew-resize",className:"right-0 top-2 bottom-2 w-1.5 translate-x-1/2"},{position:"w",cursor:"ew-resize",className:"left-0 top-2 bottom-2 w-1.5 -translate-x-1/2"},{position:"nw",cursor:"nwse-resize",className:"top-0 left-0 w-3 h-3 -translate-x-1/2 -translate-y-1/2"},{position:"ne",cursor:"nesw-resize",className:"top-0 right-0 w-3 h-3 translate-x-1/2 -translate-y-1/2"},{position:"sw",cursor:"nesw-resize",className:"bottom-0 left-0 w-3 h-3 -translate-x-1/2 translate-y-1/2"},{position:"se",cursor:"nwse-resize",className:"bottom-0 right-0 w-3 h-3 translate-x-1/2 translate-y-1/2"}];function V0({tile:e,viewport:t,isSelected:n}){const{t:r}=ce(),s=rt(T=>T.removeTile),o=rt(T=>T.duplicateTile),l=rt(T=>T.toggleMaximize),a=rt(T=>T.toggleMinimize),c=rt(T=>T.setTilePty),d=rt(T=>T.selectTile),u=rt(T=>T.bringToFront),p=Re(T=>{var j;return(j=T.panes[e.paneId])==null?void 0:j.title}),{panX:m,panY:b,zoom:w}=t,x=e.x*w+m,g=e.y*w+b,f=e.windowState==="maximized",h=e.windowState==="minimized",y=n?"var(--color-canvas-tile-border-selected)":"var(--color-canvas-tile-border)",v=S.useCallback(()=>{l(e.id)},[e.id,l]),E=S.useCallback(()=>{a(e.id)},[e.id,a]),_=S.useCallback(()=>{o(e.id)},[e.id,o]),k=S.useCallback(T=>{T.target.closest("button")||(T.stopPropagation(),h?a(e.id):l(e.id))},[e.id,h,l,a]),C=S.useCallback(T=>{c(e.id,T.sessionId,T.cwd||null)},[e.id,c]),R=S.useRef(null),[O,A]=S.useState(!1);S.useEffect(()=>{const T=j=>{A(j.shiftKey||j.altKey)};return window.addEventListener("keydown",T),window.addEventListener("keyup",T),()=>{window.removeEventListener("keydown",T),window.removeEventListener("keyup",T)}},[]);const D=n||O,L=S.useRef(null),B=S.useCallback(T=>{L.current={x:T.clientX,y:T.clientY,id:T.pointerId}},[]),H=S.useCallback(T=>{L.current=null},[]),V=S.useCallback(T=>{var W;if(T.ctrlKey||T.metaKey||T.shiftKey||!n)return;const N=(W=R.current)==null?void 0:W.querySelector(".xterm-viewport");N&&(N.scrollTop+=T.deltaY,T.stopPropagation())},[n]),Y=S.useCallback(()=>{const T=new URLSearchParams(window.location.search),j=new URLSearchParams;j.set("paneId",e.paneId),T.forEach((W,$)=>{j.has($)||j.set($,W)});const N=`${window.location.pathname}${window.location.search}#/canvas-pane?${j.toString()}`;window.open(N,`canvas-pane-${e.paneId}`,"noopener,noreferrer")},[e.paneId]),ee=f?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",transform:"none",pointerEvents:"auto",zIndex:9999,borderRadius:0,border:"none",overflow:"hidden",boxShadow:"none"}:{transform:`translate(${x}px, ${g}px) scale(${w})`,transformOrigin:"top left",width:e.width,height:e.height,willChange:"transform",pointerEvents:"auto",zIndex:e.zIndex,borderRadius:8,border:`1px solid ${y}`,overflow:"hidden",boxShadow:n?"0 0 0 1px var(--color-canvas-tile-border-selected)":"0 2px 8px rgba(0,0,0,0.08)"},I=S.useCallback(T=>{var $;if(T.button!==0)return;d(e.id),u(e.id);const j=($=R.current)==null?void 0:$.querySelector(".xterm-helper-textarea");if(!j)return;const N=()=>{try{j.focus()}catch{}};N();const W=()=>{window.removeEventListener("pointerup",W,!0),N()};window.addEventListener("pointerup",W,!0)},[e.id,d,u]);return i.jsxs("div",{className:f?"canvas-tile":"absolute canvas-tile",style:ee,onPointerDownCapture:I,children:[i.jsxs("div",{className:"canvas-tile-header flex items-center gap-1.5 px-2 select-none",style:{height:32,background:"var(--color-canvas-tile-header)",color:"var(--color-canvas-tile-header-text)",cursor:"grab",borderBottom:h?"none":"1px solid var(--color-canvas-tile-border)"},onDoubleClick:k,children:[i.jsx(Pr,{size:13,style:{opacity:.5,flexShrink:0}}),i.jsx("span",{className:"flex-1 text-xs truncate",style:{fontSize:12,fontWeight:500},children:p||r("canvas.defaultTitle")}),i.jsx("button",{onClick:T=>{T.stopPropagation(),_()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r("canvas.tileMenu.duplicate"),children:i.jsx(ls,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),Y()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r("canvas.tileMenu.openStandalone"),children:i.jsx(tn,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),E()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r(h?"canvas.tileMenu.restore":"canvas.tileMenu.minimize"),children:h?i.jsx(Vl,{size:12}):i.jsx(ri,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),v()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r(f?"canvas.tileMenu.restore":"canvas.tileMenu.maximize"),children:f?i.jsx(Wl,{size:12}):i.jsx(ni,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),s(e.id)},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r("canvas.tileMenu.close"),children:i.jsx(at,{size:12})})]}),!h&&i.jsxs("div",{ref:R,className:"flex-1 relative",style:{height:"calc(100% - 32px)",overflow:"hidden"},children:[i.jsx(Na,{paneId:e.paneId,initialCwd:e.cwd??null,onPtyCreated:C}),i.jsx("div",{className:"absolute inset-0","data-canvas-tile-focused":n?"true":"false",style:{zIndex:5,pointerEvents:D?"none":"auto",background:"transparent"},onPointerDown:B,onPointerUp:H,onWheel:V})]}),!h&&q0.map(T=>i.jsx("div",{className:`absolute ${T.className}`,style:{cursor:T.cursor,zIndex:10,opacity:0},"data-resize-handle":T.position},T.position))]})}function K0({rect:e}){return i.jsx("div",{className:"absolute pointer-events-none",style:{left:e.x,top:e.y,width:e.width,height:e.height,background:"var(--color-canvas-selection-fill)",border:"1px solid var(--color-canvas-selection-stroke)",borderRadius:2,zIndex:999}})}function Z0(){const e=S.useRef(null),t=S.useRef(new Wi),n=S.useRef(new G0),r=rt(T=>T.tiles),s=rt(T=>T.viewport),o=rt(T=>T.selectedTileIds),l=rt(T=>T.setViewport),a=rt(T=>T.updateTile),c=rt(T=>T.selectTile),d=rt(T=>T.selectTiles),u=rt(T=>T.deselectAll),p=rt(T=>T.bringToFront),[m,b]=S.useState(null),[w,x]=S.useState(!1),[g,f]=S.useState(!1),[h,y]=S.useState(null);S.useEffect(()=>{t.current.setState(s)},[s]);const v=S.useMemo(()=>Object.values(r).sort((T,j)=>T.zIndex-j.zIndex),[r]),E=S.useMemo(()=>new Set(o),[o]),_=S.useRef(s);_.current=s;const k=S.useRef({setViewport:l,updateTile:a,selectTile:c,deselectAll:u,bringToFront:p,selectTiles:d});k.current={setViewport:l,updateTile:a,selectTile:c,deselectAll:u,bringToFront:p,selectTiles:d};const C=.92,R=.01,O=3.5,A=S.useRef(null),D=S.useRef({vx:0,vy:0,last:0}),L=S.useCallback(()=>{A.current!==null&&(cancelAnimationFrame(A.current),A.current=null)},[]),B=S.useCallback((T,j)=>{L();const N=Math.hypot(T,j);if(N>O){const $=O/N;T*=$,j*=$}D.current={vx:T,vy:j,last:performance.now()};const W=()=>{const $=performance.now(),P=D.current,z=Math.min(32,$-P.last);P.last=$;const M=t.current.applyPan(P.vx*z,P.vy*z);k.current.setViewport(M);const J=Math.pow(C,z/16.67);if(P.vx*=J,P.vy*=J,Math.hypot(P.vx,P.vy)<R){A.current=null;return}A.current=requestAnimationFrame(W)};A.current=requestAnimationFrame(W)},[L]);S.useEffect(()=>()=>L(),[L]),S.useEffect(()=>{const T=n.current,j={onViewportPan:(N,W)=>{const P=t.current.applyPan(N,W);k.current.setViewport(P)},onTileMove:(N,W,$)=>{k.current.updateTile(N,{x:W,y:$})},onTileResize:(N,W)=>{k.current.updateTile(N,W)},onTileSelect:N=>{k.current.selectTile(N),k.current.bringToFront(N)},onSelectionBox:N=>{if(N){const W=e.current,$=W==null?void 0:W.getBoundingClientRect();b($?{x:N.x-$.left,y:N.y-$.top,width:N.width,height:N.height}:N)}else b(null)},onBoxSelectEnd:()=>{},onTileClick:N=>{k.current.selectTile(N),k.current.bringToFront(N)},onCanvasClick:()=>{k.current.deselectAll()},onInteractionStart:()=>{L()},onPanInertiaStart:(N,W)=>{B(N,W)},getViewport:()=>_.current};return T.attach(j),()=>T.detach()},[]),S.useEffect(()=>{const T=e.current;if(!T)return;const j=t.current,N=P=>{const z=P.target,F=!!(z&&z.closest('.xterm, .xterm-screen, .xterm-viewport, input, textarea, [contenteditable="true"], [contenteditable=""]')),M=!!(z&&z.closest('[data-canvas-tile-focused="true"]')),J=P.ctrlKey||P.metaKey;if((F||M)&&!J&&!P.shiftKey)return;P.preventDefault();const X=T.getBoundingClientRect(),re=P.clientX-X.left,ne=P.clientY-X.top;if(J){const de=j.applyZoom(P.deltaY,re,ne);l(de);return}let te=-P.deltaX,fe=-P.deltaY;P.shiftKey&&te===0&&(te=-P.deltaY,fe=0);const pe=P.deltaMode===1?16:P.deltaMode===2?100:1,ge=j.applyPan(te*pe,fe*pe);l(ge)},W=P=>{if(!(P.ctrlKey||P.metaKey))return;const z=P.target;if(z){const F=z.tagName;if(F==="INPUT"||F==="TEXTAREA"||F==="SELECT"||z.isContentEditable)return}if(P.key==="+"||P.key==="="||P.key==="-"||P.key==="_"||P.key==="0"){P.preventDefault();const F=T.clientWidth,M=T.clientHeight;if(P.key==="0")l(j.resetView());else if(P.key==="-"||P.key==="_"){const J=j.applyZoom(120,F/2,M/2);l(J)}else{const J=j.applyZoom(-120,F/2,M/2);l(J)}}},$=P=>{P.preventDefault()};return T.addEventListener("wheel",N,{passive:!1}),window.addEventListener("keydown",W),T.addEventListener("gesturestart",$),T.addEventListener("gesturechange",$),T.addEventListener("gestureend",$),()=>{T.removeEventListener("wheel",N),window.removeEventListener("keydown",W),T.removeEventListener("gesturestart",$),T.removeEventListener("gesturechange",$),T.removeEventListener("gestureend",$)}},[l]);const H=S.useCallback(T=>{const j=e.current;if(!j)return;const N=T.button===1||T.button===2,W=n.current.isSpacePressed,$=j.getBoundingClientRect(),P=T.clientX-$.left,z=T.clientY-$.top,F=n.current;let M=null,J=null,X=null;if(!N&&!W){const pe=[...Object.values(r)].sort((ge,de)=>de.zIndex-ge.zIndex);for(const ge of pe){const de=ge.x*s.zoom+s.panX,Ne=ge.y*s.zoom+s.panY,Ce=ge.width*s.zoom,oe=ge.height*s.zoom,_e={x:de,y:Ne,width:Ce,height:oe},Be=F.getResizeHandle(_e,P,z,ly);if(Be){M=ge.id,J=Be,X=ge.id;break}if(F.isInTileHeader(_e,P,z,s.zoom)){M=ge.id,X=ge.id;break}if(P>=de&&P<=de+Ce&&z>=Ne&&z<=Ne+oe){X=ge.id;break}}}const re=T.target;if(!N&&!W&&J===null&&X&&E.has(X)&&re&&re.closest(".xterm, .xterm-screen, .xterm-viewport, .xterm-rows"))return;const ne=T.target;if(ne&&!(N||W||J!==null)&&(ne.closest("button")||ne.closest("input, textarea:not(.xterm-helper-textarea), select")||ne.closest('[contenteditable="true"], [contenteditable=""]')))return;if(N&&T.preventDefault(),!X&&!J){const pe=document.activeElement;pe&&typeof pe.blur=="function"&&pe.blur(),u()}const fe=T.nativeEvent;F.handlePointerDown(fe,M,J,r),X?(c(X),p(X)):(T.shiftKey||T.ctrlKey||T.metaKey)&&u(),j.setPointerCapture(T.pointerId),x(F.isSpacePressed)},[r,s,c,u,p,E]),V=S.useCallback(T=>{var N;const j=n.current;j.handlePointerMove(T.nativeEvent),x(j.isSpacePressed),f(j.isDragging),y(((N=j.currentDrag)==null?void 0:N.type)??null)},[]),Y=S.useCallback(T=>{var W;const j=n.current;if(((W=j.currentDrag)==null?void 0:W.type)==="select"&&j.isDragging&&m){const $=s.zoom||1,P={x:(m.x-s.panX)/$,y:(m.y-s.panY)/$,width:m.width/$,height:m.height/$},z=j.getSelectedTileIds(P,r);d(z)}j.handlePointerUp(T.nativeEvent);const N=e.current;N&&N.releasePointerCapture(T.pointerId),f(!1),y(null),b(null)},[s,r,d,m]),I=g&&h==="pan"?"grabbing":w?"grab":"default";return i.jsxs("div",{ref:e,className:"absolute inset-0",style:{cursor:I,touchAction:"none",overscrollBehavior:"contain"},onPointerDown:H,onPointerMove:V,onPointerUp:Y,onContextMenu:T=>T.preventDefault(),children:[i.jsx("div",{className:"absolute inset-0",style:{pointerEvents:"none"},children:v.map(T=>i.jsx(V0,{tile:T,viewport:s,isSelected:E.has(T.id)},T.id))}),m&&i.jsx(K0,{rect:m})]})}function _f(){const e=rt(r=>r.tiles),{t}=ce(),n=Object.keys(e).length>0;return i.jsxs("div",{className:"relative w-full h-full overflow-hidden bg-bg-primary",children:[i.jsx(Z0,{}),i.jsx(H0,{}),!n&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:i.jsx("p",{className:"text-text-tertiary text-sm",children:t("canvas.empty")})})]})}const py="/assets/dark-claw-cat-D_ew_BKV.png",hy="/assets/light-claw-cat-BgBWmnmi.png",my="/assets/red-claw-cat--t2EuBIB.png",fy={small:{container:"w-20 h-20",text:"text-[12px]"},medium:{container:"w-32 h-32",text:"text-[14px]"},large:{container:"w-40 h-40",text:"text-[16px]"}};function gy({size:e="medium",className:t=""}){const r=Lt(o=>o.resolved)==="dark"?py:hy,s=fy[e];return i.jsxs("div",{className:`relative ${s.container} ${t}`,children:[i.jsx("img",{src:r,alt:"",className:"cat-loading-layer cat-loading-layer-base absolute inset-0 w-full h-full object-contain",decoding:"async",loading:"eager"}),i.jsx("img",{src:my,alt:"",className:"cat-loading-layer cat-loading-layer-color absolute inset-0 w-full h-full object-contain",decoding:"async",loading:"eager"})]})}function An({size:e="medium",text:t="Loading...",className:n=""}){const r=fy[e];return i.jsxs("div",{className:`flex flex-col items-center justify-center gap-4 ${n}`,children:[i.jsx(gy,{size:e}),t&&i.jsx("div",{className:`text-text-secondary ${r.text} font-medium animate-pulse`,children:t})]})}function Y0({size:e="medium",className:t=""}){return i.jsx(gy,{size:e,className:t})}function wf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X0(e){if(Array.isArray(e))return e}function J0(e,t,n){return(t=iE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,l,a=[],c=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(u){d=!0,s=u}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return a}}function eE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
680
|
+
`);break;case"pong":break}}catch{}},$.onerror=()=>{_.current&&(m(e,"error"),b(e,r("terminal.wsConnectionFailed")))},$.onclose=()=>{var te;if(!_.current)return;((te=Re.getState().panes[e])==null?void 0:te.ptyStatus)==="connected"&&(m(e,"error"),b(e,r("terminal.connectionLost")))};const J=N.onData(ne=>{$.readyState===WebSocket.OPEN&&$.send(JSON.stringify({type:"input",data:ne}))}),X=N.onResize(({cols:ne,rows:te})=>{$.readyState===WebSocket.OPEN&&$.send(JSON.stringify({type:"resize",cols:ne,rows:te}))});C.current=!0;const re=()=>{J.dispose(),X.dispose(),H(),O.current=null};return R.current=re,re},[H,e,p,m,b]),Y=S.useCallback(()=>{const N=h.current;if(!N||k.current)return;const W=s==="dark"?hf:pf;for(;N.firstChild;)N.removeChild(N.firstChild);const $=new R0.Terminal({cursorBlink:!0,fontSize:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:W,allowProposedApi:!0,scrollback:5e4}),P=new E0.FitAddon;$.loadAddon(P);let z=null;const F=(oe,_e)=>{z&&z.remove(),z=document.createElement("div"),z.textContent=_e,z.className="xterm-link-tooltip",Object.assign(z.style,{position:"fixed",left:`${oe.clientX}px`,top:`${oe.clientY+16}px`,padding:"2px 8px",borderRadius:"4px",fontSize:"12px",pointerEvents:"none",zIndex:"10000",maxWidth:"600px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",background:"var(--color-bg-tertiary, #333)",color:"var(--color-text-primary, #eee)",border:"1px solid var(--color-border-muted, #555)"}),document.body.appendChild(z)},M=()=>{z&&(z.remove(),z=null)},J=new T0.WebLinksAddon((oe,_e)=>{window.open(_e,"_blank","noopener")},{hover(oe,_e){F(oe,_e)},leave:M});$.loadAddon(J);const X=/(?:(?:\.{1,2}\/|\/)[a-zA-Z0-9._\-~@+/]+[a-zA-Z0-9._\-~@+])(?::(\d+)(?::(\d+))?)?/g,re=["/api/","/http","/dev/","/proc/","/sys/","/tmp/"];$.registerLinkProvider({provideLinks(oe,_e){const Be=$.buffer.active.getLine(oe-1);if(!Be){_e(void 0);return}const Ge=Be.translateToString(!0),Ze=[];X.lastIndex=0;let le;for(;(le=X.exec(Ge))!==null;){const xe=le[0],je=le.index,ct=xe.indexOf(":"),nt=ct>=0?xe.slice(0,ct):xe;if(re.some(Pt=>nt.startsWith(Pt))||!nt.includes(".")&&!nt.endsWith("/"))continue;const kt=le[1]?parseInt(le[1],10):void 0,ze=le[2]?parseInt(le[2],10):void 0,Me=kt?`${nt}:${kt}${ze?":"+ze:""}`:nt;Ze.push({range:{start:{x:je+1,y:oe},end:{x:je+xe.length+1,y:oe}},text:xe,activate(){var mr;const Pt=(mr=Wn.getState().info)==null?void 0:mr.cwd,Xa=nt.startsWith("/")?nt:Pt?`${Pt}/${nt}`:nt;Zl(Xa,kt,ze)},hover(Pt){F(Pt,`${Me} — Click to open in editor`)},leave:M})}_e(Ze.length>0?Ze:void 0)}}),$.attachCustomKeyEventHandler(oe=>oe.key==="Enter"&&oe.shiftKey?(oe.type==="keydown"&&$.input("\x1B[13;2u",!0),!1):!0),$.open(N);const ne=N.querySelector(".xterm-helper-textarea");ne&&(ne.setAttribute("autocomplete","off"),ne.setAttribute("autocorrect","off"),ne.setAttribute("autocapitalize","off"),ne.setAttribute("spellcheck","false"),ne.setAttribute("unselectable","on")),y.current=$,v.current=P,k.current=!0;const te=N.querySelector(".xterm-viewport"),fe=()=>{if(D.current||!te)return;const oe=te.scrollHeight-te.scrollTop-te.clientHeight<5;A.current=!oe};te==null||te.addEventListener("scroll",fe);const pe=$.onTitleChange(oe=>{_.current&&(x(oe||null),w(e,oe||null))});let ge=null;const de=()=>{ge&&clearTimeout(ge),ge=setTimeout(()=>{if(_.current)try{D.current=!0,P.fit(),A.current||$.scrollToBottom(),$.refresh(0,$.rows-1),requestAnimationFrame(()=>{D.current=!1})}catch{D.current=!1}},50)},Ne=new ResizeObserver(de);Ne.observe(N),window.addEventListener("resize",de);const Ce=()=>{document.visibilityState==="visible"&&de()};return document.addEventListener("visibilitychange",Ce),()=>{te==null||te.removeEventListener("scroll",fe),pe.dispose(),Ne.disconnect(),window.removeEventListener("resize",de),document.removeEventListener("visibilitychange",Ce),ge&&clearTimeout(ge),z&&(z.remove(),z=null)}},[]),ee=S.useCallback(async()=>{var F,M;const N=y.current,W=v.current;if(!N||!W||!_.current||C.current)return;let $=80,P=24;try{const J=W.proposeDimensions();J&&($=J.cols,P=J.rows)}catch{}const z=(F=Re.getState().panes[e])==null?void 0:F.ptySessionId;if(z&&await mf(z)&&_.current){if(V(N,z),B.current){const X=await gf(z);X&&_.current&&B.current({sessionId:z,cwd:X.cwd})}return}if(_.current){if(!z){const J=P0(e),re=(await M0()).find(ne=>!ne.hasClient&&!J.has(ne.id));if(re&&_.current){if(p(e,re.id),V(N,re.id),B.current){const ne=await gf(re.id);ne&&_.current&&B.current({sessionId:re.id,cwd:ne.cwd})}return}}if(_.current){m(e,"connecting");try{const J=L.current||void 0,{sessionId:X,cwd:re}=await ff($,P,J);if(!_.current)return;p(e,X),V(N,X),(M=B.current)==null||M.call(B,{sessionId:X,cwd:re})}catch(J){if(!_.current)return;m(e,"error"),b(e,J.message||r("terminal.createSessionFailed"))}}}},[V,e,p,m,b]),I=S.useRef(null);S.useEffect(()=>{_.current=!0;const N=h.current;if(!N)return;const W=()=>{if(!_.current)return;const{clientWidth:P,clientHeight:z}=N;P===0||z===0||(k.current||(I.current=Y()||null),y.current&&v.current&&(C.current||ee()))};if(N.clientWidth>0&&N.clientHeight>0){const P=requestAnimationFrame(W);return()=>cancelAnimationFrame(P)}const $=new ResizeObserver(P=>{for(const z of P){const{width:F,height:M}=z.contentRect;if(F>0&&M>0){$.disconnect(),W();break}}});return $.observe(N),()=>$.disconnect()},[Y,ee]),S.useEffect(()=>()=>{var N,W,$;_.current=!1,(N=R.current)==null||N.call(R),(W=I.current)==null||W.call(I),($=y.current)==null||$.dispose(),y.current=null,v.current=null,k.current=!1,C.current=!1},[]),S.useEffect(()=>{const N=y.current;if(N){const W=s==="dark"?hf:pf;N.options.theme=W;try{N.refresh(0,N.rows-1)}catch{}}},[s,c]);const T=S.useCallback(async()=>{var W,$,P;if(H(),C.current=!1,m(e,"connecting"),b(e,null),await new Promise(z=>setTimeout(z,O0)),!_.current)return;const N=y.current;if(N)try{N.clear();try{(W=v.current)==null||W.fit()}catch{}const z=N.cols||80,F=N.rows||24,M=($=Re.getState().panes[e])==null?void 0:$.ptySessionId;if(M&&await mf(M)&&_.current){V(N,M);return}if(!_.current)return;const J=L.current||void 0,{sessionId:X,cwd:re}=await ff(z,F,J);if(!_.current)return;p(e,X),V(N,X),(P=B.current)==null||P.call(B,{sessionId:X,cwd:re})}catch(z){if(!_.current)return;m(e,"error"),b(e,z.message||r("terminal.reconnectFailed"))}},[H,V,e,p,m,b]),j=S.useCallback(()=>{var N;g||d(e),(N=y.current)==null||N.focus()},[g,e,d]);return o?i.jsxs("div",{className:`terminal-pane flex flex-col h-full w-full min-h-0 ${g&&f>1?"active":""}`,style:{backgroundColor:"var(--ide-side-panel-bg)"},onClick:j,children:[f>1&&i.jsx("div",{className:"terminal-pane-toolbar",children:i.jsx("button",{onClick:N=>{N.stopPropagation(),u(e)},className:"w-6 h-6 flex items-center justify-center rounded bg-bg-tertiary/80 text-text-secondary hover:text-text-primary hover:bg-bg-hover transition-colors",title:r("terminal.closePane"),children:i.jsx(at,{size:14})})}),i.jsx("div",{ref:h,className:"flex-1 w-full min-h-0",style:{overflow:"hidden",padding:"4px"}}),o.ptyStatus==="connecting"&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-10",style:{backgroundColor:"var(--ide-side-panel-bg)"},children:i.jsx(Ue,{size:20,className:"animate-spin",style:{color:"var(--color-text-tertiary)"}})}),o.ptyStatus==="error"&&i.jsxs("div",{className:"absolute bottom-0 left-0 right-0 flex items-center justify-between px-4 py-2 bg-accent-red/10 border-t border-accent-red/30 z-10",children:[i.jsxs("div",{className:"flex items-center gap-2 text-accent-red text-xs",children:[i.jsx(Dw,{size:14}),i.jsx("span",{children:o.errorMessage||r("terminal.error")})]}),i.jsxs("button",{onClick:T,className:"flex items-center gap-1.5 px-3 py-1 rounded-md bg-bg-secondary border border-border-muted text-text-primary text-xs hover:bg-bg-hover transition-colors",children:[i.jsx(bt,{size:12}),i.jsx("span",{children:r("terminal.reconnect")})]})]})]}):i.jsx("div",{})}const bf=400,yf=300,ho=200,mo=150,fo=.1,go=5,Nn=20,xf=3,ly=8,F0=10,cy=32,B0=cy;function dy(){return be({"Content-Type":"application/json"})}async function z0(e){try{const t=await fetch(`/api/v1/pty/${e}`,{headers:dy()});if(!t.ok)return null;const n=await t.json(),r=n.data??n;return typeof(r==null?void 0:r.cwd)=="string"?r.cwd:null}catch{return null}}function uy(e){const t=Object.values(e);if(t.length===0)return;const r={...Re.getState().panes};let s=!1;for(const o of t){const l=r[o.paneId];l?o.ptySessionId&&l.ptySessionId!==o.ptySessionId&&(r[o.paneId]={...l,ptySessionId:o.ptySessionId},s=!0):(r[o.paneId]={id:o.paneId,ptySessionId:o.ptySessionId??null,ptyStatus:"disconnected",errorMessage:null},s=!0)}s&&Re.setState({panes:r})}const rt=Ye()(Dr((e,t)=>({viewport:{panX:0,panY:0,zoom:1},tiles:{},nextZIndex:1,selectedTileIds:[],setViewport:n=>{e({viewport:n})},addTile:()=>{const n=`tile-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,r=`canvas-pane-${n}`,{nextZIndex:s,viewport:o}=t(),l=o.zoom||1,a=(-o.panX+window.innerWidth/2)/l-bf/2,c=(-o.panY+window.innerHeight/2)/l-yf/2,d=Math.round(a/Nn)*Nn,u=Math.round(c/Nn)*Nn,p={id:n,type:"terminal",x:d,y:u,width:bf,height:yf,zIndex:s,paneId:r,windowState:"normal",ptySessionId:null,cwd:null},m=Re.getState();if(!m.panes[r]){const b={...m.panes,[r]:{id:r,ptySessionId:null,ptyStatus:"disconnected",errorMessage:null}};Re.setState({panes:b})}return e(b=>({tiles:{...b.tiles,[n]:p},nextZIndex:b.nextZIndex+1})),n},duplicateTile:n=>{var h,y,v,E;const r=t().tiles[n];if(!r)return null;const s=`tile-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,o=`canvas-pane-${s}`,{nextZIndex:l}=t(),a=((h=r.prevBounds)==null?void 0:h.width)??r.width,c=((y=r.prevBounds)==null?void 0:y.height)??r.height,d=((v=r.prevBounds)==null?void 0:v.x)??r.x,u=((E=r.prevBounds)==null?void 0:E.y)??r.y,p=Nn*2,m=Math.round((d+p)/Nn)*Nn,b=Math.round((u+p)/Nn)*Nn,w={id:s,type:"terminal",x:m,y:b,width:a,height:c,zIndex:l,paneId:o,windowState:"normal",ptySessionId:null,cwd:r.cwd??null},x=Re.getState();x.panes[o]||Re.setState({panes:{...x.panes,[o]:{id:o,ptySessionId:null,ptyStatus:"disconnected",errorMessage:null}}}),e(_=>({tiles:{..._.tiles,[s]:w},nextZIndex:_.nextZIndex+1}));const g=Re.getState().panes[r.paneId],f=g==null?void 0:g.ptySessionId;return f&&z0(f).then(_=>{_&&(t().updateTile(r.id,{cwd:_}),t().updateTile(s,{cwd:_}))}),s},removeTile:n=>{const r=t().tiles[n];if(r){const s=Re.getState(),o=s.panes[r.paneId];if(o!=null&&o.ptySessionId&&fetch(`/api/v1/pty/${o.ptySessionId}`,{method:"DELETE",headers:dy()}).catch(()=>{}),s.panes[r.paneId]){const{[r.paneId]:l,...a}=s.panes;Re.setState({panes:a})}}e(s=>{const{[n]:o,...l}=s.tiles;return{tiles:l,selectedTileIds:s.selectedTileIds.filter(a=>a!==n)}})},updateTile:(n,r)=>{e(s=>{const o=s.tiles[n];return o?{tiles:{...s.tiles,[n]:{...o,...r}}}:s})},selectTile:n=>e({selectedTileIds:[n]}),deselectAll:()=>e({selectedTileIds:[]}),selectTiles:n=>e({selectedTileIds:n}),bringToFront:n=>{e(r=>{const s=r.tiles[n];return s?{tiles:{...r.tiles,[n]:{...s,zIndex:r.nextZIndex}},nextZIndex:r.nextZIndex+1}:r})},maximizeTile:n=>{e(r=>{const s=r.tiles[n];if(!s)return r;const o=s.windowState==="normal"?{x:s.x,y:s.y,width:s.width,height:s.height}:s.prevBounds;return{tiles:{...r.tiles,[n]:{...s,windowState:"maximized",prevBounds:o,zIndex:r.nextZIndex}},nextZIndex:r.nextZIndex+1}})},minimizeTile:n=>{e(r=>{const s=r.tiles[n];if(!s)return r;const o=s.windowState==="normal"?{x:s.x,y:s.y,width:s.width,height:s.height}:s.prevBounds;return{tiles:{...r.tiles,[n]:{...s,height:B0,windowState:"minimized",prevBounds:o}}}})},restoreTile:n=>{e(r=>{const s=r.tiles[n];return!s||!s.prevBounds?s?{tiles:{...r.tiles,[n]:{...s,windowState:"normal"}}}:r:{tiles:{...r.tiles,[n]:{...s,x:s.prevBounds.x,y:s.prevBounds.y,width:s.prevBounds.width,height:s.prevBounds.height,windowState:"normal",prevBounds:void 0}}}})},toggleMaximize:n=>{const r=t().tiles[n];r&&(r.windowState==="maximized"?t().restoreTile(n):t().maximizeTile(n))},toggleMinimize:n=>{const r=t().tiles[n];r&&(r.windowState==="minimized"?t().restoreTile(n):t().minimizeTile(n))},setTilePty:(n,r,s)=>{let o=null;if(e(l=>{const a=l.tiles[n];if(!a)return l;o=a.paneId;const c={...a,ptySessionId:r};return s!==void 0&&(c.cwd=s),{tiles:{...l.tiles,[n]:c}}}),o){const l=Re.getState(),a=l.panes[o];a&&a.ptySessionId!==r&&Re.setState({panes:{...l.panes,[o]:{...a,ptySessionId:r}}})}},loadFromStorage:()=>{}}),{namespace:"canvas",fields:["viewport","tiles","nextZIndex"],scope:"workspace",debounceMs:1e3,onLoad:(e,t)=>{const n={};e.viewport&&(n.viewport=e.viewport),e.tiles&&(n.tiles=e.tiles),e.nextZIndex!==void 0&&(n.nextZIndex=e.nextZIndex),Object.keys(n).length>0&&(t(n),n.tiles&&uy(n.tiles))}}));uy(rt.getState().tiles);function U0(){const{t:e}=ce(),[t,n]=S.useState(()=>aa().get("paneId")||"");S.useEffect(()=>{const a=()=>{n(aa().get("paneId")||"")};return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]);const r=rt(a=>Object.values(a.tiles).find(c=>c.paneId===t)??null),s=Re(a=>{var c;return t?(c=a.panes[t])==null?void 0:c.title:null}),o=rt(a=>a.setTilePty),l=S.useCallback(a=>{r&&o(r.id,a.sessionId,a.cwd||null)},[r,o]);return S.useEffect(()=>{if(!t)return;const a=Re.getState();a.panes[t]||Re.setState({panes:{...a.panes,[t]:{id:t,ptySessionId:(r==null?void 0:r.ptySessionId)??null,ptyStatus:"disconnected",errorMessage:null}}})},[t,r==null?void 0:r.ptySessionId]),t?i.jsxs("div",{className:"flex flex-col h-full w-full bg-bg-primary",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 select-none",style:{height:32,background:"var(--color-canvas-tile-header)",color:"var(--color-canvas-tile-header-text)",borderBottom:"1px solid var(--color-border-default)"},children:[i.jsx(Pr,{size:14,style:{opacity:.6}}),i.jsx("span",{className:"text-xs truncate",style:{fontSize:12,fontWeight:500},children:s||e("canvas.defaultTitle")})]}),i.jsx("div",{className:"flex-1 min-h-0 relative",children:i.jsx(Na,{paneId:t,initialCwd:(r==null?void 0:r.cwd)??null,onPtyCreated:l})})]}):i.jsx("div",{className:"flex items-center justify-center h-full w-full bg-bg-primary text-text-secondary text-sm",children:e("canvas.standalone.missingPaneId")})}class Wi{constructor(){he(this,"panX",0);he(this,"panY",0);he(this,"zoom",1)}getState(){return{panX:this.panX,panY:this.panY,zoom:this.zoom}}setState(t){this.panX=t.panX,this.panY=t.panY,this.zoom=Math.max(fo,Math.min(go,t.zoom))}screenToWorld(t,n){return this.zoom===0?{x:0,y:0}:{x:(t-this.panX)/this.zoom,y:(n-this.panY)/this.zoom}}worldToScreen(t,n){return{x:t*this.zoom+this.panX,y:n*this.zoom+this.panY}}applyZoom(t,n,r){const s=this.zoom,o=Math.exp(-t*.6/100),l=Math.max(fo,Math.min(go,s*o));if(s===0)return this.zoom=l,this.getState();const a=l/s-1;return this.panX-=(n-this.panX)*a,this.panY-=(r-this.panY)*a,this.zoom=l,this.getState()}applyPan(t,n){return this.panX+=t,this.panY+=n,this.getState()}fitTiles(t,n,r,s=40){if(t.length===0)return this.resetView();let o=1/0,l=1/0,a=-1/0,c=-1/0;for(const g of t)o=Math.min(o,g.x),l=Math.min(l,g.y),a=Math.max(a,g.x+g.width),c=Math.max(c,g.y+g.height);const d=a-o,u=c-l;if(d<=0||u<=0)return this.resetView();const p=n-s*2,m=r-s*2;if(p<=0||m<=0)return this.resetView();const b=Math.max(fo,Math.min(go,Math.min(p/d,m/u))),w=(n-d*b)/2-o*b,x=(r-u*b)/2-l*b;return this.panX=w,this.panY=x,this.zoom=b,this.getState()}resetView(){return this.panX=0,this.panY=0,this.zoom=1,this.getState()}}const vf=120;function H0(){const{t:e}=ce(),t=rt(f=>f.viewport),n=rt(f=>f.tiles),r=rt(f=>f.setViewport),s=rt(f=>f.addTile),o=S.useRef(null),l=Math.round(t.zoom*100),a=typeof window<"u"&&window.location.hash.includes("standalone");if(Object.values(n).some(f=>f.windowState==="maximized"))return null;const d=()=>{var h;const f=(h=o.current)==null?void 0:h.parentElement;return{w:(f==null?void 0:f.clientWidth)??window.innerWidth,h:(f==null?void 0:f.clientHeight)??window.innerHeight}},u=()=>{const f=new Wi;f.setState(t);const{w:h,h:y}=d(),v=f.applyZoom(-vf,h/2,y/2);r(v)},p=()=>{const f=new Wi;f.setState(t);const{w:h,h:y}=d(),v=f.applyZoom(vf,h/2,y/2);r(v)},m=()=>{const f=new Wi;f.setState(t);const{w:h,h:y}=d(),v=Object.values(n);v.length===0?r(f.resetView()):r(f.fitTiles(v,h,y,60))},b=()=>{s()},w=()=>{const f=new URLSearchParams(window.location.search),h=new URLSearchParams;h.set("standalone","1"),f.forEach((v,E)=>{h.has(E)||h.set(E,v)});const y=`${window.location.pathname}${window.location.search}#/canvas?${h.toString()}`;window.open(y,"canvas-standalone","noopener,noreferrer")},x="w-8 h-8 flex items-center justify-center rounded-lg transition-colors",g={border:"none",background:"transparent",color:"var(--color-text-secondary)",cursor:"pointer"};return i.jsxs("div",{ref:o,className:"canvas-toolbar fixed bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 px-2 py-1 rounded-xl",style:{background:"var(--color-bg-card)",border:"1px solid var(--color-border-default)",boxShadow:"0 2px 12px rgba(0,0,0,0.12)",zIndex:1e4},children:[i.jsx("button",{className:x,style:g,onClick:b,title:e("canvas.addTerminal"),children:i.jsx(St,{size:16})}),i.jsx("div",{style:{width:1,height:20,background:"var(--color-border-muted)"}}),i.jsx("button",{className:x,style:g,onClick:p,title:e("canvas.zoomOut"),children:i.jsx(S0,{size:16})}),i.jsxs("span",{className:"text-xs tabular-nums select-none",style:{minWidth:40,textAlign:"center",color:"var(--color-text-secondary)"},children:[l,"%"]}),i.jsx("button",{className:x,style:g,onClick:u,title:e("canvas.zoomIn"),children:i.jsx(_0,{size:16})}),i.jsx("div",{style:{width:1,height:20,background:"var(--color-border-muted)"}}),i.jsx("button",{className:x,style:g,onClick:m,title:e("canvas.fitView"),children:i.jsx(JS,{size:16})}),!a&&i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{width:1,height:20,background:"var(--color-border-muted)"}}),i.jsx("button",{className:x,style:g,onClick:w,title:e("canvas.openStandalone"),children:i.jsx(tn,{size:16})})]})]})}function Hr(e,t=Nn,n=F0){const r=(e%t+t)%t;return r<=n?e-r:t-r<=n?e+(t-r):e}function W0(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable)}class G0{constructor(){he(this,"dragState",null);he(this,"spacePressed",!1);he(this,"callbacks",null);he(this,"keydownHandler",null);he(this,"keyupHandler",null);he(this,"dragStarted",!1);he(this,"panSamples",[])}attach(t){this.callbacks=t,this.keydownHandler=n=>{if(n.code==="Space"&&!n.repeat){if(W0(n.target))return;this.spacePressed=!0,n.preventDefault()}},this.keyupHandler=n=>{n.code==="Space"&&(this.spacePressed=!1)},window.addEventListener("keydown",this.keydownHandler),window.addEventListener("keyup",this.keyupHandler)}detach(){this.keydownHandler&&(window.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.keyupHandler&&(window.removeEventListener("keyup",this.keyupHandler),this.keyupHandler=null),this.callbacks=null,this.dragState=null}get isSpacePressed(){return this.spacePressed}get isDragging(){return this.dragState!==null&&this.dragStarted}get currentDrag(){return this.dragState}handlePointerDown(t,n,r,s){var c,d,u;const o=t.clientX,l=t.clientY;this.dragStarted=!1,this.panSamples=[],(d=(c=this.callbacks)==null?void 0:c.onInteractionStart)==null||d.call(c);const a=(u=this.callbacks)==null?void 0:u.getViewport();if(this.spacePressed||!n&&!r){const p=t.shiftKey||t.ctrlKey||t.metaKey;!this.spacePressed&&p?this.dragState={type:"select",startScreenX:o,startScreenY:l}:(this.dragState={type:"pan",startScreenX:o,startScreenY:l,initialViewport:a?{...a}:void 0},this.panSamples=[{t:performance.now(),x:o,y:l}]);return}if(n&&r){const p=s[n];if(!p)return;this.dragState={type:"resize",startScreenX:o,startScreenY:l,tileId:n,handle:r,initialTiles:{[n]:{x:p.x,y:p.y,width:p.width,height:p.height}}};return}if(n){const p=s[n];if(!p)return;const m={};m[n]={x:p.x,y:p.y,width:p.width,height:p.height},this.dragState={type:"move",startScreenX:o,startScreenY:l,tileId:n,initialTiles:m}}}handlePointerMove(t){var o,l;if(!this.dragState||!this.callbacks)return;const n=t.clientX-this.dragState.startScreenX,r=t.clientY-this.dragState.startScreenY;if(!this.dragStarted){if(Math.abs(n)<xf&&Math.abs(r)<xf)return;this.dragStarted=!0}const s=this.callbacks.getViewport();switch(this.dragState.type){case"pan":{const a=this.dragState.initialViewport;if(a){const u=n,p=r;this.callbacks.onViewportPan(a.panX+u-s.panX,a.panY+p-s.panY)}const c=performance.now();this.panSamples.push({t:c,x:t.clientX,y:t.clientY});const d=c-100;for(;this.panSamples.length>2&&this.panSamples[0].t<d;)this.panSamples.shift();break}case"move":{if(this.dragState.tileId&&s.zoom!==0){const a=n/s.zoom,c=r/s.zoom,d=(o=this.dragState.initialTiles)==null?void 0:o[this.dragState.tileId];d&&this.callbacks.onTileMove(this.dragState.tileId,Hr(d.x+a),Hr(d.y+c))}break}case"resize":{if(this.dragState.tileId&&this.dragState.handle&&s.zoom!==0){const a=(l=this.dragState.initialTiles)==null?void 0:l[this.dragState.tileId];if(a){const c=n/s.zoom,d=r/s.zoom,u=this.applyResize(this.dragState.handle,a,c,d);this.callbacks.onTileResize(this.dragState.tileId,u)}}break}case"select":{const a={x:Math.min(this.dragState.startScreenX,t.clientX),y:Math.min(this.dragState.startScreenY,t.clientY),width:Math.abs(n),height:Math.abs(r)};this.callbacks.onSelectionBox(a);break}}}handlePointerUp(t){var s,o,l,a;if(!this.callbacks){this.dragState=null;return}const n=((s=this.dragState)==null?void 0:s.type)==="pan",r=this.dragStarted;if(this.dragStarted?((a=this.dragState)==null?void 0:a.type)==="select"&&(this.callbacks.onSelectionBox(null),this.callbacks.onBoxSelectEnd([])):(o=this.dragState)!=null&&o.tileId?this.callbacks.onTileClick(this.dragState.tileId):((l=this.dragState)==null?void 0:l.type)==="select"&&this.callbacks.onCanvasClick(),n&&r&&this.panSamples.length>=2&&this.callbacks.onPanInertiaStart){const c=this.panSamples[this.panSamples.length-1],d=this.panSamples[0],u=c.t-d.t;if(u>0){const p=(c.x-d.x)/u,m=(c.y-d.y)/u;Math.hypot(p,m)>.05&&this.callbacks.onPanInertiaStart(p,m)}}this.dragState=null,this.dragStarted=!1,this.panSamples=[]}getSelectedTileIds(t,n){const r=[],s=t.x,o=t.y,l=t.width,a=t.height;for(const c of Object.values(n))c.x<s+l&&c.x+c.width>s&&c.y<o+a&&c.y+c.height>o&&r.push(c.id);return r}getResizeHandle(t,n,r,s=ly){const{x:o,y:l,width:a,height:c}=t,d=o+a/2,u=l+c/2,p=o+a,m=l+c;return this.hitTest(n,r,o,l,s)?"nw":this.hitTest(n,r,p,l,s)?"ne":this.hitTest(n,r,o,m,s)?"sw":this.hitTest(n,r,p,m,s)?"se":this.hitTest(n,r,d,l,s)?"n":this.hitTest(n,r,d,m,s)?"s":this.hitTest(n,r,o,u,s)?"w":this.hitTest(n,r,p,u,s)?"e":null}applyResize(t,n,r,s){let{x:o,y:l,width:a,height:c}=n;switch(t){case"n":l=n.y+s,c=n.height-s;break;case"s":c=n.height+s;break;case"w":o=n.x+r,a=n.width-r;break;case"e":a=n.width+r;break;case"nw":o=n.x+r,l=n.y+s,a=n.width-r,c=n.height-s;break;case"ne":l=n.y+s,a=n.width+r,c=n.height-s;break;case"sw":o=n.x+r,a=n.width-r,c=n.height+s;break;case"se":a=n.width+r,c=n.height+s;break}return a<ho&&((t==="w"||t==="nw"||t==="sw")&&(o=n.x+n.width-ho),a=ho),c<mo&&((t==="n"||t==="nw"||t==="ne")&&(l=n.y+n.height-mo),c=mo),o=Hr(o),l=Hr(l),a=Hr(a),c=Hr(c),{x:o,y:l,width:a,height:c}}isInTileHeader(t,n,r,s){const o=cy*s;return n>=t.x&&n<=t.x+t.width&&r>=t.y&&r<=t.y+o}hitTest(t,n,r,s,o){return Math.abs(t-r)<=o&&Math.abs(n-s)<=o}}const q0=[{position:"n",cursor:"ns-resize",className:"top-0 left-2 right-2 h-1.5 -translate-y-1/2"},{position:"s",cursor:"ns-resize",className:"bottom-0 left-2 right-2 h-1.5 translate-y-1/2"},{position:"e",cursor:"ew-resize",className:"right-0 top-2 bottom-2 w-1.5 translate-x-1/2"},{position:"w",cursor:"ew-resize",className:"left-0 top-2 bottom-2 w-1.5 -translate-x-1/2"},{position:"nw",cursor:"nwse-resize",className:"top-0 left-0 w-3 h-3 -translate-x-1/2 -translate-y-1/2"},{position:"ne",cursor:"nesw-resize",className:"top-0 right-0 w-3 h-3 translate-x-1/2 -translate-y-1/2"},{position:"sw",cursor:"nesw-resize",className:"bottom-0 left-0 w-3 h-3 -translate-x-1/2 translate-y-1/2"},{position:"se",cursor:"nwse-resize",className:"bottom-0 right-0 w-3 h-3 translate-x-1/2 translate-y-1/2"}];function V0({tile:e,viewport:t,isSelected:n}){const{t:r}=ce(),s=rt(T=>T.removeTile),o=rt(T=>T.duplicateTile),l=rt(T=>T.toggleMaximize),a=rt(T=>T.toggleMinimize),c=rt(T=>T.setTilePty),d=rt(T=>T.selectTile),u=rt(T=>T.bringToFront),p=Re(T=>{var j;return(j=T.panes[e.paneId])==null?void 0:j.title}),{panX:m,panY:b,zoom:w}=t,x=e.x*w+m,g=e.y*w+b,f=e.windowState==="maximized",h=e.windowState==="minimized",y=n?"var(--color-canvas-tile-border-selected)":"var(--color-canvas-tile-border)",v=S.useCallback(()=>{l(e.id)},[e.id,l]),E=S.useCallback(()=>{a(e.id)},[e.id,a]),_=S.useCallback(()=>{o(e.id)},[e.id,o]),k=S.useCallback(T=>{T.target.closest("button")||(T.stopPropagation(),h?a(e.id):l(e.id))},[e.id,h,l,a]),C=S.useCallback(T=>{c(e.id,T.sessionId,T.cwd||null)},[e.id,c]),R=S.useRef(null),[O,A]=S.useState(!1);S.useEffect(()=>{const T=j=>{A(j.shiftKey||j.altKey)};return window.addEventListener("keydown",T),window.addEventListener("keyup",T),()=>{window.removeEventListener("keydown",T),window.removeEventListener("keyup",T)}},[]);const D=n||O,L=S.useRef(null),B=S.useCallback(T=>{L.current={x:T.clientX,y:T.clientY,id:T.pointerId}},[]),H=S.useCallback(T=>{L.current=null},[]),V=S.useCallback(T=>{var W;if(T.ctrlKey||T.metaKey||T.shiftKey||!n)return;const N=(W=R.current)==null?void 0:W.querySelector(".xterm-viewport");N&&(N.scrollTop+=T.deltaY,T.stopPropagation())},[n]),Y=S.useCallback(()=>{const T=new URLSearchParams(window.location.search),j=new URLSearchParams;j.set("paneId",e.paneId),T.forEach((W,$)=>{j.has($)||j.set($,W)});const N=`${window.location.pathname}${window.location.search}#/canvas-pane?${j.toString()}`;window.open(N,`canvas-pane-${e.paneId}`,"noopener,noreferrer")},[e.paneId]),ee=f?{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",transform:"none",pointerEvents:"auto",zIndex:9999,borderRadius:0,border:"none",overflow:"hidden",boxShadow:"none"}:{transform:`translate(${x}px, ${g}px) scale(${w})`,transformOrigin:"top left",width:e.width,height:e.height,willChange:"transform",pointerEvents:"auto",zIndex:e.zIndex,borderRadius:8,border:`1px solid ${y}`,overflow:"hidden",boxShadow:n?"0 0 0 1px var(--color-canvas-tile-border-selected)":"0 2px 8px rgba(0,0,0,0.08)"},I=S.useCallback(T=>{var $;if(T.button!==0)return;d(e.id),u(e.id);const j=($=R.current)==null?void 0:$.querySelector(".xterm-helper-textarea");if(!j)return;const N=()=>{try{j.focus()}catch{}};N();const W=()=>{window.removeEventListener("pointerup",W,!0),N()};window.addEventListener("pointerup",W,!0)},[e.id,d,u]);return i.jsxs("div",{className:f?"canvas-tile":"absolute canvas-tile",style:ee,onPointerDownCapture:I,children:[i.jsxs("div",{className:"canvas-tile-header flex items-center gap-1.5 px-2 select-none",style:{height:32,background:"var(--color-canvas-tile-header)",color:"var(--color-canvas-tile-header-text)",cursor:"grab",borderBottom:h?"none":"1px solid var(--color-canvas-tile-border)"},onDoubleClick:k,children:[i.jsx(Pr,{size:13,style:{opacity:.5,flexShrink:0}}),i.jsx("span",{className:"flex-1 text-xs truncate",style:{fontSize:12,fontWeight:500},children:p||r("canvas.defaultTitle")}),i.jsx("button",{onClick:T=>{T.stopPropagation(),_()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r("canvas.tileMenu.duplicate"),children:i.jsx(ls,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),Y()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r("canvas.tileMenu.openStandalone"),children:i.jsx(tn,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),E()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r(h?"canvas.tileMenu.restore":"canvas.tileMenu.minimize"),children:h?i.jsx(Vl,{size:12}):i.jsx(ri,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),v()},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r(f?"canvas.tileMenu.restore":"canvas.tileMenu.maximize"),children:f?i.jsx(Wl,{size:12}):i.jsx(ni,{size:12})}),i.jsx("button",{onClick:T=>{T.stopPropagation(),s(e.id)},className:"w-5 h-5 flex items-center justify-center rounded hover:bg-bg-hover transition-colors",style:{cursor:"pointer",border:"none",background:"transparent",color:"inherit"},title:r("canvas.tileMenu.close"),children:i.jsx(at,{size:12})})]}),!h&&i.jsxs("div",{ref:R,className:"flex-1 relative",style:{height:"calc(100% - 32px)",overflow:"hidden"},children:[i.jsx(Na,{paneId:e.paneId,initialCwd:e.cwd??null,onPtyCreated:C}),i.jsx("div",{className:"absolute inset-0","data-canvas-tile-focused":n?"true":"false",style:{zIndex:5,pointerEvents:D?"none":"auto",background:"transparent"},onPointerDown:B,onPointerUp:H,onWheel:V})]}),!h&&q0.map(T=>i.jsx("div",{className:`absolute ${T.className}`,style:{cursor:T.cursor,zIndex:10,opacity:0},"data-resize-handle":T.position},T.position))]})}function K0({rect:e}){return i.jsx("div",{className:"absolute pointer-events-none",style:{left:e.x,top:e.y,width:e.width,height:e.height,background:"var(--color-canvas-selection-fill)",border:"1px solid var(--color-canvas-selection-stroke)",borderRadius:2,zIndex:999}})}function Z0(){const e=S.useRef(null),t=S.useRef(new Wi),n=S.useRef(new G0),r=rt(T=>T.tiles),s=rt(T=>T.viewport),o=rt(T=>T.selectedTileIds),l=rt(T=>T.setViewport),a=rt(T=>T.updateTile),c=rt(T=>T.selectTile),d=rt(T=>T.selectTiles),u=rt(T=>T.deselectAll),p=rt(T=>T.bringToFront),[m,b]=S.useState(null),[w,x]=S.useState(!1),[g,f]=S.useState(!1),[h,y]=S.useState(null);S.useEffect(()=>{t.current.setState(s)},[s]);const v=S.useMemo(()=>Object.values(r).sort((T,j)=>T.zIndex-j.zIndex),[r]),E=S.useMemo(()=>new Set(o),[o]),_=S.useRef(s);_.current=s;const k=S.useRef({setViewport:l,updateTile:a,selectTile:c,deselectAll:u,bringToFront:p,selectTiles:d});k.current={setViewport:l,updateTile:a,selectTile:c,deselectAll:u,bringToFront:p,selectTiles:d};const C=.92,R=.01,O=3.5,A=S.useRef(null),D=S.useRef({vx:0,vy:0,last:0}),L=S.useCallback(()=>{A.current!==null&&(cancelAnimationFrame(A.current),A.current=null)},[]),B=S.useCallback((T,j)=>{L();const N=Math.hypot(T,j);if(N>O){const $=O/N;T*=$,j*=$}D.current={vx:T,vy:j,last:performance.now()};const W=()=>{const $=performance.now(),P=D.current,z=Math.min(32,$-P.last);P.last=$;const M=t.current.applyPan(P.vx*z,P.vy*z);k.current.setViewport(M);const J=Math.pow(C,z/16.67);if(P.vx*=J,P.vy*=J,Math.hypot(P.vx,P.vy)<R){A.current=null;return}A.current=requestAnimationFrame(W)};A.current=requestAnimationFrame(W)},[L]);S.useEffect(()=>()=>L(),[L]),S.useEffect(()=>{const T=n.current,j={onViewportPan:(N,W)=>{const P=t.current.applyPan(N,W);k.current.setViewport(P)},onTileMove:(N,W,$)=>{k.current.updateTile(N,{x:W,y:$})},onTileResize:(N,W)=>{k.current.updateTile(N,W)},onTileSelect:N=>{k.current.selectTile(N),k.current.bringToFront(N)},onSelectionBox:N=>{if(N){const W=e.current,$=W==null?void 0:W.getBoundingClientRect();b($?{x:N.x-$.left,y:N.y-$.top,width:N.width,height:N.height}:N)}else b(null)},onBoxSelectEnd:()=>{},onTileClick:N=>{k.current.selectTile(N),k.current.bringToFront(N)},onCanvasClick:()=>{k.current.deselectAll()},onInteractionStart:()=>{L()},onPanInertiaStart:(N,W)=>{B(N,W)},getViewport:()=>_.current};return T.attach(j),()=>T.detach()},[]),S.useEffect(()=>{const T=e.current;if(!T)return;const j=t.current,N=P=>{const z=P.target,F=!!(z&&z.closest('.xterm, .xterm-screen, .xterm-viewport, input, textarea, [contenteditable="true"], [contenteditable=""]')),M=!!(z&&z.closest('[data-canvas-tile-focused="true"]')),J=P.ctrlKey||P.metaKey;if((F||M)&&!J&&!P.shiftKey)return;P.preventDefault();const X=T.getBoundingClientRect(),re=P.clientX-X.left,ne=P.clientY-X.top;if(J){const de=j.applyZoom(P.deltaY,re,ne);l(de);return}let te=-P.deltaX,fe=-P.deltaY;P.shiftKey&&te===0&&(te=-P.deltaY,fe=0);const pe=P.deltaMode===1?16:P.deltaMode===2?100:1,ge=j.applyPan(te*pe,fe*pe);l(ge)},W=P=>{if(!(P.ctrlKey||P.metaKey))return;const z=P.target;if(z){const F=z.tagName;if(F==="INPUT"||F==="TEXTAREA"||F==="SELECT"||z.isContentEditable)return}if(P.key==="+"||P.key==="="||P.key==="-"||P.key==="_"||P.key==="0"){P.preventDefault();const F=T.clientWidth,M=T.clientHeight;if(P.key==="0")l(j.resetView());else if(P.key==="-"||P.key==="_"){const J=j.applyZoom(120,F/2,M/2);l(J)}else{const J=j.applyZoom(-120,F/2,M/2);l(J)}}},$=P=>{P.preventDefault()};return T.addEventListener("wheel",N,{passive:!1}),window.addEventListener("keydown",W),T.addEventListener("gesturestart",$),T.addEventListener("gesturechange",$),T.addEventListener("gestureend",$),()=>{T.removeEventListener("wheel",N),window.removeEventListener("keydown",W),T.removeEventListener("gesturestart",$),T.removeEventListener("gesturechange",$),T.removeEventListener("gestureend",$)}},[l]);const H=S.useCallback(T=>{const j=e.current;if(!j)return;const N=T.button===1||T.button===2,W=n.current.isSpacePressed,$=j.getBoundingClientRect(),P=T.clientX-$.left,z=T.clientY-$.top,F=n.current;let M=null,J=null,X=null;if(!N&&!W){const pe=[...Object.values(r)].sort((ge,de)=>de.zIndex-ge.zIndex);for(const ge of pe){const de=ge.x*s.zoom+s.panX,Ne=ge.y*s.zoom+s.panY,Ce=ge.width*s.zoom,oe=ge.height*s.zoom,_e={x:de,y:Ne,width:Ce,height:oe},Be=F.getResizeHandle(_e,P,z,ly);if(Be){M=ge.id,J=Be,X=ge.id;break}if(F.isInTileHeader(_e,P,z,s.zoom)){M=ge.id,X=ge.id;break}if(P>=de&&P<=de+Ce&&z>=Ne&&z<=Ne+oe){X=ge.id;break}}}const re=T.target;if(!N&&!W&&J===null&&X&&E.has(X)&&re&&re.closest(".xterm, .xterm-screen, .xterm-viewport, .xterm-rows"))return;const ne=T.target;if(ne&&!(N||W||J!==null)&&(ne.closest("button")||ne.closest("input, textarea:not(.xterm-helper-textarea), select")||ne.closest('[contenteditable="true"], [contenteditable=""]')))return;if(N&&T.preventDefault(),!X&&!J){const pe=document.activeElement;pe&&typeof pe.blur=="function"&&pe.blur(),u()}const fe=T.nativeEvent;F.handlePointerDown(fe,M,J,r),X?(c(X),p(X)):(T.shiftKey||T.ctrlKey||T.metaKey)&&u(),j.setPointerCapture(T.pointerId),x(F.isSpacePressed)},[r,s,c,u,p,E]),V=S.useCallback(T=>{var N;const j=n.current;j.handlePointerMove(T.nativeEvent),x(j.isSpacePressed),f(j.isDragging),y(((N=j.currentDrag)==null?void 0:N.type)??null)},[]),Y=S.useCallback(T=>{var W;const j=n.current;if(((W=j.currentDrag)==null?void 0:W.type)==="select"&&j.isDragging&&m){const $=s.zoom||1,P={x:(m.x-s.panX)/$,y:(m.y-s.panY)/$,width:m.width/$,height:m.height/$},z=j.getSelectedTileIds(P,r);d(z)}j.handlePointerUp(T.nativeEvent);const N=e.current;N&&N.releasePointerCapture(T.pointerId),f(!1),y(null),b(null)},[s,r,d,m]),I=g&&h==="pan"?"grabbing":w?"grab":"default";return i.jsxs("div",{ref:e,className:"absolute inset-0",style:{cursor:I,touchAction:"none",overscrollBehavior:"contain"},onPointerDown:H,onPointerMove:V,onPointerUp:Y,onContextMenu:T=>T.preventDefault(),children:[i.jsx("div",{className:"absolute inset-0",style:{pointerEvents:"none"},children:v.map(T=>i.jsx(V0,{tile:T,viewport:s,isSelected:E.has(T.id)},T.id))}),m&&i.jsx(K0,{rect:m})]})}function _f(){const e=rt(r=>r.tiles),{t}=ce(),n=Object.keys(e).length>0;return i.jsxs("div",{className:"relative w-full h-full overflow-hidden bg-bg-primary",children:[i.jsx(Z0,{}),i.jsx(H0,{}),!n&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:i.jsx("p",{className:"text-text-tertiary text-sm",children:t("canvas.empty")})})]})}const py="/assets/dark-claw-cat-D_ew_BKV.png",hy="/assets/light-claw-cat-BgBWmnmi.png",my="/assets/red-claw-cat--t2EuBIB.png",fy={small:{container:"w-20 h-20",text:"text-[12px]"},medium:{container:"w-32 h-32",text:"text-[14px]"},large:{container:"w-40 h-40",text:"text-[16px]"}};function gy({size:e="medium",className:t=""}){const r=Lt(o=>o.resolved)==="dark"?py:hy,s=fy[e];return i.jsxs("div",{className:`relative ${s.container} ${t}`,children:[i.jsx("img",{src:r,alt:"",className:"cat-loading-layer cat-loading-layer-base absolute inset-0 w-full h-full object-contain",decoding:"async",loading:"eager"}),i.jsx("img",{src:my,alt:"",className:"cat-loading-layer cat-loading-layer-color absolute inset-0 w-full h-full object-contain",decoding:"async",loading:"eager"})]})}function An({size:e="medium",text:t="Loading...",className:n=""}){const r=fy[e];return i.jsxs("div",{className:`flex flex-col items-center justify-center gap-4 ${n}`,children:[i.jsx(gy,{size:e}),t&&i.jsx("div",{className:`text-text-secondary ${r.text} font-medium animate-pulse`,children:t})]})}function Y0({size:e="medium",className:t=""}){return i.jsx(gy,{size:e,className:t})}function wf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X0(e){if(Array.isArray(e))return e}function J0(e,t,n){return(t=iE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,l,a=[],c=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(u){d=!0,s=u}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return a}}function eE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
681
681
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sf(Object(n),!0).forEach(function(r){J0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tE(e,t){if(e==null)return{};var n,r,s=nE(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function nE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function rE(e,t){return X0(e)||Q0(e,t)||aE(e,t)||eE()}function sE(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iE(e){var t=sE(e,"string");return typeof t=="symbol"?t:t+""}function aE(e,t){if(e){if(typeof e=="string")return wf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wf(e,t):void 0}}function oE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Cf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ef(Object(n),!0).forEach(function(r){oE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ef(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(s,o){return o(s)},r)}}function Os(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var l=arguments.length,a=new Array(l),c=0;c<l;c++)a[c]=arguments[c];return t.apply(n,[].concat(s,a))}}}function oa(e){return{}.toString.call(e).includes("Object")}function cE(e){return!Object.keys(e).length}function Vs(e){return typeof e=="function"}function dE(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function uE(e,t){return oa(t)||ar("changeType"),Object.keys(t).some(function(n){return!dE(e,n)})&&ar("changeField"),t}function pE(e){Vs(e)||ar("selectorType")}function hE(e){Vs(e)||oa(e)||ar("handlerType"),oa(e)&&Object.values(e).some(function(t){return!Vs(t)})&&ar("handlersType")}function mE(e){e||ar("initialIsRequired"),oa(e)||ar("initialType"),cE(e)&&ar("initialContent")}function fE(e,t){throw new Error(e[t]||e.default)}var gE={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ar=Os(fE)(gE),Ei={changes:uE,selector:pE,handler:hE,initial:mE};function bE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ei.initial(e),Ei.handler(t);var n={current:e},r=Os(vE)(n,t),s=Os(xE)(n),o=Os(Ei.changes)(e),l=Os(yE)(n);function a(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return Ei.selector(d),d(n.current)}function c(d){lE(r,s,o,l)(d)}return[a,c]}function yE(e,t){return Vs(t)?t(e.current):t}function xE(e,t){return e.current=Cf(Cf({},e.current),t),t}function vE(e,t,n){return Vs(t)?t(e.current):Object.keys(n).forEach(function(r){var s;return(s=t[r])===null||s===void 0?void 0:s.call(t,e.current[r])}),n}var _E={create:bE},wE={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function SE(e){return function t(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=e.length?e.apply(this,s):function(){for(var l=arguments.length,a=new Array(l),c=0;c<l;c++)a[c]=arguments[c];return t.apply(n,[].concat(s,a))}}}function kE(e){return{}.toString.call(e).includes("Object")}function EE(e){return e||Tf("configIsRequired"),kE(e)||Tf("configType"),e.urls?(CE(),{paths:{vs:e.urls.monacoBase}}):e}function CE(){console.warn(by.deprecation)}function TE(e,t){throw new Error(e[t]||e.default)}var by={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
682
682
|
You are using deprecated way of configuration.
|
|
683
683
|
|
package/dist/web-ui/index.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
20
20
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
21
21
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
22
|
-
<script type="module" crossorigin src="/assets/index-
|
|
22
|
+
<script type="module" crossorigin src="/assets/index-i5iGMXx3.js"></script>
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/markdown-Ce2Umeb2.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/vendor-DpYitQz5.js">
|
|
25
25
|
<link rel="stylesheet" crossorigin href="/assets/index-CNL64lkN.css">
|
package/dist/web-ui/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let e,s={};const
|
|
1
|
+
if(!self.define){let e,s={};const i=(i,o)=>(i=new URL(i+".js",o).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(o,n)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let r={};const t=e=>i(e,l),f={module:{uri:l},exports:r,require:t};s[l]=Promise.all(o.map(e=>f[e]||t(e))).then(e=>(n(...e),r))}}define(["./workbox-fed2bdfe"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"sandbox_proxy.html",revision:"e54bd087bf8b90d87d84c3cd8f2c22e9"},{url:"pwa-icon.svg",revision:"673adddf1548f59682764258005b6034"},{url:"logo.svg",revision:"269aa921a3f446f8e17843c89ed7bf35"},{url:"index.html",revision:"05380fc5292db073be067462d935edec"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/vendor-DpYitQz5.js",revision:null},{url:"assets/octicons-CaZ_fok2.woff2",revision:null},{url:"assets/mfixx-CpAhKOZz.woff2",revision:null},{url:"assets/markdown-Ce2Umeb2.js",revision:null},{url:"assets/index-i5iGMXx3.js",revision:null},{url:"assets/index-DixJ0kqk.js",revision:null},{url:"assets/index-CNL64lkN.css",revision:null},{url:"assets/fontawesome-B-jkhYfk.woff2",revision:null},{url:"assets/file-icons-C0jOugUK.woff2",revision:null},{url:"assets/devopicons-QN4QXivI.woff2",revision:null},{url:"logo.svg",revision:"269aa921a3f446f8e17843c89ed7bf35"},{url:"pwa-icon.svg",revision:"673adddf1548f59682764258005b6034"},{url:"manifest.webmanifest",revision:"7a003d0094122eb3e607566c757e9885"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api/,/^\/gateway/,/^\/docs\//]})),e.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),e.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:31536e3})]}),"GET")});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI mode entry point — full module set.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all shared modules from index-shared.ts, then adds TUI-only modules.
|
|
5
|
+
* The shared file is the DEFAULT place to add new modules.
|
|
6
|
+
* Only add exports here if the module has hard TUI dependencies
|
|
7
|
+
* (e.g., imports from ./ui, ink, react, TUI panels).
|
|
8
|
+
*
|
|
9
|
+
* See also: index-headless.ts (headless/SDK entry point)
|
|
10
|
+
*/
|
|
11
|
+
import './process';
|
|
12
|
+
export * from './index-shared';
|
|
13
|
+
// ── TUI-only modules ─────────────────────────────────────────────────
|
|
14
|
+
// These modules are excluded from headless builds because they depend on
|
|
15
|
+
// TUI rendering (ink/react), heavy optional deps, or interactive-only features.
|
|
16
|
+
export * from './doctor'; // CLI diagnostics wizard
|
|
17
|
+
export * from './install'; // CLI install / shell-setup
|
|
18
|
+
export * from './navigation'; // TUI page routing
|
|
19
|
+
export * from './remote-control'; // Remote control via WeChat etc.
|
|
20
|
+
export * from './remote-gateway'; // Remote gateway (local + cloud)
|
|
21
|
+
export * from './resume'; // ResumeMiddleware (imports TUI panel)
|
|
22
|
+
export * from './sandbox'; // e2b sandbox (heavy deps ~1250 modules)
|
|
23
|
+
export * from './shortcut'; // TUI keyboard shortcuts
|
|
24
|
+
export * from './tips'; // TUI tips / user state tracking
|
|
25
|
+
export * from './worktree'; // Git worktree management
|
|
26
|
+
export * from './ui'; // TUI UI components
|
|
27
|
+
export * from './feedback-survey'; // TUI feedback survey
|
|
28
|
+
export * from './undo-redo'; // TUI undo/redo
|
|
29
|
+
export * from './prompt-suggestion'; // TUI prompt suggestions
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencent-ai/codebuddy-code",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.115.0",
|
|
4
4
|
"description": "Use CodeBuddy, Tencent's AI assistant, right from your terminal. CodeBuddy can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.",
|
|
5
5
|
"main": "lib/node/index.js",
|
|
6
6
|
"typings": "lib/node/index.d.ts",
|
|
@@ -42,8 +42,7 @@
|
|
|
42
42
|
"url": "https://cnb.cool/codebuddy/codebuddy-code/-/issues"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
|
-
"access": "public"
|
|
46
|
-
"tag": "dev"
|
|
45
|
+
"access": "public"
|
|
47
46
|
},
|
|
48
47
|
"scripts": {},
|
|
49
48
|
"devDependencies": {}
|
package/product.cloudhosted.json
CHANGED
|
@@ -824,6 +824,6 @@
|
|
|
824
824
|
"SelectImage": true,
|
|
825
825
|
"SkipToolCallSupportCheck": true
|
|
826
826
|
},
|
|
827
|
-
"commit": "
|
|
828
|
-
"date": "2026-07-
|
|
827
|
+
"commit": "1d731a179ea6b5bb914fc2bb51980b267866866c",
|
|
828
|
+
"date": "2026-07-03T01:23:10.163Z"
|
|
829
829
|
}
|
package/product.internal.json
CHANGED
package/product.ioa.json
CHANGED
package/product.json
CHANGED
package/product.selfhosted.json
CHANGED
|
@@ -339,6 +339,6 @@
|
|
|
339
339
|
"ScheduledTasks": true,
|
|
340
340
|
"SkipToolCallSupportCheck": true
|
|
341
341
|
},
|
|
342
|
-
"commit": "
|
|
343
|
-
"date": "2026-07-
|
|
342
|
+
"commit": "1d731a179ea6b5bb914fc2bb51980b267866866c",
|
|
343
|
+
"date": "2026-07-03T01:23:10.178Z"
|
|
344
344
|
}
|