Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion .github/workflows/marketplace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ jobs:
npm run vsix
package=$(unzip -l bin/roo-cline-${current_package_version}.vsix)
echo "$package"
echo "$package" | grep -q "dist/extension.js" || exit 1
echo "$package" | grep -q "extension/dist/package.json" || exit 1
echo "$package" | grep -q "extension/dist/package.nls.json" || exit 1
echo "$package" | grep -q "extension/dist/extension.js" || exit 1
echo "$package" | grep -q "extension/webview-ui/audio/celebration.wav" || exit 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional checks to ensure we're building the vsix correctly. We recently changed the location of the audio directory. I'd like to come up with a better solution for ensuring certain build artifacts are always present. You can end up breaking things if you add something without realizing that .vscodeignore disallows it.

echo "$package" | grep -q "extension/webview-ui/build/assets/index.js" || exit 1
echo "$package" | grep -q "extension/node_modules/@vscode/codicons/dist/codicon.ttf" || exit 1
echo "$package" | grep -q ".env" || exit 1
Expand Down
11 changes: 4 additions & 7 deletions evals/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ build_extension() {
echo "🔨 Building the Roo Code extension..."
cd ..
mkdir -p bin
npm run install-extension -- --silent --no-audit || exit 1
npm run install-webview -- --silent --no-audit || exit 1
npm run install-e2e -- --silent --no-audit || exit 1
npx vsce package --out bin/roo-code-latest.vsix || exit 1
code --install-extension bin/roo-code-latest.vsix || exit 1
pnpm build --out ../bin/roo-code-$(git rev-parse --short HEAD).vsix || exit 1
code --install-extension bin/roo-code-$(git rev-parse --short HEAD).vsix || exit 1
cd evals
}

Expand Down Expand Up @@ -293,8 +290,8 @@ code --install-extension redhat.java &>/dev/null || exit 1
code --install-extension ms-python.python&>/dev/null || exit 1
code --install-extension rust-lang.rust-analyzer &>/dev/null || exit 1

if ! code --list-extensions 2>/dev/null | grep -q "rooveterinaryinc.roo-cline"; then
code --install-extension rooveterinaryinc.roo-cline &>/dev/null || exit 1
if ! code --list-extensions 2>/dev/null | grep -q "RooVeterinaryInc.roo-cline"; then
code --install-extension RooVeterinaryInc.roo-cline &>/dev/null || exit 1
fi

echo "✅ Done"
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@
],
"main": "./dist/extension.js",
"contributes": {
"submenus": [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this below menus, which makes more sense to me.

{
"id": "roo-code.contextMenu",
"label": "%views.contextMenu.label%"
},
{
"id": "roo-code.terminalMenu",
"label": "%views.terminalMenu.label%"
}
],
"viewsContainers": {
"activitybar": [
{
Expand Down Expand Up @@ -166,19 +156,19 @@
"category": "%configuration.title%"
},
{
"command": "roo.acceptInput",
"command": "roo-cline.acceptInput",
"title": "%command.acceptInput.title%",
"category": "%configuration.title%"
}
],
"menus": {
"editor/context": [
{
"submenu": "roo-code.contextMenu",
"submenu": "roo-cline.contextMenu",
"group": "navigation"
}
],
"roo-code.contextMenu": [
"roo-cline.contextMenu": [
{
"command": "roo-cline.addToContext",
"group": "1_actions@1"
Expand All @@ -194,11 +184,11 @@
],
"terminal/context": [
{
"submenu": "roo-code.terminalMenu",
"submenu": "roo-cline.terminalMenu",
"group": "navigation"
}
],
"roo-code.terminalMenu": [
"roo-cline.terminalMenu": [
{
"command": "roo-cline.terminalAddToContext",
"group": "1_actions@1"
Expand Down Expand Up @@ -277,6 +267,16 @@
}
]
},
"submenus": [
{
"id": "roo-cline.contextMenu",
"label": "%views.contextMenu.label%"
},
{
"id": "roo-cline.terminalMenu",
"label": "%views.terminalMenu.label%"
}
],
"configuration": {
"title": "%configuration.title%",
"properties": {
Expand Down
1 change: 1 addition & 0 deletions src/exports/roo-code.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,7 @@ declare const Package: {
readonly publisher: string
readonly name: string
readonly version: string
readonly outputChannel: string
}
/**
* ProviderName
Expand Down
11 changes: 4 additions & 7 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ let extensionContext: vscode.ExtensionContext
// Your extension is activated the very first time the command is executed.
export async function activate(context: vscode.ExtensionContext) {
extensionContext = context
outputChannel = vscode.window.createOutputChannel("Roo-Code")
outputChannel = vscode.window.createOutputChannel(Package.outputChannel)
context.subscriptions.push(outputChannel)
outputChannel.appendLine("Roo-Code extension activated")
outputChannel.appendLine(`${Package.name} extension activated`)

// Migrate old settings to new
await migrateSettings(context, outputChannel)
Expand Down Expand Up @@ -147,13 +147,10 @@ export async function activate(context: vscode.ExtensionContext) {
return new API(outputChannel, provider, socketPath, enableLogging)
}

// This method is called when your extension is deactivated
// This method is called when your extension is deactivated.
export async function deactivate() {
outputChannel.appendLine("Roo-Code extension deactivated")
// Clean up MCP server manager
outputChannel.appendLine(`${Package.name} extension deactivated`)
await McpServerManager.cleanup(extensionContext)
telemetryService.shutdown()

// Clean up terminal handlers
TerminalRegistry.cleanup()
}
13 changes: 10 additions & 3 deletions src/schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ import { Equals, Keys, AssertEqual } from "../utils/type-fu"

import { publisher, name, version } from "../../package.json"

// These ENV variables can be defined by ESBuild when building the extension
// in order to override the values in package.json. This allows us built
// different extension variants with the same package.json file.
// The build process still needs to emit a modified package.json for consumption
// by VSCode, but that build artifact is not used during the transpile step of
// the build, so we still need this override mechanism.
export const Package = {
publisher,
name,
version,
publisher: process.env.PKG_PUBLISHER || publisher,
name: process.env.PKG_NAME || name,
version: process.env.PKG_VERSION || version,
outputChannel: process.env.PKG_OUTPUT_CHANNEL || "Roo-Code",
} as const

/**
Expand Down