refactor: remove hotreload code

This commit is contained in:
Catriel Müller
2026-02-16 18:16:26 -03:00
parent 0eb2da613b
commit f4ee1308d8
+20
View File
@@ -1,4 +1,6 @@
import * as vscode from "vscode"
import * as fs from "fs"
import * as path from "path"
import { KiloProvider } from "./KiloProvider"
import { AgentManagerProvider } from "./AgentManagerProvider"
import { EXTENSION_DISPLAY_NAME } from "./constants"
@@ -9,6 +11,24 @@ import { BrowserAutomationService } from "./services/browser-automation"
export function activate(context: vscode.ExtensionContext) {
console.log("Kilo Code extension is now active")
// kilocode_change - ensure VS Code directories exist to prevent ENOENT errors during webview hot reload
// VS Code 1.109+ checks for these directories during webview initialization
try {
const userConfigPath = path.join(context.globalStorageUri.fsPath, "..", "..", "..", "User")
fs.mkdirSync(path.join(userConfigPath, "prompts"), { recursive: true })
// Also create .github/agents in workspace roots to prevent workspace-specific ENOENT
const workspaceFolders = vscode.workspace.workspaceFolders
if (workspaceFolders) {
for (const folder of workspaceFolders) {
const agentsPath = path.join(folder.uri.fsPath, ".github", "agents")
fs.mkdirSync(agentsPath, { recursive: true })
}
}
} catch {
// Ignore errors (e.g., permissions, already exists)
}
// Create shared connection service (one server for all webviews)
const connectionService = new KiloConnectionService(context)