1.2 KiB
1.2 KiB
SDK Adapter
The VSCode extension runs on the Cline SDK (@cline/core, @cline/llms,
@cline/shared) through an adapter layer in apps/vscode/src/sdk/. The
webview still talks gRPC; the adapter translates between gRPC handlers and SDK
calls. See apps/vscode/src/dev/debug-harness/README.md for the debug harness.
Conventions
- Look up SDK APIs, don't guess. Use
kb_search(name="sdk", query="...")before implementing against an SDK surface. - Reference the pre-SDK implementation when replacing a module. Add a
// Replaces classic src/core/... (see origin/main)header and usekb_search(name="cline", commit="origin/main")orgit show origin/main:pathto consult the prior implementation. - Single entry point. There is one codepath — the SDK adapter. No
CLINE_SDKenv flag. - Use
{appBaseUrl}, never hardcodeapp.cline.bot. - Avoid
ascasts. Use explicit conversion functions with tests. The branded types inapps/vscode/src/sdk/model-catalog/contracts.tsexist so casts are unnecessary outside parse/compute boundaries.
Debug harness
- Dismiss the Kanban/promo overlay before any debug harness interaction.
- Use the command palette to navigate tabs in the debug harness.