Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/kilo-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,14 @@
{
"command": "kilo-code.new.cycleAgentMode",
"key": "ctrl+.",
"mac": "cmd+."
"mac": "cmd+.",
"when": "sideBarFocus && kilo-code.new.sidebarVisible || activeWebviewPanelId == 'kilo-code.new.AgentManagerPanel' || activeWebviewPanelId == 'kilo-code.new.TabPanel'"
},
{
"command": "kilo-code.new.cyclePreviousAgentMode",
"key": "ctrl+shift+.",
"mac": "cmd+shift+."
"mac": "cmd+shift+.",
"when": "sideBarFocus && kilo-code.new.sidebarVisible || activeWebviewPanelId == 'kilo-code.new.AgentManagerPanel' || activeWebviewPanelId == 'kilo-code.new.TabPanel'"
},
{
"command": "kilo-code.new.autocomplete.cancelSuggestions",
Expand Down
4 changes: 3 additions & 1 deletion packages/kilo-vscode/src/KiloProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,10 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper
// Handle messages from webview (shared handler)
this.setupWebviewMessageHandler(webviewView.webview)

// Pause stats polling when sidebar is hidden, resume when visible
// Track sidebar visibility for keybinding when-clauses and stats polling
vscode.commands.executeCommand("setContext", "kilo-code.new.sidebarVisible", webviewView.visible)
webviewView.onDidChangeVisibility(() => {
vscode.commands.executeCommand("setContext", "kilo-code.new.sidebarVisible", webviewView.visible)
this.statsPoller?.setEnabled(webviewView.visible)
})

Expand Down
8 changes: 6 additions & 2 deletions packages/kilo-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,15 @@ export function activate(context: vscode.ExtensionContext) {
else provider.postMessage({ type: "action", action: "historyButtonClicked" })
}),
vscode.commands.registerCommand("kilo-code.new.cycleAgentMode", () => {
provider.postMessage({ type: "action", action: "cycleAgentMode" })
const tab = activeTabProvider()
if (tab) tab.postMessage({ type: "action", action: "cycleAgentMode" })
else provider.postMessage({ type: "action", action: "cycleAgentMode" })
agentManagerProvider.postMessage({ type: "action", action: "cycleAgentMode" })
}),
vscode.commands.registerCommand("kilo-code.new.cyclePreviousAgentMode", () => {
provider.postMessage({ type: "action", action: "cyclePreviousAgentMode" })
const tab = activeTabProvider()
if (tab) tab.postMessage({ type: "action", action: "cyclePreviousAgentMode" })
else provider.postMessage({ type: "action", action: "cyclePreviousAgentMode" })
agentManagerProvider.postMessage({ type: "action", action: "cyclePreviousAgentMode" })
}),
vscode.commands.registerCommand("kilo-code.new.profileButtonClicked", () => {
Expand Down
Loading