mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2025-12-16 17:09:37 +00:00
Improve terminal and UI experience
- Open all terminals in editor area (first column) instead of panel - Update login message to mention Claude plan (Pro/Max) and API key - Hide "Claude Code Chat" title when window is very small (<350px) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1148,7 +1148,10 @@ class ClaudeChatProvider {
|
|||||||
const claudePath = config.get<string>('wsl.claudePath', '/usr/local/bin/claude');
|
const claudePath = config.get<string>('wsl.claudePath', '/usr/local/bin/claude');
|
||||||
|
|
||||||
// Open terminal and run claude login
|
// Open terminal and run claude login
|
||||||
const terminal = vscode.window.createTerminal('Claude Login');
|
const terminal = vscode.window.createTerminal({
|
||||||
|
name: 'Claude Login',
|
||||||
|
location: { viewColumn: vscode.ViewColumn.One }
|
||||||
|
});
|
||||||
if (wslEnabled) {
|
if (wslEnabled) {
|
||||||
terminal.sendText(`wsl -d ${wslDistro} ${nodePath} --no-warnings --enable-source-maps ${claudePath}`);
|
terminal.sendText(`wsl -d ${wslDistro} ${nodePath} --no-warnings --enable-source-maps ${claudePath}`);
|
||||||
} else {
|
} else {
|
||||||
@@ -1158,14 +1161,14 @@ class ClaudeChatProvider {
|
|||||||
|
|
||||||
// Show info message
|
// Show info message
|
||||||
vscode.window.showInformationMessage(
|
vscode.window.showInformationMessage(
|
||||||
'Please login to Claude in the terminal, then come back to this chat to continue.',
|
'Please login with your Claude plan or API key in the terminal, then come back to this chat.',
|
||||||
'OK'
|
'OK'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Send message to UI about terminal
|
// Send message to UI about terminal
|
||||||
this._postMessage({
|
this._postMessage({
|
||||||
type: 'terminalOpened',
|
type: 'terminalOpened',
|
||||||
data: `Please login to Claude in the terminal, then come back to this chat to continue.`,
|
data: `Please login with your Claude plan or API key in the terminal, then come back to this chat.`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2684,7 +2687,10 @@ class ClaudeChatProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create terminal with the claude /model command
|
// Create terminal with the claude /model command
|
||||||
const terminal = vscode.window.createTerminal('Claude Model Selection');
|
const terminal = vscode.window.createTerminal({
|
||||||
|
name: 'Claude Model Selection',
|
||||||
|
location: { viewColumn: vscode.ViewColumn.One }
|
||||||
|
});
|
||||||
if (wslEnabled) {
|
if (wslEnabled) {
|
||||||
terminal.sendText(`wsl -d ${wslDistro} ${nodePath} --no-warnings --enable-source-maps ${claudePath} ${args.join(' ')}`);
|
terminal.sendText(`wsl -d ${wslDistro} ${nodePath} --no-warnings --enable-source-maps ${claudePath} ${args.join(' ')}`);
|
||||||
} else {
|
} else {
|
||||||
@@ -2708,7 +2714,7 @@ class ClaudeChatProvider {
|
|||||||
private _openUsageTerminal(usageType: string): void {
|
private _openUsageTerminal(usageType: string): void {
|
||||||
const terminal = vscode.window.createTerminal({
|
const terminal = vscode.window.createTerminal({
|
||||||
name: 'Claude Usage',
|
name: 'Claude Usage',
|
||||||
location: vscode.TerminalLocation.Editor
|
location: { viewColumn: vscode.ViewColumn.One }
|
||||||
});
|
});
|
||||||
|
|
||||||
if (usageType === 'plan') {
|
if (usageType === 'plan') {
|
||||||
@@ -2744,7 +2750,10 @@ class ClaudeChatProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create terminal with the claude command
|
// Create terminal with the claude command
|
||||||
const terminal = vscode.window.createTerminal(`Claude /${command}`);
|
const terminal = vscode.window.createTerminal({
|
||||||
|
name: `Claude /${command}`,
|
||||||
|
location: { viewColumn: vscode.ViewColumn.One }
|
||||||
|
});
|
||||||
if (wslEnabled) {
|
if (wslEnabled) {
|
||||||
terminal.sendText(`wsl -d ${wslDistro} ${nodePath} --no-warnings --enable-source-maps ${claudePath} ${args.join(' ')}`);
|
terminal.sendText(`wsl -d ${wslDistro} ${nodePath} --no-warnings --enable-source-maps ${claudePath} ${args.join(' ')}`);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2248,7 +2248,7 @@ const getScript = (isTelemetryEnabled: boolean) => `<script>
|
|||||||
|
|
||||||
case 'loginRequired':
|
case 'loginRequired':
|
||||||
sendStats('Login required');
|
sendStats('Login required');
|
||||||
addMessage('🔐 Login Required\\n\\nYour Claude API key is invalid or expired.\\nA terminal has been opened - please run the login process there.\\n\\nAfter logging in, come back to this chat to continue.', 'error');
|
addMessage('🔐 Login Required\\n\\nPlease login with your Claude plan (Pro/Max) or API key.\\nA terminal has been opened - follow the login process there.\\n\\nAfter logging in, come back to this chat to continue.', 'error');
|
||||||
updateStatus('Login Required', 'error');
|
updateStatus('Login Required', 'error');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ const styles = `
|
|||||||
letter-spacing: -0.3px;
|
letter-spacing: -0.3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 385px) {
|
||||||
|
.header h2 {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
|
|||||||
Reference in New Issue
Block a user