-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture Layers
YarCraSy edited this page Jul 8, 2026
·
2 revisions
Contains shared types and stable contracts:
-
chat.ts: chat messages, request/response types, streaming chunks, and system prompt helpers. -
config.ts:AppConfig, defaults, and DeepSeek-only configuration types. -
message.ts: webview-handler contract. -
models.ts: DeepSeek models and reasoning options.
This layer must not depend on React, VS Code, or HTTP.
Contains pure tool logic:
- tool registry.
- execution and validation.
- danger analysis.
-
ToolWorkspaceinterface for workspace access without importingvscode.
Main rule: core must not import vscode.
Contains DeepSeek integration:
- DeepSeek provider.
- chat/FIM requests.
- SSE streaming.
- tool-call requests and parsing.
- API types and errors.
It should not contain UI logic or direct VS Code manipulation.
Contains technical persistence:
-
SettingsManager: global extension settings. -
SecretsManager: API key inSecretStorage. -
HistoryManager: conversations inglobalState.
Contains concrete VS Code adapters:
- activation and commands.
-
WebviewProvider. -
DropZoneProvider. - message handlers.
- filesystem/workspace/terminal implementation for tools.
Contains the React webview:
- Chat, History, and Settings views.
- messaging hooks.
- rendering for streaming, tool results, and confirmations.
- Vite build to
dist/webview.