mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2025-12-14 15:39:37 +00:00
Show WSL alert for windows users
This commit is contained in:
@@ -228,6 +228,9 @@ class ClaudeChatProvider {
|
||||
case 'executeSlashCommand':
|
||||
this._executeSlashCommand(message.command);
|
||||
return;
|
||||
case 'dismissWSLAlert':
|
||||
this._dismissWSLAlert();
|
||||
return;
|
||||
}
|
||||
},
|
||||
null,
|
||||
@@ -265,6 +268,10 @@ class ClaudeChatProvider {
|
||||
type: 'modelSelected',
|
||||
model: this._selectedModel
|
||||
});
|
||||
|
||||
|
||||
// Send platform information to webview
|
||||
this._sendPlatformInfo();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@@ -917,6 +924,7 @@ class ClaudeChatProvider {
|
||||
|
||||
private async _saveCurrentConversation(): Promise<void> {
|
||||
if (!this._conversationsPath || this._currentConversation.length === 0) {return;}
|
||||
if(!this._currentSessionId) {return;}
|
||||
|
||||
try {
|
||||
// Create filename from first user message and timestamp
|
||||
@@ -1340,6 +1348,29 @@ class ClaudeChatProvider {
|
||||
});
|
||||
}
|
||||
|
||||
private _sendPlatformInfo() {
|
||||
const platform = process.platform;
|
||||
const dismissed = this._context.globalState.get<boolean>('wslAlertDismissed', false);
|
||||
|
||||
// Get WSL configuration
|
||||
const config = vscode.workspace.getConfiguration('claudeCodeChat');
|
||||
const wslEnabled = config.get<boolean>('wsl.enabled', false);
|
||||
|
||||
this._panel?.webview.postMessage({
|
||||
type: 'platformInfo',
|
||||
data: {
|
||||
platform: platform,
|
||||
isWindows: platform === 'win32',
|
||||
wslAlertDismissed: dismissed,
|
||||
wslEnabled: wslEnabled
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private _dismissWSLAlert() {
|
||||
this._context.globalState.update('wslAlertDismissed', true);
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
if (this._panel) {
|
||||
this._panel.dispose();
|
||||
|
||||
Reference in New Issue
Block a user