1.26.0 • Published 10 months ago

@roo-code/types v1.26.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Roo Code API

The Roo Code extension exposes an API that can be used by other extensions. To use this API in your extension:

  1. Install @roo-code/types with npm, pnpm, or yarn.
  2. Import the RooCodeAPI type.
  3. Load the extension API.
import { RooCodeAPI } from "@roo-code/types"

const extension = vscode.extensions.getExtension<RooCodeAPI>("RooVeterinaryInc.roo-cline")

if (!extension?.isActive) {
	throw new Error("Extension is not activated")
}

const api = extension.exports

if (!api) {
	throw new Error("API is not available")
}

// Start a new task with an initial message.
await api.startNewTask("Hello, Roo Code API! Let's make a new project...")

// Start a new task with an initial message and images.
await api.startNewTask("Use this design language", ["data:image/webp;base64,..."])

// Send a message to the current task.
await api.sendMessage("Can you fix the @problems?")

// Simulate pressing the primary button in the chat interface (e.g. 'Save' or 'Proceed While Running').
await api.pressPrimaryButton()

// Simulate pressing the secondary button in the chat interface (e.g. 'Reject').
await api.pressSecondaryButton()

NOTE: To ensure that the RooVeterinaryInc.roo-cline extension is activated before your extension, add it to the extensionDependencies in your package.json:

"extensionDependencies": ["RooVeterinaryInc.roo-cline"]

For detailed information on the available methods and their usage, refer to the roo-code.d.ts file.

1.26.0

10 months ago

1.25.0

10 months ago

1.24.0

10 months ago

1.23.0

11 months ago

1.22.0

11 months ago

1.21.0

11 months ago

1.20.0

11 months ago

1.19.0

11 months ago

1.18.0

11 months ago

1.17.0

11 months ago

1.16.0

11 months ago

1.15.0

11 months ago

1.14.0

11 months ago

1.13.0

11 months ago

1.12.0

11 months ago

1.11.0

11 months ago

1.10.0

11 months ago

1.9.0

11 months ago

1.8.0

11 months ago

1.7.0

11 months ago

1.6.0

11 months ago

1.5.0

11 months ago

1.4.0

11 months ago

1.3.0

11 months ago

1.2.0

11 months ago