mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2026-05-31 00:55:28 +08:00
Run /compact command in chat instead of spawning terminal
The /compact command now executes through the chat interface using the existing Claude process, providing a seamless user experience instead of opening a separate terminal window. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1679,18 +1679,22 @@ const getScript = (isTelemetryEnabled: boolean) => `<script>
|
||||
function executeSlashCommand(command) {
|
||||
// Hide the modal
|
||||
hideSlashCommandsModal();
|
||||
|
||||
|
||||
// Clear the input since user selected a command
|
||||
messageInput.value = '';
|
||||
|
||||
// Send command to VS Code to execute in terminal
|
||||
|
||||
// Send command to VS Code to execute
|
||||
vscode.postMessage({
|
||||
type: 'executeSlashCommand',
|
||||
command: command
|
||||
});
|
||||
|
||||
// Show user feedback
|
||||
addMessage('user', \`Executing /\${command} command in terminal. Check the terminal output and return when ready.\`, 'assistant');
|
||||
|
||||
// Show user feedback - /compact runs in chat, others in terminal
|
||||
if (command === 'compact') {
|
||||
// No message needed - compact runs in chat and shows its own status
|
||||
} else {
|
||||
addMessage('user', \`Executing /\${command} command in terminal. Check the terminal output and return when ready.\`, 'assistant');
|
||||
}
|
||||
}
|
||||
|
||||
function handleCustomCommandKeydown(event) {
|
||||
|
||||
Reference in New Issue
Block a user