Files
cline-multi-mirror/src/core/controller/ui/openWalkthrough.ts
T
Bee 1530cfe034 Register commands and view to use centralized ExtensionRegistryInfo (#6153)
* Register commands and view to use centralized ExtensionRegistryInfo

Replace hardcoded package.json imports and string literals with a centralized
ExtensionRegistryInfo object that provides extension name and command
definitions. This improves maintainability and ensures consistency across
the codebase.

* update view id

* Fix environment variable serialization in vite config

Wrap all process.env values with JSON.stringify to ensure proper
string serialization and prevent undefined values from breaking
the build configuration.
2025-09-11 20:35:16 -07:00

27 lines
896 B
TypeScript

import type { EmptyRequest } from "@shared/proto/cline/common"
import { Empty } from "@shared/proto/cline/common"
import * as vscode from "vscode"
import { ExtensionRegistryInfo } from "@/registry"
import { telemetryService } from "@/services/telemetry"
import type { Controller } from "../index"
/**
* Opens the Cline walkthrough in VSCode
* @param controller The controller instance
* @param request Empty request
* @returns Empty response
*/
export async function openWalkthrough(_controller: Controller, _request: EmptyRequest): Promise<Empty> {
try {
await vscode.commands.executeCommand(
"workbench.action.openWalkthrough",
`saoudrizwan.${ExtensionRegistryInfo.name}#ClineWalkthrough`,
)
telemetryService.captureButtonClick("webview_openWalkthrough")
return Empty.create({})
} catch (error) {
console.error(`Failed to open walkthrough: ${error}`)
throw error
}
}